PageSourceSearch

https://salesforcesage.com/assets/index-tbOJazYY.js

js salesforcesage.com collected 2026-10-02 01:42:30 UTC 1,529,951 bytes, 944 lines download raw bytes

vendor: 4,338 bytes, lines 1-9
1var EA=e=>{throw TypeError(e)};var JV=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ub=(e,t,n)=>t.has(e)||EA("Cannot "+n);var M=(e,t,n)=>(Ub(e,t,"read from private field"),n?n.call(e):t.get(e)),_e=(e,t,n)=>t.has(e)?EA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pe=(e,t,n,r)=>(Ub(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),tt=(e,t,n)=>(Ub(e,t,"access private method"),n);var Pm=(e,t,n,r)=>({set _(s){pe(e,t,s,n)},get _(){return M(e,t,r)}});var XTe=JV((ps,ms)=>{function XV(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(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=n(s);fetch(s.href,i)}})();var Dm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var HI={exports:{}},C0={},GI={exports:{}},lt={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Xp=Symbol.for("react.element"),ZV=Symbol.for("react.portal"),e8=Symbol.for("react.fragment"),t8=Symbol.for("react.strict_mode"),n8=Symbol.for("react.profiler"),r8=Symbol.for("react.provider"),s8=Symbol.for("react.context"),i8=Symbol.for("react.forward_ref"),o8=Symbol.for("react.suspense"),a8=Symbol.for("react.memo"),l8=Symbol.for("react.lazy"),NA=Symbol.iterator;function c8(e){return e===null||typeof e!="object"?null:(e=NA&&e[NA]||e["@@iterator"],typeof e=="function"?e:null)}var KI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qI=Object.assign,YI={};function Hd(e,t,n){this.props=e,this.context=t,this.refs=YI,this.updater=n||KI}Hd.prototype.isReactComponent={};Hd.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Hd.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function QI(){}QI.prototype=Hd.prototype;function ON(e,t,n){this.props=e,this.context=t,this.refs=YI,this.updater=n||KI}var RN=ON.prototype=new QI;RN.constructor=ON;qI(RN,Hd.prototype);RN.isPureReactComponent=!0;var kA=Array.isArray,JI=Object.prototype.hasOwnProperty,_N={current:null},XI={key:!0,ref:!0,__self:!0,__source:!0};function ZI(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)JI.call(t,r)&&!XI.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Xp,type:e,key:i,ref:o,props:s,_owner:_N.current}}function u8(e,t){return{$$typeof:Xp,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function IN(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xp}function d8(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var CA=/\/+/g;function zb(e,t){return typeof e=="object"&&e!==null&&e.key!=null?d8(""+e.key):t.toString(36)}
vendor: 4,788 bytes, lines 9-17
9function Ug(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Xp:case ZV:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+zb(o,0):r,kA(s)?(n="",e!=null&&(n=e.replace(CA,"$&/")+"/"),Ug(s,t,n,"",function(u){return u})):s!=null&&(IN(s)&&(s=u8(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(CA,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",kA(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+zb(i,l);o+=Ug(i,t,n,c,s)}else if(c=c8(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+zb(i,l++),o+=Ug(i,t,n,c,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function $m(e,t,n){if(e==null)return e;var r=[],s=0;return Ug(e,r,"","",function(i){return t.call(n,i,s++)}),r}function h8(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Dr={current:null},zg={transition:null},f8={ReactCurrentDispatcher:Dr,ReactCurrentBatchConfig:zg,ReactCurrentOwner:_N};function eM(){throw Error("act(...) is not supported in production builds of React.")}lt.Children={map:$m,forEach:function(e,t,n){$m(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return $m(e,function(){t++}),t},toArray:function(e){return $m(e,function(t){return t})||[]},only:function(e){if(!IN(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};lt.Component=Hd;lt.Fragment=e8;lt.Profiler=n8;lt.PureComponent=ON;lt.StrictMode=t8;lt.Suspense=o8;lt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f8;lt.act=eM;lt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=qI({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=_N.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)JI.call(t,c)&&!XI.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Xp,type:e.type,key:s,ref:i,props:r,_owner:o}};lt.createContext=function(e){return e={$$typeof:s8,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:r8,_context:e},e.Consumer=e};lt.createElement=ZI;lt.createFactory=function(e){var t=ZI.bind(null,e);return t.type=e,t};lt.createRef=function(){return{current:null}};lt.forwardRef=function(e){return{$$typeof:i8,render:e}};lt.isValidElement=IN;lt.lazy=function(e){return{$$typeof:l8,_payload:{_status:-1,_result:e},_init:h8}};lt.memo=function(e,t){return{$$typeof:a8,type:e,compare:t===void 0?null:t}};lt.startTransition=function(e){var t=zg.transition;zg.transition={};try{e()}finally{zg.transition=t}};lt.unstable_act=eM;lt.useCallback=function(e,t){return Dr.current.useCallback(e,t)};lt.useContext=function(e){return Dr.current.useContext(e)};lt.useDebugValue=function(){};lt.useDeferredValue=function(e){return Dr.current.useDeferredValue(e)};lt.useEffect=function(e,t){return Dr.current.useEffect(e,t)};lt.useId=function(){return Dr.current.useId()};lt.useImperativeHandle=function(e,t,n){return Dr.current.useImperativeHandle(e,t,n)};lt.useInsertionEffect=function(e,t){return Dr.current.useInsertionEffect(e,t)};lt.useLayoutEffect=function(e,t){return Dr.current.useLayoutEffect(e,t)};lt.useMemo=function(e,t){return Dr.current.useMemo(e,t)};lt.useReducer=function(e,t,n){return Dr.current.useReducer(e,t,n)};lt.useRef=function(e){return Dr.current.useRef(e)};lt.useState=function(e){return Dr.current.useState(e)};lt.useSyncExternalStore=function(e,t,n){return Dr.current.useSyncExternalStore(e,t,n)};lt.useTransition=function(){return Dr.current.useTransition()};lt.version="18.3.1";GI.exports=lt;var v=GI.exports;const Le=Jp(v),Ff=XV({__proto__:null,default:Le},[v]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var p8=v,m8=Symbol.for("react.element"),g8=Symbol.for("react.fragment"),y8=Object.prototype.hasOwnProperty,x8=p8.__SECRET_INT
vendor: 11,418 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v8={key:!0,ref:!0,__self:!0,__source:!0};function tM(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)y8.call(t,r)&&!v8.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:m8,type:e,key:i,ref:o,props:s,_owner:x8.current}}C0.Fragment=g8;C0.jsx=tM;C0.jsxs=tM;HI.exports=C0;var a=HI.exports,nM={exports:{}},Cs={},rM={exports:{}},sM={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(P,D){var q=P.length;P.push(D);e:for(;0<q;){var Q=q-1>>>1,F=P[Q];if(0<s(F,D))P[Q]=D,P[q]=F,q=Q;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var D=P[0],q=P.pop();if(q!==D){P[0]=q;e:for(var Q=0,F=P.length,ge=F>>>1;Q<ge;){var Ve=2*(Q+1)-1,He=P[Ve],Fe=Ve+1,le=P[Fe];if(0>s(He,q))Fe<F&&0>s(le,He)?(P[Q]=le,P[Fe]=q,Q=Fe):(P[Q]=He,P[Ve]=q,Q=Ve);else if(Fe<F&&0>s(le,q))P[Q]=le,P[Fe]=q,Q=Fe;else break e}}return D}function s(P,D){var q=P.sortIndex-D.sortIndex;return q!==0?q:P.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(P){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=P)r(u),D.sortIndex=D.expirationTime,t(c,D);else break;D=n(u)}}function E(P){if(g=!1,w(P),!m)if(n(c)!==null)m=!0,U(N);else{var D=n(u);D!==null&&V(E,D.startTime-P)}}function N(P,D){m=!1,g&&(g=!1,y(T),T=-1),p=!0;var q=f;try{for(w(D),h=n(c);h!==null&&(!(h.expirationTime>D)||P&&!R());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,f=h.priorityLevel;var F=Q(h.expirationTime<=D);D=e.unstable_now(),typeof F=="function"?h.callback=F:h===n(c)&&r(c),w(D)}else r(c);h=n(c)}if(h!==null)var ge=!0;else{var Ve=n(u);Ve!==null&&V(E,Ve.startTime-D),ge=!1}return ge}finally{h=null,f=q,p=!1}}var k=!1,C=null,T=-1,j=5,S=-1;function R(){return!(e.unstable_now()-S<j)}function _(){if(C!==null){var P=e.unstable_now();S=P;var D=!0;try{D=C(!0,P)}finally{D?L():(k=!1,C=null)}}else k=!1}var L;if(typeof b=="function")L=function(){b(_)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,B=A.port2;A.port1.onmessage=_,L=function(){B.postMessage(null)}}else L=function(){x(_,0)};function U(P){C=P,k||(k=!0,L())}function V(P,D){T=x(function(){P(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,U(N))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(P){switch(f){case 1:case 2:case 3:var D=3;break;default:D=f}var q=f;f=D;try{return P()}finally{f=q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,D){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var q=f;f=P;try{return D()}finally{f=q}},e.unstable_scheduleCallback=function(P,D,q){var Q=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?Q+q:Q):q=Q,P){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=q+F,P={id:d++,callback:D,priorityLevel:P,startTime:q,expirationTime:F,sortIndex:-1},q>Q?(P.sortIndex=q,t(u,P),n(c)===null&&P===n(u)&&(g?(y(T),T=-1):g=!0,V(E,q-Q))):(P.sortIndex=F,t(c,P),m||p||(m=!0,U(N))),P},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(P){var D=f;return function(){var q=f;f=D;try{return P.apply(this,arguments)}finally{f=q}}}})(sM);rM.exports=sM;var b8=rM.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var w8=v,ws=b8;function Z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var iM=new Set,Bf={};function Gc(e,t){xd(e,t),xd(e+"Capture",t)}function xd(e,t){for(Bf[e]=t,e=0;e<t.length;e++)iM.add(t[e])}var qo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kw=Object.prototype.hasOwnProperty,S8=/^[: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]*$/,TA={},AA={};function E8(e){return kw.call(AA,e)?!0:kw.call(TA,e)?!1:S8.test(e)?AA[e]=!0:(TA[e]=!0,!1)}function N8(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function k8(e,t,n,r){if(t===null||typeof t>"u"||N8(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function $r(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var or={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){or[e]=new $r(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];or[t]=new $r(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){or[e]=new $r(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){or[e]=new $r(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){or[e]=new $r(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){or[e]=new $r(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){or[e]=new $r(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){or[e]=new $r(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){or[e]=new $r(e,5,!1,e.toLowerCase(),null,!1,!1)});var MN=/[\-:]([a-z])/g;function LN(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(MN,LN);or[t]=new $r(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(MN,LN);or[t]=new $r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(MN,LN);or[t]=new $r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){or[e]=new $r(e,1,!1,e.toLowerCase(),null,!1,!1)});or.xlinkHref=new $r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){or[e]=new $r(e,1,!1,e.toLowerCase(),null,!0,!0)});function PN(e,t,n,r){var s=or.hasOwnProperty(t)?or[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(k8(t,n,s,r)&&(n=null),r||s===null?E8(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var aa=w8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fm=Symbol.for("react.element"),ku=Symbol.for("react.portal"),Cu=Symbol.for("react.fragment"),DN=Symbol.for("react.strict_mode"),Cw=Symbol.for("react.profiler"),oM=Symbol.for("react.provider"),aM=Symbol.for("react.context"),$N=Symbol.for("react.forward_ref"),Tw=Symbol.for("react.suspense"),Aw=Symbol.for("react.suspense_list"),FN=Symbol.for("react.memo"),wa=Symbol.for("react.lazy"),lM=Symbol.for("react.offscreen"),jA=Symbol.iterator;function gh(e){return e===null||typeof e!="object"?null:(e=jA&&e[jA]||e["@@iterator"],typeof e=="function"?e:null)}var rn=Object.assign,Vb;function Bh(e){if(Vb===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Vb=t&&t[1]||""}return`
34`+Vb+e}var Wb=!1;function Hb(e,t){if(!e||Wb)return"";Wb=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 4,643 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=r.stack.split(`
36`),o=s.length-1,l=i.length-1;1<=o&&0<=l&&s[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==i[l]){var c=`
37`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{Wb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bh(e):""}function C8(e){switch(e.tag){case 5:return Bh(e.type);case 16:return Bh("Lazy");case 13:return Bh("Suspense");case 19:return Bh("SuspenseList");case 0:case 2:case 15:return e=Hb(e.type,!1),e;case 11:return e=Hb(e.type.render,!1),e;case 1:return e=Hb(e.type,!0),e;default:return""}}function jw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Cu:return"Fragment";case ku:return"Portal";case Cw:return"Profiler";case DN:return"StrictMode";case Tw:return"Suspense";case Aw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case aM:return(e.displayName||"Context")+".Consumer";case oM:return(e._context.displayName||"Context")+".Provider";case $N:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case FN:return t=e.displayName||null,t!==null?t:jw(e.type)||"Memo";case wa:t=e._payload,e=e._init;try{return jw(e(t))}catch{}}return null}function T8(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return jw(t);case 8:return t===DN?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ml(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function A8(e){var t=cM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bm(e){e._valueTracker||(e._valueTracker=A8(e))}function uM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=cM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Cy(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ow(e,t){var n=t.checked;return rn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function OA(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ml(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function dM(e,t){t=t.checked,t!=null&&PN(e,"checked",t,!1)}function Rw(e,t){dM(e,t);var n=ml(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?_w(e,t.type,n):t.hasOwnProperty("defaultValue")&&_w(e,t.type,ml(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function RA(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}
vendor: 10,954 bytes, line 37
37function _w(e,t,n){(t!=="number"||Cy(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Uh=Array.isArray;function Bu(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ml(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Iw(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Z(91));return rn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _A(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Z(92));if(Uh(n)){if(1<n.length)throw Error(Z(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ml(n)}}function hM(e,t){var n=ml(t.value),r=ml(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function IA(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function fM(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Mw(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?fM(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Um,pM=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Um=Um||document.createElement("div"),Um.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Um.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Uf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},j8=["Webkit","ms","Moz","O"];Object.keys(cf).forEach(function(e){j8.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cf[t]=cf[e]})});function mM(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cf.hasOwnProperty(e)&&cf[e]?(""+t).trim():t+"px"}function gM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=mM(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var O8=rn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Lw(e,t){if(t){if(O8[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Z(62))}}function Pw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Dw=null;function BN(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $w=null,Uu=null,zu=null;function MA(e){if(e=tm(e)){if(typeof $w!="function")throw Error(Z(280));var t=e.stateNode;t&&(t=R0(t),$w(e.stateNode,e.type,t))}}function yM(e){Uu?zu?zu.push(e):zu=[e]:Uu=e}function xM(){if(Uu){var e=Uu,t=zu;if(zu=Uu=null,MA(e),t)for(e=0;e<t.length;e++)MA(t[e])}}function vM(e,t){return e(t)}function bM(){}var Gb=!1;function wM(e,t,n){if(Gb)return e(t,n);Gb=!0;try{return vM(e,t,n)}finally{Gb=!1,(Uu!==null||zu!==null)&&(bM(),xM())}}function zf(e,t){var n=e.stateNode;if(n===null)return null;var r=R0(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Z(231,t,typeof n));return n}var Fw=!1;if(qo)try{var yh={};Object.defineProperty(yh,"passive",{get:function(){Fw=!0}}),window.addEventListener("test",yh,yh),window.removeEventListener("test",yh,yh)}catch{Fw=!1}function R8(e,t,n,r,s,i,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var uf=!1,Ty=null,Ay=!1,Bw=null,_8={onError:function(e){uf=!0,Ty=e}};function I8(e,t,n,r,s,i,o,l,c){uf=!1,Ty=null,R8.apply(_8,arguments)}function M8(e,t,n,r,s,i,o,l,c){if(I8.apply(this,arguments),uf){if(uf){var u=Ty;uf=!1,Ty=null}else throw Error(Z(198));Ay||(Ay=!0,Bw=u)}}function Kc(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function SM(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function LA(e){if(Kc(e)!==e)throw Error(Z(188))}function L8(e){var t=e.alternate;if(!t){if(t=Kc(e),t===null)throw Error(Z(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return LA(s),e;if(i===r)return LA(s),t;i=i.sibling}throw Error(Z(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o)throw Error(Z(189))}}if(n.alternate!==r)throw Error(Z(190))}if(n.tag!==3)throw Error(Z(188));return n.stateNode.current===n?e:t}function EM(e){return e=L8(e),e!==null?NM(e):null}function NM(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=NM(e);if(t!==null)return t;e=e.sibling}return null}var kM=ws.unstable_scheduleCallback,PA=ws.unstable_cancelCallback,P8=ws.unstable_shouldYield,D8=ws.unstable_requestPaint,xn=ws.unstable_now,$8=ws.unstable_getCurrentPriorityLevel,UN=ws.unstable_ImmediatePriority,CM=ws.unstable_UserBlockingPriority,jy=ws.unstable_NormalPriority,F8=ws.unstable_LowPriority,TM=ws.unstable_IdlePriority,T0=null,ro=null;function B8(e){if(ro&&typeof ro.onCommitFiberRoot=="function")try{ro.onCommitFiberRoot(T0,e,void 0,(e.current.flags&128)===128)}catch{}}var gi=Math.clz32?Math.clz32:V8,U8=Math.log,z8=Math.LN2;function V8(e){return e>>>=0,e===0?32:31-(U8(e)/z8|0)|0}var zm=64,Vm=4194304;function zh(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Oy(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=zh(l):(i&=o,i!==0&&(r=zh(i)))}else o=n&~s,o!==0?r=zh(o):i!==0&&(r=zh(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-gi(t),s=1<<n,r|=e[n],t&=~s;return r}function W8(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function H8(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-gi(i),l=1<<o,c=s[o];c===-1?(!(l&n)||l&r)&&(s[o]=W8(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function Uw(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function AM(){var e=zm;return zm<<=1,!(zm&4194240)&&(zm=64),e}function Kb(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zp(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gi(t),e[t]=n}function G8(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-gi(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function zN(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gi(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Nt=0;function jM(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var OM,VN,RM,_M,IM,zw=!1,Wm=[],Qa=null,Ja=null,Xa=null,Vf=new Map,Wf=new Map,Ca=[],K8="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function DA(e,t){switch(e){case"focusin":case"focusout":Qa=null;break;case"dragenter":case"dragleave":Ja=null;break;case"mouseover":case"mouseout":Xa=null;break;case"pointerover":case"pointerout":Vf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wf.delete(t.pointerId)}}function xh(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=tm(t),t!==null&&VN(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 12,981 bytes, line 37
37function q8(e,t,n,r,s){switch(t){case"focusin":return Qa=xh(Qa,e,t,n,r,s),!0;case"dragenter":return Ja=xh(Ja,e,t,n,r,s),!0;case"mouseover":return Xa=xh(Xa,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Vf.set(i,xh(Vf.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Wf.set(i,xh(Wf.get(i)||null,e,t,n,r,s)),!0}return!1}function MM(e){var t=Kl(e.target);if(t!==null){var n=Kc(t);if(n!==null){if(t=n.tag,t===13){if(t=SM(n),t!==null){e.blockedOn=t,IM(e.priority,function(){RM(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Vg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vw(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Dw=r,n.target.dispatchEvent(r),Dw=null}else return t=tm(n),t!==null&&VN(t),e.blockedOn=n,!1;t.shift()}return!0}function $A(e,t,n){Vg(e)&&n.delete(t)}function Y8(){zw=!1,Qa!==null&&Vg(Qa)&&(Qa=null),Ja!==null&&Vg(Ja)&&(Ja=null),Xa!==null&&Vg(Xa)&&(Xa=null),Vf.forEach($A),Wf.forEach($A)}function vh(e,t){e.blockedOn===t&&(e.blockedOn=null,zw||(zw=!0,ws.unstable_scheduleCallback(ws.unstable_NormalPriority,Y8)))}function Hf(e){function t(s){return vh(s,e)}if(0<Wm.length){vh(Wm[0],e);for(var n=1;n<Wm.length;n++){var r=Wm[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Qa!==null&&vh(Qa,e),Ja!==null&&vh(Ja,e),Xa!==null&&vh(Xa,e),Vf.forEach(t),Wf.forEach(t),n=0;n<Ca.length;n++)r=Ca[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ca.length&&(n=Ca[0],n.blockedOn===null);)MM(n),n.blockedOn===null&&Ca.shift()}var Vu=aa.ReactCurrentBatchConfig,Ry=!0;function Q8(e,t,n,r){var s=Nt,i=Vu.transition;Vu.transition=null;try{Nt=1,WN(e,t,n,r)}finally{Nt=s,Vu.transition=i}}function J8(e,t,n,r){var s=Nt,i=Vu.transition;Vu.transition=null;try{Nt=4,WN(e,t,n,r)}finally{Nt=s,Vu.transition=i}}function WN(e,t,n,r){if(Ry){var s=Vw(e,t,n,r);if(s===null)r1(e,t,r,_y,n),DA(e,r);else if(q8(s,e,t,n,r))r.stopPropagation();else if(DA(e,r),t&4&&-1<K8.indexOf(e)){for(;s!==null;){var i=tm(s);if(i!==null&&OM(i),i=Vw(e,t,n,r),i===null&&r1(e,t,r,_y,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else r1(e,t,r,null,n)}}var _y=null;function Vw(e,t,n,r){if(_y=null,e=BN(r),e=Kl(e),e!==null)if(t=Kc(e),t===null)e=null;else if(n=t.tag,n===13){if(e=SM(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return _y=e,null}function LM(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch($8()){case UN:return 1;case CM:return 4;case jy:case F8:return 16;case TM:return 536870912;default:return 16}default:return 16}}var Ua=null,HN=null,Wg=null;function PM(){if(Wg)return Wg;var e,t=HN,n=t.length,r,s="value"in Ua?Ua.value:Ua.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Wg=s.slice(e,1<r?1-r:void 0)}function Hg(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Hm(){return!0}function FA(){return!1}function Ts(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Hm:FA,this.isPropagationStopped=FA,this}return rn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Hm)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Hm)},persist:function(){},isPersistent:Hm}),t}var Gd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},GN=Ts(Gd),em=rn({},Gd,{view:0,detail:0}),X8=Ts(em),qb,Yb,bh,A0=rn({},em,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:KN,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==bh&&(bh&&e.type==="mousemove"?(qb=e.screenX-bh.screenX,Yb=e.screenY-bh.screenY):Yb=qb=0,bh=e),qb)},movementY:function(e){return"movementY"in e?e.movementY:Yb}}),BA=Ts(A0),Z8=rn({},A0,{dataTransfer:0}),e9=Ts(Z8),t9=rn({},em,{relatedTarget:0}),Qb=Ts(t9),n9=rn({},Gd,{animationName:0,elapsedTime:0,pseudoElement:0}),r9=Ts(n9),s9=rn({},Gd,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),i9=Ts(s9),o9=rn({},Gd,{data:0}),UA=Ts(o9),a9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},l9={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"},c9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function u9(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=c9[e])?!!t[e]:!1}function KN(){return u9}var d9=rn({},em,{key:function(e){if(e.key){var t=a9[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?l9[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:KN,charCode:function(e){return e.type==="keypress"?Hg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),h9=Ts(d9),f9=rn({},A0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zA=Ts(f9),p9=rn({},em,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:KN}),m9=Ts(p9),g9=rn({},Gd,{propertyName:0,elapsedTime:0,pseudoElement:0}),y9=Ts(g9),x9=rn({},A0,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),v9=Ts(x9),b9=[9,13,27,32],qN=qo&&"CompositionEvent"in window,df=null;qo&&"documentMode"in document&&(df=document.documentMode);var w9=qo&&"TextEvent"in window&&!df,DM=qo&&(!qN||df&&8<df&&11>=df),VA=" ",WA=!1;function $M(e,t){switch(e){case"keyup":return b9.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tu=!1;function S9(e,t){switch(e){case"compositionend":return FM(t);case"keypress":return t.which!==32?null:(WA=!0,VA);case"textInput":return e=t.data,e===VA&&WA?null:e;default:return null}}function E9(e,t){if(Tu)return e==="compositionend"||!qN&&$M(e,t)?(e=PM(),Wg=HN=Ua=null,Tu=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return DM&&t.locale!=="ko"?null:t.data;default:return null}}var N9={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 HA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!N9[e.type]:t==="textarea"}function BM(e,t,n,r){yM(r),t=Iy(t,"onChange"),0<t.length&&(n=new GN("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hf=null,Gf=null;function k9(e){JM(e,0)}function j0(e){var t=Ou(e);if(uM(t))return e}function C9(e,t){if(e==="change")return t}var UM=!1;if(qo){var Jb;if(qo){var Xb="oninput"in document;if(!Xb){var GA=document.createElement("div");GA.setAttribute("oninput","return;"),Xb=typeof GA.oninput=="function"}Jb=Xb}else Jb=!1;UM=Jb&&(!document.documentMode||9<document.documentMode)}function KA(){hf&&(hf.detachEvent("onpropertychange",zM),Gf=hf=null)}function zM(e){if(e.propertyName==="value"&&j0(Gf)){var t=[];BM(t,Gf,e,BN(e)),wM(k9,t)}}function T9(e,t,n){e==="focusin"?(KA(),hf=t,Gf=n,hf.attachEvent("onpropertychange",zM)):e==="focusout"&&KA()}function A9(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return j0(Gf)}function j9(e,t){if(e==="click")return j0(t)}function O9(e,t){if(e==="input"||e==="change")return j0(t)}function R9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wi=typeof Object.is=="function"?Object.is:R9;function Kf(e,t){if(wi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!kw.call(t,s)||!wi(e[s],t[s]))return!1}return!0}function qA(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function YA(e,t){var n=qA(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qA(n)}}function VM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?VM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function WM(){for(var e=window,t=Cy();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Cy(e.document)}return t}function YN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function _9(e){var t=WM(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&VM(n.ownerDocument.documentElement,n)){if(r!==null&&YN(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=YA(n,i);var o=YA(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var I9=qo&&"documentMode"in document&&11>=document.documentMode,Au=null,Ww=null,ff=null,Hw=!1;function QA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hw||Au==null||Au!==Cy(r)||(r=Au,"selectionStart"in r&&YN(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,352 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),ff&&Kf(ff,r)||(ff=r,r=Iy(Ww,"onSelect"),0<r.length&&(t=new GN("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Au)))}function Gm(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ju={animationend:Gm("Animation","AnimationEnd"),animationiteration:Gm("Animation","AnimationIteration"),animationstart:Gm("Animation","AnimationStart"),transitionend:Gm("Transition","TransitionEnd")},Zb={},HM={};qo&&(HM=document.createElement("div").style,"AnimationEvent"in window||(delete ju.animationend.animation,delete ju.animationiteration.animation,delete ju.animationstart.animation),"TransitionEvent"in window||delete ju.transitionend.transition);function O0(e){if(Zb[e])return Zb[e];if(!ju[e])return e;var t=ju[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in HM)return Zb[e]=t[n];return e}var GM=O0("animationend"),KM=O0("animationiteration"),qM=O0("animationstart"),YM=O0("transitionend"),QM=new Map,JA="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Il(e,t){QM.set(e,t),Gc(t,[e])}for(var e1=0;e1<JA.length;e1++){var t1=JA[e1],M9=t1.toLowerCase(),L9=t1[0].toUpperCase()+t1.slice(1);Il(M9,"on"+L9)}Il(GM,"onAnimationEnd");Il(KM,"onAnimationIteration");Il(qM,"onAnimationStart");Il("dblclick","onDoubleClick");Il("focusin","onFocus");Il("focusout","onBlur");Il(YM,"onTransitionEnd");xd("onMouseEnter",["mouseout","mouseover"]);xd("onMouseLeave",["mouseout","mouseover"]);xd("onPointerEnter",["pointerout","pointerover"]);xd("onPointerLeave",["pointerout","pointerover"]);Gc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gc("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vh="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(" "),P9=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vh));function XA(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,M8(r,t,void 0,e),e.currentTarget=null}function JM(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;XA(s,l,u),i=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;XA(s,l,u),i=c}}}if(Ay)throw e=Bw,Ay=!1,Bw=null,e}function Bt(e,t){var n=t[Qw];n===void 0&&(n=t[Qw]=new Set);var r=e+"__bubble";n.has(r)||(XM(t,e,2,!1),n.add(r))}function n1(e,t,n){var r=0;t&&(r|=4),XM(n,e,r,t)}var Km="_reactListening"+Math.random().toString(36).slice(2);function qf(e){if(!e[Km]){e[Km]=!0,iM.forEach(function(n){n!=="selectionchange"&&(P9.has(n)||n1(n,!1,e),n1(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Km]||(t[Km]=!0,n1("selectionchange",!1,t))}}function XM(e,t,n,r){switch(LM(t)){case 1:var s=Q8;break;case 4:s=J8;break;default:s=WN}n=s.bind(null,t,n,e),s=void 0,!Fw||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}
vendor: 2,676 bytes, line 37
37function r1(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;l!==null;){if(o=Kl(l),o===null)return;if(c=o.tag,c===5||c===6){r=i=o;continue e}l=l.parentNode}}r=r.return}wM(function(){var u=i,d=BN(n),h=[];e:{var f=QM.get(e);if(f!==void 0){var p=GN,m=e;switch(e){case"keypress":if(Hg(n)===0)break e;case"keydown":case"keyup":p=h9;break;case"focusin":m="focus",p=Qb;break;case"focusout":m="blur",p=Qb;break;case"beforeblur":case"afterblur":p=Qb;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=BA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=e9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=m9;break;case GM:case KM:case qM:p=r9;break;case YM:p=y9;break;case"scroll":p=X8;break;case"wheel":p=v9;break;case"copy":case"cut":case"paste":p=i9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=zA}var g=(t&4)!==0,x=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var b=u,w;b!==null;){w=b;var E=w.stateNode;if(w.tag===5&&E!==null&&(w=E,y!==null&&(E=zf(b,y),E!=null&&g.push(Yf(b,E,w)))),x)break;b=b.return}0<g.length&&(f=new p(f,m,null,n,d),h.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Dw&&(m=n.relatedTarget||n.fromElement)&&(Kl(m)||m[Yo]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?Kl(m):null,m!==null&&(x=Kc(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=BA,E="onMouseLeave",y="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(g=zA,E="onPointerLeave",y="onPointerEnter",b="pointer"),x=p==null?f:Ou(p),w=m==null?f:Ou(m),f=new g(E,b+"leave",p,n,d),f.target=x,f.relatedTarget=w,E=null,Kl(d)===u&&(g=new g(y,b+"enter",m,n,d),g.target=w,g.relatedTarget=x,E=g),x=E,p&&m)t:{for(g=p,y=m,b=0,w=g;w;w=nu(w))b++;for(w=0,E=y;E;E=nu(E))w++;for(;0<b-w;)g=nu(g),b--;for(;0<w-b;)y=nu(y),w--;for(;b--;){if(g===y||y!==null&&g===y.alternate)break t;g=nu(g),y=nu(y)}g=null}else g=null;p!==null&&ZA(h,f,p,g,!1),m!==null&&x!==null&&ZA(h,x,m,g,!0)}}
vendor: 4,734 bytes, lines 37-38
37e:{if(f=u?Ou(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var N=C9;else if(HA(f))if(UM)N=O9;else{N=A9;var k=T9}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(N=j9);if(N&&(N=N(e,u))){BM(h,N,n,d);break e}k&&k(e,f,u),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&_w(f,"number",f.value)}switch(k=u?Ou(u):window,e){case"focusin":(HA(k)||k.contentEditable==="true")&&(Au=k,Ww=u,ff=null);break;case"focusout":ff=Ww=Au=null;break;case"mousedown":Hw=!0;break;case"contextmenu":case"mouseup":case"dragend":Hw=!1,QA(h,n,d);break;case"selectionchange":if(I9)break;case"keydown":case"keyup":QA(h,n,d)}var C;if(qN)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Tu?$M(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(DM&&n.locale!=="ko"&&(Tu||T!=="onCompositionStart"?T==="onCompositionEnd"&&Tu&&(C=PM()):(Ua=d,HN="value"in Ua?Ua.value:Ua.textContent,Tu=!0)),k=Iy(u,T),0<k.length&&(T=new UA(T,e,null,n,d),h.push({event:T,listeners:k}),C?T.data=C:(C=FM(n),C!==null&&(T.data=C)))),(C=w9?S9(e,n):E9(e,n))&&(u=Iy(u,"onBeforeInput"),0<u.length&&(d=new UA("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=C))}JM(h,t)})}function Yf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Iy(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=zf(e,n),i!=null&&r.unshift(Yf(e,i,s)),i=zf(e,t),i!=null&&r.push(Yf(e,i,s))),e=e.return}return r}function nu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ZA(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=zf(n,i),c!=null&&o.unshift(Yf(n,c,l))):s||(c=zf(n,i),c!=null&&o.push(Yf(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var D9=/\r\n?/g,$9=/\u0000|\uFFFD/g;function ej(e){return(typeof e=="string"?e:""+e).replace(D9,`
38`).replace($9,"")}function qm(e,t,n){if(t=ej(t),ej(e)!==t&&n)throw Error(Z(425))}function My(){}var Gw=null,Kw=null;function qw(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yw=typeof setTimeout=="function"?setTimeout:void 0,F9=typeof clearTimeout=="function"?clearTimeout:void 0,tj=typeof Promise=="function"?Promise:void 0,B9=typeof queueMicrotask=="function"?queueMicrotask:typeof tj<"u"?function(e){return tj.resolve(null).then(e).catch(U9)}:Yw;function U9(e){setTimeout(function(){throw e})}function s1(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Hf(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Hf(t)}function Za(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function nj(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Kd=Math.random().toString(36).slice(2),Ji="__reactFiber$"+Kd,Qf="__reactProps$"+Kd,Yo="__reactContainer$"+Kd,Qw="__reactEvents$"+Kd,z9="__reactListeners$"+Kd,V9="__reactHandles$"+Kd;function Kl(e){var t=e[Ji];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yo]||n[Ji]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=nj(e);e!==null;){if(n=e[Ji])return n;e=nj(e)}return t}e=n,n=e.parentNode}return null}function tm(e){return e=e[Ji]||e[Yo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ou(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Z(33))}function R0(e){return e[Qf]||null}var Jw=[],Ru=-1;function Ml(e){return{current:e}}function Vt(e){0>Ru||(e.current=Jw[Ru],Jw[Ru]=null,Ru--)}function Lt(e,t){Ru++,Jw[Ru]=e.current,e.current=t}var gl={},br=Ml(gl),Yr=Ml(!1),vc=gl;function vd(e,t){var n=e.type.contextTypes;if(!n)return gl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Qr(e){return e=e.childContextTypes,e!=null}function Ly(){Vt(Yr),Vt(br)}function rj(e,t,n){if(br.current!==gl)throw Error(Z(168));Lt(br,t),Lt(Yr,n)}
vendor: 14,150 bytes, line 38
38function ZM(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(Z(108,T8(e)||"Unknown",s));return rn({},n,r)}function Py(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||gl,vc=br.current,Lt(br,e),Lt(Yr,Yr.current),!0}function sj(e,t,n){var r=e.stateNode;if(!r)throw Error(Z(169));n?(e=ZM(e,t,vc),r.__reactInternalMemoizedMergedChildContext=e,Vt(Yr),Vt(br),Lt(br,e)):Vt(Yr),Lt(Yr,n)}var Do=null,_0=!1,i1=!1;function eL(e){Do===null?Do=[e]:Do.push(e)}function W9(e){_0=!0,eL(e)}function Ll(){if(!i1&&Do!==null){i1=!0;var e=0,t=Nt;try{var n=Do;for(Nt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Do=null,_0=!1}catch(s){throw Do!==null&&(Do=Do.slice(e+1)),kM(UN,Ll),s}finally{Nt=t,i1=!1}}return null}var _u=[],Iu=0,Dy=null,$y=0,Ds=[],$s=0,bc=null,zo=1,Vo="";function zl(e,t){_u[Iu++]=$y,_u[Iu++]=Dy,Dy=e,$y=t}function tL(e,t,n){Ds[$s++]=zo,Ds[$s++]=Vo,Ds[$s++]=bc,bc=e;var r=zo;e=Vo;var s=32-gi(r)-1;r&=~(1<<s),n+=1;var i=32-gi(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,zo=1<<32-gi(t)+s|n<<s|r,Vo=i+e}else zo=1<<i|n<<s|r,Vo=e}function QN(e){e.return!==null&&(zl(e,1),tL(e,1,0))}function JN(e){for(;e===Dy;)Dy=_u[--Iu],_u[Iu]=null,$y=_u[--Iu],_u[Iu]=null;for(;e===bc;)bc=Ds[--$s],Ds[$s]=null,Vo=Ds[--$s],Ds[$s]=null,zo=Ds[--$s],Ds[$s]=null}var gs=null,hs=null,Kt=!1,ci=null;function nL(e,t){var n=Us(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ij(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,gs=e,hs=Za(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,gs=e,hs=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=bc!==null?{id:zo,overflow:Vo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Us(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,gs=e,hs=null,!0):!1;default:return!1}}function Xw(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Zw(e){if(Kt){var t=hs;if(t){var n=t;if(!ij(e,t)){if(Xw(e))throw Error(Z(418));t=Za(n.nextSibling);var r=gs;t&&ij(e,t)?nL(r,n):(e.flags=e.flags&-4097|2,Kt=!1,gs=e)}}else{if(Xw(e))throw Error(Z(418));e.flags=e.flags&-4097|2,Kt=!1,gs=e}}}function oj(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;gs=e}function Ym(e){if(e!==gs)return!1;if(!Kt)return oj(e),Kt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!qw(e.type,e.memoizedProps)),t&&(t=hs)){if(Xw(e))throw rL(),Error(Z(418));for(;t;)nL(e,t),t=Za(t.nextSibling)}if(oj(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Z(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){hs=Za(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}hs=null}}else hs=gs?Za(e.stateNode.nextSibling):null;return!0}function rL(){for(var e=hs;e;)e=Za(e.nextSibling)}function bd(){hs=gs=null,Kt=!1}function XN(e){ci===null?ci=[e]:ci.push(e)}var H9=aa.ReactCurrentBatchConfig;function wh(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Z(309));var r=n.stateNode}if(!r)throw Error(Z(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=s.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(Z(284));if(!n._owner)throw Error(Z(290,e))}return e}function Qm(e,t){throw e=Object.prototype.toString.call(t),Error(Z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function aj(e){var t=e._init;return t(e._payload)}function sL(e){function t(y,b){if(e){var w=y.deletions;w===null?(y.deletions=[b],y.flags|=16):w.push(b)}}function n(y,b){if(!e)return null;for(;b!==null;)t(y,b),b=b.sibling;return null}function r(y,b){for(y=new Map;b!==null;)b.key!==null?y.set(b.key,b):y.set(b.index,b),b=b.sibling;return y}function s(y,b){return y=rl(y,b),y.index=0,y.sibling=null,y}function i(y,b,w){return y.index=w,e?(w=y.alternate,w!==null?(w=w.index,w<b?(y.flags|=2,b):w):(y.flags|=2,b)):(y.flags|=1048576,b)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,b,w,E){return b===null||b.tag!==6?(b=h1(w,y.mode,E),b.return=y,b):(b=s(b,w),b.return=y,b)}function c(y,b,w,E){var N=w.type;return N===Cu?d(y,b,w.props.children,E,w.key):b!==null&&(b.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===wa&&aj(N)===b.type)?(E=s(b,w.props),E.ref=wh(y,b,w),E.return=y,E):(E=Xg(w.type,w.key,w.props,null,y.mode,E),E.ref=wh(y,b,w),E.return=y,E)}function u(y,b,w,E){return b===null||b.tag!==4||b.stateNode.containerInfo!==w.containerInfo||b.stateNode.implementation!==w.implementation?(b=f1(w,y.mode,E),b.return=y,b):(b=s(b,w.children||[]),b.return=y,b)}function d(y,b,w,E,N){return b===null||b.tag!==7?(b=dc(w,y.mode,E,N),b.return=y,b):(b=s(b,w),b.return=y,b)}function h(y,b,w){if(typeof b=="string"&&b!==""||typeof b=="number")return b=h1(""+b,y.mode,w),b.return=y,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Fm:return w=Xg(b.type,b.key,b.props,null,y.mode,w),w.ref=wh(y,null,b),w.return=y,w;case ku:return b=f1(b,y.mode,w),b.return=y,b;case wa:var E=b._init;return h(y,E(b._payload),w)}if(Uh(b)||gh(b))return b=dc(b,y.mode,w,null),b.return=y,b;Qm(y,b)}return null}function f(y,b,w,E){var N=b!==null?b.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return N!==null?null:l(y,b,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Fm:return w.key===N?c(y,b,w,E):null;case ku:return w.key===N?u(y,b,w,E):null;case wa:return N=w._init,f(y,b,N(w._payload),E)}if(Uh(w)||gh(w))return N!==null?null:d(y,b,w,E,null);Qm(y,w)}return null}function p(y,b,w,E,N){if(typeof E=="string"&&E!==""||typeof E=="number")return y=y.get(w)||null,l(b,y,""+E,N);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Fm:return y=y.get(E.key===null?w:E.key)||null,c(b,y,E,N);case ku:return y=y.get(E.key===null?w:E.key)||null,u(b,y,E,N);case wa:var k=E._init;return p(y,b,w,k(E._payload),N)}if(Uh(E)||gh(E))return y=y.get(w)||null,d(b,y,E,N,null);Qm(b,E)}return null}function m(y,b,w,E){for(var N=null,k=null,C=b,T=b=0,j=null;C!==null&&T<w.length;T++){C.index>T?(j=C,C=null):j=C.sibling;var S=f(y,C,w[T],E);if(S===null){C===null&&(C=j);break}e&&C&&S.alternate===null&&t(y,C),b=i(S,b,T),k===null?N=S:k.sibling=S,k=S,C=j}if(T===w.length)return n(y,C),Kt&&zl(y,T),N;if(C===null){for(;T<w.length;T++)C=h(y,w[T],E),C!==null&&(b=i(C,b,T),k===null?N=C:k.sibling=C,k=C);return Kt&&zl(y,T),N}for(C=r(y,C);T<w.length;T++)j=p(C,y,T,w[T],E),j!==null&&(e&&j.alternate!==null&&C.delete(j.key===null?T:j.key),b=i(j,b,T),k===null?N=j:k.sibling=j,k=j);return e&&C.forEach(function(R){return t(y,R)}),Kt&&zl(y,T),N}function g(y,b,w,E){var N=gh(w);if(typeof N!="function")throw Error(Z(150));if(w=N.call(w),w==null)throw Error(Z(151));for(var k=N=null,C=b,T=b=0,j=null,S=w.next();C!==null&&!S.done;T++,S=w.next()){C.index>T?(j=C,C=null):j=C.sibling;var R=f(y,C,S.value,E);if(R===null){C===null&&(C=j);break}e&&C&&R.alternate===null&&t(y,C),b=i(R,b,T),k===null?N=R:k.sibling=R,k=R,C=j}if(S.done)return n(y,C),Kt&&zl(y,T),N;if(C===null){for(;!S.done;T++,S=w.next())S=h(y,S.value,E),S!==null&&(b=i(S,b,T),k===null?N=S:k.sibling=S,k=S);return Kt&&zl(y,T),N}for(C=r(y,C);!S.done;T++,S=w.next())S=p(C,y,T,S.value,E),S!==null&&(e&&S.alternate!==null&&C.delete(S.key===null?T:S.key),b=i(S,b,T),k===null?N=S:k.sibling=S,k=S);return e&&C.forEach(function(_){return t(y,_)}),Kt&&zl(y,T),N}function x(y,b,w,E){if(typeof w=="object"&&w!==null&&w.type===Cu&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Fm:e:{for(var N=w.key,k=b;k!==null;){if(k.key===N){if(N=w.type,N===Cu){if(k.tag===7){n(y,k.sibling),b=s(k,w.props.children),b.return=y,y=b;break e}}else if(k.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===wa&&aj(N)===k.type){n(y,k.sibling),b=s(k,w.props),b.ref=wh(y,k,w),b.return=y,y=b;break e}n(y,k);break}else t(y,k);k=k.sibling}w.type===Cu?(b=dc(w.props.children,y.mode,E,w.key),b.return=y,y=b):(E=Xg(w.type,w.key,w.props,null,y.mode,E),E.ref=wh(y,b,w),E.return=y,y=E)}return o(y);case ku:e:{for(k=w.key;b!==null;){if(b.key===k)if(b.tag===4&&b.stateNode.containerInfo===w.containerInfo&&b.stateNode.implementation===w.implementation){n(y,b.sibling),b=s(b,w.children||[]),b.return=y,y=b;break e}else{n(y,b);break}else t(y,b);b=b.sibling}b=f1(w,y.mode,E),b.return=y,y=b}return o(y);case wa:return k=w._init,x(y,b,k(w._payload),E)}if(Uh(w))return m(y,b,w,E);if(gh(w))return g(y,b,w,E);Qm(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,b!==null&&b.tag===6?(n(y,b.sibling),b=s(b,w),b.return=y,y=b):(n(y,b),b=h1(w,y.mode,E),b.return=y,y=b),o(y)):n(y,b)}return x}var wd=sL(!0),iL=sL(!1),Fy=Ml(null),By=null,Mu=null,ZN=null;function ek(){ZN=Mu=By=null}function tk(e){var t=Fy.current;Vt(Fy),e._currentValue=t}function eS(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Wu(e,t){By=e,ZN=Mu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(qr=!0),e.firstContext=null)}function Ys(e){var t=e._currentValue;if(ZN!==e)if(e={context:e,memoizedValue:t,next:null},Mu===null){if(By===null)throw Error(Z(308));Mu=e,By.dependencies={lanes:0,firstContext:e}}else Mu=Mu.next=e;return t}var ql=null;function nk(e){ql===null?ql=[e]:ql.push(e)}function oL(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,nk(t)):(n.next=s.next,s.next=n),t.interleaved=n,Qo(e,r)}function Qo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Sa=!1;function rk(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function aL(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ho(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function el(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,pt&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Qo(e,n)}return s=r.interleaved,s===null?(t.next=t,nk(r)):(t.next=s.next,s.next=t),r.interleaved=t,Qo(e,n)}function Gg(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zN(e,n)}}function lj(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Uy(e,t,n,r){var s=e.updateQueue;Sa=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=s.baseState;o=0,d=u=c=null,l=i;do{var f=l.lane,p=l.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,g=l;switch(f=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){h=m.call(p,h,f);break e}h=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,h,f):m,f==null)break e;h=rn({},h,f);break e;case 2:Sa=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=h):d=d.next=p,o|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;f=l,l=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Sc|=o,e.lanes=o,e.memoizedState=h}}function cj(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(Z(191,s));s.call(r)}}}var nm={},so=Ml(nm),Jf=Ml(nm),Xf=Ml(nm);function Yl(e){if(e===nm)throw Error(Z(174));return e}function sk(e,t){switch(Lt(Xf,t),Lt(Jf,e),Lt(so,nm),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Mw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Mw(t,e)}Vt(so),Lt(so,t)}function Sd(){Vt(so),Vt(Jf),Vt(Xf)}function lL(e){Yl(Xf.current);var t=Yl(so.current),n=Mw(t,e.type);t!==n&&(Lt(Jf,e),Lt(so,n))}function ik(e){Jf.current===e&&(Vt(so),Vt(Jf))}var Jt=Ml(0);function zy(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var o1=[];function ok(){for(var e=0;e<o1.length;e++)o1[e]._workInProgressVersionPrimary=null;o1.length=0}var Kg=aa.ReactCurrentDispatcher,a1=aa.ReactCurrentBatchConfig,wc=0,en=null,In=null,Un=null,Vy=!1,pf=!1,Zf=0,G9=0;
vendor: 5,808 bytes, line 38
38function ur(){throw Error(Z(321))}function ak(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wi(e[n],t[n]))return!1;return!0}function lk(e,t,n,r,s,i){if(wc=i,en=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Kg.current=e===null||e.memoizedState===null?Q9:J9,e=n(r,s),pf){i=0;do{if(pf=!1,Zf=0,25<=i)throw Error(Z(301));i+=1,Un=In=null,t.updateQueue=null,Kg.current=X9,e=n(r,s)}while(pf)}if(Kg.current=Wy,t=In!==null&&In.next!==null,wc=0,Un=In=en=null,Vy=!1,t)throw Error(Z(300));return e}function ck(){var e=Zf!==0;return Zf=0,e}function Bi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Un===null?en.memoizedState=Un=e:Un=Un.next=e,Un}function Qs(){if(In===null){var e=en.alternate;e=e!==null?e.memoizedState:null}else e=In.next;var t=Un===null?en.memoizedState:Un.next;if(t!==null)Un=t,In=e;else{if(e===null)throw Error(Z(310));In=e,e={memoizedState:In.memoizedState,baseState:In.baseState,baseQueue:In.baseQueue,queue:In.queue,next:null},Un===null?en.memoizedState=Un=e:Un=Un.next=e}return Un}function ep(e,t){return typeof t=="function"?t(e):t}function l1(e){var t=Qs(),n=t.queue;if(n===null)throw Error(Z(311));n.lastRenderedReducer=e;var r=In,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var l=o=null,c=null,u=i;do{var d=u.lane;if((wc&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,o=r):c=c.next=h,en.lanes|=d,Sc|=d}u=u.next}while(u!==null&&u!==i);c===null?o=r:c.next=l,wi(r,t.memoizedState)||(qr=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,en.lanes|=i,Sc|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function c1(e){var t=Qs(),n=t.queue;if(n===null)throw Error(Z(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);wi(i,t.memoizedState)||(qr=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function cL(){}function uL(e,t){var n=en,r=Qs(),s=t(),i=!wi(r.memoizedState,s);if(i&&(r.memoizedState=s,qr=!0),r=r.queue,uk(fL.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Un!==null&&Un.memoizedState.tag&1){if(n.flags|=2048,tp(9,hL.bind(null,n,r,s,t),void 0,null),Wn===null)throw Error(Z(349));wc&30||dL(n,t,s)}return s}function dL(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=en.updateQueue,t===null?(t={lastEffect:null,stores:null},en.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hL(e,t,n,r){t.value=n,t.getSnapshot=r,pL(t)&&mL(e)}function fL(e,t,n){return n(function(){pL(t)&&mL(e)})}function pL(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wi(e,n)}catch{return!0}}function mL(e){var t=Qo(e,1);t!==null&&yi(t,e,1,-1)}function uj(e){var t=Bi();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ep,lastRenderedState:e},t.queue=e,e=e.dispatch=Y9.bind(null,en,e),[t.memoizedState,e]}function tp(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=en.updateQueue,t===null?(t={lastEffect:null,stores:null},en.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function gL(){return Qs().memoizedState}function qg(e,t,n,r){var s=Bi();en.flags|=e,s.memoizedState=tp(1|t,n,void 0,r===void 0?null:r)}function I0(e,t,n,r){var s=Qs();r=r===void 0?null:r;var i=void 0;if(In!==null){var o=In.memoizedState;if(i=o.destroy,r!==null&&ak(r,o.deps)){s.memoizedState=tp(t,n,i,r);return}}en.flags|=e,s.memoizedState=tp(1|t,n,i,r)}function dj(e,t){return qg(8390656,8,e,t)}function uk(e,t){return I0(2048,8,e,t)}function yL(e,t){return I0(4,2,e,t)}function xL(e,t){return I0(4,4,e,t)}function vL(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bL(e,t,n){return n=n!=null?n.concat([e]):null,I0(4,4,vL.bind(null,t,e),n)}function dk(){}function wL(e,t){var n=Qs();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ak(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function SL(e,t){var n=Qs();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ak(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function EL(e,t,n){return wc&21?(wi(n,t)||(n=AM(),en.lanes|=n,Sc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,qr=!0),e.memoizedState=n)}function K9(e,t){var n=Nt;Nt=n!==0&&4>n?n:4,e(!0);var r=a1.transition;a1.transition={};try{e(!1),t()}finally{Nt=n,a1.transition=r}}function NL(){return Qs().memoizedState}function q9(e,t,n){var r=nl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kL(e))CL(t,n);else if(n=oL(e,t,n,r),n!==null){var s=Rr();yi(n,e,r,s),TL(n,t,r)}}function Y9(e,t,n){var r=nl(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kL(e))CL(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,wi(l,o)){var c=t.interleaved;c===null?(s.next=s,nk(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=oL(e,t,s,r),n!==null&&(s=Rr(),yi(n,e,r,s),TL(n,t,r))}}function kL(e){var t=e.alternate;return e===en||t!==null&&t===en}function CL(e,t){pf=Vy=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}
vendor: 5,718 bytes, lines 38-40
38function TL(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zN(e,n)}}var Wy={readContext:Ys,useCallback:ur,useContext:ur,useEffect:ur,useImperativeHandle:ur,useInsertionEffect:ur,useLayoutEffect:ur,useMemo:ur,useReducer:ur,useRef:ur,useState:ur,useDebugValue:ur,useDeferredValue:ur,useTransition:ur,useMutableSource:ur,useSyncExternalStore:ur,useId:ur,unstable_isNewReconciler:!1},Q9={readContext:Ys,useCallback:function(e,t){return Bi().memoizedState=[e,t===void 0?null:t],e},useContext:Ys,useEffect:dj,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qg(4194308,4,vL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qg(4194308,4,e,t)},useInsertionEffect:function(e,t){return qg(4,2,e,t)},useMemo:function(e,t){var n=Bi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=q9.bind(null,en,e),[r.memoizedState,e]},useRef:function(e){var t=Bi();return e={current:e},t.memoizedState=e},useState:uj,useDebugValue:dk,useDeferredValue:function(e){return Bi().memoizedState=e},useTransition:function(){var e=uj(!1),t=e[0];return e=K9.bind(null,e[1]),Bi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=en,s=Bi();if(Kt){if(n===void 0)throw Error(Z(407));n=n()}else{if(n=t(),Wn===null)throw Error(Z(349));wc&30||dL(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,dj(fL.bind(null,r,i,e),[e]),r.flags|=2048,tp(9,hL.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Bi(),t=Wn.identifierPrefix;if(Kt){var n=Vo,r=zo;n=(r&~(1<<32-gi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zf++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=G9++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},J9={readContext:Ys,useCallback:wL,useContext:Ys,useEffect:uk,useImperativeHandle:bL,useInsertionEffect:yL,useLayoutEffect:xL,useMemo:SL,useReducer:l1,useRef:gL,useState:function(){return l1(ep)},useDebugValue:dk,useDeferredValue:function(e){var t=Qs();return EL(t,In.memoizedState,e)},useTransition:function(){var e=l1(ep)[0],t=Qs().memoizedState;return[e,t]},useMutableSource:cL,useSyncExternalStore:uL,useId:NL,unstable_isNewReconciler:!1},X9={readContext:Ys,useCallback:wL,useContext:Ys,useEffect:uk,useImperativeHandle:bL,useInsertionEffect:yL,useLayoutEffect:xL,useMemo:SL,useReducer:c1,useRef:gL,useState:function(){return c1(ep)},useDebugValue:dk,useDeferredValue:function(e){var t=Qs();return In===null?t.memoizedState=e:EL(t,In.memoizedState,e)},useTransition:function(){var e=c1(ep)[0],t=Qs().memoizedState;return[e,t]},useMutableSource:cL,useSyncExternalStore:uL,useId:NL,unstable_isNewReconciler:!1};function oi(e,t){if(e&&e.defaultProps){t=rn({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function tS(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:rn({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var M0={isMounted:function(e){return(e=e._reactInternals)?Kc(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rr(),s=nl(e),i=Ho(r,s);i.payload=t,n!=null&&(i.callback=n),t=el(e,i,s),t!==null&&(yi(t,e,s,r),Gg(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rr(),s=nl(e),i=Ho(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=el(e,i,s),t!==null&&(yi(t,e,s,r),Gg(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rr(),r=nl(e),s=Ho(n,r);s.tag=2,t!=null&&(s.callback=t),t=el(e,s,r),t!==null&&(yi(t,e,r,n),Gg(t,e,r))}};function hj(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Kf(n,r)||!Kf(s,i):!0}function AL(e,t,n){var r=!1,s=gl,i=t.contextType;return typeof i=="object"&&i!==null?i=Ys(i):(s=Qr(t)?vc:br.current,r=t.contextTypes,i=(r=r!=null)?vd(e,s):gl),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=M0,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function fj(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&M0.enqueueReplaceState(t,t.state,null)}function nS(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},rk(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Ys(i):(i=Qr(t)?vc:br.current,s.context=vd(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(tS(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&M0.enqueueReplaceState(s,s.state,null),Uy(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ed(e,t){try{var n="",r=t;do n+=C8(r),r=r.return;while(r);var s=n}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function u1(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function rS(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Z9=typeof WeakMap=="function"?WeakMap:Map;
vendor: 10,926 bytes, line 40
40function jL(e,t,n){n=Ho(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gy||(Gy=!0,fS=r),rS(e,t)},n}function OL(e,t,n){n=Ho(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){rS(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){rS(e,t),typeof r!="function"&&(tl===null?tl=new Set([this]):tl.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function pj(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Z9;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=fW.bind(null,e,t,n),t.then(e,e))}function mj(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function gj(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ho(-1,1),t.tag=2,el(n,t,1))),n.lanes|=1),e)}var eW=aa.ReactCurrentOwner,qr=!1;function jr(e,t,n,r){t.child=e===null?iL(t,null,n,r):wd(t,e.child,n,r)}function yj(e,t,n,r,s){n=n.render;var i=t.ref;return Wu(t,s),r=lk(e,t,n,r,i,s),n=ck(),e!==null&&!qr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Jo(e,t,s)):(Kt&&n&&QN(t),t.flags|=1,jr(e,t,r,s),t.child)}function xj(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!vk(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,RL(e,t,i,r,s)):(e=Xg(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Kf,n(o,r)&&e.ref===t.ref)return Jo(e,t,s)}return t.flags|=1,e=rl(i,r),e.ref=t.ref,e.return=t,t.child=e}function RL(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Kf(i,r)&&e.ref===t.ref)if(qr=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(qr=!0);else return t.lanes=e.lanes,Jo(e,t,s)}return sS(e,t,n,r,s)}function _L(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Lt(Pu,ss),ss|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Lt(Pu,ss),ss|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Lt(Pu,ss),ss|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Lt(Pu,ss),ss|=r;return jr(e,t,s,n),t.child}function IL(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function sS(e,t,n,r,s){var i=Qr(n)?vc:br.current;return i=vd(t,i),Wu(t,s),n=lk(e,t,n,r,i,s),r=ck(),e!==null&&!qr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Jo(e,t,s)):(Kt&&r&&QN(t),t.flags|=1,jr(e,t,n,s),t.child)}function vj(e,t,n,r,s){if(Qr(n)){var i=!0;Py(t)}else i=!1;if(Wu(t,s),t.stateNode===null)Yg(e,t),AL(t,n,r),nS(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ys(u):(u=Qr(n)?vc:br.current,u=vd(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&fj(t,o,r,u),Sa=!1;var f=t.memoizedState;o.state=f,Uy(t,r,o,s),c=t.memoizedState,l!==r||f!==c||Yr.current||Sa?(typeof d=="function"&&(tS(t,n,d,r),c=t.memoizedState),(l=Sa||hj(t,n,l,r,f,c,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,aL(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:oi(t.type,l),o.props=u,h=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=Ys(c):(c=Qr(n)?vc:br.current,c=vd(t,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==h||f!==c)&&fj(t,o,r,c),Sa=!1,f=t.memoizedState,o.state=f,Uy(t,r,o,s);var m=t.memoizedState;l!==h||f!==m||Yr.current||Sa?(typeof p=="function"&&(tS(t,n,p,r),m=t.memoizedState),(u=Sa||hj(t,n,u,r,f,m,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return iS(e,t,n,r,i,s)}function iS(e,t,n,r,s,i){IL(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&sj(t,n,!1),Jo(e,t,i);r=t.stateNode,eW.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=wd(t,e.child,null,i),t.child=wd(t,null,l,i)):jr(e,t,l,i),t.memoizedState=r.state,s&&sj(t,n,!0),t.child}function ML(e){var t=e.stateNode;t.pendingContext?rj(e,t.pendingContext,t.pendingContext!==t.context):t.context&&rj(e,t.context,!1),sk(e,t.containerInfo)}function bj(e,t,n,r,s){return bd(),XN(s),t.flags|=256,jr(e,t,n,r),t.child}var oS={dehydrated:null,treeContext:null,retryLane:0};function aS(e){return{baseLanes:e,cachePool:null,transitions:null}}function LL(e,t,n){var r=t.pendingProps,s=Jt.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Lt(Jt,s&1),e===null)return Zw(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=D0(o,r,0,null),e=dc(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=aS(n),t.memoizedState=oS,e):hk(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return tW(e,t,o,r,l,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=rl(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=rl(l,i):(i=dc(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?aS(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=oS,r}return i=e.child,e=i.sibling,r=rl(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function hk(e,t){return t=D0({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Jm(e,t,n,r){return r!==null&&XN(r),wd(t,e.child,null,n),e=hk(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tW(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=u1(Error(Z(422))),Jm(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=D0({mode:"visible",children:r.children},s,0,null),i=dc(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&wd(t,e.child,null,o),t.child.memoizedState=aS(o),t.memoizedState=oS,i);if(!(t.mode&1))return Jm(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(Z(419)),r=u1(i,r,void 0),Jm(e,t,o,r)}if(l=(o&e.childLanes)!==0,qr||l){if(r=Wn,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Qo(e,s),yi(r,e,s,-1))}return xk(),r=u1(Error(Z(421))),Jm(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=pW.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,hs=Za(s.nextSibling),gs=t,Kt=!0,ci=null,e!==null&&(Ds[$s++]=zo,Ds[$s++]=Vo,Ds[$s++]=bc,zo=e.id,Vo=e.overflow,bc=t),t=hk(t,r.children),t.flags|=4096,t)}function wj(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),eS(e.return,t,n)}function d1(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function PL(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(jr(e,t,r.children,n),r=Jt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wj(e,n,t);else if(e.tag===19)wj(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Lt(Jt,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&zy(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),d1(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&zy(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}d1(t,!0,n,null,i);break;case"together":d1(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yg(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Jo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Sc|=t.lanes,!(n&t.childLanes))return null;
vendor: 4,472 bytes, line 40
40if(e!==null&&t.child!==e.child)throw Error(Z(153));if(t.child!==null){for(e=t.child,n=rl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nW(e,t,n){switch(t.tag){case 3:ML(t),bd();break;case 5:lL(t);break;case 1:Qr(t.type)&&Py(t);break;case 4:sk(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Lt(Fy,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Lt(Jt,Jt.current&1),t.flags|=128,null):n&t.child.childLanes?LL(e,t,n):(Lt(Jt,Jt.current&1),e=Jo(e,t,n),e!==null?e.sibling:null);Lt(Jt,Jt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return PL(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Lt(Jt,Jt.current),r)break;return null;case 22:case 23:return t.lanes=0,_L(e,t,n)}return Jo(e,t,n)}var DL,lS,$L,FL;DL=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};lS=function(){};$L=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Yl(so.current);var i=null;switch(n){case"input":s=Ow(e,s),r=Ow(e,r),i=[];break;case"select":s=rn({},s,{value:void 0}),r=rn({},r,{value:void 0}),i=[];break;case"textarea":s=Iw(e,s),r=Iw(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=My)}Lw(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Bf.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Bf.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Bt("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};FL=function(e,t,n,r){n!==r&&(t.flags|=4)};function Sh(e,t){if(!Kt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function dr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function rW(e,t,n){var r=t.pendingProps;switch(JN(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dr(t),null;case 1:return Qr(t.type)&&Ly(),dr(t),null;case 3:return r=t.stateNode,Sd(),Vt(Yr),Vt(br),ok(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ym(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ci!==null&&(gS(ci),ci=null))),lS(e,t),dr(t),null;case 5:ik(t);var s=Yl(Xf.current);if(n=t.type,e!==null&&t.stateNode!=null)$L(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Z(166));return dr(t),null}if(e=Yl(so.current),Ym(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ji]=t,r[Qf]=i,e=(t.mode&1)!==0,n){case"dialog":Bt("cancel",r),Bt("close",r);break;case"iframe":case"object":case"embed":Bt("load",r);break;case"video":case"audio":for(s=0;s<Vh.length;s++)Bt(Vh[s],r);break;case"source":Bt("error",r);break;
vendor: 32,828 bytes, line 40
40case"img":case"image":case"link":Bt("error",r),Bt("load",r);break;case"details":Bt("toggle",r);break;case"input":OA(r,i),Bt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Bt("invalid",r);break;case"textarea":_A(r,i),Bt("invalid",r)}Lw(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&qm(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&qm(r.textContent,l,e),s=["children",""+l]):Bf.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Bt("scroll",r)}switch(n){case"input":Bm(r),RA(r,i,!0);break;case"textarea":Bm(r),IA(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=My)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=fM(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ji]=t,e[Qf]=r,DL(e,t,!1,!1),t.stateNode=e;e:{switch(o=Pw(n,r),n){case"dialog":Bt("cancel",e),Bt("close",e),s=r;break;case"iframe":case"object":case"embed":Bt("load",e),s=r;break;case"video":case"audio":for(s=0;s<Vh.length;s++)Bt(Vh[s],e);s=r;break;case"source":Bt("error",e),s=r;break;case"img":case"image":case"link":Bt("error",e),Bt("load",e),s=r;break;case"details":Bt("toggle",e),s=r;break;case"input":OA(e,r),s=Ow(e,r),Bt("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=rn({},r,{value:void 0}),Bt("invalid",e);break;case"textarea":_A(e,r),s=Iw(e,r),Bt("invalid",e);break;default:s=r}Lw(n,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?gM(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&pM(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Uf(e,c):typeof c=="number"&&Uf(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Bf.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Bt("scroll",e):c!=null&&PN(e,i,c,o))}switch(n){case"input":Bm(e),RA(e,r,!1);break;case"textarea":Bm(e),IA(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ml(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Bu(e,!!r.multiple,i,!1):r.defaultValue!=null&&Bu(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=My)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return dr(t),null;case 6:if(e&&t.stateNode!=null)FL(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Z(166));if(n=Yl(Xf.current),Yl(so.current),Ym(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ji]=t,(i=r.nodeValue!==n)&&(e=gs,e!==null))switch(e.tag){case 3:qm(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qm(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ji]=t,t.stateNode=r}return dr(t),null;case 13:if(Vt(Jt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Kt&&hs!==null&&t.mode&1&&!(t.flags&128))rL(),bd(),t.flags|=98560,i=!1;else if(i=Ym(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(Z(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Z(317));i[Ji]=t}else bd(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dr(t),i=!1}else ci!==null&&(gS(ci),ci=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Jt.current&1?Bn===0&&(Bn=3):xk())),t.updateQueue!==null&&(t.flags|=4),dr(t),null);case 4:return Sd(),lS(e,t),e===null&&qf(t.stateNode.containerInfo),dr(t),null;case 10:return tk(t.type._context),dr(t),null;case 17:return Qr(t.type)&&Ly(),dr(t),null;case 19:if(Vt(Jt),i=t.memoizedState,i===null)return dr(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Sh(i,!1);else{if(Bn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=zy(e),o!==null){for(t.flags|=128,Sh(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Lt(Jt,Jt.current&1|2),t.child}e=e.sibling}i.tail!==null&&xn()>Nd&&(t.flags|=128,r=!0,Sh(i,!1),t.lanes=4194304)}else{if(!r)if(e=zy(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Sh(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Kt)return dr(t),null}else 2*xn()-i.renderingStartTime>Nd&&n!==1073741824&&(t.flags|=128,r=!0,Sh(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=xn(),t.sibling=null,n=Jt.current,Lt(Jt,r?n&1|2:n&1),t):(dr(t),null);case 22:case 23:return yk(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ss&1073741824&&(dr(t),t.subtreeFlags&6&&(t.flags|=8192)):dr(t),null;case 24:return null;case 25:return null}throw Error(Z(156,t.tag))}function sW(e,t){switch(JN(t),t.tag){case 1:return Qr(t.type)&&Ly(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sd(),Vt(Yr),Vt(br),ok(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ik(t),null;case 13:if(Vt(Jt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));bd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vt(Jt),null;case 4:return Sd(),null;case 10:return tk(t.type._context),null;case 22:case 23:return yk(),null;case 24:return null;default:return null}}var Xm=!1,yr=!1,iW=typeof WeakSet=="function"?WeakSet:Set,ye=null;function Lu(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){un(e,t,r)}else n.current=null}function cS(e,t,n){try{n()}catch(r){un(e,t,r)}}var Sj=!1;function oW(e,t){if(Gw=Ry,e=WM(),YN(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||s!==0&&h.nodeType!==3||(l=o+s),h!==i||r!==0&&h.nodeType!==3||(c=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(p=h.firstChild)!==null;)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===s&&(l=o),f===i&&++d===r&&(c=o),(p=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kw={focusedElem:e,selectionRange:n},Ry=!1,ye=t;ye!==null;)if(t=ye,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ye=e;else for(;ye!==null;){t=ye;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,x=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:oi(t.type,g),x);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(163))}}catch(E){un(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,ye=e;break}ye=t.return}return m=Sj,Sj=!1,m}function mf(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&cS(t,n,i)}s=s.next}while(s!==r)}}function L0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function uS(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function BL(e){var t=e.alternate;t!==null&&(e.alternate=null,BL(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ji],delete t[Qf],delete t[Qw],delete t[z9],delete t[V9])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function UL(e){return e.tag===5||e.tag===3||e.tag===4}function Ej(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||UL(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function dS(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=My));else if(r!==4&&(e=e.child,e!==null))for(dS(e,t,n),e=e.sibling;e!==null;)dS(e,t,n),e=e.sibling}function hS(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(hS(e,t,n),e=e.sibling;e!==null;)hS(e,t,n),e=e.sibling}var Xn=null,li=!1;function fa(e,t,n){for(n=n.child;n!==null;)zL(e,t,n),n=n.sibling}function zL(e,t,n){if(ro&&typeof ro.onCommitFiberUnmount=="function")try{ro.onCommitFiberUnmount(T0,n)}catch{}switch(n.tag){case 5:yr||Lu(n,t);case 6:var r=Xn,s=li;Xn=null,fa(e,t,n),Xn=r,li=s,Xn!==null&&(li?(e=Xn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Xn.removeChild(n.stateNode));break;case 18:Xn!==null&&(li?(e=Xn,n=n.stateNode,e.nodeType===8?s1(e.parentNode,n):e.nodeType===1&&s1(e,n),Hf(e)):s1(Xn,n.stateNode));break;case 4:r=Xn,s=li,Xn=n.stateNode.containerInfo,li=!0,fa(e,t,n),Xn=r,li=s;break;case 0:case 11:case 14:case 15:if(!yr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&cS(n,t,o),s=s.next}while(s!==r)}fa(e,t,n);break;case 1:if(!yr&&(Lu(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){un(n,t,l)}fa(e,t,n);break;case 21:fa(e,t,n);break;case 22:n.mode&1?(yr=(r=yr)||n.memoizedState!==null,fa(e,t,n),yr=r):fa(e,t,n);break;default:fa(e,t,n)}}function Nj(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new iW),t.forEach(function(r){var s=mW.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ri(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Xn=l.stateNode,li=!1;break e;case 3:Xn=l.stateNode.containerInfo,li=!0;break e;case 4:Xn=l.stateNode.containerInfo,li=!0;break e}l=l.return}if(Xn===null)throw Error(Z(160));zL(i,o,s),Xn=null,li=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){un(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)VL(t,e),t=t.sibling}function VL(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ri(t,e),Pi(e),r&4){try{mf(3,e,e.return),L0(3,e)}catch(g){un(e,e.return,g)}try{mf(5,e,e.return)}catch(g){un(e,e.return,g)}}break;case 1:ri(t,e),Pi(e),r&512&&n!==null&&Lu(n,n.return);break;case 5:if(ri(t,e),Pi(e),r&512&&n!==null&&Lu(n,n.return),e.flags&32){var s=e.stateNode;try{Uf(s,"")}catch(g){un(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&dM(s,i),Pw(l,o);var u=Pw(l,i);for(o=0;o<c.length;o+=2){var d=c[o],h=c[o+1];d==="style"?gM(s,h):d==="dangerouslySetInnerHTML"?pM(s,h):d==="children"?Uf(s,h):PN(s,d,h,u)}switch(l){case"input":Rw(s,i);break;case"textarea":hM(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Bu(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?Bu(s,!!i.multiple,i.defaultValue,!0):Bu(s,!!i.multiple,i.multiple?[]:"",!1))}s[Qf]=i}catch(g){un(e,e.return,g)}}break;case 6:if(ri(t,e),Pi(e),r&4){if(e.stateNode===null)throw Error(Z(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){un(e,e.return,g)}}break;case 3:if(ri(t,e),Pi(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hf(t.containerInfo)}catch(g){un(e,e.return,g)}break;case 4:ri(t,e),Pi(e);break;case 13:ri(t,e),Pi(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(mk=xn())),r&4&&Nj(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(yr=(u=yr)||d,ri(t,e),yr=u):ri(t,e),Pi(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(ye=e,d=e.child;d!==null;){for(h=ye=d;ye!==null;){switch(f=ye,p=f.child,f.tag){case 0:case 11:case 14:case 15:mf(4,f,f.return);break;case 1:Lu(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){un(r,n,g)}}break;case 5:Lu(f,f.return);break;case 22:if(f.memoizedState!==null){Cj(h);continue}}p!==null?(p.return=f,ye=p):Cj(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=h.stateNode,c=h.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=mM("display",o))}catch(g){un(e,e.return,g)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){un(e,e.return,g)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ri(t,e),Pi(e),r&4&&Nj(e);break;case 21:break;default:ri(t,e),Pi(e)}}function Pi(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(UL(n)){var r=n;break e}n=n.return}throw Error(Z(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Uf(s,""),r.flags&=-33);var i=Ej(e);hS(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,l=Ej(e);dS(e,l,o);break;default:throw Error(Z(161))}}catch(c){un(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function aW(e,t,n){ye=e,WL(e)}function WL(e,t,n){for(var r=(e.mode&1)!==0;ye!==null;){var s=ye,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Xm;if(!o){var l=s.alternate,c=l!==null&&l.memoizedState!==null||yr;l=Xm;var u=yr;if(Xm=o,(yr=c)&&!u)for(ye=s;ye!==null;)o=ye,c=o.child,o.tag===22&&o.memoizedState!==null?Tj(s):c!==null?(c.return=o,ye=c):Tj(s);for(;i!==null;)ye=i,WL(i),i=i.sibling;ye=s,Xm=l,yr=u}kj(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,ye=i):kj(e)}}function kj(e){for(;ye!==null;){var t=ye;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:yr||L0(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!yr)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:oi(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&cj(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}cj(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Hf(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Z(163))}yr||t.flags&512&&uS(t)}catch(f){un(t,t.return,f)}}if(t===e){ye=null;break}if(n=t.sibling,n!==null){n.return=t.return,ye=n;break}ye=t.return}}function Cj(e){for(;ye!==null;){var t=ye;if(t===e){ye=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ye=n;break}ye=t.return}}function Tj(e){for(;ye!==null;){var t=ye;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{L0(4,t)}catch(c){un(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){un(t,s,c)}}var i=t.return;try{uS(t)}catch(c){un(t,i,c)}break;case 5:var o=t.return;try{uS(t)}catch(c){un(t,o,c)}}}catch(c){un(t,t.return,c)}if(t===e){ye=null;break}var l=t.sibling;if(l!==null){l.return=t.return,ye=l;break}ye=t.return}}var lW=Math.ceil,Hy=aa.ReactCurrentDispatcher,fk=aa.ReactCurrentOwner,Vs=aa.ReactCurrentBatchConfig,pt=0,Wn=null,Tn=null,ir=0,ss=0,Pu=Ml(0),Bn=0,np=null,Sc=0,P0=0,pk=0,gf=null,Gr=null,mk=0,Nd=1/0,Lo=null,Gy=!1,fS=null,tl=null,Zm=!1,za=null,Ky=0,yf=0,pS=null,Qg=-1,Jg=0;function Rr(){return pt&6?xn():Qg!==-1?Qg:Qg=xn()}function nl(e){return e.mode&1?pt&2&&ir!==0?ir&-ir:H9.transition!==null?(Jg===0&&(Jg=AM()),Jg):(e=Nt,e!==0||(e=window.event,e=e===void 0?16:LM(e.type)),e):1}function yi(e,t,n,r){if(50<yf)throw yf=0,pS=null,Error(Z(185));Zp(e,n,r),(!(pt&2)||e!==Wn)&&(e===Wn&&(!(pt&2)&&(P0|=n),Bn===4&&Ta(e,ir)),Jr(e,r),n===1&&pt===0&&!(t.mode&1)&&(Nd=xn()+500,_0&&Ll()))}function Jr(e,t){var n=e.callbackNode;H8(e,t);var r=Oy(e,e===Wn?ir:0);if(r===0)n!==null&&PA(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&PA(n),t===1)e.tag===0?W9(Aj.bind(null,e)):eL(Aj.bind(null,e)),B9(function(){!(pt&6)&&Ll()}),n=null;else{switch(jM(r)){case 1:n=UN;break;case 4:n=CM;break;case 16:n=jy;break;case 536870912:n=TM;break;default:n=jy}n=XL(n,HL.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function HL(e,t){if(Qg=-1,Jg=0,pt&6)throw Error(Z(327));var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Oy(e,e===Wn?ir:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=qy(e,r);else{t=r;var s=pt;pt|=2;var i=KL();(Wn!==e||ir!==t)&&(Lo=null,Nd=xn()+500,uc(e,t));do try{dW();break}catch(l){GL(e,l)}while(!0);ek(),Hy.current=i,pt=s,Tn!==null?t=0:(Wn=null,ir=0,t=Bn)}if(t!==0){if(t===2&&(s=Uw(e),s!==0&&(r=s,t=mS(e,s))),t===1)throw n=np,uc(e,0),Ta(e,r),Jr(e,xn()),n;if(t===6)Ta(e,r);else{if(s=e.current.alternate,!(r&30)&&!cW(s)&&(t=qy(e,r),t===2&&(i=Uw(e),i!==0&&(r=i,t=mS(e,i))),t===1))throw n=np,uc(e,0),Ta(e,r),Jr(e,xn()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(Z(345));case 2:Vl(e,Gr,Lo);break;case 3:if(Ta(e,r),(r&130023424)===r&&(t=mk+500-xn(),10<t)){if(Oy(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Rr(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Yw(Vl.bind(null,e,Gr,Lo),t);break}Vl(e,Gr,Lo);break;case 4:if(Ta(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-gi(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=xn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*lW(r/1960))-r,10<r){e.timeoutHandle=Yw(Vl.bind(null,e,Gr,Lo),r);break}Vl(e,Gr,Lo);break;case 5:Vl(e,Gr,Lo);break;default:throw Error(Z(329))}}}return Jr(e,xn()),e.callbackNode===n?HL.bind(null,e):null}function mS(e,t){var n=gf;return e.current.memoizedState.isDehydrated&&(uc(e,t).flags|=256),e=qy(e,t),e!==2&&(t=Gr,Gr=n,t!==null&&gS(t)),e}function gS(e){Gr===null?Gr=e:Gr.push.apply(Gr,e)}function cW(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!wi(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ta(e,t){for(t&=~pk,t&=~P0,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-gi(t),r=1<<n;e[n]=-1,t&=~r}}function Aj(e){if(pt&6)throw Error(Z(327));Hu();var t=Oy(e,0);if(!(t&1))return Jr(e,xn()),null;var n=qy(e,t);if(e.tag!==0&&n===2){var r=Uw(e);r!==0&&(t=r,n=mS(e,r))}if(n===1)throw n=np,uc(e,0),Ta(e,t),Jr(e,xn()),n;if(n===6)throw Error(Z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Vl(e,Gr,Lo),Jr(e,xn()),null}function gk(e,t){var n=pt;pt|=1;try{return e(t)}finally{pt=n,pt===0&&(Nd=xn()+500,_0&&Ll())}}function Ec(e){za!==null&&za.tag===0&&!(pt&6)&&Hu();var t=pt;pt|=1;var n=Vs.transition,r=Nt;try{if(Vs.transition=null,Nt=1,e)return e()}finally{Nt=r,Vs.transition=n,pt=t,!(pt&6)&&Ll()}}function yk(){ss=Pu.current,Vt(Pu)}function uc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,F9(n)),Tn!==null)for(n=Tn.return;n!==null;){var r=n;switch(JN(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ly();break;case 3:Sd(),Vt(Yr),Vt(br),ok();break;case 5:ik(r);break;case 4:Sd();break;case 13:Vt(Jt);break;case 19:Vt(Jt);break;case 10:tk(r.type._context);break;case 22:case 23:yk()}n=n.return}if(Wn=e,Tn=e=rl(e.current,null),ir=ss=t,Bn=0,np=null,pk=P0=Sc=0,Gr=gf=null,ql!==null){for(t=0;t<ql.length;t++)if(n=ql[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}ql=null}return e}function GL(e,t){do{var n=Tn;try{if(ek(),Kg.current=Wy,Vy){for(var r=en.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Vy=!1}if(wc=0,Un=In=en=null,pf=!1,Zf=0,fk.current=null,n===null||n.return===null){Bn=1,np=t,Tn=null;break}e:{var i=e,o=n.return,l=n,c=t;if(t=ir,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=mj(o);if(p!==null){p.flags&=-257,gj(p,o,l,i,t),p.mode&1&&pj(i,u,t),t=p,c=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}else{if(!(t&1)){pj(i,u,t),xk();break e}c=Error(Z(426))}}else if(Kt&&l.mode&1){var x=mj(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),gj(x,o,l,i,t),XN(Ed(c,l));break e}}i=c=Ed(c,l),Bn!==4&&(Bn=2),gf===null?gf=[i]:gf.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=jL(i,c,t);lj(i,y);break e;case 1:l=c;var b=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof b.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(tl===null||!tl.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var E=OL(i,l,t);lj(i,E);break e}}i=i.return}while(i!==null)}YL(n)}catch(N){t=N,Tn===n&&n!==null&&(Tn=n=n.return);continue}break}while(!0)}function KL(){var e=Hy.current;return Hy.current=Wy,e===null?Wy:e}function xk(){(Bn===0||Bn===3||Bn===2)&&(Bn=4),Wn===null||!(Sc&268435455)&&!(P0&268435455)||Ta(Wn,ir)}function qy(e,t){var n=pt;pt|=2;var r=KL();(Wn!==e||ir!==t)&&(Lo=null,uc(e,t));do try{uW();break}catch(s){GL(e,s)}while(!0);if(ek(),pt=n,Hy.current=r,Tn!==null)throw Error(Z(261));return Wn=null,ir=0,Bn}function uW(){for(;Tn!==null;)qL(Tn)}function dW(){for(;Tn!==null&&!P8();)qL(Tn)}function qL(e){var t=JL(e.alternate,e,ss);e.memoizedProps=e.pendingProps,t===null?YL(e):Tn=t,fk.current=null}function YL(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=sW(n,t),n!==null){n.flags&=32767,Tn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Bn=6,Tn=null;return}}else if(n=rW(n,t,ss),n!==null){Tn=n;return}if(t=t.sibling,t!==null){Tn=t;return}Tn=t=e}while(t!==null);Bn===0&&(Bn=5)}function Vl(e,t,n){var r=Nt,s=Vs.transition;try{Vs.transition=null,Nt=1,hW(e,t,n,r)}finally{Vs.transition=s,Nt=r}return null}function hW(e,t,n,r){do Hu();while(za!==null);if(pt&6)throw Error(Z(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Z(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(G8(e,i),e===Wn&&(Tn=Wn=null,ir=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Zm||(Zm=!0,XL(jy,function(){return Hu(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Vs.transition,Vs.transition=null;var o=Nt;Nt=1;var l=pt;pt|=4,fk.current=null,oW(e,n),VL(n,e),_9(Kw),Ry=!!Gw,Kw=Gw=null,e.current=n,aW(n),D8(),pt=l,Nt=o,Vs.transition=i}else e.current=n;if(Zm&&(Zm=!1,za=e,Ky=s),i=e.pendingLanes,i===0&&(tl=null),B8(n.stateNode),Jr(e,xn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Gy)throw Gy=!1,e=fS,fS=null,e;return Ky&1&&e.tag!==0&&Hu(),i=e.pendingLanes,i&1?e===pS?yf++:(yf=0,pS=e):yf=0,Ll(),null}function Hu(){if(za!==null){var e=jM(Ky),t=Vs.transition,n=Nt;try{if(Vs.transition=null,Nt=16>e?16:e,za===null)var r=!1;else{if(e=za,za=null,Ky=0,pt&6)throw Error(Z(331));var s=pt;for(pt|=4,ye=e.current;ye!==null;){var i=ye,o=i.child;if(ye.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(ye=u;ye!==null;){var d=ye;switch(d.tag){case 0:case 11:case 15:mf(8,d,i)}var h=d.child;if(h!==null)h.return=d,ye=h;else for(;ye!==null;){d=ye;var f=d.sibling,p=d.return;if(BL(d),d===u){ye=null;break}if(f!==null){f.return=p,ye=f;break}ye=p}}}var m=i.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}ye=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,ye=o;else e:for(;ye!==null;){if(i=ye,i.flags&2048)switch(i.tag){case 0:case 11:case 15:mf(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,ye=y;break e}ye=i.return}}var b=e.current;for(ye=b;ye!==null;){o=ye;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,ye=w;else e:for(o=b;ye!==null;){if(l=ye,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:L0(9,l)}}catch(N){un(l,l.return,N)}if(l===o){ye=null;break e}var E=l.sibling;if(E!==null){E.return=l.return,ye=E;break e}ye=l.return}}if(pt=s,Ll(),ro&&typeof ro.onPostCommitFiberRoot=="function")try{ro.onPostCommitFiberRoot(T0,e)}catch{}r=!0}return r}finally{Nt=n,Vs.transition=t}}return!1}function jj(e,t,n){t=Ed(n,t),t=jL(e,t,1),e=el(e,t,1),t=Rr(),e!==null&&(Zp(e,1,t),Jr(e,t))}function un(e,t,n){if(e.tag===3)jj(e,e,n);else for(;t!==null;){if(t.tag===3){jj(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(tl===null||!tl.has(r))){e=Ed(n,e),e=OL(t,e,1),t=el(t,e,1),e=Rr(),t!==null&&(Zp(t,1,e),Jr(t,e));break}}t=t.return}}function fW(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Rr(),e.pingedLanes|=e.suspendedLanes&n,Wn===e&&(ir&n)===n&&(Bn===4||Bn===3&&(ir&130023424)===ir&&500>xn()-mk?uc(e,0):pk|=n),Jr(e,t)}function QL(e,t){t===0&&(e.mode&1?(t=Vm,Vm<<=1,!(Vm&130023424)&&(Vm=4194304)):t=1);var n=Rr();e=Qo(e,t),e!==null&&(Zp(e,t,n),Jr(e,n))}function pW(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),QL(e,n)}function mW(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Z(314))}r!==null&&r.delete(t),QL(e,n)}var JL;JL=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Yr.current)qr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return qr=!1,nW(e,t,n);qr=!!(e.flags&131072)}else qr=!1,Kt&&t.flags&1048576&&tL(t,$y,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yg(e,t),e=t.pendingProps;var s=vd(t,br.current);Wu(t,n),s=lk(null,t,r,e,s,n);var i=ck();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qr(r)?(i=!0,Py(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,rk(t),s.updater=M0,t.stateNode=s,s._reactInternals=t,nS(t,r,e,n),t=iS(null,t,r,!0,i,n)):(t.tag=0,Kt&&i&&QN(t),jr(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yg(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=yW(r),e=oi(r,e),s){case 0:t=sS(null,t,r,e,n);break e;case 1:t=vj(null,t,r,e,n);break e;case 11:t=yj(null,t,r,e,n);break e;case 14:t=xj(null,t,r,oi(r.type,e),n);break e}throw Error(Z(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:oi(r,s),sS(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:oi(r,s),vj(e,t,r,s,n);case 3:e:{if(ML(t),e===null)throw Error(Z(387));r=t.pendingProps,i=t.memoizedState,s=i.element,aL(e,t),Uy(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Ed(Error(Z(423)),t),t=bj(e,t,r,n,s);break e}else if(r!==s){s=Ed(Error(Z(424)),t),t=bj(e,t,r,n,s);break e}else for(hs=Za(t.stateNode.containerInfo.firstChild),gs=t,Kt=!0,ci=null,n=iL(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bd(),r===s){t=Jo(e,t,n);break e}jr(e,t,r,n)}t=t.child}return t;case 5:return lL(t),e===null&&Zw(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,qw(r,s)?o=null:i!==null&&qw(r,i)&&(t.flags|=32),IL(e,t),jr(e,t,o,n),t.child;case 6:return e===null&&Zw(t),null;case 13:return LL(e,t,n);case 4:return sk(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wd(t,null,r,n):jr(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:oi(r,s),yj(e,t,r,s,n);case 7:return jr(e,t,t.pendingProps,n),t.child;case 8:return jr(e,t,t.pendingProps.children,n),t.child;case 12:return jr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,Lt(Fy,r._currentValue),r._currentValue=o,i!==null)if(wi(i.value,o)){if(i.children===s.children&&!Yr.current){t=Jo(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Ho(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),eS(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(Z(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),eS(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}jr(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Wu(t,n),s=Ys(s),r=r(s),t.flags|=1,jr(e,t,r,n),t.child;case 14:return r=t.type,s=oi(r,t.pendingProps),s=oi(r.type,s),xj(e,t,r,s,n);case 15:return RL(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:oi(r,s),Yg(e,t),t.tag=1,Qr(r)?(e=!0,Py(t)):e=!1,Wu(t,n),AL(t,r,s),nS(t,r,s,n),iS(null,t,r,!0,e,n);case 19:return PL(e,t,n);case 22:return _L(e,t,n)}throw Error(Z(156,t.tag))};function XL(e,t){return kM(e,t)}function gW(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Us(e,t,n,r){return new gW(e,t,n,r)}function vk(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yW(e){if(typeof e=="function")return vk(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$N)return 11;if(e===FN)return 14}return 2}function rl(e,t){var n=e.alternate;return n===null?(n=Us(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 1,134 bytes, line 40
40ons=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xg(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")vk(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Cu:return dc(n.children,s,i,t);case DN:o=8,s|=8;break;case Cw:return e=Us(12,n,t,s|2),e.elementType=Cw,e.lanes=i,e;case Tw:return e=Us(13,n,t,s),e.elementType=Tw,e.lanes=i,e;case Aw:return e=Us(19,n,t,s),e.elementType=Aw,e.lanes=i,e;case lM:return D0(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case oM:o=10;break e;case aM:o=9;break e;case $N:o=11;break e;case FN:o=14;break e;case wa:o=16,r=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return t=Us(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function dc(e,t,n,r){return e=Us(7,e,r,t),e.lanes=n,e}function D0(e,t,n,r){return e=Us(22,e,r,t),e.elementType=lM,e.lanes=n,e.stateNode={isHidden:!1},e}
vendor: 5,691 bytes, line 40
40function h1(e,t,n){return e=Us(6,e,null,t),e.lanes=n,e}function f1(e,t,n){return t=Us(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xW(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kb(0),this.expirationTimes=Kb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kb(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function bk(e,t,n,r,s,i,o,l,c){return e=new xW(e,t,n,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Us(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rk(i),e}function vW(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ku,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ZL(e){if(!e)return gl;e=e._reactInternals;e:{if(Kc(e)!==e||e.tag!==1)throw Error(Z(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Qr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Z(171))}if(e.tag===1){var n=e.type;if(Qr(n))return ZM(e,n,t)}return t}function eP(e,t,n,r,s,i,o,l,c){return e=bk(n,r,!0,e,s,i,o,l,c),e.context=ZL(null),n=e.current,r=Rr(),s=nl(n),i=Ho(r,s),i.callback=t??null,el(n,i,s),e.current.lanes=s,Zp(e,s,r),Jr(e,r),e}function $0(e,t,n,r){var s=t.current,i=Rr(),o=nl(s);return n=ZL(n),t.context===null?t.context=n:t.pendingContext=n,t=Ho(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=el(s,t,o),e!==null&&(yi(e,s,o,i),Gg(e,s,o)),o}function Yy(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Oj(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function wk(e,t){Oj(e,t),(e=e.alternate)&&Oj(e,t)}function bW(){return null}var tP=typeof reportError=="function"?reportError:function(e){console.error(e)};function Sk(e){this._internalRoot=e}F0.prototype.render=Sk.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Z(409));$0(e,t,null,null)};F0.prototype.unmount=Sk.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ec(function(){$0(null,e,null,null)}),t[Yo]=null}};function F0(e){this._internalRoot=e}F0.prototype.unstable_scheduleHydration=function(e){if(e){var t=_M();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ca.length&&t!==0&&t<Ca[n].priority;n++);Ca.splice(n,0,e),n===0&&MM(e)}};function Ek(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function B0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Rj(){}function wW(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Yy(o);i.call(u)}}var o=eP(t,r,e,0,null,!1,!1,"",Rj);return e._reactRootContainer=o,e[Yo]=o.current,qf(e.nodeType===8?e.parentNode:e),Ec(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=Yy(c);l.call(u)}}var c=bk(e,0,!1,null,null,!1,!1,"",Rj);return e._reactRootContainer=c,e[Yo]=c.current,qf(e.nodeType===8?e.parentNode:e),Ec(function(){$0(t,c,n,r)}),c}function U0(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var l=s;s=function(){var c=Yy(o);l.call(c)}}$0(t,o,e,s)}else o=wW(n,t,e,s,r);return Yy(o)}OM=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=zh(t.pendingLanes);n!==0&&(zN(t,n|1),Jr(t,xn()),!(pt&6)&&(Nd=xn()+500,Ll()))}break;case 13:Ec(function(){var r=Qo(e,1);if(r!==null){var s=Rr();yi(r,e,1,s)}}),wk(e,1)}};VN=function(e){if(e.tag===13){var t=Qo(e,134217728);if(t!==null){var n=Rr();yi(t,e,134217728,n)}wk(e,134217728)}};RM=function(e){if(e.tag===13){var t=nl(e),n=Qo(e,t);if(n!==null){var r=Rr();yi(n,e,t,r)}wk(e,t)}};_M=function(){return Nt};IM=function(e,t){var n=Nt;try{return Nt=e,t()}finally{Nt=n}};$w=function(e,t,n){switch(t){case"input":if(Rw(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=R0(r);if(!s)throw Error(Z(90));uM(r),Rw(r,s)}}}break;case"textarea":hM(e,n);break;case"select":t=n.value,t!=null&&Bu(e,!!n.multiple,t,!1)}};vM=gk;bM=Ec;var SW={usingClientEntryPoint:!1,Events:[tm,Ou,R0,yM,xM,gk]},Eh={findFiberByHostInstance:Kl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},EW={bundleType:Eh.bundleType,version:Eh.version,rendererPackageName:Eh.rendererPackageName,rendererConfig:Eh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:aa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=EM(e),e===null?null:e.stateNode},findFiberByHostInstance:Eh.findFiberByHostInstance||bW,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var eg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!eg.isDisabled&&eg.supportsFiber)try{T0=eg.inject(EW),ro=eg}catch{}}Cs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SW;Cs.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ek(t))throw Error(Z(200));return vW(e,t,null,n)};Cs.createRoot=function(e,t){if(!Ek(e))throw Error(Z(299));var n=!1,r="",s=tP;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=bk(e,1,!1,null,null,n,!1,r,s),e[Yo]=t.current,qf(e.nodeType===8?e.parentNode:e),new Sk(t)};Cs.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Z(188)):(e=Object.keys(e).join(","),Error(Z(268,e)));return e=EM(t),e=e===null?null:e.stateNode,e};Cs.flushSync=function(e){return Ec(e)};Cs.hydrate=function(e,t,n){if(!B0(t))throw Error(Z(200));return U0(null,e,t,!0,n)};Cs.hydrateRoot=function(e,t,n){if(!Ek(e))throw Error(Z(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=tP;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=eP(t,null,e,1,n??null,s,!1,i,o),e[Yo]=t.current,qf(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new F0(t)};Cs.render=function(e,t,n){if(!B0(t))throw Error(Z(200));return U0(null,e,t,!1,n)};Cs.unmountComponentAtNode=function(e){if(!B0(e))throw Error(Z(40));return e._reactRootContainer?(Ec(function(){U0(null,null,e,!1,function(){e._reactRootContainer=null,e[Yo]=null})}),!0):!1};Cs.unstable_batchedUpdates=gk;Cs.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!B0(n))throw Error(Z(200));if(e==null||e._reactInternals===void 0)throw Error(Z(38));return U0(e,t,n,!1,r)};Cs.version="18.3.1-next-f1338f8080-20240426";function nP(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nP)}catch(e){console.error(e)}}nP(),nM.exports=Cs;var qc=nM.exports;const rP=Jp(qc);var sP,_j=qc;sP=_j.createRoot,_j.hydrateRoot;function NW(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,s,i,o=[],l="",c=e.split("/");for(c[0]||c.shift();s=c.shift();)n=s[0],n==="*"?(o.push(n),l+=s[1]==="?"?"(?:/(.*))?":"/(.*)"):n===":"?(r=s.indexOf("?",1),i=s.indexOf(".",1),o.push(s.substring(1,~r?r:~i?i:s.length)),l+=~r&&!~i?"(?:/([^/]+?))?":"/([^/]+?)",~i&&(l+=(~r?"?":"")+"\\"+s.substring(i))):l+="/"+s;return{keys:o,pattern:new RegExp("^"+l+(t?"(?=$|/)":"/?$"),"i")}}var iP={exports:{}},oP={};/**
41 * @license React
42 * use-sync-external-store-shim.production.js
43 *
44 * Copyright (c) Meta Platforms, Inc. and affiliates.
45 *
46 * This source code is licensed under the MIT license found in the
47 * LICENSE file in the root directory of this source tree.
48 */var kd=v;function kW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var CW=typeof Object.is=="function"?Object.is:kW,TW=kd.useState,AW=kd.useEffect,jW=kd.useLayoutEffect,OW=kd.useDebugValue;function RW(e,t){var n=t(),r=TW({inst:{value:n,getSnapshot:t}}),s=r[0].inst,i=r[1];return jW(function(){s.value=n,s.getSnapshot=t,p1(s)&&i({inst:s})},[e,n,t]),AW(function(){return p1(s)&&i({inst:s}),e(function(){p1(s)&&i({inst:s})})},[e]),OW(n),n}function p1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!CW(e,n)}catch{return!0}}function _W(e,t){return t()}var IW=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?_W:RW;oP.useSyncExternalStore=kd.useSyncExternalStore!==void 0?kd.useSyncExternalStore:IW;iP.exports=oP;var z0=iP.exports;const MW=Ff.useInsertionEffect,LW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PW=LW?v.useLayoutEffect:v.useEffect,DW=MW||PW,aP=e=>{const t=v.useRef([e,(...n)=>t[0](...n)]).current;return DW(()=>{t[0]=e}),t[1]},$W="popstate",Nk="pushState",kk="replaceState",FW="hashchange",Ij=[$W,Nk,kk,FW],BW=e=>{for(const t of Ij)addEventListener(t,e);return()=>{for(const t of Ij)removeEventListener(t,e)}},lP=(e,t)=>z0.useSyncExternalStore(BW,e,t),UW=()=>location.search,zW=({ssrSearch:e=""}={})=>lP(UW,()=>e),Mj=()=>location.pathname,VW=({ssrPath:e}={})=>lP(Mj,e?()=>e:Mj),WW=(e,{replace:t=!1,state:n=null}={})=>history[t?kk:Nk](n,"",e),HW=(e={})=>[VW(e),WW],Lj=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Lj]>"u"){for(const e of[Nk,kk]){const t=history[e];history[e]=function(){const n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,Lj,{value:!0})}const GW=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",cP=(e="")=>e==="/"?"":e,KW=(e,t)=>
48e[0]==="~"?e.slice(1):cP(t)+e,qW=(e="",t)=>GW(Pj(cP(e)),Pj(t)),Pj=e=>{try{return decodeURI(e)}catch{return e}},uP={hook:HW,searchHook:zW,parser:NW,base:"",ssrPath:void 0,ssrSearch:void 0,hrefs:e=>e},dP=v.createContext(uP),qd=()=>v.useContext(dP),hP={},fP=v.createContext(hP),YW=()=>v.useContext(fP),V0=e=>{const[t,n]=e.hook(e);return[qW(e.base,t),aP((r,s)=>n(KW(r,e.base),s))]},go=()=>V0(qd()),Ck=(e,t,n,r)=>{const{pattern:s,keys:i}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",r),o=s.exec(n)||[],[l,...c]=o;return l!==void 0?[!0,(()=>{const u=i!==!1?Object.fromEntries(i.map((h,f)=>[h,c[f]])):o.groups;let d={...c};return u&&Object.assign(d,u),d})(),...r?[l]:[]]:[!1,null]},Tk=e=>Ck(qd().parser,e,go()[0]),QW=({children:e,...t})=>{var d,h;const n=qd(),r=t.hook?uP:n;let s=r;const[i,o]=((d=t.ssrPath)==null?void 0:d.split("?"))??[];o&&(t.ssrSearch=o,t.ssrPath=i),t.hrefs=t.hrefs??((h=t.hook)==null?void 0:h.hrefs);let l=v.useRef({}),c=l.current,u=c;for(let f in r){const p=f==="base"?r[f]+(t[f]||""):t[f]||r[f];c===u&&p!==u[f]&&(l.current=u={...u}),u[f]=p,p!==r[f]&&(s=u)}return v.createElement(dP.Provider,{value:s,children:e})},Dj=({children:e,component:t},n)=>t?v.createElement(t,{params:n}):typeof e=="function"?e(n):e,JW=e=>{let t=v.useRef(hP),n=t.current;for(const r in e)e[r]!==n[r]&&(n=e);return Object.keys(e).length===0&&(n=e),t.current=n},Ct=({path:e,nest:t,match:n,...r})=>{const s=qd(),[i]=V0(s),[o,l,c]=n??Ck(s.parser,e,i,t),u=JW({...YW(),...l});if(!o)return null;const d=c?v.createElement(QW,{base:c},Dj(r,u)):Dj(r,u);return v.createElement(fP.Provider,{value:u,children:d})},Te=v.forwardRef((e,t)=>{const n=qd(),[r,s]=V0(n),{to:i="",href:o=i,onClick:l,asChild:c,children:u,className:d,replace:h,state:f,...p}=e,m=aP(x=>{x.ctrlKey||x.metaKey||x.altKey||x.shiftKey||x.button!==0||(l==null||l(x),x.defaultPrevented||(x.preventDefault(),s(o,e)))}),g=n.hrefs(o[0]==="~"?o.slice(1):n.base+o,n);return c&&v.isValidElement(u)?v.cloneElement(u,{onClick:m,href:g}):v.createElement("a",{...p,onClick:m,href:g,className:d!=null&&d.call?d(r===o):d,children:u,ref:t})}),pP=e=>Array.isArray(e)?e.flatMap(t=>pP(t&&t.type===v.Fragment?t.props.children:t)):[e],XW=({children:e,location:t})=>{const n=qd(),[r]=V0(n);for(const s of pP(e)){let i=0;if(v.isValidElement(s)&&(i=Ck(n.parser,s.props.path,t||r,s.props.nest))[0])return v.cloneElement(s,{match:i})}return null};var Yd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Nc=typeof window>"u"||"Deno"in globalThis;function Ls(){}function ZW(e,t){return typeof e=="function"?e(t):e}function yS(e){return typeof e=="number"&&e>=0&&e!==1/0}function mP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gu(e,t){return typeof e=="function"?e(t):e}function ui(e,t){return typeof e=="function"?e(t):e}function $j(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==Ak(o,t.options))return!1}else if(!rp(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||i&&!i(t))}function Fj(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(kc(t.options.mutationKey)!==kc(i))return!1}else if(!rp(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Ak(e,t){return((t==null?void 0:t.queryKeyHashFn)||kc)(e)}function kc(e){return JSON.stringify(e,(t,n)=>xS(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function rp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!rp(e[n],t[n])):!1}function gP(e,t){if(e===t)return e;const n=Bj(e)&&Bj(t);if(n||xS(e)&&xS(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,l=n?[]:{};let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(l[d]=void 0,c++):(l[d]=gP(e[d],t[d]),l[d]===e[d]&&e[d]!==void 0&&c++)}return s===o&&c===s?e:l}return t}function Qy(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Bj(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xS(e){if(!Uj(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Uj(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Uj(e){return Object.prototype.toString.call(e)==="[object Object]"}function eH(e){return new Promise(t=>{setTimeout(t,e)})}
vendor: 36,214 bytes, line 48
48function vS(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?gP(e,t):t}function tH(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function nH(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var jk=Symbol();function yP(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===jk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var rc,_a,id,LI,rH=(LI=class extends Yd{constructor(){super();_e(this,rc);_e(this,_a);_e(this,id);pe(this,id,t=>{if(!Nc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){M(this,_a)||this.setEventListener(M(this,id))}onUnsubscribe(){var t;this.hasListeners()||((t=M(this,_a))==null||t.call(this),pe(this,_a,void 0))}setEventListener(t){var n;pe(this,id,t),(n=M(this,_a))==null||n.call(this),pe(this,_a,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){M(this,rc)!==t&&(pe(this,rc,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof M(this,rc)=="boolean"?M(this,rc):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},rc=new WeakMap,_a=new WeakMap,id=new WeakMap,LI),Ok=new rH,od,Ia,ad,PI,sH=(PI=class extends Yd{constructor(){super();_e(this,od,!0);_e(this,Ia);_e(this,ad);pe(this,ad,t=>{if(!Nc&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){M(this,Ia)||this.setEventListener(M(this,ad))}onUnsubscribe(){var t;this.hasListeners()||((t=M(this,Ia))==null||t.call(this),pe(this,Ia,void 0))}setEventListener(t){var n;pe(this,ad,t),(n=M(this,Ia))==null||n.call(this),pe(this,Ia,t(this.setOnline.bind(this)))}setOnline(t){M(this,od)!==t&&(pe(this,od,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return M(this,od)}},od=new WeakMap,Ia=new WeakMap,ad=new WeakMap,PI),Jy=new sH;function bS(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function iH(e){return Math.min(1e3*2**e,3e4)}function xP(e){return(e??"online")==="online"?Jy.isOnline():!0}var vP=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function m1(e){return e instanceof vP}function bP(e){let t=!1,n=0,r=!1,s;const i=bS(),o=g=>{var x;r||(f(new vP(g)),(x=e.abort)==null||x.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>Ok.isFocused()&&(e.networkMode==="always"||Jy.isOnline())&&e.canRun(),d=()=>xP(e.networkMode)&&e.canRun(),h=g=>{var x;r||(r=!0,(x=e.onSuccess)==null||x.call(e,g),s==null||s(),i.resolve(g))},f=g=>{var x;r||(r=!0,(x=e.onError)==null||x.call(e,g),s==null||s(),i.reject(g))},p=()=>new Promise(g=>{var x;s=y=>{(r||u())&&g(y)},(x=e.onPause)==null||x.call(e)}).then(()=>{var g;s=void 0,r||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(r)return;let g;const x=n===0?e.initialPromise:void 0;try{g=x??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(h).catch(y=>{var k;if(r)return;const b=e.retry??(Nc?0:3),w=e.retryDelay??iH,E=typeof w=="function"?w(n,y):w,N=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,y);if(t||!N){f(y);return}n++,(k=e.onFail)==null||k.call(e,n,y),eH(E).then(()=>u()?void 0:p()).then(()=>{t?f(y):m()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?m():p().then(m),i)}}function oH(){let e=[],t=0,n=l=>{l()},r=l=>{l()},s=l=>setTimeout(l,0);const i=l=>{t?e.push(l):s(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var Pn=oH(),sc,DI,wP=(DI=class{constructor(){_e(this,sc)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yS(this.gcTime)&&pe(this,sc,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Nc?1/0:5*60*1e3))}clearGcTimeout(){M(this,sc)&&(clearTimeout(M(this,sc)),pe(this,sc,void 0))}},sc=new WeakMap,DI),ld,cd,Ms,fr,Kp,ic,ai,Ro,$I,aH=($I=class extends wP{constructor(t){super();_e(this,ai);_e(this,ld);_e(this,cd);_e(this,Ms);_e(this,fr);_e(this,Kp);_e(this,ic);pe(this,ic,!1),pe(this,Kp,t.defaultOptions),this.setOptions(t.options),this.observers=[],pe(this,Ms,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,pe(this,ld,lH(this.options)),this.state=t.state??M(this,ld),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=M(this,fr))==null?void 0:t.promise}setOptions(t){this.options={...M(this,Kp),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&M(this,Ms).remove(this)}setData(t,n){const r=vS(this.state.data,t,this.options);return tt(this,ai,Ro).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){tt(this,ai,Ro).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=M(this,fr))==null?void 0:r.promise;return(s=M(this,fr))==null||s.cancel(t),n?n.then(Ls).catch(Ls):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(M(this,ld))}isActive(){return this.observers.some(t=>ui(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===jk||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!mP(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=M(this,fr))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=M(this,fr))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),M(this,Ms).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(M(this,fr)&&(M(this,ic)?M(this,fr).cancel({revert:!0}):M(this,fr).cancelRetry()),this.scheduleGc()),M(this,Ms).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,ai,Ro).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(M(this,fr))return M(this,fr).continueRetry(),M(this,fr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(pe(this,ic,!0),r.signal)})},i=()=>{const h=yP(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return s(f),pe(this,ic,!1),this.options.persister?this.options.persister(h,f,this):h(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(c=this.options.behavior)==null||c.onFetch(o,this),pe(this,cd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&tt(this,ai,Ro).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const l=h=>{var f,p,m,g;m1(h)&&h.silent||tt(this,ai,Ro).call(this,{type:"error",error:h}),m1(h)||((p=(f=M(this,Ms).config).onError)==null||p.call(f,h,this),(g=(m=M(this,Ms).config).onSettled)==null||g.call(m,this.state.data,h,this)),this.scheduleGc()};return pe(this,fr,bP({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var f,p,m,g;if(h===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(x){l(x);return}(p=(f=M(this,Ms).config).onSuccess)==null||p.call(f,h,this),(g=(m=M(this,Ms).config).onSettled)==null||g.call(m,h,this.state.error,this),this.scheduleGc()},onError:l,onFail:(h,f)=>{tt(this,ai,Ro).call(this,{type:"failed",failureCount:h,error:f})},onPause:()=>{tt(this,ai,Ro).call(this,{type:"pause"})},onContinue:()=>{tt(this,ai,Ro).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),M(this,fr).start()}},ld=new WeakMap,cd=new WeakMap,Ms=new WeakMap,fr=new WeakMap,Kp=new WeakMap,ic=new WeakMap,ai=new WeakSet,Ro=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...SP(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return m1(s)&&s.revert&&M(this,cd)?{...M(this,cd),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Pn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),M(this,Ms).notify({query:this,type:"updated",action:t})})},$I);function SP(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xP(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lH(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Wi,FI,cH=(FI=class extends Yd{constructor(t={}){super();_e(this,Wi);this.config=t,pe(this,Wi,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Ak(s,n);let o=this.get(i);return o||(o=new aH({cache:this,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){M(this,Wi).has(t.queryHash)||(M(this,Wi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=M(this,Wi).get(t.queryHash);n&&(t.destroy(),n===t&&M(this,Wi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Pn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return M(this,Wi).get(t)}getAll(){return[...M(this,Wi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>$j(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>$j(t,r)):n}notify(t){Pn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Pn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Pn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Wi=new WeakMap,FI),Hi,Cr,oc,Gi,xa,BI,uH=(BI=class extends wP{constructor(t){super();_e(this,Gi);_e(this,Hi);_e(this,Cr);_e(this,oc);this.mutationId=t.mutationId,pe(this,Cr,t.mutationCache),pe(this,Hi,[]),this.state=t.state||EP(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){M(this,Hi).includes(t)||(M(this,Hi).push(t),this.clearGcTimeout(),M(this,Cr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){pe(this,Hi,M(this,Hi).filter(n=>n!==t)),this.scheduleGc(),M(this,Cr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){M(this,Hi).length||(this.state.status==="pending"?this.scheduleGc():M(this,Cr).remove(this))}continue(){var t;return((t=M(this,oc))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,l,c,u,d,h,f,p,m,g,x,y,b,w,E,N,k,C;pe(this,oc,bP({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(T,j)=>{tt(this,Gi,xa).call(this,{type:"failed",failureCount:T,error:j})},onPause:()=>{tt(this,Gi,xa).call(this,{type:"pause"})},onContinue:()=>{tt(this,Gi,xa).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>M(this,Cr).canRun(this)}));const n=this.state.status==="pending",r=!M(this,oc).canStart();try{if(!n){tt(this,Gi,xa).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(s=M(this,Cr).config).onMutate)==null?void 0:i.call(s,t,this));const j=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));j!==this.state.context&&tt(this,Gi,xa).call(this,{type:"pending",context:j,variables:t,isPaused:r})}const T=await M(this,oc).start();return await((u=(c=M(this,Cr).config).onSuccess)==null?void 0:u.call(c,T,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,T,t,this.state.context)),await((p=(f=M(this,Cr).config).onSettled)==null?void 0:p.call(f,T,null,this.state.variables,this.state.context,this)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,T,null,t,this.state.context)),tt(this,Gi,xa).call(this,{type:"success",data:T}),T}catch(T){try{throw await((y=(x=M(this,Cr).config).onError)==null?void 0:y.call(x,T,t,this.state.context,this)),await((w=(b=this.options).onError)==null?void 0:w.call(b,T,t,this.state.context)),await((N=(E=M(this,Cr).config).onSettled)==null?void 0:N.call(E,void 0,T,this.state.variables,this.state.context,this)),await((C=(k=this.options).onSettled)==null?void 0:C.call(k,void 0,T,t,this.state.context)),T}finally{tt(this,Gi,xa).call(this,{type:"error",error:T})}}finally{M(this,Cr).runNext(this)}}},Hi=new WeakMap,Cr=new WeakMap,oc=new WeakMap,Gi=new WeakSet,xa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Pn.batch(()=>{M(this,Hi).forEach(r=>{r.onMutationUpdate(t)}),M(this,Cr).notify({mutation:this,type:"updated",action:t})})},BI);function EP(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rs,qp,UI,dH=(UI=class extends Yd{constructor(t={}){super();_e(this,rs);_e(this,qp);this.config=t,pe(this,rs,new Map),pe(this,qp,Date.now())}build(t,n,r){const s=new uH({mutationCache:this,mutationId:++Pm(this,qp)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){const n=tg(t),r=M(this,rs).get(n)??[];r.push(t),M(this,rs).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=tg(t);if(M(this,rs).has(n)){const s=(r=M(this,rs).get(n))==null?void 0:r.filter(i=>i!==t);s&&(s.length===0?M(this,rs).delete(n):M(this,rs).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=M(this,rs).get(tg(t)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=M(this,rs).get(tg(t)))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Pn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...M(this,rs).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Fj(n,r))}findAll(t={}){return this.getAll().filter(n=>Fj(t,n))}notify(t){Pn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Pn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ls))))}},rs=new WeakMap,qp=new WeakMap,UI);function tg(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function zj(e){return{onFetch:(t,n)=>{var d,h,f,p,m;const r=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let g=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},y=yP(t.options,t.fetchOptions),b=async(w,E,N)=>{if(g)return Promise.reject();if(E==null&&w.pages.length)return Promise.resolve(w);const k={queryKey:t.queryKey,pageParam:E,direction:N?"backward":"forward",meta:t.options.meta};x(k);const C=await y(k),{maxPages:T}=t.options,j=N?nH:tH;return{pages:j(w.pages,C,T),pageParams:j(w.pageParams,E,T)}};if(s&&i.length){const w=s==="backward",E=w?hH:Vj,N={pages:i,pageParams:o},k=E(r,N);l=await b(N,k,w)}else{const w=e??i.length;do{const E=c===0?o[0]??r.initialPageParam:Vj(r,l);if(c>0&&E==null)break;l=await b(l,E),c++}while(c<w)}return l};t.options.persister?t.fetchFn=()=>{var g,x;return(x=(g=t.options).persister)==null?void 0:x.call(g,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Vj(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function hH(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var cn,Ma,La,ud,dd,Pa,hd,fd,zI,fH=(zI=class{constructor(e={}){_e(this,cn);_e(this,Ma);_e(this,La);_e(this,ud);_e(this,dd);_e(this,Pa);_e(this,hd);_e(this,fd);pe(this,cn,e.queryCache||new cH),pe(this,Ma,e.mutationCache||new dH),pe(this,La,e.defaultOptions||{}),pe(this,ud,new Map),pe(this,dd,new Map),pe(this,Pa,0)}mount(){Pm(this,Pa)._++,M(this,Pa)===1&&(pe(this,hd,Ok.subscribe(async e=>{e&&(await this.resumePausedMutations(),M(this,cn).onFocus())})),pe(this,fd,Jy.subscribe(async e=>{e&&(await this.resumePausedMutations(),M(this,cn).onOnline())})))}unmount(){var e,t;Pm(this,Pa)._--,M(this,Pa)===0&&((e=M(this,hd))==null||e.call(this),pe(this,hd,void 0),(t=M(this,fd))==null||t.call(this),pe(this,fd,void 0))}isFetching(e){return M(this,cn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return M(this,Ma).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=M(this,cn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=M(this,cn).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Gu(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return M(this,cn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=M(this,cn).get(r.queryHash),i=s==null?void 0:s.state.data,o=ZW(t,i);if(o!==void 0)return M(this,cn).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Pn.batch(()=>M(this,cn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=M(this,cn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=M(this,cn);Pn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=M(this,cn),r={type:"active",...e};return Pn.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Pn.batch(()=>M(this,cn).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Ls).catch(Ls)}invalidateQueries(e={},t={}){return Pn.batch(()=>{if(M(this,cn).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Pn.batch(()=>M(this,cn).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Ls)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Ls)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=M(this,cn).build(this,t);return n.isStaleByTime(Gu(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ls).catch(Ls)}fetchInfiniteQuery(e){return e.behavior=zj(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ls).catch(Ls)}ensureInfiniteQueryData(e){return e.behavior=zj(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Jy.isOnline()?M(this,Ma).resumePausedMutations():Promise.resolve()}getQueryCache(){return M(this,cn)}getMutationCache(){return M(this,Ma)}getDefaultOptions(){return M(this,La)}setDefaultOptions(e){pe(this,La,e)}setQueryDefaults(e,t){M(this,ud).set(kc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...M(this,ud).values()];let n={};return t.forEach(r=>{rp(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){M(this,dd).set(kc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...M(this,dd).values()];let n={};return t.forEach(r=>{rp(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...M(this,La).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ak(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===jk&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...M(this,La).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){M(this,cn).clear(),M(this,Ma).clear()}},cn=new WeakMap,Ma=new WeakMap,La=new WeakMap,ud=new WeakMap,dd=new WeakMap,Pa=new WeakMap,hd=new WeakMap,fd=new WeakMap,zI),Wr,ut,Yp,Tr,ac,pd,Da,Ki,Qp,md,gd,lc,cc,$a,yd,wt,Wh,wS,SS,ES,NS,kS,CS,TS,NP,VI,pH=(VI=class extends Yd{constructor(t,n){super();_e(this,wt);_e(this,Wr);_e(this,ut);_e(this,Yp);_e(this,Tr);_e(this,ac);_e(this,pd);_e(this,Da);_e(this,Ki);_e(this,Qp);_e(this,md);_e(this,gd);_e(this,lc);_e(this,cc);_e(this,$a);_e(this,yd,new Set);this.options=n,pe(this,Wr,t),pe(this,Ki,null),pe(this,Da,bS()),this.options.experimental_prefetchInRender||M(this,Da).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(M(this,ut).addObserver(this),Wj(M(this,ut),this.options)?tt(this,wt,Wh).call(this):this.updateResult(),tt(this,wt,NS).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return AS(M(this,ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return AS(M(this,ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,wt,kS).call(this),tt(this,wt,CS).call(this),M(this,ut).removeObserver(this)}setOptions(t,n){const r=this.options,s=M(this,ut);if(this.options=M(this,Wr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ui(this.options.enabled,M(this,ut))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");tt(this,wt,TS).call(this),M(this,ut).setOptions(this.options),r._defaulted&&!Qy(this.options,r)&&M(this,Wr).getQueryCache().notify({type:"observerOptionsUpdated",query:M(this,ut),observer:this});const i=this.hasListeners();i&&Hj(M(this,ut),s,this.options,r)&&tt(this,wt,Wh).call(this),this.updateResult(n),i&&(M(this,ut)!==s||ui(this.options.enabled,M(this,ut))!==ui(r.enabled,M(this,ut))||Gu(this.options.staleTime,M(this,ut))!==Gu(r.staleTime,M(this,ut)))&&tt(this,wt,wS).call(this);const o=tt(this,wt,SS).call(this);i&&(M(this,ut)!==s||ui(this.options.enabled,M(this,ut))!==ui(r.enabled,M(this,ut))||o!==M(this,$a))&&tt(this,wt,ES).call(this,o)}getOptimisticResult(t){const n=M(this,Wr).getQueryCache().build(M(this,Wr),t),r=this.createResult(n,t);return gH(this,r)&&(pe(this,Tr,r),pe(this,pd,this.options),pe(this,ac,M(this,ut).state)),r}getCurrentResult(){return M(this,Tr)}trackResult(t,n){const r={};return Object.keys(t).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),t[s])})}),r}trackProp(t){M(this,yd).add(t)}getCurrentQuery(){return M(this,ut)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=M(this,Wr).defaultQueryOptions(t),r=M(this,Wr).getQueryCache().build(M(this,Wr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return tt(this,wt,Wh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),M(this,Tr)))}createResult(t,n){var T;const r=M(this,ut),s=this.options,i=M(this,Tr),o=M(this,ac),l=M(this,pd),u=t!==r?t.state:M(this,Yp),{state:d}=t;let h={...d},f=!1,p;if(n._optimisticResults){const j=this.hasListeners(),S=!j&&Wj(t,n),R=j&&Hj(t,r,n,s);(S||R)&&(h={...h,...SP(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:x}=h;if(n.select&&h.data!==void 0)if(i&&h.data===(o==null?void 0:o.data)&&n.select===M(this,Qp))p=M(this,md);else try{pe(this,Qp,n.select),p=n.select(h.data),p=vS(i==null?void 0:i.data,p,n),pe(this,md,p),pe(this,Ki,null)}catch(j){pe(this,Ki,j)}else p=h.data;if(n.placeholderData!==void 0&&p===void 0&&x==="pending"){let j;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))j=i.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((T=M(this,gd))==null?void 0:T.state.data,M(this,gd)):n.placeholderData,n.select&&j!==void 0)try{j=n.select(j),pe(this,Ki,null)}catch(S){pe(this,Ki,S)}j!==void 0&&(x="success",p=vS(i==null?void 0:i.data,j,n),f=!0)}M(this,Ki)&&(m=M(this,Ki),p=M(this,md),g=Date.now(),x="error");const y=h.fetchStatus==="fetching",b=x==="pending",w=x==="error",E=b&&y,N=p!==void 0,C={status:x,fetchStatus:h.fetchStatus,isPending:b,isSuccess:x==="success",isError:w,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:w&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&N,isStale:Rk(t,n),refetch:this.refetch,promise:M(this,Da)};if(this.options.experimental_prefetchInRender){const j=_=>{C.status==="error"?_.reject(C.error):C.data!==void 0&&_.resolve(C.data)},S=()=>{const _=pe(this,Da,C.promise=bS());j(_)},R=M(this,Da);switch(R.status){case"pending":t.queryHash===r.queryHash&&j(R);break;case"fulfilled":(C.status==="error"||C.data!==R.value)&&S();break;case"rejected":(C.status!=="error"||C.error!==R.reason)&&S();break}}return C}updateResult(t){const n=M(this,Tr),r=this.createResult(M(this,ut),this.options);if(pe(this,ac,M(this,ut).state),pe(this,pd,this.options),M(this,ac).data!==void 0&&pe(this,gd,M(this,ut)),Qy(r,n))return;pe(this,Tr,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!M(this,yd).size)return!0;const c=new Set(l??M(this,yd));return this.options.throwOnError&&c.add("error"),Object.keys(M(this,Tr)).some(u=>{const d=u;return M(this,Tr)[d]!==n[d]&&c.has(d)})};(t==null?void 0:t.listeners)!==!1&&i()&&(s.listeners=!0),tt(this,wt,NP).call(this,{...s,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,wt,NS).call(this)}},Wr=new WeakMap,ut=new WeakMap,Yp=new WeakMap,Tr=new WeakMap,ac=new WeakMap,pd=new WeakMap,Da=new WeakMap,Ki=new WeakMap,Qp=new WeakMap,md=new WeakMap,gd=new WeakMap,lc=new WeakMap,cc=new WeakMap,$a=new WeakMap,yd=new WeakMap,wt=new WeakSet,Wh=function(t){tt(this,wt,TS).call(this);let n=M(this,ut).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ls)),n},wS=function(){tt(this,wt,kS).call(this);const t=Gu(this.options.staleTime,M(this,ut));if(Nc||M(this,Tr).isStale||!yS(t))return;const r=mP(M(this,Tr).dataUpdatedAt,t)+1;pe(this,lc,setTimeout(()=>{M(this,Tr).isStale||this.updateResult()},r))},SS=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(M(this,ut)):this.options.refetchInterval)??!1},ES=function(t){tt(this,wt,CS).call(this),pe(this,$a,t),!(Nc||ui(this.options.enabled,M(this,ut))===!1||!yS(M(this,$a))||M(this,$a)===0)&&pe(this,cc,setInterval(()=>{(this.options.refetchIntervalInBackground||Ok.isFocused())&&tt(this,wt,Wh).call(this)},M(this,$a)))},NS=function(){tt(this,wt,wS).call(this),tt(this,wt,ES).call(this,tt(this,wt,SS).call(this))},kS=function(){M(this,lc)&&(clearTimeout(M(this,lc)),pe(this,lc,void 0))},CS=function(){M(this,cc)&&(clearInterval(M(this,cc)),pe(this,cc,void 0))},TS=function(){const t=M(this,Wr).getQueryCache().build(M(this,Wr),this.options);if(t===M(this,ut))return;const n=M(this,ut);pe(this,ut,t),pe(this,Yp,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},NP=function(t){Pn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(M(this,Tr))}),M(this,Wr).getQueryCache().notify({query:M(this,ut),type:"observerResultsUpdated"})})},VI);function mH(e,t){return ui(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Wj(e,t){return mH(e,t)||e.state.data!==void 0&&AS(e,t,t.refetchOnMount)}function AS(e,t,n){if(ui(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Rk(e,t)}return!1}function Hj(e,t,n,r){return(e!==t||ui(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Rk(e,n)}function Rk(e,t){return ui(t.enabled,e)!==!1&&e.isStaleByTime(Gu(t.staleTime,e))}function gH(e,t){return!Qy(e.getCurrentResult(),t)}var Fa,Ba,Hr,Fo,Ko,Zg,jS,WI,yH=(WI=class extends Yd{constructor(n,r){super();_e(this,Ko);_e(this,Fa);_e(this,Ba);_e(this,Hr);_e(this,Fo);pe(this,Fa,n),this.setOptions(r),this.bindMethods(),tt(this,Ko,Zg).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=M(this,Fa).defaultMutationOptions(n),Qy(this.options,r)||M(this,Fa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:M(this,Hr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&kc(r.mutationKey)!==kc(this.options.mutationKey)?this.reset():((s=M(this,Hr))==null?void 0:s.state.status)==="pending"&&M(this,Hr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=M(this,Hr))==null||n.removeObserver(this)}onMutationUpdate(n){tt(this,Ko,Zg).call(this),tt(this,Ko,jS).call(this,n)}getCurrentResult(){return M(this,Ba)}reset(){var n;(n=M(this,Hr))==null||n.removeObserver(this),pe(this,Hr,void 0),tt(this,Ko,Zg).call(this),tt(this,Ko,jS).call(this)}mutate(n,r){var s;return pe(this,Fo,r),(s=M(this,Hr))==null||s.removeObserver(this),pe(this,Hr,M(this,Fa).getMutationCache().build(M(this,Fa),this.options)),M(this,Hr).addObserver(this),M(this,Hr).execute(n)}},Fa=new WeakMap,Ba=new WeakMap,Hr=new WeakMap,Fo=new WeakMap,Ko=new WeakSet,Zg=function(){var r;const n=((r=M(this,Hr))==null?void 0:r.state)??EP();pe(this,Ba,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},jS=function(n){Pn.batch(()=>{var r,s,i,o,l,c,u,d;if(M(this,Fo)&&this.hasListeners()){const h=M(this,Ba).variables,f=M(this,Ba).context;(n==null?void 0:n.type)==="success"?((s=(r=M(this,Fo)).onSuccess)==null||s.call(r,n.data,h,f),(o=(i=M(this,Fo)).onSettled)==null||o.call(i,n.data,null,h,f)):(n==null?void 0:n.type)==="error"&&((c=(l=M(this,Fo)).onError)==null||c.call(l,n.error,h,f),(d=(u=M(this,Fo)).onSettled)==null||d.call(u,void 0,n.error,h,f))}this.listeners.forEach(h=>{h(M(this,Ba))})})},WI),kP=v.createContext(void 0),Qd=e=>{const t=v.useContext(kP);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},xH=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(kP.Provider,{value:e,children:t})),CP=v.createContext(!1),vH=()=>v.useContext(CP);CP.Provider;function bH(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var wH=v.createContext(bH()),SH=()=>v.useContext(wH);function TP(e,t){return typeof e=="function"?e(...t):!!e}function OS(){}var EH=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},NH=e=>{v.useEffect(()=>{e.clearReset()},[e])},kH=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&TP(n,[e.error,r]),CH=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},TH=(e,t)=>e.isLoading&&e.isFetching&&!t,AH=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Gj=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function jH(e,t,n){var d,h,f,p,m;const r=Qd(),s=vH(),i=SH(),o=r.defaultQueryOptions(e);(h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,o),o._optimisticResults=s?"isRestoring":"optimistic",CH(o),EH(o,i),NH(i);const l=!r.getQueryCache().get(o.queryHash),[c]=v.useState(()=>new t(r,o)),u=c.getOptimisticResult(o);if(v.useSyncExternalStore(v.useCallback(g=>{const x=s?OS:c.subscribe(Pn.batchCalls(g));return c.updateResult(),x},[c,s]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),v.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),AH(o,u))throw Gj(o,c,i);if(kH({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,o,u),o.experimental_prefetchInRender&&!Nc&&TH(u,s)){const g=l?Gj(o,c,i):(m=r.getQueryCache().get(o.queryHash))==null?void 0:m.promise;g==null||g.catch(OS).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function tn(e,t){return jH(e,pH)}function zs(e,t){const n=Qd(),[r]=v.useState(()=>new yH(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const s=v.useSyncExternalStore(v.useCallback(o=>r.subscribe(Pn.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=v.useCallback((o,l)=>{r.mutate(o,l).catch(OS)},[r]);if(s.error&&TP(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}async function AP(e){if(!e.ok){const t=await e.text()||e.statusText;throw new Error(`${e.status}: ${t}`)}}
48async function sp(e,t,n){const r=await fetch(t,{method:e,headers:n?{"Content-Type":"application/json"}:{},body:n?JSON.stringify(n):void 0,credentials:"include"});return await AP(r),r}const OH=({on401:e})=>async({queryKey:t})=>{let n=t[0];if(t.length>1&&t[1]&&typeof t[1]=="object"){const s=new URLSearchParams,i=t[1];Object.entries(i).forEach(([o,l])=>{l!=null&&s.append(o,String(l))}),s.toString()&&(n+="?"+s.toString())}const r=await fetch(n,{credentials:"include"});return e==="returnNull"&&r.status===401?null:(await AP(r),await r.json())},jP=new fH({defaultOptions:{queries:{queryFn:OH({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}}),RH=1,_H=1e6;let g1=0;function IH(){return g1=(g1+1)%Number.MAX_SAFE_INTEGER,g1.toString()}const y1=new Map,Kj=e=>{if(y1.has(e))return;const t=setTimeout(()=>{y1.delete(e),xf({type:"REMOVE_TOAST",toastId:e})},_H);y1.set(e,t)},MH=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,RH)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Kj(n):e.toasts.forEach(r=>{Kj(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ey=[];let ty={toasts:[]};function xf(e){ty=MH(ty,e),ey.forEach(t=>{t(ty)})}function LH({...e}){const t=IH(),n=s=>xf({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>xf({type:"DISMISS_TOAST",toastId:t});return xf({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Fr(){const[e,t]=v.useState(ty);return v.useEffect(()=>(ey.push(t),()=>{const n=ey.indexOf(t);n>-1&&ey.splice(n,1)}),[e]),{...e,toast:LH,dismiss:n=>xf({type:"DISMISS_TOAST",toastId:n})}}function ae(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function qj(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function W0(...e){return t=>{let n=!1;const r=e.map(s=>{const i=qj(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():qj(e[s],null)}}}}function gt(...e){return v.useCallback(W0(...e),e)}function PH(e,t){const n=v.createContext(t),r=i=>{const{children:o,...l}=i,c=v.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function s(i){const o=v.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function As(e,t=[]){let n=[];function r(i,o){const l=v.createContext(o),c=n.length;n=[...n,o];const u=h=>{var y;const{scope:f,children:p,...m}=h,g=((y=f==null?void 0:f[e])==null?void 0:y[c])||l,x=v.useMemo(()=>m,Object.values(m));return a.jsx(g.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(h,f){var g;const p=((g=f==null?void 0:f[e])==null?void 0:g[c])||l,m=v.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(o=>v.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,DH(s,...t)]}function DH(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Cc(e){const t=$H(e),n=v.forwardRef((r,s)=>{const{children:i,...o}=r,l=v.Children.toArray(i),c=l.find(BH);if(c){const u=c.props.children,d=l.map(h=>h===c?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:h);return a.jsx(t,{...o,ref:s,children:v.isValidElement(u)?v.cloneElement(u,void 0,d):null})}return a.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}var OP=Cc("Slot");function $H(e){const t=v.forwardRef((n,r)=>{const{children:s,...i}=n;
vendor: 9,228 bytes, line 48
48if(v.isValidElement(s)){const o=zH(s),l=UH(i,s.props);return s.type!==v.Fragment&&(l.ref=r?W0(r,o):o),v.cloneElement(s,l)}return v.Children.count(s)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var RP=Symbol("radix.slottable");function FH(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=RP,t}function BH(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===RP}function UH(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...l)=>{i(...l),s(...l)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function zH(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function H0(e){const t=e+"CollectionProvider",[n,r]=As(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:x,children:y}=g,b=Le.useRef(null),w=Le.useRef(new Map).current;return a.jsx(s,{scope:x,itemMap:w,collectionRef:b,children:y})};o.displayName=t;const l=e+"CollectionSlot",c=Cc(l),u=Le.forwardRef((g,x)=>{const{scope:y,children:b}=g,w=i(l,y),E=gt(x,w.collectionRef);return a.jsx(c,{ref:E,children:b})});u.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=Cc(d),p=Le.forwardRef((g,x)=>{const{scope:y,children:b,...w}=g,E=Le.useRef(null),N=gt(x,E),k=i(d,y);return Le.useEffect(()=>(k.itemMap.set(E,{ref:E,...w}),()=>void k.itemMap.delete(E))),a.jsx(f,{[h]:"",ref:N,children:b})});p.displayName=d;function m(g){const x=i(e+"CollectionConsumer",g);return Le.useCallback(()=>{const b=x.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((k,C)=>w.indexOf(k.ref.current)-w.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},m,r]}var VH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],je=VH.reduce((e,t)=>{const n=Cc(`Primitive.${t}`),r=v.forwardRef((s,i)=>{const{asChild:o,...l}=s,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _k(e,t){e&&qc.flushSync(()=>e.dispatchEvent(t))}function wr(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function WH(e,t=globalThis==null?void 0:globalThis.document){const n=wr(e);v.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var HH="DismissableLayer",RS="dismissableLayer.update",GH="dismissableLayer.pointerDownOutside",KH="dismissableLayer.focusOutside",Yj,_P=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jd=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=v.useContext(_P),[d,h]=v.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),m=gt(t,C=>h(C)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(x),b=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,E=b>=y,N=YH(C=>{const T=C.target,j=[...u.branches].some(S=>S.contains(T));!E||j||(s==null||s(C),o==null||o(C),C.defaultPrevented||l==null||l())},f),k=QH(C=>{const T=C.target;[...u.branches].some(S=>S.contains(T))||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},f);return WH(C=>{b===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),v.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Yj=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Qj(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Yj)}},[d,f,n,u]),v.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Qj())},[d,u]),v.useEffect(()=>{const C=()=>p({});return document.addEventListener(RS,C),()=>document.removeEventListener(RS,C)},[]),a.jsx(je.div,{...c,ref:m,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:ae(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ae(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ae(e.onPointerDownCapture,N.onPointerDownCapture)})});Jd.displayName=HH;var qH="DismissableLayerBranch",IP=v.forwardRef((e,t)=>{const n=v.useContext(_P),r=v.useRef(null),s=gt(t,r);return v.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),a.jsx(je.div,{...e,ref:s})});IP.displayName=qH;function YH(e,t=globalThis==null?void 0:globalThis.document){const n=wr(e),r=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){MP(GH,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function QH(e,t=globalThis==null?void 0:globalThis.document){const n=wr(e),r=v.useRef(!1);return v.useEffect(()=>{const s=i=>{i.target&&!r.current&&MP(KH,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Qj(){const e=new CustomEvent(RS);document.dispatchEvent(e)}function MP(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?_k(s,i):s.dispatchEvent(i)}var JH=Jd,XH=IP,Sr=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},ZH="Portal",rm=v.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,i]=v.useState(!1);Sr(()=>i(!0),[]);const o=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?rP.createPortal(a.jsx(je.div,{...r,ref:t}),o):null});rm.displayName=ZH;function e7(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Zs=e=>{const{present:t,children:n}=e,r=t7(t),s=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),i=gt(r.ref,n7(s));return typeof n=="function"||r.isPresent?v.cloneElement(s,{ref:i}):null};Zs.displayName="Presence";function t7(e){const[t,n]=v.useState(),r=v.useRef({}),s=v.useRef(e),i=v.useRef("none"),o=e?"mounted":"unmounted",[l,c]=e7(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=ng(r.current);i.current=l==="mounted"?u:"none"},[l]),Sr(()=>{const u=r.current,d=s.current;if(d!==e){const f=i.current,p=ng(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Sr(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=p=>{const g=ng(r.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=p=>{p.target===t&&(i.current=ng(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function ng(e){return(e==null?void 0:e.animationName)||"none"}function n7(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Xo({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=r7({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,l=wr(n),c=v.useCallback(u=>{if(i){const h=typeof u=="function"?u(e):u;h!==e&&l(h)}else s(u)},[i,e,s,l]);return[o,c]}function r7({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,s=v.useRef(r),i=wr(t);return v.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var s7="VisuallyHidden",sm=v.forwardRef((e,t)=>
48a.jsx(je.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));sm.displayName=s7;var i7=sm,Ik="ToastProvider",[Mk,o7,a7]=H0("Toast"),[LP,tAe]=As("Toast",[a7]),[l7,G0]=LP(Ik),PP=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[l,c]=v.useState(null),[u,d]=v.useState(0),h=v.useRef(!1),f=v.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ik}\`. Expected non-empty \`string\`.`),a.jsx(Mk.Provider,{scope:t,children:a.jsx(l7,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:v.useCallback(()=>d(p=>p+1),[]),onToastRemove:v.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};PP.displayName=Ik;var DP="ToastViewport",c7=["F8"],_S="toast.viewportPause",IS="toast.viewportResume",$P=v.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=c7,label:s="Notifications ({hotkey})",...i}=e,o=G0(DP,n),l=o7(n),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),h=v.useRef(null),f=gt(t,h,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=o.toastCount>0;v.useEffect(()=>{const x=y=>{var w;r.length!==0&&r.every(E=>y[E]||y.code===E)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),v.useEffect(()=>{const x=c.current,y=h.current;if(m&&x&&y){const b=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(_S);y.dispatchEvent(k),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(IS);y.dispatchEvent(k),o.isClosePausedRef.current=!1}},E=k=>{!x.contains(k.relatedTarget)&&w()},N=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",b),x.addEventListener("focusout",E),x.addEventListener("pointermove",b),x.addEventListener("pointerleave",N),window.addEventListener("blur",b),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",b),x.removeEventListener("focusout",E),x.removeEventListener("pointermove",b),x.removeEventListener("pointerleave",N),window.removeEventListener("blur",b),window.removeEventListener("focus",w)}}},[m,o.isClosePausedRef]);const g=v.useCallback(({tabbingDirection:x})=>{const b=l().map(w=>{const E=w.ref.current,N=[E,...S7(E)];return x==="forwards"?N:N.reverse()});return(x==="forwards"?b.reverse():b).flat()},[l]);return v.useEffect(()=>{const x=h.current;if(x){const y=b=>{var N,k,C;const w=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!w){const T=document.activeElement,j=b.shiftKey;if(b.target===x&&j){(N=u.current)==null||N.focus();return}const _=g({tabbingDirection:j?"backwards":"forwards"}),L=_.findIndex(A=>A===T);x1(_.slice(L+1))?b.preventDefault():j?(k=u.current)==null||k.focus():(C=d.current)==null||C.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[l,g]),a.jsxs(XH,{ref:c,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&a.jsx(MS,{ref:u,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"forwards"});x1(x)}}),a.jsx(Mk.Slot,{scope:n,children:a.jsx(je.ol,{tabIndex:-1,...i,ref:f})}),m&&a.jsx(MS,{ref:d,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"backwards"});x1(x)}})]})});$P.displayName=DP;var FP="ToastFocusProxy",MS=v.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=G0(FP,n);return a.jsx(sm,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});MS.displayName=FP;var K0="Toast",u7="toast.swipeStart",d7="toast.swipeMove",h7="toast.swipeCancel",f7="toast.swipeEnd",BP=v.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[l=!0,c]=Xo({prop:r,defaultProp:s,onChange:i});return a.jsx(Zs,{present:n||l,children:a.jsx(g7,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:wr(e.onPause),onResume:wr(e.onResume),onSwipeStart:ae(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ae(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:ae(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ae(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});BP.displayName=K0;var[p7,m7]=LP(K0,{onClose(){}}),g7=v.forwardRef((e,t)=>
48{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:p,...m}=e,g=G0(K0,n),[x,y]=v.useState(null),b=gt(t,A=>y(A)),w=v.useRef(null),E=v.useRef(null),N=s||g.duration,k=v.useRef(0),C=v.useRef(N),T=v.useRef(0),{onToastAdd:j,onToastRemove:S}=g,R=wr(()=>{var B;(x==null?void 0:x.contains(document.activeElement))&&((B=g.viewport)==null||B.focus()),o()}),_=v.useCallback(A=>{!A||A===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(R,A))},[R]);v.useEffect(()=>{const A=g.viewport;if(A){const B=()=>{_(C.current),u==null||u()},U=()=>{const V=new Date().getTime()-k.current;C.current=C.current-V,window.clearTimeout(T.current),c==null||c()};return A.addEventListener(_S,U),A.addEventListener(IS,B),()=>{A.removeEventListener(_S,U),A.removeEventListener(IS,B)}}},[g.viewport,N,c,u,_]),v.useEffect(()=>{i&&!g.isClosePausedRef.current&&_(N)},[i,N,g.isClosePausedRef,_]),v.useEffect(()=>(j(),()=>S()),[j,S]);const L=v.useMemo(()=>x?KP(x):null,[x]);return g.viewport?a.jsxs(a.Fragment,{children:[L&&a.jsx(y7,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),a.jsx(p7,{scope:n,onClose:R,children:qc.createPortal(a.jsx(Mk.ItemSlot,{scope:n,children:a.jsx(JH,{asChild:!0,onEscapeKeyDown:ae(l,()=>{g.isFocusedToastEscapeKeyDownRef.current||R(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(je.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...m,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ae(e.onKeyDown,A=>{A.key==="Escape"&&(l==null||l(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:ae(e.onPointerDown,A=>{A.button===0&&(w.current={x:A.clientX,y:A.clientY})}),onPointerMove:ae(e.onPointerMove,A=>{if(!w.current)return;const B=A.clientX-w.current.x,U=A.clientY-w.current.y,V=!!E.current,P=["left","right"].includes(g.swipeDirection),D=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,q=P?D(0,B):0,Q=P?0:D(0,U),F=A.pointerType==="touch"?10:2,ge={x:q,y:Q},Ve={originalEvent:A,delta:ge};V?(E.current=ge,rg(d7,h,Ve,{discrete:!1})):Jj(ge,g.swipeDirection,F)?(E.current=ge,rg(u7,d,Ve,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(B)>F||Math.abs(U)>F)&&(w.current=null)}),onPointerUp:ae(e.onPointerUp,A=>{const B=E.current,U=A.target;if(U.hasPointerCapture(A.pointerId)&&U.releasePointerCapture(A.pointerId),E.current=null,w.current=null,B){const V=A.currentTarget,P={originalEvent:A,delta:B};Jj(B,g.swipeDirection,g.swipeThreshold)?rg(f7,p,P,{discrete:!0}):rg(h7,f,P,{discrete:!0}),V.addEventListener("click",D=>D.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),y7=e=>{const{__scopeToast:t,children:n,...r}=e,s=G0(K0,t),[i,o]=v.useState(!1),[l,c]=v.useState(!1);return b7(()=>o(!0)),v.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:a.jsx(rm,{asChild:!0,children:a.jsx(sm,{...r,children:i&&a.jsxs(a.Fragment,{children:[s.label," ",n]})})})},x7="ToastTitle",UP=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(je.div,{...r,ref:t})});UP.displayName=x7;var v7="ToastDescription",zP=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(je.div,{...r,ref:t})});zP.displayName=v7;var VP="ToastAction",WP=v.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?a.jsx(GP,{altText:n,asChild:!0,children:a.jsx(Lk,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${VP}\`. Expected non-empty \`string\`.`),null)});WP.displayName=VP;var HP="ToastClose",Lk=v.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=m7(HP,n);return a.jsx(GP,{asChild:!0,children:a.jsx(je.button,{type:"button",...r,ref:t,onClick:ae(e.onClick,s.onClose)})})});Lk.displayName=HP;var GP=v.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return a.jsx(je.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function KP(e){const t=[];
48return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),w7(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...KP(r))}}),t}function rg(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?_k(s,i):s.dispatchEvent(i)}var Jj=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function b7(e=()=>{}){const t=wr(e);Sr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function w7(e){return e.nodeType===e.ELEMENT_NODE}function S7(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function x1(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var E7=PP,qP=$P,YP=BP,QP=UP,JP=zP,XP=WP,ZP=Lk;function eD(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=eD(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Tc(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=eD(e))&&(r&&(r+=" "),r+=t);return r}const Xj=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Zj=Tc,Xd=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zj(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=i==null?void 0:i[u];if(d===null)return null;const f=Xj(d)||Xj(h);return s[u][f]}),l=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...p}=d;return Object.entries(p).every(m=>{let[g,x]=m;return Array.isArray(x)?x.includes({...i,...l}[g]):{...i,...l}[g]===x})?[...u,h,f]:u},[]);return Zj(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
49 * @license lucide-react v0.453.0 - ISC
50 *
51 * This source code is licensed under the ISC license.
52 * See the LICENSE file in the root directory of this source tree.
53 */const N7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tD=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
54 * @license lucide-react v0.453.0 - ISC
55 *
56 * This source code is licensed under the ISC license.
57 * See the LICENSE file in the root directory of this source tree.
58 */var k7={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"};/**
59 * @license lucide-react v0.453.0 - ISC
60 *
61 * This source code is licensed under the ISC license.
62 * See the LICENSE file in the root directory of this source tree.
63 */const C7=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...l},c)=>v.createElement("svg",{ref:c,...k7,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:tD("lucide",s),...l},[...o.map(([u,d])=>v.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
64 * @license lucide-react v0.453.0 - ISC
65 *
66 * This source code is licensed under the ISC license.
67 * See the LICENSE file in the root directory of this source tree.
68 */const re=(e,t)=>{const n=v.forwardRef(({className:r,...s},i)=>v.createElement(C7,{ref:i,iconNode:t,className:tD(`lucide-${N7(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
69 * @license lucide-react v0.453.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 v1=re("Activity",[["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
73-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
74 * @license lucide-react v0.453.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 */const T7=re("AlignCenter",[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/**
79 * @license lucide-react v0.453.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 A7=re("AlignLeft",[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/**
84 * @license lucide-react v0.453.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 j7=re("AlignRight",[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/**
89 * @license lucide-react v0.453.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 Cd=re("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
94 * @license lucide-react v0.453.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 O7=re("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
99 * @license lucide-react v0.453.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 vf=re("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
104 * @license lucide-react v0.453.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 R7=re("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
109 * @license lucide-react v0.453.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 _7=re("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
114 * @license lucide-react v0.453.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 LS=re("BookOpen",[["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"}]]);/**
119 * @license lucide-react v0.453.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 Pk=re("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
124 * @license lucide-react v0.453.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 Va=re("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
129 * @license lucide-react v0.453.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 Wa=re("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
134 * @license lucide-react v0.453.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 PS=re("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
139 * @license lucide-react v0.453.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 I7=re("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
144 * @license lucide-react v0.453.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 bf=re("Chrome",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["line",{x1:"21.17",x2:"12",y1:"8",y2:"8",key:"a0cw5f"}],["line",{x1:"3.95",x2:"8.54",y1:"6.06",y2:"14",key:"1kftof"}],["line",{x1:"10.88",x2:"15.46",y1:"21.94",y2:"14",key:"1ymyh8"}]]);/**
149 * @license lucide-react v0.453.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 Si=re("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
154 * @license lucide-react v0.453.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 sl=re("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
159 * @license lucide-react v0.453.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 wf=re("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
164 * @license lucide-react v0.453.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 M7=re("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
169 * @license lucide-react v0.453.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 L7=re("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
174 * @license lucide-react v0.453.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 Dk=re("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
179 * @license lucide-react v0.453.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 Bo=re("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
184 * @license lucide-react v0.453.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 P7=re("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
189 * @license lucide-react v0.453.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 Ku=re("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
194 * @license lucide-react v0.453.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 Ws=re("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
199 * @license lucide-react v0.453.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 ip=re("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
204 * @license lucide-react v0.453.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 Xy=re("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
209 * @license lucide-react v0.453.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 q0=re("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
214 * @license lucide-react v0.453.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 D7=re("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
219 * @license lucide-react v0.453.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 eO=re("FileJson",[["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"}]]);/**
224 * @license lucide-react v0.453.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 op=re("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
229 * @license lucide-react v0.453.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 $7=re("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
234 * @license lucide-react v0.453.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 F7=re("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
239 * @license lucide-react v0.453.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 $k=re("GraduationCap",[["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"}]]);/**
244 * @license lucide-react v0.453.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 B7=re("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
249 * @license lucide-react v0.453.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 U7=re("Heading1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]);/**
254 * @license lucide-react v0.453.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 z7=re("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}
258]]);/**
259 * @license lucide-react v0.453.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 V7=re("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);/**
264 * @license lucide-react v0.453.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 W7=re("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
269 * @license lucide-react v0.453.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 tO=re("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
274 * @license lucide-react v0.453.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 H7=re("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
279 * @license lucide-react v0.453.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 G7=re("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
284 * @license lucide-react v0.453.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 K7=re("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
289 * @license lucide-react v0.453.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 Fk=re("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
294 * @license lucide-react v0.453.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 q7=re("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
299 * @license lucide-react v0.453.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 Y7=re("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
304 * @license lucide-react v0.453.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 qu=re("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
309 * @license lucide-react v0.453.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 Td=re("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
314 * @license lucide-react v0.453.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 Q7=re("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",ke
318y:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
319 * @license lucide-react v0.453.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 Bk=re("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
324 * @license lucide-react v0.453.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 J7=re("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
329 * @license lucide-react v0.453.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 nD=re("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
334 * @license lucide-react v0.453.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 b1=re("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
339 * @license lucide-react v0.453.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 X7=re("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
344 * @license lucide-react v0.453.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 Z7=re("Palette",[["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:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
349 * @license lucide-react v0.453.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 eG=re("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
354 * @license lucide-react v0.453.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 tG=re("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
359 * @license lucide-react v0.453.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 nG=re("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
364 * @license lucide-react v0.453.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 Hh=re("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
369 * @license lucide-react v0.453.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 rG=re("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
374 * @license lucide-react v0.453.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 sG=re("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);/**
379 * @license lucide-react v0.453.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 rD=re("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
384 * @license lucide-react v0.453.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 iG=re("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
389 * @license lucide-react v0.453.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 eo=re("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
394 * @license lucide-react v0.453.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 oG=re("Send",[["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"}]]);/**
399 * @license lucide-react v0.453.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 Zy=re("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
404 * @license lucide-react v0.453.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 xr=re("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
408y:"oel41y"}]]);/**
409 * @license lucide-react v0.453.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 ny=re("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
414 * @license lucide-react v0.453.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 aG=re("Strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
419 * @license lucide-react v0.453.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 lG=re("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
424 * @license lucide-react v0.453.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 cG=re("TableProperties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);/**
429 * @license lucide-react v0.453.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 uG=re("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
434 * @license lucide-react v0.453.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 dG=re("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
439 * @license lucide-react v0.453.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 hG=re("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/**
444 * @license lucide-react v0.453.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 hc=re("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
449 * @license lucide-react v0.453.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 fG=re("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
454 * @license lucide-react v0.453.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 pG=re("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
459 * @license lucide-react v0.453.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 sD=re("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/**
464 * @license lucide-react v0.453.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 mG=re("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
469 * @license lucide-react v0.453.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 gG=re("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
474 * @license lucide-react v0.453.0 - ISC
475 *
476 * This source code is licensed under the ISC license.
477 * See the LICENSE file in the root directory of this source tree.
478 */const yG=re("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
479 * @license lucide-react v0.453.0 - ISC
480 *
481 * This source code is licensed under the ISC license.
482 * See the LICENSE file in the root directory of this source tree.
483 */const xG=re("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
484 * @license lucide-react v0.453.0 - ISC
485 *
486 * This source code is licensed under the ISC license.
487 * See the LICENSE file in the root directory of this source tree.
488 */const Y0=re("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 8,565 bytes, lines 488-493
488],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
489 * @license lucide-react v0.453.0 - ISC
490 *
491 * This source code is licensed under the ISC license.
492 * See the LICENSE file in the root directory of this source tree.
493 */const Ha=re("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Uk="-",vG=e=>{const t=wG(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(Uk);return l[0]===""&&l.length!==1&&l.shift(),iD(l,t)||bG(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},iD=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?iD(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Uk);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},nO=/^\[(.+)\]$/,bG=e=>{if(nO.test(e)){const t=nO.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},wG=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return EG(Object.entries(e.classGroups),n).forEach(([i,o])=>{DS(o,r,i,t)}),r},DS=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:rO(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(SG(s)){DS(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{DS(o,rO(t,i),n,r)})})},rO=(e,t)=>{let n=e;return t.split(Uk).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},SG=e=>e.isThemeGetter,EG=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,l])=>[t+o,l])):i);return[n,s]}):e,NG=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},oD="!",kG=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=l=>{const c=[];let u=0,d=0,h;for(let x=0;x<l.length;x++){let y=l[x];if(u===0){if(y===s&&(r||l.slice(x,x+i)===t)){c.push(l.slice(d,x)),d=x+i;continue}if(y==="/"){h=x;continue}}y==="["?u++:y==="]"&&u--}const f=c.length===0?l:l.substring(d),p=f.startsWith(oD),m=p?f.substring(1):f,g=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}};return n?l=>n({className:l,parseClassName:o}):o},CG=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},TG=e=>({cache:NG(e.cacheSize),parseClassName:kG(e),...vG(e)}),AG=/\s+/,jG=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(AG);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}=n(u);let m=!!p,g=r(m?f.substring(0,p):f);if(!g){if(!m){l=u+(l.length>0?" "+l:l);continue}if(g=r(f),!g){l=u+(l.length>0?" "+l:l);continue}m=!1}const x=CG(d).join(":"),y=h?x+oD:x,b=y+g;if(i.includes(b))continue;i.push(b);const w=s(g,m);for(let E=0;E<w.length;++E){const N=w[E];i.push(y+N)}l=u+(l.length>0?" "+l:l)}return l};function OG(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=aD(t))&&(r&&(r+=" "),r+=n);return r}const aD=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=aD(e[r]))&&(n&&(n+=" "),n+=t);return n};function RG(e,...t){let n,r,s,i=o;function o(c){const u=t.reduce((d,h)=>h(d),e());return n=TG(u),r=n.cache.get,s=n.cache.set,i=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=jG(c,n);return s(c,d),d}return function(){return i(OG.apply(null,arguments))}}const Ft=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},lD=/^\[(?:([a-z-]+):)?(.+)\]$/i,_G=/^\d+\/\d+$/,IG=new Set(["px","full","screen"]),MG=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LG=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,PG=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,DG=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$G=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ko=e=>Yu(e)||IG.has(e)||_G.test(e),pa=e=>Zd(e,"length",GG),Yu=e=>!!e&&!Number.isNaN(Number(e)),w1=e=>Zd(e,"number",Yu),Nh=e=>!!e&&Number.isInteger(Number(e)),FG=e=>e.endsWith("%")&&Yu(e.slice(0,-1)),et=e=>lD.test(e),ma=e=>MG.test(e),BG=new Set(["length","size","percentage"]),UG=e=>Zd(e,BG,cD),zG=e=>Zd(e,"position",cD),VG=new Set(["image","url"]),WG=e=>Zd(e,VG,qG),HG=e=>Zd(e,"",KG),kh=()=>!0,Zd=(e,t,n)=>{const r=lD.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},GG=e=>LG.test(e)&&!PG.test(e),cD=()=>!1,KG=e=>DG.test(e),qG=e=>$G.test(e),YG=()=>{const e=Ft("colors"),t=Ft("spacing"),n=Ft("blur"),r=Ft("brightness"),s=Ft("borderColor"),i=Ft("borderRadius"),o=Ft("borderSpacing"),l=Ft("borderWidth"),c=Ft("contrast"),u=Ft("grayscale"),d=Ft("hueRotate"),h=Ft("invert"),f=Ft("gap"),p=Ft("gradientColorStops"),m=Ft("gradientColorStopPositions"),g=Ft("inset"),x=Ft("margin"),y=Ft("opacity"),b=Ft("padding"),w=Ft("saturate"),E=Ft("scale"),N=Ft("sepia"),k=Ft("skew"),C=Ft("space"),T=Ft("translate"),j=()=>["auto","contain","none"],S=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",et,t],_=()=>[et,t],L=()=>["",ko,pa],A=()=>["auto",Yu,et],B=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",et],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Yu,et];return{cacheSize:500,separator:":",theme:{colors:[kh],spacing:[ko,pa],blur:["none","",ma,et],brightness:Q(),borderColor:[e],borderRadius:["none","","full",ma,et],borderSpacing:_(),borderWidth:L(),contrast:Q(),grayscale:D(),hueRotate:Q(),invert:D(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[FG,pa],inset:R(),margin:R(),opacity:Q(),padding:_(),saturate:Q(),scale:Q(),sepia:D(),skew:Q(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",et]}],container:["container"],columns:[{columns:[ma]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...B(),et]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Nh,et]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",et]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",Nh,et]}],"grid-cols":[{"grid-cols":[kh]}],"col-start-end":[{col:["auto",{span:["full",Nh,et]},et]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[kh]}],"row-start-end":[{row:["auto",{span:[Nh,et]},et]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}
vendor: 9,248 bytes, line 493
493],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",et]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",et]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",et,t]}],"min-w":[{"min-w":[et,t,"min","max","fit"]}],"max-w":[{"max-w":[et,t,"none","full","min","max","fit","prose",{screen:[ma]},ma]}],h:[{h:[et,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[et,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[et,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[et,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ma,pa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",w1]}],"font-family":[{font:[kh]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",et]}],"line-clamp":[{"line-clamp":["none",Yu,w1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ko,et]}],"list-image":[{"list-image":["none",et]}],"list-style-type":[{list:["none","disc","decimal",et]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ko,pa]}],"underline-offset":[{"underline-offset":["auto",ko,et]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",et]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",et]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...B(),zG]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",UG]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},WG]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:U()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[ko,et]}],"outline-w":[{outline:[ko,pa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ko,pa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ma,HG]}],"shadow-color":[{shadow:[kh]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ma,et]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",et]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",et]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",et]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Nh,et]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",et]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",et]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,647 bytes, line 493
493],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",et]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ko,pa,w1]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},QG=RG(YG);function be(...e){return QG(Tc(e))}const JG=E7,uD=v.forwardRef(({className:e,...t},n)=>a.jsx(qP,{ref:n,className:be("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));uD.displayName=qP.displayName;const XG=Xd("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),dD=v.forwardRef(({className:e,variant:t,...n},r)=>a.jsx(YP,{ref:r,className:be(XG({variant:t}),e),...n}));dD.displayName=YP.displayName;const ZG=v.forwardRef(({className:e,...t},n)=>a.jsx(XP,{ref:n,className:be("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));ZG.displayName=XP.displayName;const hD=v.forwardRef(({className:e,...t},n)=>a.jsx(ZP,{ref:n,className:be("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 4,162 bytes, line 493
493/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(Y0,{className:"h-4 w-4"})}));hD.displayName=ZP.displayName;const fD=v.forwardRef(({className:e,...t},n)=>a.jsx(QP,{ref:n,className:be("text-sm font-semibold",e),...t}));fD.displayName=QP.displayName;const pD=v.forwardRef(({className:e,...t},n)=>a.jsx(JP,{ref:n,className:be("text-sm opacity-90",e),...t}));pD.displayName=JP.displayName;function eK(){const{toasts:e}=Fr();return a.jsxs(JG,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return a.jsxs(dD,{...i,children:[a.jsxs("div",{className:"grid gap-1",children:[n&&a.jsx(fD,{children:n}),r&&a.jsx(pD,{children:r})]}),s,a.jsx(hD,{})]},t)}),a.jsx(uD,{})]})}var tK=Ff[" useId ".trim().toString()]||(()=>{}),nK=0;function io(e){const[t,n]=v.useState(tK());return Sr(()=>{n(r=>r??String(nK++))},[e]),t?`radix-${t}`:""}const rK=["top","right","bottom","left"],yl=Math.min,as=Math.max,ex=Math.round,sg=Math.floor,oo=e=>({x:e,y:e}),sK={left:"right",right:"left",bottom:"top",top:"bottom"},iK={start:"end",end:"start"};function $S(e,t,n){return as(e,yl(t,n))}function Zo(e,t){return typeof e=="function"?e(t):e}function ea(e){return e.split("-")[0]}function eh(e){return e.split("-")[1]}function zk(e){return e==="x"?"y":"x"}function Vk(e){return e==="y"?"height":"width"}function xl(e){return["top","bottom"].includes(ea(e))?"y":"x"}function Wk(e){return zk(xl(e))}function oK(e,t,n){n===void 0&&(n=!1);const r=eh(e),s=Wk(e),i=Vk(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=tx(o)),[o,tx(o)]}function aK(e){const t=tx(e);return[FS(e),t,FS(t)]}function FS(e){return e.replace(/start|end/g,t=>iK[t])}function lK(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:o;default:return[]}}function cK(e,t,n,r){const s=eh(e);let i=lK(ea(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(FS)))),i}function tx(e){return e.replace(/left|right|bottom|top/g,t=>sK[t])}function uK(e){return{top:0,right:0,bottom:0,left:0,...e}}function mD(e){return typeof e!="number"?uK(e):{top:e,right:e,bottom:e,left:e}}function nx(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function sO(e,t,n){let{reference:r,floating:s}=e;const i=xl(t),o=Wk(t),l=Vk(o),c=ea(t),u=i==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[l]/2-s[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-s.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-s.width,y:h};break;default:p={x:r.x,y:r.y}}switch(eh(t)){case"start":p[o]-=f*(n&&u?-1:1);break;case"end":p[o]+=f*(n&&u?-1:1);break}return p}const dK=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=sO(u,r,c),f=r,p={},m=0;for(let g=0;g<l.length;g++){const{name:x,fn:y}=l[g],{x:b,y:w,data:E,reset:N}=await y({x:d,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});d=b??d,h=w??h,p={...p,[x]:{...p[x],...E}},N&&m<=50&&(m++,typeof N=="object"&&(N.placement&&(f=N.placement),N.rects&&(u=N.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):N.rects),{x:d,y:h}=sO(u,f,c)),g=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:p}};async function ap(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=Zo(t,e),m=mD(p),x=l[f?h==="floating"?"reference":"floating":h],y=nx(await i.getClippingRect
vendor: 6,057 bytes, line 493
493({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),b=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),E=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},N=nx(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:w,strategy:c}):b);return{top:(y.top-N.top+m.top)/E.y,bottom:(N.bottom-y.bottom+m.bottom)/E.y,left:(y.left-N.left+m.left)/E.x,right:(N.right-y.right+m.right)/E.x}}const hK=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Zo(e,t)||{};if(u==null)return{};const h=mD(d),f={x:n,y:r},p=Wk(s),m=Vk(p),g=await o.getDimensions(u),x=p==="y",y=x?"top":"left",b=x?"bottom":"right",w=x?"clientHeight":"clientWidth",E=i.reference[m]+i.reference[p]-f[p]-i.floating[m],N=f[p]-i.reference[p],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=k?k[w]:0;(!C||!await(o.isElement==null?void 0:o.isElement(k)))&&(C=l.floating[w]||i.floating[m]);const T=E/2-N/2,j=C/2-g[m]/2-1,S=yl(h[y],j),R=yl(h[b],j),_=S,L=C-g[m]-R,A=C/2-g[m]/2+T,B=$S(_,A,L),U=!c.arrow&&eh(s)!=null&&A!==B&&i.reference[m]/2-(A<_?S:R)-g[m]/2<0,V=U?A<_?A-_:A-L:0;return{[p]:f[p]+V,data:{[p]:B,centerOffset:A-B-V,...U&&{alignmentOffset:V}},reset:U}}}),fK=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...x}=Zo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=ea(s),b=xl(l),w=ea(l)===l,E=await(c.isRTL==null?void 0:c.isRTL(u.floating)),N=f||(w||!g?[tx(l)]:aK(l)),k=m!=="none";!f&&k&&N.push(...cK(l,g,m,E));const C=[l,...N],T=await ap(t,x),j=[];let S=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&j.push(T[y]),h){const A=oK(s,o,E);j.push(T[A[0]],T[A[1]])}if(S=[...S,{placement:s,overflows:j}],!j.every(A=>A<=0)){var R,_;const A=(((R=i.flip)==null?void 0:R.index)||0)+1,B=C[A];if(B)return{data:{index:A,overflows:S},reset:{placement:B}};let U=(_=S.filter(V=>V.overflows[0]<=0).sort((V,P)=>V.overflows[1]-P.overflows[1])[0])==null?void 0:_.placement;if(!U)switch(p){case"bestFit":{var L;const V=(L=S.filter(P=>{if(k){const D=xl(P.placement);return D===b||D==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(D=>D>0).reduce((D,q)=>D+q,0)]).sort((P,D)=>P[1]-D[1])[0])==null?void 0:L[0];V&&(U=V);break}case"initialPlacement":U=l;break}if(s!==U)return{reset:{placement:U}}}return{}}}};function iO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oO(e){return rK.some(t=>e[t]>=0)}const pK=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Zo(e,t);switch(r){case"referenceHidden":{const i=await ap(t,{...s,elementContext:"reference"}),o=iO(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:oO(o)}}}case"escaped":{const i=await ap(t,{...s,altBoundary:!0}),o=iO(i,n.floating);return{data:{escapedOffsets:o,escaped:oO(o)}}}default:return{}}}}};async function mK(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=ea(n),l=eh(n),c=xl(n)==="y",u=["left","top"].includes(o)?-1:1,d=i&&c?-1:1,h=Zo(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof m=="number"&&(p=l==="end"?m*-1:m),c?{x:p*d,y:f*u}:{x:f*u,y:p*d}}const gK=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:l}=t,c=await mK(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},yK=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...c}=Zo(e,t),u={x:n,y:r},d=await ap(t,c),h=xl(ea(s)),f=zk(h);let p=u[f],m=u[h];if(i){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+d[x],w=p-d[y];p=$S(b,p,w)}if(o){const x=h==="y"?"top":"left",y=h==="y"?"bottom":"right",b=m+d[x],w=m-d[y];m=$S(b,m,w)}const g=l.fn({...t,[f]:p,[h]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[h]:o}}}}}},xK=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Zo(e,t),d={x:n,y:r},h=xl(s),f=zk(h);let p=d[f],m=d[h];const g=Zo(l,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=f==="y"?"height":"width",E=i.reference[f]-i.floating[w]+x.mainAxis,N=i.reference[f]+i.reference[w]-x.mainAxis;p<E?p=E:p>N&&(p=N)}if(u){var y,b;const w=f==="y"?"width":"height",E=["top","left"].includes(ea(s)),N=i.reference[h]-i.floating[w]+(E&&((y=o.offset)==null?void 0:y[h])||0)+(E?0:x.crossAxis),k=i.reference[h]+i.reference[w]+(E?0:((b=o.offset)==null?void 0:b[h])||0)-(E?x.crossAxis:0);m<N?m=N:m>k&&(m=k)}return{[f]:p,[h]:m}}}},vK=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...u}=Zo(e,t),d=await ap(t,u),h=ea(s),f=eh(s),p=xl(s)==="y",{width:m,height:g}=i.floating;let x,y;h==="top"||h==="bottom"?(x=h,y=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(y=h,x=f==="end"?"top":"bottom");const b=g-d.top-d.bottom,w=m-d.left-d.right,E=yl(g-d[x],b),N=yl(m
vendor: 10,074 bytes, line 493
493-d[y],w),k=!t.middlewareData.shift;let C=E,T=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=b),k&&!f){const S=as(d.left,0),R=as(d.right,0),_=as(d.top,0),L=as(d.bottom,0);p?T=m-2*(S!==0||R!==0?S+R:as(d.left,d.right)):C=g-2*(_!==0||L!==0?_+L:as(d.top,d.bottom))}await c({...t,availableWidth:T,availableHeight:C});const j=await o.getDimensions(l.floating);return m!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function Q0(){return typeof window<"u"}function th(e){return gD(e)?(e.nodeName||"").toLowerCase():"#document"}function ys(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yo(e){var t;return(t=(gD(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gD(e){return Q0()?e instanceof Node||e instanceof ys(e).Node:!1}function Ei(e){return Q0()?e instanceof Element||e instanceof ys(e).Element:!1}function uo(e){return Q0()?e instanceof HTMLElement||e instanceof ys(e).HTMLElement:!1}function aO(e){return!Q0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ys(e).ShadowRoot}function im(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Ni(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function bK(e){return["table","td","th"].includes(th(e))}function J0(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Hk(e){const t=Gk(),n=Ei(e)?Ni(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function wK(e){let t=vl(e);for(;uo(t)&&!Ad(t);){if(Hk(t))return t;if(J0(t))return null;t=vl(t)}return null}function Gk(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ad(e){return["html","body","#document"].includes(th(e))}function Ni(e){return ys(e).getComputedStyle(e)}function X0(e){return Ei(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vl(e){if(th(e)==="html")return e;const t=e.assignedSlot||e.parentNode||aO(e)&&e.host||yo(e);return aO(t)?t.host:t}function yD(e){const t=vl(e);return Ad(t)?e.ownerDocument?e.ownerDocument.body:e.body:uo(t)&&im(t)?t:yD(t)}function lp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=yD(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=ys(s);if(i){const l=BS(o);return t.concat(o,o.visualViewport||[],im(s)?s:[],l&&n?lp(l):[])}return t.concat(s,lp(s,[],n))}function BS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xD(e){const t=Ni(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=uo(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,l=ex(n)!==i||ex(r)!==o;return l&&(n=i,r=o),{width:n,height:r,$:l}}function Kk(e){return Ei(e)?e:e.contextElement}function Qu(e){const t=Kk(e);if(!uo(t))return oo(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=xD(t);let o=(i?ex(n.width):n.width)/r,l=(i?ex(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const SK=oo(0);function vD(e){const t=ys(e);return!Gk()||!t.visualViewport?SK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function EK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ys(e)?!1:t}function Ac(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Kk(e);let o=oo(1);t&&(r?Ei(r)&&(o=Qu(r)):o=Qu(e));const l=EK(i,n,r)?vD(i):oo(0);let c=(s.left+l.x)/o.x,u=(s.top+l.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const f=ys(i),p=r&&Ei(r)?ys(r):r;let m=f,g=BS(m);for(;g&&r&&p!==m;){const x=Qu(g),y=g.getBoundingClientRect(),b=Ni(g),w=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*x.x,E=y.top+(g.clientTop+parseFloat(b.paddingTop))*x.y;c*=x.x,u*=x.y,d*=x.x,h*=x.y,c+=w,u+=E,m=ys(g),g=BS(m)}}return nx({width:d,height:h,x:c,y:u})}function qk(e,t){const n=X0(e).scrollLeft;return t?t.left+n:Ac(yo(e)).left+n}function bD(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:qk(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function NK(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=yo(r),l=t?J0(t.floating):!1;if(r===o||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=oo(1);const d=oo(0),h=uo(r);if((h||!h&&!i)&&((th(r)!=="body"||im(o))&&(c=X0(r)),uo(r))){const p=Ac(r);u=Qu(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const f=o&&!h&&!i?bD(o,c,!0):oo(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-c.scrollTop*u.y+d.y+f.y}}function kK(e){return Array.from(e.getClientRects())}function CK(e){const t=yo(e),n=X0(e),r=e.ownerDocument.body,s=as(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=as(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+qk(e);const l=-n.scrollTop;return Ni(r).direction==="rtl"&&(o+=as(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:l}}function TK(e,t){const n=ys(e),r=yo(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,l=0,c=0;if(s){i=s.width,o=s.height;const u=Gk();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:l,y:c}}function AK(e,t){const n=Ac(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=uo(e)?Qu(e):oo(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:o,height:l,x:c,y:u}}function lO(e,t,n){let r;if(t==="viewport")r=TK(e,n);else if(t==="document")r=CK(yo(e));else if(Ei(t))r=AK(t,n);else{const s=vD(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return nx(r)}function wD(e,t){const n=vl(e);return n===t||!Ei(n)||Ad(n)?!1:Ni(n).position==="fixed"||wD(n,t)}function jK(e,t){const n=t.get(e);if(n)return n;let r=lp(e,[],!1).filter(l=>Ei(l)&&th(l)!=="body"),s=null;const i=Ni(e).position==="fixed";let o=i?vl(e):e;for(;Ei(o)&&!Ad(o);){const l=Ni(o),c=Hk(o);!c&&l.position==="fixed"&&(s=null),(i?!c&&!s:!c&&l.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||im(o)&&!c&&wD(e,o))?r=r.filter(d=>d!==o):s=l,o=vl(o)}return t.set(e,r),r}function OK(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?J0(t)?[]:jK(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,d)=>{const h=lO(t,d,s);return u.top=as(h.top,u.top),u.right=yl(h.right,u.right),u.bottom=yl(h.bottom,u.bottom),u.left=as(h.left,u.left),u},lO(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function RK(e){const{width:t,height:n}=xD(e);return{width:t,height:n}}function _K(e,t,n){const r=uo(t),s=yo(t),i=n==="fixed",o=Ac(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=oo(0);if(r||!r&&!i)if((th(t)!=="body"||im(s))&&(l=X0(t)),r){const f=Ac(t,!0,i,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&(c.x=qk(s));const u=s&&!r&&!i?bD(s,l):oo(0),d=o.left+l.scrollLeft-c.x-u.x,h=o.top+l.scrollTop-c.y-u.y;return{x:d,y:h,width:o.width,height:o.height}}function S1(e){return Ni(e).position==="static"}function cO(e,t){if(!uo(e)||Ni(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return yo(e)===n&&(n=n.ownerDocument.body),n}function SD(e,t){const n=ys(e);if(J0(e))return n;if(!uo(e)){let s=vl(e);for(;s&&!Ad(s);){if(Ei(s)&&!S1(s))return s;s=vl(s)}return n}let r=cO(e,t);for(;r&&bK(r)&&S1(r);)r=cO(r,t);return r&&Ad(r)&&S1(r)&&!Hk(r)?n:r||wK(e)||n}const IK=async function(e){const t=this.getOffsetParent||SD,n=this.getDimensions,r=await n(e.floating);return{reference:_K(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function MK(e){return Ni(e).direction==="rtl"}const LK={convertOffsetParentRelativeRectToViewportRelativeRect:NK,getDocumentElement:yo,getClippingRect:OK,getOffsetParent:SD,getElementRects:IK,getClientRects:kK,getDimensions:RK,getScale:Qu,isElement:Ei,isRTL:MK};function ED(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function PK(e,t){let n=null,r;const s=yo(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:h,width:f,height:p}=u;if(l||t(),!f||!p)return;const m=sg(h),g=sg(s.clientWidth-(d+f)),x=sg(s.clientHeight-(h+p)),y=sg(d),w={rootMargin:-m+"px "+-g+"px "+-x+"px "+-y+"px",threshold:as(0,yl(1,c))||1};let E=!0;function N(k){const C=k[0].intersectionRatio;if(C!==c){if(!E)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!ED(u,e.getBoundingClientRect())&&o(),E=!1}try{n=new IntersectionObserver(N,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(N,w)}n.observe(e)}return o(!0),i}function DK(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Kk(e),d=s||i?[...u?lp(u):[],...lp(t)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const h=u&&l?PK(u,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let m,g=c?Ac(e):null;c&&x();function x(){const y=Ac(e);g&&!ED(g,y)&&n(),g=y,m=requestAnimationFrame(x)}return n(),()=>{var y;d.forEach(b=>{s&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),h==null||h(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const $K=gK,FK=yK,BK=fK,UK=vK,zK=pK,uO=hK,VK=xK,WK=(e,t,n)=>{const r=new Map,s={platform:LK,...n},i={...s.platform,_c:r};return dK(e,t,{...s,platform:i})};var ry=typeof document<"u"?v.useLayoutEffect:v.useEffect;function rx(e,t){if(e===t)return!0;
vendor: 4,143 bytes, line 493
493if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!rx(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!rx(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ND(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dO(e,t){const n=ND(e);return Math.round(t*n)/n}function E1(e){const t=v.useRef(e);return ry(()=>{t.current=e}),t}function HK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);rx(f,r)||p(r);const[m,g]=v.useState(null),[x,y]=v.useState(null),b=v.useCallback(P=>{P!==k.current&&(k.current=P,g(P))},[]),w=v.useCallback(P=>{P!==C.current&&(C.current=P,y(P))},[]),E=i||m,N=o||x,k=v.useRef(null),C=v.useRef(null),T=v.useRef(d),j=c!=null,S=E1(c),R=E1(s),_=E1(u),L=v.useCallback(()=>{if(!k.current||!C.current)return;const P={placement:t,strategy:n,middleware:f};R.current&&(P.platform=R.current),WK(k.current,C.current,P).then(D=>{const q={...D,isPositioned:_.current!==!1};A.current&&!rx(T.current,q)&&(T.current=q,qc.flushSync(()=>{h(q)}))})},[f,t,n,R,_]);ry(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(P=>({...P,isPositioned:!1})))},[u]);const A=v.useRef(!1);ry(()=>(A.current=!0,()=>{A.current=!1}),[]),ry(()=>{if(E&&(k.current=E),N&&(C.current=N),E&&N){if(S.current)return S.current(E,N,L);L()}},[E,N,L,S,j]);const B=v.useMemo(()=>({reference:k,floating:C,setReference:b,setFloating:w}),[b,w]),U=v.useMemo(()=>({reference:E,floating:N}),[E,N]),V=v.useMemo(()=>{const P={position:n,left:0,top:0};if(!U.floating)return P;const D=dO(U.floating,d.x),q=dO(U.floating,d.y);return l?{...P,transform:"translate("+D+"px, "+q+"px)",...ND(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:q}},[n,l,U.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:L,refs:B,elements:U,floatingStyles:V}),[d,L,B,U,V])}const GK=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?uO({element:r.current,padding:s}).fn(n):{}:r?uO({element:r,padding:s}).fn(n):{}}}},KK=(e,t)=>({...$K(e),options:[e,t]}),qK=(e,t)=>({...FK(e),options:[e,t]}),YK=(e,t)=>({...VK(e),options:[e,t]}),QK=(e,t)=>({...BK(e),options:[e,t]}),JK=(e,t)=>({...UK(e),options:[e,t]}),XK=(e,t)=>({...zK(e),options:[e,t]}),ZK=(e,t)=>({...GK(e),options:[e,t]});var eq="Arrow",kD=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return a.jsx(je.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});kD.displayName=eq;var tq=kD;function Yk(e){const[t,n]=v.useState(void 0);return Sr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Qk="Popper",[CD,nh]=As(Qk),[nq,TD]=CD(Qk),AD=e=>{const{__scopePopper:t,children:n}=e,[r,s]=v.useState(null);return a.jsx(nq,{scope:t,anchor:r,onAnchorChange:s,children:n})};AD.displayName=Qk;var jD="PopperAnchor",OD=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=TD(jD,n),o=v.useRef(null),l=gt(t,o);return v.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:a.jsx(je.div,{...s,ref:l})});OD.displayName=jD;var Jk="PopperContent",[rq,sq]=CD(Jk),RD=v.forwardRef((e,t)=>
vendor: 4,219 bytes, line 493
493{var le,Se,Ce,Be,Me,Oe;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...g}=e,x=TD(Jk,n),[y,b]=v.useState(null),w=gt(t,St=>b(St)),[E,N]=v.useState(null),k=Yk(E),C=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,j=r+(i!=="center"?"-"+i:""),S=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},R=Array.isArray(u)?u:[u],_=R.length>0,L={padding:S,boundary:R.filter(oq),altBoundary:_},{refs:A,floatingStyles:B,placement:U,isPositioned:V,middlewareData:P}=HK({strategy:"fixed",placement:j,whileElementsMounted:(...St)=>DK(...St,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[KK({mainAxis:s+T,alignmentAxis:o}),c&&qK({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?YK():void 0,...L}),c&&QK({...L}),JK({...L,apply:({elements:St,rects:Qe,availableWidth:$t,availableHeight:En})=>{const{width:Nn,height:At}=Qe.reference,Yn=St.floating.style;Yn.setProperty("--radix-popper-available-width",`${$t}px`),Yn.setProperty("--radix-popper-available-height",`${En}px`),Yn.setProperty("--radix-popper-anchor-width",`${Nn}px`),Yn.setProperty("--radix-popper-anchor-height",`${At}px`)}}),E&&ZK({element:E,padding:l}),aq({arrowWidth:C,arrowHeight:T}),f&&XK({strategy:"referenceHidden",...L})]}),[D,q]=MD(U),Q=wr(m);Sr(()=>{V&&(Q==null||Q())},[V,Q]);const F=(le=P.arrow)==null?void 0:le.x,ge=(Se=P.arrow)==null?void 0:Se.y,Ve=((Ce=P.arrow)==null?void 0:Ce.centerOffset)!==0,[He,Fe]=v.useState();return Sr(()=>{y&&Fe(window.getComputedStyle(y).zIndex)},[y]),a.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:V?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:He,"--radix-popper-transform-origin":[(Be=P.transformOrigin)==null?void 0:Be.x,(Me=P.transformOrigin)==null?void 0:Me.y].join(" "),...((Oe=P.hide)==null?void 0:Oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(rq,{scope:n,placedSide:D,onArrowChange:N,arrowX:F,arrowY:ge,shouldHideArrow:Ve,children:a.jsx(je.div,{"data-side":D,"data-align":q,...g,ref:w,style:{...g.style,animation:V?void 0:"none"}})})})});RD.displayName=Jk;var _D="PopperArrow",iq={top:"bottom",right:"left",bottom:"top",left:"right"},ID=v.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=sq(_D,r),o=iq[i.placedSide];return a.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:a.jsx(tq,{...s,ref:n,style:{...s.style,display:"block"}})})});ID.displayName=_D;function oq(e){return e!==null}var aq=e=>({name:"transformOrigin",options:e,fn(t){var x,y,b;const{placement:n,rects:r,middlewareData:s}=t,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=MD(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((y=s.arrow)==null?void 0:y.x)??0)+l/2,p=(((b=s.arrow)==null?void 0:b.y)??0)+c/2;let m="",g="";return u==="bottom"?(m=o?h:`${f}px`,g=`${-c}px`):u==="top"?(m=o?h:`${f}px`,g=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,g=o?h:`${p}px`):u==="left"&&(m=`${r.floating.width+c}px`,g=o?h:`${p}px`),{data:{x:m,y:g}}}});function MD(e){const[t,n="center"]=e.split("-");return[t,n]}var LD=AD,Xk=OD,Zk=RD,eC=ID,[Z0,nAe]=As("Tooltip",[nh]),tC=nh(),PD="TooltipProvider",lq=700,hO="tooltip.open",[cq,DD]=Z0(PD),$D=e=>{const{__scopeTooltip:t,delayDuration:n=lq,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=v.useRef(!0),l=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),a.jsx(cq,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>
vendor: 5,838 bytes, line 493
493o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:v.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:i})};$D.displayName=PD;var FD="Tooltip",[rAe,ev]=Z0(FD),US="TooltipTrigger",uq=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=ev(US,n),i=DD(US,n),o=tC(n),l=v.useRef(null),c=gt(t,l,s.onTriggerChange),u=v.useRef(!1),d=v.useRef(!1),h=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(Xk,{asChild:!0,...o,children:a.jsx(je.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ae(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ae(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ae(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ae(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ae(e.onBlur,s.onClose),onClick:ae(e.onClick,s.onClose)})})});uq.displayName=US;var dq="TooltipPortal",[sAe,hq]=Z0(dq,{forceMount:void 0}),jd="TooltipContent",BD=v.forwardRef((e,t)=>{const n=hq(jd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=ev(jd,e.__scopeTooltip);return a.jsx(Zs,{present:r||o.open,children:o.disableHoverableContent?a.jsx(UD,{side:s,...i,ref:t}):a.jsx(fq,{side:s,...i,ref:t})})}),fq=v.forwardRef((e,t)=>{const n=ev(jd,e.__scopeTooltip),r=DD(jd,e.__scopeTooltip),s=v.useRef(null),i=gt(t,s),[o,l]=v.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,f=v.useCallback(()=>{l(null),h(!1)},[h]),p=v.useCallback((m,g)=>{const x=m.currentTarget,y={x:m.clientX,y:m.clientY},b=xq(y,x.getBoundingClientRect()),w=vq(y,b),E=bq(g.getBoundingClientRect()),N=Sq([...w,...E]);l(N),h(!0)},[h]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(c&&d){const m=x=>p(x,d),g=x=>p(x,c);return c.addEventListener("pointerleave",m),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",m),d.removeEventListener("pointerleave",g)}}},[c,d,p,f]),v.useEffect(()=>{if(o){const m=g=>{const x=g.target,y={x:g.clientX,y:g.clientY},b=(c==null?void 0:c.contains(x))||(d==null?void 0:d.contains(x)),w=!wq(y,o);b?f():w&&(f(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,d,o,u,f]),a.jsx(UD,{...e,ref:i})}),[pq,mq]=Z0(FD,{isInside:!1}),gq=FH("TooltipContent"),UD=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...l}=e,c=ev(jd,n),u=tC(n),{onClose:d}=c;return v.useEffect(()=>(document.addEventListener(hO,d),()=>document.removeEventListener(hO,d)),[d]),v.useEffect(()=>{if(c.trigger){const h=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),a.jsx(Jd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:a.jsxs(Zk,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(gq,{children:r}),a.jsx(pq,{scope:n,isInside:!0,children:a.jsx(i7,{id:c.contentId,role:"tooltip",children:s||r})})]})})});BD.displayName=jd;var zD="TooltipArrow",yq=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=tC(n);return mq(zD,n).isInside?null:a.jsx(eC,{...s,...r,ref:t})});yq.displayName=zD;function xq(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function vq(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function bq(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function wq(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i].x,c=t[i].y,u=t[o].x,d=t[o].y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(s=!s)}return s}function Sq(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Eq(t)}function Eq(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Nq=$D,VD=BD;const kq=Nq,Cq=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(VD,{ref:r,sideOffset:t,className:be("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
493de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n}));Cq.displayName=VD.displayName;const WD=v.createContext(void 0);function Tq({children:e}){const[t,n]=v.useState(()=>localStorage.getItem("theme")||"light");v.useEffect(()=>{const i=window.document.documentElement;i.classList.remove("light","dark"),i.classList.add(t),localStorage.setItem("theme",t)},[t]);const s={theme:t,setTheme:n,toggleTheme:()=>{n(i=>i==="light"?"dark":"light")}};return a.jsx(WD.Provider,{value:s,children:e})}const Aq=()=>{const e=v.useContext(WD);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},jq=Xd("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),H=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?OP:"button";return a.jsx(o,{className:be(jq({variant:t,size:n,className:e})),ref:i,...s})});H.displayName="Button";const Ke=v.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:be("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ke.displayName="Input";var N1="focusScope.autoFocusOnMount",k1="focusScope.autoFocusOnUnmount",fO={bubbles:!1,cancelable:!0},Oq="FocusScope",tv=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[l,c]=v.useState(null),u=wr(s),d=wr(i),h=v.useRef(null),f=gt(t,g=>c(g)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let g=function(w){if(p.paused||!l)return;const E=w.target;l.contains(E)?h.current=E:va(h.current,{select:!0})},x=function(w){if(p.paused||!l)return;const E=w.relatedTarget;E!==null&&(l.contains(E)||va(h.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const N of w)N.removedNodes.length>0&&va(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const b=new MutationObserver(y);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),b.disconnect()}}},[r,l,p.paused]),v.useEffect(()=>{if(l){mO.add(p);const g=document.activeElement;if(!l.contains(g)){const y=new CustomEvent(N1,fO);l.addEventListener(N1,u),l.dispatchEvent(y),y.defaultPrevented||(Rq(Pq(HD(l)),{select:!0}),document.activeElement===g&&va(l))}return()=>{l.removeEventListener(N1,u),setTimeout(()=>{const y=new CustomEvent(k1,fO);l.addEventListener(k1,d),l.dispatchEvent(y),y.defaultPrevented||va(g??document.body,{select:!0}),l.removeEventListener(k1,d),mO.remove(p)},0)}}},[l,u,d,p]);const m=v.useCallback(g=>{if(!n&&!r||p.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(x&&y){const b=g.currentTarget,[w,E]=_q(b);w&&E?!g.shiftKey&&y===E?(g.preventDefault(),n&&va(w,{select:!0})):g.shiftKey&&y===w&&(g.preventDefault(),n&&va(E,{select:!0})):y===b&&g.preventDefault()}},[n,r,p.paused]);return a.jsx(je.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});tv.displayName=Oq;function Rq(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(va(r,{select:t}),document.activeElement!==n)return}function _q(e){const t=HD(e),n=pO(t,e),r=pO(t.reverse(),e);return[n,r]}function HD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pO(e,t){for(const n of e)if(!Iq(n,{upTo:t}))return n}function Iq(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mq(e){return e instanceof HTMLInputElement&&"select"in e}function va(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mq(e)&&t&&e.select()}}var mO=Lq();function Lq(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=gO(e,t),e.unshift(t)},remove(t){var n;e=gO(e,t),(n=e[0])==null||n.resume()}}}function gO(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Pq(e){return e.filter(t=>t.tagName!=="A")}var C1=0;function nC(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??yO()),document.body.insertAdjacentElement("beforeend",e[1]??yO()),C1++,()=>{C1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>
vendor: 5,285 bytes, lines 493-494
493t.remove()),C1--}},[])}function yO(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Xi=function(){return Xi=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Xi.apply(this,arguments)};function GD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function Dq(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var sy="right-scroll-bar-position",iy="width-before-scroll-bar",$q="with-scroll-bars-hidden",Fq="--removed-body-scroll-bar-size";function T1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Bq(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var Uq=typeof window<"u"?v.useLayoutEffect:v.useEffect,xO=new WeakMap;function zq(e,t){var n=Bq(null,function(r){return e.forEach(function(s){return T1(s,r)})});return Uq(function(){var r=xO.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;s.forEach(function(l){i.has(l)||T1(l,null)}),i.forEach(function(l){s.has(l)||T1(l,o)})}xO.set(n,e)},[e]),n}function Vq(e){return e}function Wq(e,t){t===void 0&&(t=Vq);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(i),o=n}var c=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function Hq(e){e===void 0&&(e={});var t=Wq(null);return t.options=Xi({async:!0,ssr:!1},e),t}var KD=function(e){var t=e.sideCar,n=GD(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Xi({},n))};KD.isSideCarExport=!0;function Gq(e,t){return e.useMedium(t),KD}var qD=Hq(),A1=function(){},nv=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:A1,onWheelCapture:A1,onTouchMoveCapture:A1}),s=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,b=e.gapMode,w=GD(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=f,N=zq([n,t]),k=Xi(Xi({},w),s);return v.createElement(v.Fragment,null,d&&v.createElement(E,{sideCar:qD,removeScrollBar:u,shards:h,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:b}),o?v.cloneElement(v.Children.only(l),Xi(Xi({},k),{ref:N})):v.createElement(y,Xi({},k,{className:c,ref:N}),l))});nv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};nv.classNames={fullWidth:iy,zeroRight:sy};var Kq=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qq(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Kq();return t&&e.setAttribute("nonce",t),e}function Yq(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Qq(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Jq=function(){var e=0,t=null;return{add:function(n){e==0&&(t=qq())&&(Yq(t,n),Qq(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xq=function(){var e=Jq();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},YD=function(){var e=Xq(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},Zq={left:0,top:0,right:0,gap:0},j1=function(e){return parseInt(e||"",10)||0},eY=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[j1(n),j1(r),j1(s)]},tY=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Zq;var t=eY(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nY=YD(),Ju="data-scroll-locked",rY=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
494  .`.concat($q,` {
495   overflow: hidden `).concat(r,`;
496   padding-right: `).concat(l,"px ").concat(r,`;
497  }
498  body[`).concat(Ju,`] {
499    overflow: hidden `).concat(r,`;
500    overscroll-behavior: contain;
501    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
502    padding-left: `.concat(s,`px;
503    padding-top: `).concat(i,`px;
504    padding-right: `).concat(o,`px;
505    margin-left:0;
506    margin-top:0;
507    margin-right: `).concat(l,"px ").concat(r,`;
508    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
509  }
510  
511  .`).concat(sy,` {
512    right: `).concat(l,"px ").concat(r,`;
513  }
514  
515  .`).concat(iy,` {
516    margin-right: `).concat(l,"px ").concat(r,`;
517  }
518  
519  .`).concat(sy," .").concat(sy,` {
520    right: 0 `).concat(r,`;
521  }
522  
523  .`).concat(iy," .").concat(iy,` {
524    margin-right: 0 `).concat(r,`;
525  }
526  
527  body[`).concat(Ju,`] {
528    `).concat(Fq,": ").concat(l,`px;
529  }
530`)},vO=function(){var e=parseInt(document.body.getAttribute(Ju)||"0",10);return isFinite(e)?e:0},sY=function(){v.useEffect(function(){return document.body.setAttribute(Ju,(vO()+1).toString()),function(){var e=vO()-1;e<=0?document.body.removeAttribute(Ju):document.body.setAttribute(Ju,e.toString())}},[])},iY=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;sY();var i=v.useMemo(function(){return tY(s)},[s]);return v.createElement(nY,{styles:rY(i,!t,s,n?"":"!important")})},zS=!1;if(typeof window<"u")try{var ig=Object.defineProperty({},"passive",{get:function(){return zS=!0,!0}});window.addEventListener("test",ig,ig),window.removeEventListener("test",ig,ig)}catch{zS=!1}var ru=zS?{passive:!1}:!1,oY=function(e){return e.tagName==="TEXTAREA"},QD=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!oY(e)&&n[t]==="visible")},aY=function(e){return QD(e,"overflowY")},lY=function(e){return QD(e,"overflowX")},bO=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=JD(e,r);if(s){var i=XD(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},cY=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},uY=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},JD=function(e,t){return e==="v"?aY(t):lY(t)},XD=function(e,t){return e==="v"?cY(t):uY(t)},dY=function(e,t){return e==="h"&&t==="rtl"?-1:1},hY=function(e,t,n,r,s){var i=dY(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,f=0;do{var p=XD(e,l),m=p[0],g=p[1],x=p[2],y=g-x-i*m;(m||y)&&JD(e,l)&&(h+=y,f+=m),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},og=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wO=function(e){return[e.deltaX,e.deltaY]},SO=function(e){return e&&"current"in e?e.current:e},fY=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pY=function(e){return`
531  .block-interactivity-`.concat(e,` {pointer-events: none;}
532  .allow-interactivity-`).concat(e,` {pointer-events: all;}
533`)},mY=0,su=[];function gY(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),s=v.useState(mY++)[0],i=v.useState(YD)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=Dq([e.lockRef.current],(e.shards||[]).map(SO),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=v.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var y=og(g),b=n.current,w="deltaX"in g?g.deltaX:b[0]-y[0],E="deltaY"in g?g.deltaY:b[1]-y[1],N,k=g.target,C=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in g&&C==="h"&&k.type==="range")return!1;var T=bO(C,k);if(!T)return!0;
vendor: 27,776 bytes, lines 533-537
533if(T?N=C:(N=C==="v"?"h":"v",T=bO(C,k)),!T)return!1;if(!r.current&&"changedTouches"in g&&(w||E)&&(r.current=N),!N)return!0;var j=r.current||N;return hY(j,x,g,j==="h"?w:E,!0)},[]),c=v.useCallback(function(g){var x=g;if(!(!su.length||su[su.length-1]!==i)){var y="deltaY"in x?wO(x):og(x),b=t.current.filter(function(N){return N.name===x.type&&(N.target===x.target||x.target===N.shadowParent)&&fY(N.delta,y)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(SO).filter(Boolean).filter(function(N){return N.contains(x.target)}),E=w.length>0?l(x,w[0]):!o.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),u=v.useCallback(function(g,x,y,b){var w={name:g,delta:x,target:y,should:b,shadowParent:yY(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(E){return E!==w})},1)},[]),d=v.useCallback(function(g){n.current=og(g),r.current=void 0},[]),h=v.useCallback(function(g){u(g.type,wO(g),g.target,l(g,e.lockRef.current))},[]),f=v.useCallback(function(g){u(g.type,og(g),g.target,l(g,e.lockRef.current))},[]);v.useEffect(function(){return su.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,ru),document.addEventListener("touchmove",c,ru),document.addEventListener("touchstart",d,ru),function(){su=su.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,ru),document.removeEventListener("touchmove",c,ru),document.removeEventListener("touchstart",d,ru)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(i,{styles:pY(s)}):null,p?v.createElement(iY,{gapMode:e.gapMode}):null)}function yY(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xY=Gq(qD,gY);var rv=v.forwardRef(function(e,t){return v.createElement(nv,Xi({},e,{ref:t,sideCar:xY}))});rv.classNames=nv.classNames;var vY=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},iu=new WeakMap,ag=new WeakMap,lg={},O1=0,ZD=function(e){return e&&(e.host||ZD(e.parentNode))},bY=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ZD(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},wY=function(e,t,n,r){var s=bY(t,Array.isArray(e)?e:[e]);lg[n]||(lg[n]=new WeakMap);var i=lg[n],o=[],l=new Set,c=new Set(s),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(l.has(f))d(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",g=(iu.get(f)||0)+1,x=(i.get(f)||0)+1;iu.set(f,g),i.set(f,x),o.push(f),g===1&&m&&ag.set(f,!0),x===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return d(t),l.clear(),O1++,function(){o.forEach(function(h){var f=iu.get(h)-1,p=i.get(h)-1;iu.set(h,f),i.set(h,p),f||(ag.has(h)||h.removeAttribute(r),ag.delete(h)),p||h.removeAttribute(n)}),O1--,O1||(iu=new WeakMap,iu=new WeakMap,ag=new WeakMap,lg={})}},rC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=vY(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),wY(r,s,n,"aria-hidden")):function(){return null}},sC="Dialog",[e4,iAe]=As(sC),[SY,ji]=e4(sC),t4=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,l=v.useRef(null),c=v.useRef(null),[u=!1,d]=Xo({prop:r,defaultProp:s,onChange:i});return a.jsx(SY,{scope:t,triggerRef:l,contentRef:c,contentId:io(),titleId:io(),descriptionId:io(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};t4.displayName=sC;var n4="DialogTrigger",r4=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=ji(n4,n),i=gt(t,s.triggerRef);return a.jsx(je.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":aC(s.open),...r,ref:i,onClick:ae(e.onClick,s.onOpenToggle)})});r4.displayName=n4;var iC="DialogPortal",[EY,s4]=e4(iC,{forceMount:void 0}),i4=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=ji(iC,t);return a.jsx(EY,{scope:t,forceMount:n,children:v.Children.map(r,o=>a.jsx(Zs,{present:n||i.open,children:a.jsx(rm,{asChild:!0,container:s,children:o})}))})};i4.displayName=iC;var sx="DialogOverlay",o4=v.forwardRef((e,t)=>{const n=s4(sx,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=ji(sx,e.__scopeDialog);return i.modal?a.jsx(Zs,{present:r||i.open,children:a.jsx(kY,{...s,ref:t})}):null});o4.displayName=sx;var NY=Cc("DialogOverlay.RemoveScroll"),kY=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=ji(sx,n);return a.jsx(rv,{as:NY,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(je.div,{"data-state":aC(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),jc="DialogContent",a4=v.forwardRef((e,t)=>{const n=s4(jc,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=ji(jc,e.__scopeDialog);return a.jsx(Zs,{present:r||i.open,children:i.modal?a.jsx(CY,{...s,ref:t}):a.jsx(TY,{...s,ref:t})})});a4.displayName=jc;var CY=v.forwardRef((e,t)=>{const n=ji(jc,e.__scopeDialog),r=v.useRef(null),s=gt(t,n.contentRef,r);return v.useEffect(()=>{const i=r.current;if(i)return rC(i)},[]),a.jsx(l4,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ae(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ae(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:ae(e.onFocusOutside,i=>i.preventDefault())})}),TY=v.forwardRef((e,t)=>{const n=ji(jc,e.__scopeDialog),r=v.useRef(!1),s=v.useRef(!1);return a.jsx(l4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),l4=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,l=ji(jc,n),c=v.useRef(null),u=gt(t,c);return nC(),a.jsxs(a.Fragment,{children:[a.jsx(tv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:a.jsx(Jd,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":aC(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(AY,{titleId:l.titleId}),a.jsx(OY,{contentRef:c,descriptionId:l.descriptionId})]})]})}),oC="DialogTitle",c4=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=ji(oC,n);return a.jsx(je.h2,{id:s.titleId,...r,ref:t})});c4.displayName=oC;var u4="DialogDescription",d4=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=ji(u4,n);return a.jsx(je.p,{id:s.descriptionId,...r,ref:t})});d4.displayName=u4;var h4="DialogClose",f4=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=ji(h4,n);return a.jsx(je.button,{type:"button",...r,ref:t,onClick:ae(e.onClick,()=>s.onOpenChange(!1))})});f4.displayName=h4;function aC(e){return e?"open":"closed"}var p4="DialogTitleWarning",[oAe,m4]=PH(p4,{contentName:jc,titleName:oC,docsSlug:"dialog"}),AY=({titleId:e})=>{const t=m4(p4),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
534
535If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
536
537For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},jY="DialogDescriptionWarning",OY=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${m4(jY).contentName}}.`;return v.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},RY=t4,_Y=r4,IY=i4,g4=o4,y4=a4,x4=c4,v4=d4,MY=f4;const LY=RY,PY=_Y,DY=IY,b4=v.forwardRef(({className:e,...t},n)=>a.jsx(g4,{className:be("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));b4.displayName=g4.displayName;const $Y=Xd("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),w4=v.forwardRef(({side:e="right",className:t,children:n,...r},s)=>a.jsxs(DY,{children:[a.jsx(b4,{}),a.jsxs(y4,{ref:s,className:be($Y({side:e}),t),...r,children:[n,a.jsxs(MY,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[a.jsx(Y0,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));w4.displayName=y4.displayName;const FY=v.forwardRef(({className:e,...t},n)=>a.jsx(x4,{ref:n,className:be("text-lg font-semibold text-foreground",e),...t}));FY.displayName=x4.displayName;const BY=v.forwardRef(({className:e,...t},n)=>a.jsx(v4,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));BY.displayName=v4.displayName;var UY=v.createContext(void 0);function sv(e){const t=v.useContext(UY);return e||t||"ltr"}var R1="rovingFocusGroup.onEntryFocus",zY={bubbles:!1,cancelable:!0},iv="RovingFocusGroup",[VS,S4,VY]=H0(iv),[WY,ov]=As(iv,[VY]),[HY,GY]=WY(iv),E4=v.forwardRef((e,t)=>a.jsx(VS.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(VS.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(KY,{...e,ref:t})})}));E4.displayName=iv;var KY=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=v.useRef(null),p=gt(t,f),m=sv(i),[g=null,x]=Xo({prop:o,defaultProp:l,onChange:c}),[y,b]=v.useState(!1),w=wr(u),E=S4(n),N=v.useRef(!1),[k,C]=v.useState(0);return v.useEffect(()=>{const T=f.current;if(T)return T.addEventListener(R1,w),()=>T.removeEventListener(R1,w)},[w]),a.jsx(HY,{scope:n,orientation:r,dir:m,loop:s,currentTabStopId:g,onItemFocus:v.useCallback(T=>x(T),[x]),onItemShiftTab:v.useCallback(()=>b(!0),[]),onFocusableItemAdd:v.useCallback(()=>C(T=>T+1),[]),onFocusableItemRemove:v.useCallback(()=>C(T=>T-1),[]),children:a.jsx(je.div,{tabIndex:y||k===0?-1:0,"data-orientation":r,...h,ref:p,style:{outline:"none",...e.style},onMouseDown:ae(e.onMouseDown,()=>{N.current=!0}),onFocus:ae(e.onFocus,T=>{const j=!N.current;if(T.target===T.currentTarget&&j&&!y){const S=new CustomEvent(R1,zY);if(T.currentTarget.dispatchEvent(S),!S.defaultPrevented){const R=E().filter(U=>U.focusable),_=R.find(U=>U.active),L=R.find(U=>U.id===g),B=[_,L,...R].filter(Boolean).map(U=>U.ref.current);C4(B,d)}}N.current=!1}),onBlur:ae(e.onBlur,()=>b(!1))})})}),N4="RovingFocusGroupItem",k4=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,...o}=e,l=io(),c=i||l,u=GY(N4,n),d=u.currentTabStopId===c,h=S4(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=u;return v.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),a.jsx(VS.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:a.jsx(je.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:ae(e.onMouseDown,m=>{r?u.onItemFocus(c):m.preventDefault()}),onFocus:ae(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:ae(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const g=QY(m,u.orientation,u.dir);if(g!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let y=h().filter(b=>b.focusable).map(b=>b.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const b=y.indexOf(m.currentTarget);y=u.loop?JY(y,b+1):y.slice(b+1)}setTimeout(()=>C4(y))}})})})});k4.displayName=N4;var qY={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function YY(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function QY(e,t,n){const r=YY(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qY[r]}function C4(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function JY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var T4=E4,A4=k4,WS=["Enter"," "],XY=["ArrowDown","PageUp","Home"],j4=["ArrowUp","PageDown","End"],ZY=[...XY,...j4],eQ={ltr:[...WS,"ArrowRight"],rtl:[...WS,"ArrowLeft"]},tQ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},om="Menu",[cp,nQ,rQ]=H0(om),[Yc,O4]=As(om,[rQ,nh,ov]),av=nh(),R4=ov(),[sQ,Qc]=Yc(om),[iQ,am]=Yc(om),_4=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:i,modal:o=!0}=e,l=av(t),[c,u]=v.useState(null),d=v.useRef(!1),h=wr(i),f=sv(s);return v.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),a.jsx(LD,{...l,children:a.jsx(sQ,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:a.jsx(iQ,{scope:t,onClose:v.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:f,modal:o,children:r})})})};_4.displayName=om;var oQ="MenuAnchor",lC=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=av(n);return a.jsx(Xk,{...s,...r,ref:t})});lC.displayName=oQ;var cC="MenuPortal",[aQ,I4]=Yc(cC,{forceMount:void 0}),M4=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,i=Qc(cC,t);return a.jsx(aQ,{scope:t,forceMount:n,children:a.jsx(Zs,{present:n||i.open,children:a.jsx(rm,{asChild:!0,container:s,children:r})})})};M4.displayName=cC;var Hs="MenuContent",[lQ,uC]=Yc(Hs),L4=v.forwardRef((e,t)=>{const n=I4(Hs,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=Qc(Hs,e.__scopeMenu),o=am(Hs,e.__scopeMenu);return a.jsx(cp.Provider,{scope:e.__scopeMenu,children:a.jsx(Zs,{present:r||i.open,children:a.jsx(cp.Slot,{scope:e.__scopeMenu,children:o.modal?a.jsx(cQ,{...s,ref:t}):a.jsx(uQ,{...s,ref:t})})})})}),cQ=v.forwardRef((e,t)=>{const n=Qc(Hs,e.__scopeMenu),r=v.useRef(null),s=gt(t,r);return v.useEffect(()=>{const i=r.current;if(i)return rC(i)},[]),a.jsx(dC,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ae(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),uQ=v.forwardRef((e,t)=>{const n=Qc(Hs,e.__scopeMenu);return a.jsx(dC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),dQ=Cc("MenuContent.ScrollLock"),dC=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...g}=e,x=Qc(Hs,n),y=am(Hs,n),b=av(n),w=R4(n),E=nQ(n),[N,k]=v.useState(null),C=v.useRef(null),T=gt(t,C,x.onContentChange),j=v.useRef(0),S=v.useRef(""),R=v.useRef(0),_=v.useRef(null),L=v.useRef("right"),A=v.useRef(0),B=m?rv:v.Fragment,U=m?{as:dQ,allowPinchZoom:!0}:void 0,V=D=>{var le,Se;const q=S.current+D,Q=E().filter(Ce=>!Ce.disabled),F=document.activeElement,ge=(le=Q.find(Ce=>Ce.ref.current===F))==null?void 0:le.textValue,Ve=Q.map(Ce=>Ce.textValue),He=EQ(Ve,q,ge),Fe=(Se=Q.find(Ce=>Ce.textValue===He))==null?void 0:Se.ref.current;(function Ce(Be){S.current=Be,window.clearTimeout(j.current),Be!==""&&(j.current=window.setTimeout(()=>Ce(""),1e3))})(q),Fe&&setTimeout(()=>Fe.focus())};v.useEffect(()=>()=>window.clearTimeout(j.current),[]),nC();const P=v.useCallback(D=>{var Q,F;return L.current===((Q=_.current)==null?void 0:Q.side)&&kQ(D,(F=_.current)==null?void 0:F.area)},[]);return a.jsx(lQ,{scope:n,searchRef:S,onItemEnter:v.useCallback(D=>{P(D)&&D.preventDefault()},[P]),onItemLeave:v.useCallback(D=>{var q;P(D)||((q=C.current)==null||q.focus(),k(null))},[P]),onTriggerLeave:v.useCallback(D=>{P(D)&&D.preventDefault()},[P]),pointerGraceTimerRef:R,onPointerGraceIntentChange:v.useCallback(D=>{_.current=D},[]),children:a.jsx(B,{...U,children:a.jsx(tv,{asChild:!0,trapped:s,onMountAutoFocus:ae(i,D=>{var q;D.preventDefault(),(q=C.current)==null||q.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:a.jsx(Jd,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,children:a.jsx(T4,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:k,onEntryFocus:ae(c,D=>{y.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(Zk,{role:"menu","aria-orientation":"vertical","data-state":J4(x.open),"data-radix-menu-content":"",dir:y.dir,...b,...g,ref:T,style:{outline:"none",...g.style},onKeyDown:ae(g.onKeyDown,D=>{const Q=D.target.closest("[data-radix-menu-content]")===D.currentTarget,F=D.ctrlKey||D.altKey||D.metaKey,ge=D.key.length===1;Q&&(D.key==="Tab"&&D.preventDefault(),!F&&ge&&V(D.key));const Ve=C.current;if(D.target!==Ve||!ZY.includes(D.key))return;D.preventDefault();const Fe=E().filter(le=>!le.disabled).map(le=>le.ref.current);j4.includes(D.key)&&Fe.reverse(),wQ(Fe)}),onBlur:ae(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(j.current),S.current="")}),onPointerMove:ae(e.onPointerMove,up(D=>{const q=D.target,Q=A.current!==D.clientX;if(D.currentTarget.contains(q)&&Q){const F=D.clientX>A.current?"right":"left";L.current=F,A.current=D.clientX}}))})})})})})})});L4.displayName=Hs;var hQ="MenuGroup",hC=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(je.div,{role:"group",...r,ref:t})});hC.displayName=hQ;var fQ="MenuLabel",P4=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(je.div,{...r,ref:t})});P4.displayName=fQ;var ix="MenuItem",EO="menu.itemSelect",lv=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,i=v.useRef(null),o=am(ix,e.__scopeMenu),l=uC(ix,e.__scopeMenu),c=gt(t,i),u=v.useRef(!1),d=()=>{const h=i.current;if(!n&&h){const f=new CustomEvent(EO,{bubbles:!0,cancelable:!0});h.addEventListener(EO,p=>r==null?void 0:r(p),{once:!0}),_k(h,f),f.defaultPrevented?u.current=!1:o.onClose()}};return a.jsx(D4,{...s,ref:c,disabled:n,onClick:ae(e.onClick,d),onPointerDown:h=>{var f;(f=e.onPointerDown)==null||f.call(e,h),u.current=!0},onPointerUp:ae(e.onPointerUp,h=>{var f;u.current||(f=h.currentTarget)==null||f.click()}),onKeyDown:ae(e.onKeyDown,h=>{const f=l.searchRef.current!=="";n||f&&h.key===" "||WS.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});lv.displayName=ix;var D4=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...i}=e,o=uC(ix,n),l=R4(n),c=v.useRef(null),u=gt(t,c),[d,h]=v.useState(!1),[f,p]=v.useState("");return v.useEffect(()=>{const m=c.current;m&&p((m.textContent??"").trim())},[i.children]),a.jsx(cp.ItemSlot,{scope:n,disabled:r,textValue:s??f,children:a.jsx(A4,{asChild:!0,...l,focusable:!r,children:a.jsx(je.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:ae(e.onPointerMove,up(m=>{r?o.onItemLeave(m):(o.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ae(e.onPointerLeave,up(m=>o.onItemLeave(m))),onFocus:ae(e.onFocus,()=>h(!0)),onBlur:ae(e.onBlur,()=>h(!1))})})})}),pQ="MenuCheckboxItem",$4=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return a.jsx(V4,{scope:e.__scopeMenu,checked:n,children:a.jsx(lv,{role:"menuitemcheckbox","aria-checked":ox(n)?"mixed":n,...s,ref:t,"data-state":pC(n),onSelect:ae(s.onSelect,()=>r==null?void 0:r(ox(n)?!0:!n),{checkForDefaultPrevented:!1})})})});$4.displayName=pQ;var F4="MenuRadioGroup",[mQ,gQ]=Yc(F4,{value:void 0,onValueChange:()=>{}}),B4=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,i=wr(r);return a.jsx(mQ,{scope:e.__scopeMenu,value:n,onValueChange:i,children:a.jsx(hC,{...s,ref:t})})});B4.displayName=F4;var U4="MenuRadioItem",z4=v.forwardRef((e,t)=>{const{value:n,...r}=e,s=gQ(U4,e.__scopeMenu),i=n===s.value;return a.jsx(V4,{scope:e.__scopeMenu,checked:i,children:a.jsx(lv,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":pC(i),onSelect:ae(r.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,n)},{checkForDefaultPrevented:!1})})})});z4.displayName=U4;var fC="MenuItemIndicator",[V4,yQ]=Yc(fC,{checked:!1}),W4=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,i=yQ(fC,n);return a.jsx(Zs,{present:r||ox(i.checked)||i.checked===!0,children:a.jsx(je.span,{...s,ref:t,"data-state":pC(i.checked)})})});W4.displayName=fC;var xQ="MenuSeparator",H4=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(je.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});H4.displayName=xQ;var vQ="MenuArrow",G4=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=av(n);return a.jsx(eC,{...s,...r,ref:t})});G4.displayName=vQ;var bQ="MenuSub",[aAe,K4]=Yc(bQ),Gh="MenuSubTrigger",q4=v.forwardRef((e,t)=>{const n=Qc(Gh,e.__scopeMenu),r=am(Gh,e.__scopeMenu),s=K4(Gh,e.__scopeMenu),i=uC(Gh,e.__scopeMenu),o=v.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=v.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return v.useEffect(()=>d,[d]),v.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),c(null)}},[l,c]),a.jsx(lC,{asChild:!0,...u,children:a.jsx(D4,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":J4(n.open),...e,ref:W0(t,s.onTriggerChange),onClick:h=>{var f;(f=e.onClick)==null||f.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ae(e.onPointerMove,up(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:ae(e.onPointerLeave,up(h=>{var p,m;d();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const g=(m=n.content)==null?void 0:m.dataset.side,x=g==="right",y=x?-5:5,b=f[x?"left":"right"],w=f[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+y,y:h.clientY},{x:b,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x:b,y:f.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ae(e.onKeyDown,h=>{var p;const f=i.searchRef.current!=="";e.disabled||f&&h.key===" "||eQ[r.dir].includes(h.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),h.preventDefault())})})})});q4.displayName=Gh;var Y4="MenuSubContent",Q4=v.forwardRef((e,t)=>{const n=I4(Hs,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=Qc(Hs,e.__scopeMenu),o=am(Hs,e.__scopeMenu),l=K4(Y4,e.__scopeMenu),c=v.useRef(null),u=gt(t,c);return a.jsx(cp.Provider,{scope:e.__scopeMenu,children:a.jsx(Zs,{present:r||i.open,children:a.jsx(cp.Slot,{scope:e.__scopeMenu,children:a.jsx(dC,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var h;o.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ae(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ae(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:ae(e.onKeyDown,d=>{var p;const h=d.currentTarget.contains(d.target),f=tQ[o.dir].includes(d.key);h&&f&&(i.onOpenChange(!1),(p=l.trigger)==null||p.focus(),d.preventDefault())})})})})})});Q4.displayName=Y4;function J4(e){return e?"open":"closed"}function ox(e){return e==="indeterminate"}function pC(e){return ox(e)?"indeterminate":e?"checked":"unchecked"}function wQ(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function SQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function EQ(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=SQ(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function NQ(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i].x,c=t[i].y,u=t[o].x,d=t[o].y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(s=!s)}return s}function kQ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return NQ(n,t)}function up(e){return t=>t.pointerType==="mouse"?e(t):void 0}var CQ=_4,TQ=lC,AQ=M4,jQ=L4,OQ=hC,RQ=P4,_Q=lv,IQ=$4,MQ=B4,LQ=z4,PQ=W4,DQ=H4,$Q=G4,FQ=q4,BQ=Q4,mC="DropdownMenu",[UQ,lAe]=As(mC,[O4]),Br=O4(),[zQ,X4]=UQ(mC),Z4=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=Br(t),u=v.useRef(null),[d=!1,h]=Xo({prop:s,defaultProp:i,onChange:o});return a.jsx(zQ,{scope:t,triggerId:io(),triggerRef:u,contentId:io(),open:d,onOpenChange:h,onOpenToggle:v.useCallback(()=>h(f=>!f),[h]),modal:l,children:a.jsx(CQ,{...c,open:d,onOpenChange:h,dir:r,modal:l,children:n})})};Z4.displayName=mC;var e$="DropdownMenuTrigger",t$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,i=X4(e$,n),o=Br(n);return a.jsx(TQ,{asChild:!0,...o,children:a.jsx(je.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:W0(t,i.triggerRef),onPointerDown:ae(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:ae(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});t$.displayName=e$;var VQ="DropdownMenuPortal",n$=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Br(t);return a.jsx(AQ,{...r,...n})};n$.displayName=VQ;var r$="DropdownMenuContent",s$=v.forwardRef((e,t)=>
537{const{__scopeDropdownMenu:n,...r}=e,s=X4(r$,n),i=Br(n),o=v.useRef(!1);return a.jsx(jQ,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...r,ref:t,onCloseAutoFocus:ae(e.onCloseAutoFocus,l=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:ae(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});s$.displayName=r$;var WQ="DropdownMenuGroup",HQ=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx(OQ,{...s,...r,ref:t})});HQ.displayName=WQ;var GQ="DropdownMenuLabel",i$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx(RQ,{...s,...r,ref:t})});i$.displayName=GQ;var KQ="DropdownMenuItem",o$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx(_Q,{...s,...r,ref:t})});o$.displayName=KQ;var qQ="DropdownMenuCheckboxItem",a$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx(IQ,{...s,...r,ref:t})});a$.displayName=qQ;var YQ="DropdownMenuRadioGroup",QQ=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx(MQ,{...s,...r,ref:t})});QQ.displayName=YQ;var JQ="DropdownMenuRadioItem",l$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx(LQ,{...s,...r,ref:t})});l$.displayName=JQ;var XQ="DropdownMenuItemIndicator",c$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx(PQ,{...s,...r,ref:t})});c$.displayName=XQ;var ZQ="DropdownMenuSeparator",u$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx(DQ,{...s,...r,ref:t})});u$.displayName=ZQ;var eJ="DropdownMenuArrow",tJ=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx($Q,{...s,...r,ref:t})});tJ.displayName=eJ;var nJ="DropdownMenuSubTrigger",d$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx(FQ,{...s,...r,ref:t})});d$.displayName=nJ;var rJ="DropdownMenuSubContent",h$=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Br(n);return a.jsx(BQ,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});h$.displayName=rJ;var sJ=Z4,iJ=t$,oJ=n$,f$=s$,p$=i$,m$=o$,g$=a$,y$=l$,x$=c$,v$=u$,b$=d$,w$=h$;const cg=sJ,ug=iJ,aJ=v.forwardRef(({className:e,inset:t,children:n,...r},s)=>a.jsxs(b$,{ref:s,className:be("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,a.jsx(PS,{className:"ml-auto"})]}));aJ.displayName=b$.displayName;const lJ=v.forwardRef(({className:e,...t},n)=>a.jsx(w$,{ref:n,className:be("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));lJ.displayName=w$.displayName;const Kh=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>
537a.jsx(oJ,{children:a.jsx(f$,{ref:r,sideOffset:t,className:be("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));Kh.displayName=f$.displayName;const Yt=v.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(m$,{ref:r,className:be("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));Yt.displayName=m$.displayName;const cJ=v.forwardRef(({className:e,children:t,checked:n,...r},s)=>a.jsxs(g$,{ref:s,className:be("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(x$,{children:a.jsx(Va,{className:"h-4 w-4"})})}),t]}));cJ.displayName=g$.displayName;const uJ=v.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(y$,{ref:r,className:be("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(x$,{children:a.jsx(M7,{className:"h-2 w-2 fill-current"})})}),t]}));uJ.displayName=y$.displayName;const dJ=v.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(p$,{ref:r,className:be("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));dJ.displayName=p$.displayName;const hJ=v.forwardRef(({className:e,...t},n)=>a.jsx(v$,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));hJ.displayName=v$.displayName;const NO=e=>({flows:"project-diagram",apex:"code",configuration:"wrench",soql:"database",visualforce:"file-code",lwc:"bolt",aura:"puzzle-piece"})[e]||"folder";function fJ(){const{theme:e,toggleTheme:t}=Aq(),[n,r]=go(),[s,i]=v.useState(""),[o,l]=v.useState(!1),c=d=>{d.preventDefault(),s.trim()&&(r(`/search?q=${encodeURIComponent(s.trim())}`),i(""),window.scrollTo({top:0,behavior:"smooth"}))},{data:u}=tn({queryKey:["/api/categories"]});return a.jsx("nav",{className:"bg-white dark:bg-gray-800 shadow-sm border-b border-gray-200 dark:border-gray-700 sticky top-0 z-50 dark-transition",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex justify-between items-center h-16",children:[a.jsx("div",{className:"flex items-center",children:a.jsxs(Te,{href:"/",className:"flex items-center","data-testid":"link-home",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("img",{src:"/favicon.png",alt:"Salesforce Sage",className:"h-8 w-8 mr-3"}),a.jsx("span",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Salesforce Sage"})]})}),a.jsxs("div",{className:"hidden md:flex items-center space-x-1 lg:space-x-2 ml-2 lg:ml-4 flex-shrink-0 text-xs lg:text-sm",children:[a.jsx(H,{variant:"ghost",size:"sm",className:"h-8 px-2 text-gray-700 dark:text-gray-200 hover:text-sf-blue dark:hover:text-sf-light-blue transition-colors text-xs lg:text-sm","data-testid":"link-org-health-nav",onClick:()=>{window.location.href="/org-health",window.scrollTo({top:0,behavior:"smooth"})},children:"Check Org Health"}),a.jsx(H,{variant:"ghost",size:"sm",className:"h-8 px-2 text-gray-700 dark:text-gray-200 hover:text-sf-blue dark:hover:text-sf-light-blue transition-colors text-xs lg:text-sm","data-testid":"link-learn-sfdc-nav",asChild:!0,children:a.jsx(Te,{href:"/learn",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:"Learn SFDC"})}),a.jsxs(cg,{children:[a.jsx(ug,{asChild:!0,children:a.jsxs(H,{variant:"ghost",size:"sm",className:"h-8 px-2 text-gray-700 dark:text-gray-200 hover:text-sf-blue dark:hover:text-sf-light-blue transition-colors text-xs lg:text-sm","data-testid":"button-categories",children:["Categories",a.jsx(Wa,{className:"ml-1 h-3.5 w-3.5"})]})}),a.jsx(Kh,{className:"w-56",children:u==null?void 0:u.filter(d=>d.slug!=="all-blogs").map(d=>a.jsx(Yt,{asChild:!0,children:a.jsxs(Te,{href:`/category/${d.slug}`,"data-testid":`link-category-${d.slug}`,onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("i",{className:`fas fa-${NO(d.slug)} mr-2 text-sf-blue`}),d.name]})},d.slug))})]}),a.jsxs(cg,{children:[a.jsx(ug,{asChild:!0,children:a.jsxs(H,{variant:"ghost",size:"sm",className:"h-8 px-2 text-gray-700 dark:text-gray-200 hover:text-sf-blue dark:hover:text-sf-light-blue transition-colors text-xs lg:text-sm","data-testid":"button-salesforce-tools",children:["Tools",a.jsx(Wa,{className:"ml-1 h-3.5 w-3.5"})]})}),a.jsxs(Kh,{className:"w-56",children:[a.jsx(Yt,{asChild:!0,children:a.jsxs(Te,{href:"/tools/id-converter","data-testid":"link-id-converter",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("i",{className:"fas fa-exchange-alt mr-2 text-sf-blue"}),"Convert Salesforce IDs"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs(Te,{href:"/tools/cron-builder","data-testid":"link-cron-builder",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("i",{className:"fas fa-clock mr-2 text-sf-blue"}),"Cron Expression Builder"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs(Te,{href:"/tools/json-to-apex","data-testid":"link-json-to-apex",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("i",{className:"fas fa-file-code mr-2 text-sf-blue"}),"JSON to Apex Converter"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs(Te,{href:"/tools/api-viewer","data-testid":"link-api-viewer",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("i",{className:"fas fa-network-wired mr-2 text-sf-blue"}),"API Response Viewer"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs(Te,{href:"/tools/json-formatter","data-testid":"link-json-formatter",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("i",{className:"fas fa-file-alt mr-2 text-sf-blue"}),"JSON Formatter"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs(Te,{href:"/tools/regex-builder","data-testid":"link-regex-builder",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("i",{className:"fas fa-search mr-2 text-sf-blue"}),"Regex Builder"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs(Te,{href:"/tools/graphql-converter","data-testid":"link-graphql-converter",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("i",{className:"fas fa-exchange-alt mr-2 text-sf-blue"}),"GraphQL Converter"]})})]})]}),a.jsxs(cg,{children:[a.jsx(ug,{asChild:!0,children:a.jsxs(H,{variant:"ghost",size:"sm",className:"h-8 px-2 text-gray-700 dark:text-gray-200 hover:text-sf-blue dark:hover:text-sf-light-blue transition-colors text-xs lg:text-sm","data-testid":"button-cheatsheets",children:["Cheatsheets",a.jsx(Wa,{className:"ml-1 h-3.5 w-3.5"})]})}),a.jsxs(Kh,{className:"w-56 max-h-80 overflow-y-auto",children:[a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/apex",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-apex",children:[a.jsx("i",{className:"fas fa-code mr-2 text-sf-blue"}),"Apex Cheatsheet"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/soql-sosl",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-soql",children:[a.jsx("i",{className:"fas fa-database mr-2 text-sf-blue"}),"SOQL & SOSL Cheatsheet"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/lwc",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-lwc",children:[a.jsx("i",{className:"fas fa-bolt mr-2 text-sf-blue"}),"LWC Cheatsheet"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/aura",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-aura",children:[a.jsx("i",{className:"fas fa-cloud mr-2 text-sf-blue"}),"Aura Components"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/visualforce",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-visualforce",children:[a.jsx("i",{className:"fas fa-file-code mr-2 text-sf-blue"}),"Visualforce"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/flows",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-flows",children:[a.jsx("i",{className:"fas fa-project-diagram mr-2 text-sf-blue"}),"Flows Cheatsheet"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/formulas",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-formulas",children:[a.jsx("i",{className:"fas fa-calculator mr-2 text-sf-blue"}),"Formulas"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/rest-api",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-rest-api",children:[a.jsx("i",{className:"fas fa-plug mr-2 text-sf-blue"}),"REST API"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/soap-api",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-soap-api",children:[a.jsx("i",{className:"fas fa-envelope mr-2 text-sf-blue"}),"SOAP API"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/record-locking",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-record-locking",children:[a.jsx("i",{className:"fas fa-lock mr-2 text-sf-blue"}),"Record Locking"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/git",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-git",children:[a.jsx("i",{className:"fas fa-code-branch mr-2 text-sf-blue"}),"Git"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs("a",{href:"/cheatsheets/crm-guide",target:"_blank",rel:"noopener noreferrer","data-testid":"link-cheatsheet-crm",children:[a.jsx("i",{className:"fas fa-book mr-2 text-sf-blue"}),"CRM Ultimate Guide"]})})]})]}),a.jsxs(cg,{children:[a.jsx(ug,{asChild:!0,children:a.jsxs(H,{variant:"ghost",size:"sm",className:"h-8 px-2 text-gray-700 dark:text-gray-200 hover:text-sf-blue dark:hover:text-sf-light-blue transition-colors text-xs lg:text-sm","data-testid":"button-extensions",children:["Extensions",a.jsx(Wa,{className:"ml-1 h-3.5 w-3.5"})]})}),a.jsxs(Kh,{className:"w-64",children:[a.jsx(Yt,{asChild:!0,children:a.jsxs(Te,{href:"/extensions/component-inspector","data-testid":"link-component-inspector",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("i",{className:"fas fa-search-plus mr-2 text-sf-blue"}),"Salesforce Component Inspector"]})}),a.jsx(Yt,{asChild:!0,children:a.jsxs(Te,{href:"/extensions/securevault","data-testid":"link-securevault",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[a.jsx("i",{className:"fas fa-shield-alt mr-2 text-sf-blue"}),"SecureVault Password Manager"]})})]})]})]}),a.jsxs("div",{className:"flex items-center space-x-1.5 lg:space-x-3 flex-shrink-0",children:[a.jsxs("form",{onSubmit:c,className:"relative hidden lg:block",children:[a.jsx(Ke,{type:"text",placeholder:"Search...",value:s,onChange:d=>i(d.target.value),className:"w-28 xl:w-36 pl-7 pr-2 py-1 text-xs search-input focus:w-36 xl:focus:w-44 transition-all duration-200","data-testid":"input-search"}),a.jsx(eo,{className:"absolute left-2 top-1/2 transform -translate-y-1/2 text-gray-400 h-3 w-3"})]}),a.jsx(H,{variant:"ghost",size:"sm",onClick:t,className:"h-8 w-8 p-0 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","data-testid":"button-theme-toggle",children:e==="light"?a.jsx(X7,{className:"h-4 w-4 text-gray-700 dark:text-gray-200"}):a.jsx(lG,{className:"h-4 w-4 text-yellow-500"})}),a.jsxs(LY,{open:o,onOpenChange:l,children:[a.jsx(PY,{asChild:!0,children:a.jsx(H,{variant:"ghost",size:"sm",className:"md:hidden h-8 w-8 p-0 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors","data-testid":"button-mobile-menu",children:a.jsx(nD,{className:"h-4 w-4 text-gray-700 dark:text-gray-200"})})}),a.jsx(w4,{side:"right",className:"h-dvh max-h-dvh w-80 overflow-y-auto overscroll-contain touch-pan-y [-webkit-overflow-scrolling:touch]",children:a.jsxs("div",{className:"mt-8 flex flex-col space-y-4 pb-8",children:[a.jsxs("form",{onSubmit:c,className:"relative mb-4",children:[a.jsx(Ke,{type:"text",placeholder:"Search articles...",value:s,onChange:d=>i(d.target.value),className:"w-full pl-10 pr-4 py-2","data-testid":"input-search-mobile"}),a.jsx(eo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"})]}),a.jsx(Te,{href:"/org-health",className:"px-4 py-2 text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-org-health-mobile",children:"Check Org Health"}),a.jsx(Te,{href:"/learn",className:"px-4 py-2 text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-learn-sfdc-mobile",children:"Learn SFDC"}),a.jsx("div",{className:"px-4 py-2 text-gray-700 dark:text-gray-200 font-medium",children:"Categories"}),u==null?void 0:u.filter(d=>d.slug!=="all-blogs").map(d=>a.jsxs(Te,{href:`/category/${d.slug}`,className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":`link-category-mobile-${d.slug}`,children:[a.jsx("i",{className:`fas fa-${NO(d.slug)} mr-2 text-sf-blue`}),d.name]},d.slug)),a.jsx("div",{className:"px-4 py-2 text-gray-700 dark:text-gray-200 font-medium",children:"Salesforce Tools"}),a.jsxs(Te,{href:"/tools/id-converter",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-id-converter-mobile",children:[a.jsx("i",{className:"fas fa-exchange-alt mr-2 text-sf-blue"}),"Convert Salesforce IDs"]}),a.jsxs(Te,{href:"/tools/cron-builder",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-cron-builder-mobile",children:[a.jsx("i",{className:"fas fa-clock mr-2 text-sf-blue"}),"Cron Expression Builder"]}),a.jsxs(Te,{href:"/tools/json-to-apex",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-json-to-apex-mobile",children:[a.jsx("i",{className:"fas fa-file-code mr-2 text-sf-blue"}),"JSON to Apex Converter"]}),a.jsxs(Te,{href:"/tools/api-viewer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-api-viewer-mobile",children:[a.jsx("i",{className:"fas fa-network-wired mr-2 text-sf-blue"}),"API Response Viewer"]}),a.jsxs(Te,{href:"/tools/json-formatter",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-json-formatter-mobile",children:[a.jsx("i",{className:"fas fa-file-alt mr-2 text-sf-blue"}),"JSON Formatter"]}),a.jsxs(Te,{href:"/tools/regex-builder",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-regex-builder-mobile",children:[a.jsx("i",{className:"fas fa-search m
537r-2 text-sf-blue"}),"Regex Builder"]}),a.jsxs(Te,{href:"/tools/graphql-converter",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-graphql-converter-mobile",children:[a.jsx("i",{className:"fas fa-exchange-alt mr-2 text-sf-blue"}),"GraphQL Converter"]}),a.jsx("div",{className:"px-4 py-2 text-gray-700 dark:text-gray-200 font-medium",children:"Cheatsheets"}),a.jsxs("a",{href:"/cheatsheets/apex",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-apex-mobile",children:[a.jsx("i",{className:"fas fa-code mr-2 text-sf-blue"}),"Apex Cheatsheet"]}),a.jsxs("a",{href:"/cheatsheets/soql-sosl",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-soql-mobile",children:[a.jsx("i",{className:"fas fa-database mr-2 text-sf-blue"}),"SOQL & SOSL Cheatsheet"]}),a.jsxs("a",{href:"/cheatsheets/lwc",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-lwc-mobile",children:[a.jsx("i",{className:"fas fa-bolt mr-2 text-sf-blue"}),"LWC Cheatsheet"]}),a.jsxs("a",{href:"/cheatsheets/aura",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-aura-mobile",children:[a.jsx("i",{className:"fas fa-cloud mr-2 text-sf-blue"}),"Aura Components"]}),a.jsxs("a",{href:"/cheatsheets/visualforce",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-visualforce-mobile",children:[a.jsx("i",{className:"fas fa-file-code mr-2 text-sf-blue"}),"Visualforce"]}),a.jsxs("a",{href:"/cheatsheets/flows",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-flows-mobile",children:[a.jsx("i",{className:"fas fa-project-diagram mr-2 text-sf-blue"}),"Flows Cheatsheet"]}),a.jsxs("a",{href:"/cheatsheets/formulas",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-formulas-mobile",children:[a.jsx("i",{className:"fas fa-calculator mr-2 text-sf-blue"}),"Formulas"]}),a.jsxs("a",{href:"/cheatsheets/rest-api",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-rest-api-mobile",children:[a.jsx("i",{className:"fas fa-plug mr-2 text-sf-blue"}),"REST API"]}),a.jsxs("a",{href:"/cheatsheets/soap-api",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-soap-api-mobile",children:[a.jsx("i",{className:"fas fa-envelope mr-2 text-sf-blue"}),"SOAP API"]}),a.jsxs("a",{href:"/cheatsheets/record-locking",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-record-locking-mobile",children:[a.jsx("i",{className:"fas fa-lock mr-2 text-sf-blue"}),"Record Locking"]}),a.jsxs("a",{href:"/cheatsheets/git",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-git-mobile",children:[a.jsx("i",{className:"fas fa-code-branch mr-2 text-sf-blue"}),"Git"]}),a.jsxs("a",{href:"/cheatsheets/crm-guide",target:"_blank",rel:"noopener noreferrer",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>l(!1),"data-testid":"link-cheatsheet-crm-mobile",children:[a.jsx("i",{className:"fas fa-book mr-2 text-sf-blue"}),"CRM Ultimate Guide"]}),a.jsx("div",{className:"px-4 py-2 text-gray-700 dark:text-gray-200 font-medium",children:"Extensions"}),a.jsxs(Te,{href:"/extensions/component-inspector",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-component-inspector-mobile",children:[a.jsx("i",{className:"fas fa-search-plus mr-2 text-sf-blue"}),"Salesforce Component Inspector"]}),a.jsxs(Te,{href:"/extensions/securevault",className:"px-8 py-1 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md",onClick:()=>{l(!1),window.scrollTo({top:0,behavior:"smooth"})},"data-testid":"link-securevault-mobile",children:[a.jsx("i",{className:"fas fa-shield-alt mr-2 text-sf-blue"}),"SecureVault Password Manager"]})]})})]})]})]})})})}function pJ(){const[e,t]=v.useState(""),{data:n}=tn({queryKey:["/api/categories"]}),r=s=>{s.preventDefault(),e.trim()&&(alert(`Thank you for subscribing! We'll send the latest Salesforce insights to ${e}`),t(""))};return a.jsxs("footer",{className:"bg-gray-900 text-white",children:[a.jsx("section",{id:"newsletter-section",className:"py-16 bg-sf-blue",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[a.jsx("i",{className:"fas fa-envelope text-4xl text-white mb-6"}),a.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:"Stay Updated with Salesforce Sage"}),a.jsx("p",{className:"text-xl text-blue-100 mb-8",children:"Get the latest Salesforce insights, tutorials, and best practices delivered to your inbox."}),a.jsxs("form",{onSubmit:r,className:"flex flex-col sm:flex-row gap-4 max-w-md mx-auto",children:[a.jsx(Ke,{type:"email",placeholder:"Enter your email address",value:e,onCh
537ange:s=>t(s.target.value),className:"flex-1 bg-white text-gray-900",required:!0,"data-testid":"input-newsletter-email"}),a.jsx(H,{type:"submit",className:"px-8 py-3 bg-white text-sf-blue font-semibold hover:bg-gray-100 transition-colors","data-testid":"button-newsletter-subscribe",children:"Subscribe"})]}),a.jsx("p",{className:"text-sm text-blue-200 mt-4",children:"No spam, unsubscribe anytime. We respect your privacy."})]})}),a.jsx("div",{className:"py-12",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-6 gap-8",children:[a.jsxs("div",{className:"col-span-1 md:col-span-2 lg:col-span-1",children:[a.jsxs("div",{className:"flex items-center mb-4",children:[a.jsx(Bo,{className:"text-sf-blue text-2xl mr-3 h-8 w-8"}),a.jsx("span",{className:"text-xl font-bold",children:"Salesforce Sage"})]}),a.jsx("p",{className:"text-gray-300 mb-4 max-w-md",children:"Expert insights, tutorials, and best practices for Salesforce professionals. Elevate your Salesforce skills with our comprehensive guides."}),a.jsx("div",{className:"flex space-x-4",children:a.jsx("a",{href:"https://www.linkedin.com/company/salesforcesage",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-sf-blue transition-colors","data-testid":"link-social-linkedin",children:a.jsx("i",{className:"fab fa-linkedin text-xl"})})})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold mb-4",children:"Categories"}),a.jsx("ul",{className:"space-y-2",children:n==null?void 0:n.filter(s=>s.slug!=="all-blogs").map(s=>a.jsx("li",{children:a.jsx(Te,{href:`/category/${s.slug}`,className:"text-gray-300 hover:text-white transition-colors","data-testid":`link-footer-${s.slug}`,onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:s.name})},s.id))})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold mb-4",children:"Salesforce Tools"}),a.jsxs("ul",{className:"space-y-2",children:[a.jsx("li",{children:a.jsx(Te,{href:"/tools/id-converter",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-id-converter",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"ID Converter"})}),a.jsx("li",{children:a.jsx(Te,{href:"/tools/cron-builder",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-cron-builder",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"Cron Builder"})}),a.jsx("li",{children:a.jsx(Te,{href:"/tools/json-to-apex",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-json-to-apex",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"JSON to Apex"})}),a.jsx("li",{children:a.jsx(Te,{href:"/tools/api-viewer",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-api-viewer",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"API Response Viewer"})}),a.jsx("li",{children:a.jsx(Te,{href:"/tools/json-formatter",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-json-formatter",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"JSON Formatter"})}),a.jsx("li",{children:a.jsx(Te,{href:"/tools/regex-builder",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-regex-builder",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"Regex Builder"})}),a.jsx("li",{children:a.jsx(Te,{href:"/tools/graphql-converter",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-graphql-converter",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"GraphQL Converter"})})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold mb-4",children:"Cheatsheets"}),a.jsxs("ul",{className:"space-y-2",children:[a.jsx("li",{children:a.jsx("a",{href:"/cheatsheets/apex",target:"_blank",rel:"noopener noreferrer",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-cheatsheet-apex",children:"Apex"})}),a.jsx("li",{children:a.jsx("a",{href:"/cheatsheets/soql-sosl",target:"_blank",rel:"noopener noreferrer",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-cheatsheet-soql",children:"SOQL & SOSL"})}),a.jsx("li",{children:a.jsx("a",{href:"/cheatsheets/lwc",target:"_blank",rel:"noopener noreferrer",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-cheatsheet-lwc",children:"LWC"})}),a.jsx("li",{children:a.jsx("a",{href:"/cheatsheets/aura",target:"_blank",rel:"noopener noreferrer",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-cheatsheet-aura",children:"Aura"})}),a.jsx("li",{children:a.jsx("a",{href:"/cheatsheets/visualforce",target:"_blank",rel:"noopener noreferrer",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-cheatsheet-visualforce",children:"Visualforce"})}),a.jsx("li",{children:a.jsx("a",{href:"/cheatsheets/flows",target:"_blank",rel:"noopener noreferrer",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-cheatsheet-flows",children:"Flows"})}),a.jsx("li",{children:a.jsx("a",{href:"/cheatsheets/formulas",target:"_blank",rel:"noopener noreferrer",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-cheatsheet-formulas",children:"Formulas"})}),a.jsx("li",{children:a.jsx("a",{href:"/cheatsheets/rest-api",target:"_blank",rel:"noopener noreferrer",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-cheatsheet-rest-api",children:"REST API"})}),a.jsx("li",{children:a.jsx("a",{href:"/cheatsheets/soap-api",target:"_blank",rel:"noopener noreferrer",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-cheatsheet-soap-api",children:"SOAP API"})})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold mb-4",children:"Extensions"}),a.jsxs("ul",{className:"space-y-2",children:[a.jsx("li",{children:a.jsx(Te,{href:"/extensions/component-inspector",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-component-inspector",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"Component Inspector"})}),a.jsx("li",{children:a.jsx(Te,{href:"/extensions/securevault",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-securevault",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"SecureVault Password Manager"})})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold mb-4",children:"Qu
537ick Links"}),a.jsxs("ul",{className:"space-y-2",children:[a.jsx("li",{children:a.jsx(Te,{href:"/org-health",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-org-health",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"Check Org Health"})}),a.jsx("li",{children:a.jsx(Te,{href:"/learn",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-learn-sfdc",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"Learn SFDC"})}),a.jsx("li",{children:a.jsx(Te,{href:"/about",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-about",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"About"})}),a.jsx("li",{children:a.jsx(Te,{href:"/archive",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-archive",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"Archive"})}),a.jsx("li",{children:a.jsx(Te,{href:"/contact",className:"text-gray-300 hover:text-white transition-colors","data-testid":"link-footer-contact",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:"Contact"})})]})]})]}),a.jsx("div",{className:"border-t border-gray-800 mt-8 pt-8 text-center",children:a.jsx("p",{className:"text-gray-400",children:"© 2025 Salesforce Sage. All rights reserved. Built with ❤️ for the Salesforce community."})})]})})]})}const S$={apex:"Apex Cheatsheet","soql-sosl":"SOQL & SOSL Cheatsheet",lwc:"LWC Cheatsheet",aura:"Aura Cheatsheet",visualforce:"Visualforce Cheatsheet",flows:"Flows Cheatsheet",formulas:"Formulas Cheatsheet","rest-api":"REST API Cheatsheet","soap-api":"SOAP API Cheatsheet","record-locking":"Record Locking Cheatsheet",git:"Git Cheatsheet","crm-guide":"CRM Guide Cheatsheet"},mJ={"/":"Home","/home":"Home","/archive":"Archive","/search":"Search","/about":"About","/contact":"Contact","/login":"Sign In","/admin/login":"Admin Sign In","/tools/id-converter":"ID Converter","/tools/cron-builder":"Cron Builder","/tools/json-to-apex":"JSON to Apex Converter","/tools/api-viewer":"API Response Viewer","/tools/json-formatter":"JSON Formatter & Validator","/tools/regex-builder":"Regex Builder","/tools/graphql-converter":"GraphQL Converter","/extensions/component-inspector":"Salesforce Component Inspector","/extensions/component-inspector/privacy-policy":"Component Inspector Privacy Policy","/extensions/securevault":"SecureVault","/extensions/securevault/privacy-policy":"SecureVault Privacy Policy","/org-health":"Check Org Health","/learn":"Learn SFDC","/admin":"Admin","/admin/tutorials":"Tutorial Manager","/admin/settings":"Admin Settings"};function Ga(e){return`${e} | Salesforce Sage`}function gJ(e){var n;const t=(n=e.match(/^\/cheatsheets\/([^/]+)$/))==null?void 0:n[1];return t?Ga(S$[t]??"Page Not Found"):e.startsWith("/category/")?Ga("Category"):e.startsWith("/post/")?Ga("Article"):Ga(mJ[e]??"Page Not Found")}function yJ(){const[e]=go();return v.useEffect(()=>{document.title=gJ(e)},[e]),null}function kO(e,[t,n]){return Math.min(n,Math.max(t,e))}function gC(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xJ=[" ","Enter","ArrowUp","ArrowDown"],vJ=[" ","Enter"],lm="Select",[cv,uv,bJ]=H0(lm),[rh,cAe]=As(lm,[bJ,nh]),dv=nh(),[wJ,Pl]=rh(lm),[SJ,EJ]=rh(lm),E$=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:f,required:p,form:m}=e,g=dv(t),[x,y]=v.useState(null),[b,w]=v.useState(null),[E,N]=v.useState(!1),k=sv(u),[C=!1,T]=Xo({prop:r,defaultProp:s,onChange:i}),[j,S]=Xo({prop:o,defaultProp:l,onChange:c}),R=v.useRef(null),_=x?m||!!x.closest("form"):!0,[L,A]=v.useState(new Set),B=Array.from(L).map(U=>U.props.value).join(";");return a.jsx(LD,{...g,children:a.jsxs(wJ,{required:p,scope:t,trigger:x,onTriggerChange:y,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:E,onValueNodeHasChildrenChange:N,contentId:io(),value:j,onValueChange:S,open:C,onOpenChange:T,dir:k,triggerPointerDownPosRef:R,disabled:f,children:[a.jsx(cv.Provider,{scope:t,children:a.jsx(SJ,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(U=>{A(V=>new Set(V).add(U))},[]),onNativeOptionRemove:v.useCallback(U=>{A(V=>{const P=new Set(V);return P.delete(U),P})},[]),children:n})}),_?a.jsxs(q$,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:h,value:j,onChange:U=>S(U.target.value),disabled:f,form:m,children:[j===void 0?a.jsx("option",{value:""}):null,Array.from(L)]},B):null]})})};E$.displayName=lm;var N$="SelectTrigger",k$=v.forwardRef((e,t)=>
vendor: 16,828 bytes, line 537
537{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=dv(n),o=Pl(N$,n),l=o.disabled||r,c=gt(t,o.onTriggerChange),u=uv(n),d=v.useRef("touch"),[h,f,p]=Y$(g=>{const x=u().filter(w=>!w.disabled),y=x.find(w=>w.value===o.value),b=Q$(x,g,y);b!==void 0&&o.onValueChange(b.value)}),m=g=>{l||(o.onOpenChange(!0),p()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return a.jsx(Xk,{asChild:!0,...i,children:a.jsx(je.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":K$(o.value)?"":void 0,...s,ref:c,onClick:ae(s.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&m(g)}),onPointerDown:ae(s.onPointerDown,g=>{d.current=g.pointerType;const x=g.target;x.hasPointerCapture(g.pointerId)&&x.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(m(g),g.preventDefault())}),onKeyDown:ae(s.onKeyDown,g=>{const x=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(x&&g.key===" ")&&xJ.includes(g.key)&&(m(),g.preventDefault())})})})});k$.displayName=N$;var C$="SelectValue",T$=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...l}=e,c=Pl(C$,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,h=gt(t,c.onValueNodeChange);return Sr(()=>{u(d)},[u,d]),a.jsx(je.span,{...l,ref:h,style:{pointerEvents:"none"},children:K$(c.value)?a.jsx(a.Fragment,{children:o}):i})});T$.displayName=C$;var NJ="SelectIcon",A$=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return a.jsx(je.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});A$.displayName=NJ;var kJ="SelectPortal",j$=e=>a.jsx(rm,{asChild:!0,...e});j$.displayName=kJ;var Oc="SelectContent",O$=v.forwardRef((e,t)=>{const n=Pl(Oc,e.__scopeSelect),[r,s]=v.useState();if(Sr(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?qc.createPortal(a.jsx(R$,{scope:e.__scopeSelect,children:a.jsx(cv.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),i):null}return a.jsx(_$,{...e,ref:t})});O$.displayName=Oc;var ii=10,[R$,Dl]=rh(Oc),CJ="SelectContentImpl",TJ=Cc("SelectContent.RemoveScroll"),_$=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:x,...y}=e,b=Pl(Oc,n),[w,E]=v.useState(null),[N,k]=v.useState(null),C=gt(t,le=>E(le)),[T,j]=v.useState(null),[S,R]=v.useState(null),_=uv(n),[L,A]=v.useState(!1),B=v.useRef(!1);v.useEffect(()=>{if(w)return rC(w)},[w]),nC();const U=v.useCallback(le=>{const[Se,...Ce]=_().map(Oe=>Oe.ref.current),[Be]=Ce.slice(-1),Me=document.activeElement;for(const Oe of le)if(Oe===Me||(Oe==null||Oe.scrollIntoView({block:"nearest"}),Oe===Se&&N&&(N.scrollTop=0),Oe===Be&&N&&(N.scrollTop=N.scrollHeight),Oe==null||Oe.focus(),document.activeElement!==Me))return},[_,N]),V=v.useCallback(()=>U([T,w]),[U,T,w]);v.useEffect(()=>{L&&V()},[L,V]);const{onOpenChange:P,triggerPointerDownPosRef:D}=b;v.useEffect(()=>{if(w){let le={x:0,y:0};const Se=Be=>{var Me,Oe;le={x:Math.abs(Math.round(Be.pageX)-(((Me=D.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(Be.pageY)-(((Oe=D.current)==null?void 0:Oe.y)??0))}},Ce=Be=>{le.x<=10&&le.y<=10?Be.preventDefault():w.contains(Be.target)||P(!1),document.removeEventListener("pointermove",Se),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[w,P,D]),v.useEffect(()=>{const le=()=>P(!1);return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[P]);const[q,Q]=Y$(le=>{const Se=_().filter(Me=>!Me.disabled),Ce=Se.find(Me=>Me.ref.current===document.activeElement),Be=Q$(Se,le,Ce);Be&&setTimeout(()=>Be.ref.current.focus())}),F=v.useCallback((le,Se,Ce)=>{const Be=!B.current&&!Ce;(b.value!==void 0&&b.value===Se||Be)&&(j(le),Be&&(B.current=!0))},[b.value]),ge=v.useCallback(()=>w==null?void 0:w.focus(),[w]),Ve=v.useCallback((le,Se,Ce)=>{const Be=!B.current&&!Ce;(b.value!==void 0&&b.value===Se||Be)&&R(le)},[b.value]),He=r==="popper"?HS:I$,Fe=He===HS?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:x}:{};return a.jsx(R$,{scope:n,content:w,viewport:N,onViewportChange:k,itemRefCallback:F,selectedItem:T,onItemLeave:ge,itemTextRefCallback:Ve,focusSelectedItem:V,selectedItemText:S,position:r,isPositioned:L,searchRef:q,children:a.jsx(rv,{as:TJ,allowPinchZoom:!0,children:a.jsx(tv,{asChild:!0,trapped:b.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:ae(s,le=>{var Se;(Se=b.trigger)==null||Se.focus({preventScroll:!0}),le.preventDefault()}),children:a.jsx(Jd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:a.jsx(He,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:le=>le.preventDefault(),...y,...Fe,onPlaced:()=>A(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ae(y.onKeyDown,le=>{const Se=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!Se&&le.key.length===1&&Q(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let Be=_().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(le.key)&&(Be=Be.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const Me=le.target,Oe=Be.indexOf(Me);Be=Be.slice(Oe+1)}setTimeout(()=>U(Be)),le.preventDefault()}})})})})})})});_$.displayName=CJ;var AJ="SelectItemAlignedPosition",I$=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=Pl(Oc,n),o=Dl(Oc,n),[l,c]=v.useState(null),[u,d]=v.useState(null),h=gt(t,C=>d(C)),f=uv(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:g,selectedItem:x,selectedItemText:y,focusSelectedItem:b}=o,w=v.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&g&&x&&y){const C=i.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),S=y.getBoundingClientRect();if(i.dir!=="rtl"){const Me=S.left-T.left,Oe=j.left-Me,St=C.left-Oe,Qe=C.width+St,$t=Math.max(Qe,T.width),En=window.innerWidth-ii,Nn=kO(Oe,[ii,Math.max(ii,En-$t)]);l.style.minWidth=Qe+"px",l.style.left=Nn+"px"}else{const Me=T.right-S.right,Oe=window.innerWidth-j.right-Me,St=window.innerWidth-C.right-Oe,Qe=C.width+St,$t=Math.max(Qe,T.width),En=window.innerWidth-ii,Nn=kO(Oe,[ii,Math.max(ii,En-$t)]);l.style.minWidth=Qe+"px",l.style.right=Nn+"px"}const R=f(),_=window.innerHeight-ii*2,L=g.scrollHeight,A=window.getComputedStyle(u),B=parseInt(A.borderTopWidth,10),U=parseInt(A.paddingTop,10),V=parseInt(A.borderBottomWidth,10),P=parseInt(A.paddingBottom,10),D=B+U+L+P+V,q=Math.min(x.offsetHeight*5,D),Q=window.getComputedStyle(g),F=parseInt(Q.paddingTop,10),ge=parseInt(Q.paddingBottom,10),Ve=C.top+C.height/2-ii,He=_-Ve,Fe=x.offsetHeight/2,le=x.offsetTop+Fe,Se=B+U+le,Ce=D-Se;if(Se<=Ve){const Me=R.length>0&&x===R[R.length-1].ref.current;l.style.bottom="0px";const Oe=u.clientHeight-g.offsetTop-g.offsetHeight,St=Math.max(He,Fe+(Me?ge:0)+Oe+V),Qe=Se+St;l.style.height=Qe+"px"}else{const Me=R.length>0&&x===R[0].ref.current;l.style.top="0px";const St=Math.max(Ve,B+g.offsetTop+(Me?F:0)+Fe)+Ce;l.style.height=St+"px",g.scrollTop=Se-Ve+g.offsetTop}l.style.margin=`${ii}px 0`,l.style.minHeight=q+"px",l.style.maxHeight=_+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,l,u,g,x,y,i.dir,r]);Sr(()=>w(),[w]);const[E,N]=v.useState();Sr(()=>{u&&N(window.getComputedStyle(u).zIndex)},[u]);const k=v.useCallback(C=>{C&&m.current===!0&&(w(),b==null||b(),m.current=!1)},[w,b]);return a.jsx(OJ,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:k,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:a.jsx(je.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});I$.displayName=AJ;var jJ="SelectPopperPosition",HS=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=ii,...i}=e,o=dv(n);return a.jsx(Zk,{...o,...i,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});HS.displayName=jJ;var[OJ,yC]=rh(Oc,{}),GS="SelectViewport",M$=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=Dl(GS,n),o=yC(GS,n),l=gt(t,i.onViewportChange),c=v.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),a.jsx(cv.Slot,{scope:n,children:a.jsx(je.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ae(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&h){const p=Math.abs(c.current-d.scrollTop);if(p>0){const m=window.innerHeight-ii*2,g=parseFloat(h.style.minHeight),x=parseFloat(h.style.height),y=Math.max(g,x);if(y<m){const b=y+p,w=Math.min(m,b),E=b-w;h.style.height=w+"px",h.style.bottom==="0px"&&(d.scrollTop=E>0?E:0,h.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});M$.displayName=GS;var L$="SelectGroup",[RJ,_J]=rh(L$),IJ=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=io();return a.jsx(RJ,{scope:n,id:s,children:a.jsx(je.div,{role:"group","aria-labelledby":s,...r,ref:t})})});IJ.displayName=L$;var P$="SelectLabel",D$=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=_J(P$,n);return a.jsx(je.div,{id:s.id,...r,ref:t})});D$.displayName=P$;var ax="SelectItem",[MJ,$$]=rh(ax),F$=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,l=Pl(ax,n),c=Dl(ax,n),u=l.value===r,[d,h]=v.useState(i??""),[f,p]=v.useState(!1),m=gt(t,b=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,b,r,s)}),g=io(),x=v.useRef("touch"),y=()=>{s||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(MJ,{scope:n,value:r,disabled:s,textId:g,isSelected:u,onItemTextChange:v.useCallback(b=>{h(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:a.jsx(cv.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:a.jsx(je.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:m,onFocus:ae(o.onFocus,()=>p(!0)),onBlur:ae(o.onBlur,()=>p(!1)),onClick:ae(o.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:ae(o.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:ae(o.onPointerDown,b=>{x.current=b.pointerType}),onPointerMove:ae(o.onPointerMove,b=>{var w;x.current=b.pointerType,s?(w=c.onItemLeave)==null||w.call(c):x.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ae(o.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:ae(o.onKeyDown,b=>{var E;((E=c.searchRef)==null?void 0:E.current)!==""&&b.key===" "||(vJ.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});F$.displayName=ax;var qh="SelectItemText",B$=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=Pl(qh,n),l=Dl(qh,n),c=$$(qh,n),u=EJ(qh,n),[d,h]=v.useState(null),f=gt(t,y=>h(y),c.onItemTextChange,y=>{var b;return(b=l.itemTextRefCallback)==null?void 0:b.call(l,y,c.value,c.disabled)}),p=d==null?void 0:d.textContent,m=v.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:x}=u;return Sr(()=>(g(m),()=>x(m)),[g,x,m]),a.jsxs(a.Fragment,{children:[a.jsx(je.span,{id:c.textId,...i,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?qc.createPortal(i.children,o.valueNode):null]})});B$.displayName=qh;var U$="SelectItemIndicator",z$=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return $$(U$,n).isSelected?a.jsx(je.span,{"aria-hidden":!0,...r,ref:t}):null});z$.displayName=U$;var KS="SelectScrollUpButton",V$=v.forwardRef((e,t)=>{const n=Dl(KS,e.__scopeSelect),r=yC(KS,e.__scopeSelect),[s,i]=v.useState(!1),o=gt(t,r.onScrollButtonChange);return Sr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(H$,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});V$.displayName=KS;var qS="SelectScrollDownButton",W$=v.forwardRef((e,t)=>{const n=Dl(qS,e.__scopeSelect),r=yC(qS,e.__scopeSelect),[s,i]=v.useState(!1),o=gt(t,r.onScrollButtonChange);return Sr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;i(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(H$,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});W$.displayName=qS;var H$=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=Dl("SelectScrollButton",n),o=v.useRef(null),l=uv(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Sr(()=>{var d;const u=l().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),a.jsx(je.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ae(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ae(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ae(s.onPointerLeave,()=>{c()})})}),LJ="SelectSeparator",G$=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(je.div,{"aria-hidden":!0,...r,ref:t})});G$.displayName=LJ;var YS="SelectArrow",PJ=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=dv(n),i=Pl(YS,n),o=Dl(YS,n);return i.open&&o.position==="popper"?a.jsx(eC,{...s,...r,ref:t}):null});PJ.displayName=YS;function K$(e){return e===""||e===void 0}var q$=v.forwardRef((e,t)=>{const{value:n,...r}=e,s=v.useRef(null),i=gt(t,s),o=gC(n);return v.useEffect(()=>{const l=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==n&&d){const h=new Event("change",{bubbles:!0});d.call(l,n),l.dispatchEvent(h)}},[o,n]),a.jsx(sm,{asChild:!0,children:a.jsx("select",{...r,ref:i,defaultValue:n})})});q$.displayName="BubbleSelect";function Y$(e){const t=wr(e),n=v.useRef(""),r=v.useRef(0),s=v.useCallback(o=>{const l=n.current+o;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function Q$(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=DJ(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function DJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $J=E$,J$=k$,FJ=T$,BJ=A$,UJ=j$,X$=O$,zJ=M$,Z$=D$,eF=F$,VJ=B$,WJ=z$,tF=V$,nF=W$,rF=G$;const pr=$J,mr=FJ,er=v.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(J$,{ref:r,className:be("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
537ing-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,a.jsx(BJ,{asChild:!0,children:a.jsx(Wa,{className:"h-4 w-4 opacity-50"})})]}));er.displayName=J$.displayName;const sF=v.forwardRef(({className:e,...t},n)=>a.jsx(tF,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(I7,{className:"h-4 w-4"})}));sF.displayName=tF.displayName;const iF=v.forwardRef(({className:e,...t},n)=>a.jsx(nF,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Wa,{className:"h-4 w-4"})}));iF.displayName=nF.displayName;const tr=v.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>a.jsx(UJ,{children:a.jsxs(X$,{ref:s,className:be("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[a.jsx(sF,{}),a.jsx(zJ,{className:be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(iF,{})]})}));tr.displayName=X$.displayName;const HJ=v.forwardRef(({className:e,...t},n)=>a.jsx(Z$,{ref:n,className:be("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));HJ.displayName=Z$.displayName;const qe=v.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(eF,{ref:r,className:be("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(WJ,{children:a.jsx(Va,{className:"h-4 w-4"})})}),a.jsx(VJ,{children:t})]}));qe.displayName=eF.displayName;const GJ=v.forwardRef(({className:e,...t},n)=>a.jsx(rF,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));GJ.displayName=rF.displayName;const KJ=Xd("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function $n({className:e,variant:t,...n}){return a.jsx("div",{className:be(KJ({variant:t}),e),...n})}const te=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:be("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));te.displayName="Card";const he=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:be("flex flex-col space-y-1.5 p-6",e),...t}));he.displayName="CardHeader";const fe=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:be("text-2xl font-semibold leading-none tracking-tight",e),...t}));fe.displayName="CardTitle";const Xt=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Xt.displayName="CardDescription";const ne=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:be("p-6 pt-0",e),...t}));ne.displayName="CardContent";const qJ=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:be("flex items-center p-6 pt-0",e),...t}));
537qJ.displayName="CardFooter";function dp({post:e,category:t,featured:n=!1}){const r=i=>{const o=`${window.location.origin}/post/${e.slug}`,l=e.title;switch(i){case"twitter":window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(l)}&url=${encodeURIComponent(o)}`);break;case"linkedin":window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(o)}`);break}},s=()=>t?t.color:"#0176D3";return a.jsxs(te,{className:`blog-card bg-white dark:bg-gray-800 shadow-md overflow-hidden ${n?"h-full":""}`,children:[e.imageUrl&&a.jsx("div",{className:"w-full h-48 bg-gray-100 dark:bg-gray-700 flex items-center justify-center overflow-hidden",children:a.jsx("img",{src:e.imageUrl,alt:e.title,className:"max-w-full max-h-full object-contain","data-testid":`img-post-${e.slug}`})}),a.jsxs(ne,{className:"p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsx($n,{style:{backgroundColor:s()},className:"text-white px-3 py-1 rounded-full text-sm font-medium","data-testid":`badge-category-${e.slug}`,children:(t==null?void 0:t.name)||"Uncategorized"}),a.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400","data-testid":`text-read-time-${e.slug}`,children:[e.readTime," min read"]})]}),a.jsx(Te,{href:`/post/${e.slug}`,"data-testid":`link-post-${e.slug}`,onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:a.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-3 hover:text-sf-blue cursor-pointer line-clamp-2",children:e.title})}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4 line-clamp-3","data-testid":`text-excerpt-${e.slug}`,children:e.excerpt}),a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("div",{className:"flex flex-wrap gap-2",children:(e.tags||[]).slice(0,2).map(i=>a.jsx($n,{variant:"secondary",className:"text-xs px-3 py-1 bg-sf-blue/10 text-sf-blue hover:bg-sf-blue hover:text-white transition-colors border border-sf-blue/20 rounded-full font-medium","data-testid":`badge-tag-${i.toLowerCase()}`,children:i},i))}),a.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400","data-testid":`text-date-${e.slug}`,children:e.createdAt?new Date(e.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"No Date"})]}),a.jsx("div",{className:"flex items-center justify-end pt-4 border-t border-gray-200 dark:border-gray-600",children:a.jsxs("div",{className:"flex space-x-2",children:[a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>r("twitter"),className:"text-gray-500 hover:text-sf-blue transition-colors","data-testid":`button-share-twitter-${e.slug}`,children:a.jsx(sD,{className:"h-4 w-4"})}),a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>r("linkedin"),className:"text-gray-500 hover:text-sf-blue transition-colors","data-testid":`button-share-linkedin-${e.slug}`,children:a.jsx(Fk,{className:"h-4 w-4"})})]})})]})]})}const YJ=e=>({flows:"project-diagram",apex:"code",configuration:"wrench",soql:"database",visualforce:"file-code",lwc:"bolt",aura:"puzzle-piece"})[e]||"folder";function QJ({category:e}){return a.jsx(Te,{href:`/category/${e.slug}`,"data-testid":`link-category-card-${e.slug}`,children:a.jsx(te,{className:"bg-white dark:bg-gray-700 hover:shadow-lg transition-shadow cursor-pointer h-full",children:a.jsxs(ne,{className:"p-6 text-center",children:[a.jsx("i",{className:`fas fa-${YJ(e.slug)} text-3xl mb-4 text-sf-blue`,"data-testid":`icon-category-${e.slug}`}),a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2","data-testid":`text-category-name-${e.slug}`,children:e.name}),a.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-300","data-testid":`text-category-count-${e.slug}`,children:[e.postCount," articles"]})]})})})}function Xe({className:e,...t}){return a.jsx("div",{className:be("animate-pulse rounded-md bg-muted",e),...t})}function CO(){const[e,t]=v.useState("all"),{data:n,isLoading:r}=tn({queryKey:["/api/categories"]}),{data:s,isLoading:i}=tn({queryKey:["/api/posts",{featured:!0,limit:6}]}),{data:o,isLoading:l}=tn({queryKey:["/api/posts",{featured:!1,limit:4}]}),c=d=>n==null?void 0:n.find(h=>h.id===d),u=(s==null?void 0:s.filter(d=>{var h;return e==="all"||((h=c(d.categoryId))==null?void 0:h.slug)===e}))||[];return a.jsxs("div",{className:"min-h-screen bg-white dark:bg-gray-900 text-gray-900 dark:text-white dark-transition",children:[a.jsx("section",{className:"bg-gradient-to-br from-sf-blue to-sf-dark-blue dark:from-gray-800 dark:to-gray-900 text-white py-20",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"text-center",children:[a.jsxs("div",{className:"flex justify-center items-center mb-6",children:[a.jsx(Bo,{className:"text-6xl mr-4 text-white opacity-90 h-16 w-16"}),a.jsx("h1",{className:"text-5xl md:text-7xl font-bold","data-testid":"text-hero-title",children:"Salesforce Sage"})]}),a.jsx("p",{className:"text-xl md:text-2xl text-blue-100 mb-8 max-w-3xl mx-auto","data-testid":"text-hero-description",children:"Expert insights, tutorials, and best practices for Salesforce professionals. Elevate your Salesforce skills with in-depth guides on Apex, Components, and Administration."}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[a.jsx(Te,{href:"/archive",children:a.jsxs(H,{
537className:"px-8 py-3 bg-white text-sf-blue font-semibold hover:bg-gray-100 transition-colors","data-testid":"button-browse-articles",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:["Browse Latest Articles",a.jsx(vf,{className:"ml-2 h-4 w-4"})]})}),a.jsxs(H,{className:"px-8 py-3 bg-white text-sf-blue font-semibold hover:bg-gray-100 transition-colors","data-testid":"button-subscribe-newsletter",onClick:()=>{const d=document.getElementById("newsletter-section");d==null||d.scrollIntoView({behavior:"smooth"})},children:["Subscribe to Newsletter",a.jsx(vf,{className:"ml-2 h-4 w-4"})]})]})]})})}),a.jsx("section",{className:"py-16 bg-gray-50 dark:bg-gray-800 dark-transition",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsx("h2",{className:"text-3xl font-bold text-center mb-12 text-gray-900 dark:text-white","data-testid":"text-categories-title",children:"Explore Categories"}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-6",children:r?Array.from({length:5}).map((d,h)=>a.jsx(Xe,{className:"h-32 w-full"},h)):n==null?void 0:n.filter(d=>d.slug!=="all-blogs").map(d=>a.jsx(QJ,{category:d},d.id))})]})}),a.jsx("section",{className:"py-16",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"flex justify-between items-center mb-12",children:[a.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white","data-testid":"text-featured-title",children:"Featured Articles"}),a.jsxs("div",{className:"flex items-center space-x-4",children:[a.jsxs(pr,{value:e,onValueChange:t,children:[a.jsx(er,{className:"w-48","data-testid":"select-category-filter",children:a.jsx(mr,{placeholder:"All Categories"})}),a.jsxs(tr,{children:[a.jsx(qe,{value:"all",children:"All Categories"}),n==null?void 0:n.filter(d=>d.slug!=="all-blogs").map(d=>a.jsx(qe,{value:d.slug,children:d.name},d.id))]})]}),a.jsx(H,{onClick:()=>t("all"),variant:"outline",className:"border-sf-blue text-sf-blue hover:bg-sf-blue hover:text-white transition-colors","data-testid":"button-clear-filter",children:"Clear Filter"})]})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:i?Array.from({length:3}).map((d,h)=>a.jsxs("div",{className:"space-y-4",children:[a.jsx(Xe,{className:"h-48 w-full"}),a.jsx(Xe,{className:"h-4 w-full"}),a.jsx(Xe,{className:"h-4 w-3/4"}),a.jsx(Xe,{className:"h-4 w-1/2"})]},h)):u.slice(0,3).map(d=>a.jsx(dp,{post:d,category:c(d.categoryId),featured:!0},d.id))})]})}),a.jsx("section",{className:"py-16 bg-gray-50 dark:bg-gray-800 dark-transition",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsx("h2",{className:"text-3xl font-bold text-center mb-12 text-gray-900 dark:text-white","data-testid":"text-latest-title",children:"Latest Articles"}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:l?Array.from({length:4}).map((d,h)=>a.jsxs("div",{className:"flex space-x-4",children:[a.jsx(Xe,{className:"h-32 w-48 flex-shrink-0"}),a.jsxs("div",{className:"flex-1 space-y-2",children:[a.jsx(Xe,{className:"h-4 w-full"}),a.jsx(Xe,{className:"h-4 w-3/4"}),a.jsx(Xe,{className:"h-4 w-1/2"})]})]},h)):o==null?void 0:o.map(d=>a.jsx(dp,{post:d,category:c(d.categoryId)},d.id))}),a.jsx("div",{className:"text-center mt-12",children:a.jsx(Te,{href:"/archive",children:a.jsxs(H,{className:"px-8 py-3 bg-sf-blue text-white font-semibold hover:bg-sf-dark-blue transition-colors","data-testid":"button-view-all",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:["View All Articles",a.jsx(vf,{className:"ml-2 h-4 w-4"})]})})})]})})]})}function JJ({content:e,className:t=""}){return a.jsx("div",{className:`prose prose-lg max-w-none dark:prose-invert prose-blue prose-headings:text-gray-900 dark:prose-headings:text-white prose-p:text-gray-700 dark:prose-p:text-gray-300 prose-li:text-gray-700 dark:prose-li:text-gray-300 prose-strong:text-gray-900 dark:prose-strong:text-white prose-code:text-white prose-code:bg-black prose-code:px-2 prose-code:py-1 prose-code:rounded prose-pre:bg-black prose-pre:text-white prose-pre:border prose-pre:border-gray-700 prose-blockquote:border-sf-blue ${t}`,dangerouslySetInnerHTML:{__html:e},"data-testid":"html-content"})}function XJ(){const[,e]=Tk("/post/:slug"),{data:t,isLoading:n,error:r}=tn({queryKey:["/api/posts/"+(e==null?void 0:e.slug)],enabled:!!(e!=null&&e.slug)}),{data:s}=tn({queryKey:["/api/categories"]}),{data:i}=tn({queryKey:["/api/posts",{categoryId:t==null?void 0:t.categoryId,limit:3}],enabled:!!(t!=null&&t.categoryId)});v.useEffect(()=>{t?document.title=Ga(t.title):r&&(document.title=Ga("Article Not Found"))},[t,r]);const o=u=>{if(!t)return;const d=window.location.href,h=t.title;switch(u){case"twitter":window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(h)}&url=${encodeURIComponent(d)}`);break;case"linkedin":window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(d)}`);break}},l=()=>s==null?void 0:s.find(u=>u.id===(t==null?void 0:t.categoryId));if(r)return a.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900",children:a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-4",children:"Post Not Found"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"The blog post you're looking for doesn't exist."})]})});if(n||!t)return a.jsx("div",{className:"min-h-screen bg-white dark:bg-gray-900 py-8",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsx(Xe,{className:"h-8 w-3/4 mb-4"}),a.jsx(Xe,{className:"h-4 w-1/2 mb-8"}),a.jsx(Xe,{className:"h-64 w-full mb-8"}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(Xe,{className:"h-4 w-full"}),a.jsx(Xe,{className:"h-4 w-full"}),a.jsx(Xe,{className:"h-4 w-3/4"})]})]})});const c=l();return a.jsxs("div",{className:"min-h-screen bg-white dark:bg-gray-900",children:[a.jsx("div",{className:"bg-gray-50 dark:bg-gray-800 py-16",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"flex items-center space-x-4 mb-6",children:[c&&a.jsx($n,{style:{backgroundColor:c.color},className:"text-white px-3 py-1 rounded-full","data-testid":"badge-post-category",children:c.name}),a.jsxs("div",{className:"flex items-center text-sm text-gray-500 dark:text-gray-400 space-x-4",children:[a.jsxs("div",{className:"flex items-center","data-testid":"text-post-read-time",children:[a.jsx(Dk,{className:"h-4 w-4 mr-1"}),t.readTime," min read"]}),a.jsxs("div",{className:"flex items-center","data-testid":"text-post-date",children:[a.jsx(Pk,{className:"h-4 w-4 mr-1"}),new Date(t.createdAt).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})]})]})]}),a.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white mb-6","data-testid":"text-post-title",children:t.title}),a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 mb-8","data-testid":"text-post-excerpt",children:t.excerpt}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("div",{className:"flex flex-wrap gap-3",children:(t.tags||[]).map(u=>a.jsx($n,{variant:"secondary",className:"text-sm px-4 py-2 bg-sf-blue/10 text-sf-blue hover:bg-sf-blue hover:text-white transition-colors border border-sf-blue/20 rounded-full font-medium","data-testid":`badge-post-tag-${u.toLowerCase()}`,children:u},u))}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>o("twitter"),className:"text-gray-500 hover:text-sf-blue transition-colors","data-testid":"button-post-share-twitter",children:a.jsx(sD,{className:"h-4 w-4"})}),a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>o("linkedin"),className:"text-gray-500 hover:text-sf-blue transition-colors","data-testid":"button-post-share-linkedin",children:a.jsx(Fk,{className:"h-4 w-4"})})]})]})]})}),a.jsx("div",{className:"py-16",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[t.imageUrl&&a.jsx("img",{src:t.imageUrl,alt:t.title,className:"w-full h-96 object-contain rounded-lg mb-12 bg-gray-100 dark:bg-gray-800","data-testid":"img-post-featured"}),a.jsx("article",{className:"max-w-none","data-testid":"text-post-content",children:a.jsx(JJ,{content:t.content})})]})}),i&&i.length>0&&a.jsx("div",{className:"py-16 bg-gray-50 dark:bg-gray-800",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-12","data-testid":"text-related-posts-title",children:"Related Posts"}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:i.filter(u=>u.id!==t.id).slice(0,3).map(u=>a.jsxs(Te,{href:`/post/${u.slug}`,className:"block bg-white dark:bg-gray-700 rounded-lg shadow-md overflow-hidden hover:shadow-lg transition-shadow cursor-pointer","data-testid":`link-related-post-${u.slug}`,onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:[u.imageUrl&&a.jsx("img",{src:u.imageUrl,alt:u.title,className:"w-full h-48 object-cover","data-testid":`img-related-post-${u.slug}`}),a.jsxs("div",{className:"p-6",children:[a.jsx("h3",{className:"text-lg font-bold text-gray-900 dark:text-white mb-2 line-clamp-2 hover:text-sf-blue transition-colors",children:u.title}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300 text-sm line-clamp-3",children:u.excerpt})]})]},u.id))})]})})]})}function ZJ(){const[,e]=Tk("/category/:slug");v.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[e==null?void 0:e.slug]);const{data:t,isLoading:n,error:r}=tn({queryKey:["/api/categories/"+(e==null?void 0:e.slug)],enabled:!!(e!=null&&e.slug)}),{data:s,isLoading:i}=tn({queryKey:["/api/categories/"+(e==null?void 0:e.slug)+"/posts"],enabled:!!(e!=null&&e.slug)});return v.useEffect(()=>{t?document.title=Ga(t.name):r&&(document.title=Ga("Category Not Found"))},[t,r]),r?a.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900",children:a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-4",children:"Category Not Found"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"The category you're looking for doesn't exist."})]})}):a.jsx("div",{className:"min-h-screen bg-white dark:bg-gray-900 py-8",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsx("div",{className:"text-center mb-12",children:n?a.jsxs("div",{className:"space-y-4",children:[a.jsx(Xe,{className:"h-12 w-48 mx-auto"}),a.jsx(Xe,{className:"h-16 w-96 mx-auto"})]}):t?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex justify-center items-center mb-4",children:[a.jsx("i",{className:`${t.icon} text-5xl mr-4`,style:{color:t.color},"data-testid":`icon-category-${t.slug}`}),a.jsx("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white","data-testid":"text-category-name",children:t.name})]}),t.description&&a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto","data-testid":"text-category-description",children:t.description}),a.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-4","data-testid":"text-category-post-count",children:[t.postCount," articles in this category"]})]}):null}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:i?Array.from({length:6}).map((o,l)=>a.jsxs("div",{className:"space-y-4",children:[a.jsx(Xe,{className:"h-48 w-full"}),a.jsx(Xe,{className:"h-4 w-full"}),a.jsx(Xe,{className:"h-4 w-3/4"}),a.jsx(Xe,{className:"h-4 w-1/2"})]},l)):s==null?void 0:s.map(o=>a.jsx(dp,{post:o,category:t},o.id))}),!i&&(s==null?void 0:s.length)===0&&a.jsxs("div",{className:"text-center py-16",children:[a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4","data-testid":"text-no-posts",children:"No posts found in this category"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Check back later for new content!"})]})]})})}function eX(){const{data:e,isLoading:t}=tn({queryKey:["/api/posts"]}),{data:n}=tn({queryKey:["/api/categories"]}),r=c=>n==null?void 0:n.find(u=>u.id===c),i=e?(c=>{const u={},d=[],h=new Set;
537return c.forEach(f=>{const p=new Date(f.createdAt),m=p.toLocaleDateString("en-US",{year:"numeric",month:"long"}),g=`${p.getFullYear()}-${String(p.getMonth()+1).padStart(2,"0")}`;u[m]||(u[m]=[],h.has(g)||(d.push({label:m,sortKey:g}),h.add(g))),u[m].push(f)}),Object.keys(u).forEach(f=>{u[f].sort((p,m)=>new Date(m.createdAt).getTime()-new Date(p.createdAt).getTime())}),{byMonth:u,monthKeys:d}})(e):{byMonth:{},monthKeys:[]},o=i.byMonth,l=i.monthKeys.sort((c,u)=>u.sortKey.localeCompare(c.sortKey)).map(c=>c.label);return a.jsx("div",{className:"min-h-screen bg-white dark:bg-gray-900 py-16",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16",children:[a.jsxs("div",{className:"flex justify-center items-center mb-6",children:[a.jsx(Pk,{className:"text-sf-blue text-5xl mr-4 h-12 w-12"}),a.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white","data-testid":"text-archive-title",children:"Article Archive"})]}),a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto","data-testid":"text-archive-subtitle",children:"Browse all our Salesforce articles organized by publication date"})]}),e&&a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-16",children:[a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-6 rounded-lg text-center",children:[a.jsx("div",{className:"text-3xl font-bold text-sf-blue mb-2","data-testid":"text-total-posts",children:e.length}),a.jsx("div",{className:"text-gray-600 dark:text-gray-300",children:"Total Articles"})]}),a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-6 rounded-lg text-center",children:[a.jsx("div",{className:"text-3xl font-bold text-sf-blue mb-2","data-testid":"text-total-categories",children:(n==null?void 0:n.length)||0}),a.jsx("div",{className:"text-gray-600 dark:text-gray-300",children:"Categories"})]}),a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-6 rounded-lg text-center",children:[a.jsx("div",{className:"text-3xl font-bold text-sf-blue mb-2","data-testid":"text-total-months",children:l.length}),a.jsx("div",{className:"text-gray-600 dark:text-gray-300",children:"Months of Content"})]})]}),a.jsx("div",{className:"space-y-16",children:t?Array.from({length:3}).map((c,u)=>a.jsxs("div",{className:"space-y-8",children:[a.jsx(Xe,{className:"h-8 w-48"}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:Array.from({length:3}).map((d,h)=>a.jsxs("div",{className:"space-y-4",children:[a.jsx(Xe,{className:"h-48 w-full"}),a.jsx(Xe,{className:"h-4 w-full"}),a.jsx(Xe,{className:"h-4 w-3/4"}),a.jsx(Xe,{className:"h-4 w-1/2"})]},h))})]},u)):l.length>0?l.map(c=>a.jsxs("div",{className:"space-y-8",children:[a.jsxs("div",{className:"flex items-center space-x-4",children:[a.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white","data-testid":`text-month-${c.replace(" ","-").toLowerCase()}`,children:c}),a.jsxs($n,{variant:"secondary",className:"text-sm","data-testid":`badge-month-count-${c.replace(" ","-").toLowerCase()}`,children:[o[c].length," articles"]})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:o[c].map(u=>a.jsx(dp,{post:u,category:r(u.categoryId)},u.id))})]},c)):a.jsxs("div",{className:"text-center py-16",children:[a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4","data-testid":"text-no-posts",children:"No articles found"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Check back later for new content!"})]})})]})})}function tX(){const[e,t]=go(),[n,r]=v.useState(""),[s,i]=v.useState(""),[o,l]=v.useState([]);v.useEffect(()=>{const b=new URLSearchParams(window.location.search).get("q");b&&r(b)},[e]);const{data:c}=tn({queryKey:["/api/categories"]}),{data:u,isLoading:d}=tn({queryKey:["/api/posts",{search:n}],enabled:!!n}),h=y=>c==null?void 0:c.find(b=>b.id===y),f=y=>{y.preventDefault(),n.trim()&&t(`/search?q=${encodeURIComponent(n.trim())}`)},p=y=>{s===y?(i(""),l(b=>b.filter(w=>w!==y))):(i(y),l(b=>[...b.filter(w=>!(c!=null&&c.some(E=>E.slug===w))),y]))},m=()=>{i(""),l([])},g=(u==null?void 0:u.filter(y=>{if(!s)return!0;const b=h(y.categoryId);return(b==null?void 0:b.slug)===s}))||[],x=n.trim().length>0;return a.jsx("div",{className:"min-h-screen bg-white dark:bg-gray-900 py-16",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-12",children:[a.jsxs("div",{className:"flex justify-center items-center mb-6",children:[a.jsx(eo,{className:"text-sf-blue text-5xl mr-4 h-12 w-12"}),a.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white","data-testid":"text-search-title",children:"Search Articles"})]}),a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto","data-testid":"text-search-subtitle",children:"Find the Salesforce insights and tutorials you're looking for"})]}),a.jsx("div",{className:"max-w-2xl mx-auto mb-12",children:a.jsxs("form",{onSubmit:f,className:"relative",children:[a.jsx(Ke,{type:"text",placeholder:"Search for articles, topics, or keywords...",value:n,onChange:y=>r(y.target.value),className:"w-full pl-12 pr-20 py-4 text-lg border-2 border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-sf-blue focus:border-transparent","data-testid":"input-search-main"}),a.jsx(eo,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),a.jsx(H,{type:"submit",className:"absolute right-2 top-1/2 transform -translate-y-1/2 bg-sf-blue text-white hover:bg-sf-dark-blue","data-testid":"button-search-submit",children:"Search"})]})}),x&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mb-8",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-4 mb-4",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx($7,{className:"h-5 w-5 text-gray-500"}),a.jsx("span",{className:"font-medium text-gray-700 dark:text-gray-300",children:"Filter by category:"})]}),c==null?void 0:c.map(y=>a.jsxs(H,{variant:s===y.slug?"default":"outline",size:"sm",onClick:()=>p(y.slug),className:s===y.slug?"bg-sf-blue text-white":"","data-testid":`button-filter-${y.slug}`,children:[a.jsx("i",{className:`${y.icon} mr-2`,style:{color:s===y.slug?"white":y.color}}),y.name]},y.slug))]}),o.length>0&&a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Active filters:"}),o.map(y=>{const b=c==null?void 0:c.find(w=>w.slug===y);return a.jsxs($n,{variant:"secondary",className:"flex items-center gap-1","data-testid":`badge-active-filter-${y}`,children:[(b==null?void 0:b.name)||y,a.jsx(Y0,{className:"h-3 w-3 cursor-pointer",onClick:()=>p(y)})]},y)}),a.jsx(H,{variant:"ghost",size:"sm",onClick:m,className:"text-sf-blue hover:text-sf-dark-blue","data-testid":"button-clear-filters",children:"Clear all"})]})]}),a.jsxs("div",{className:"mb-8",children:[a.jsx("div",{className:"flex items-center justify-between mb-6",children:a.jsxs("div",{children:[a.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white","data-testid":"text-results-title",children:"Search Results"}),!d&&a.jsx("p",{className:"text-gray-600 dark:text-gray-300 mt-2","data-testid":"text-results-count",children:g.length>0?`Found ${g.length} article${g.length===1?"":"s"} for "${n}"`:`No articles found for "${n}"`})]})}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:d?Array.from({length:6}).map((y,b)=>a.jsxs("div",{className:"space-y-4",children:[a.jsx(Xe,{className:"h-48 w-full"}),a.jsx(Xe,{className:"h-4 w-full"}),a.jsx(Xe,{className:"h-4 w-3/4"}),a.jsx(Xe,{className:"h-4 w-1/2"})]},b)):g.length>0?g.map(y=>a.jsx(dp,{post:y,category:h(y.categoryId)},y.id)):x&&!d?a.jsxs("div",{className:"col-span-full text-center py-16",children:[a.jsx(eo,{className:"h-16 w-16 text-gray-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4","data-testid":"text-no-results",children:"No articles found"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-6",children:"Try adjusting your search terms or browse our categories to find what you're looking for."}),a.jsx(H,{onClick:m,className:"bg-sf-blue text-white hover:bg-sf-dark-blue","data-testid":"button-clear-search",children:"Clear Search"})]}):null})]})]}),!x&&a.jsx("div",{className:"max-w-4xl mx-auto",children:a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-8 rounded-lg",children:[a.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-6","data-testid":"text-search-tips-title",children:"Search Tips"}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"Popular Topics"}),a.jsxs("ul",{className:"space-y-2 text-gray-600 dark:text-gray-300",children:[a.jsx("li",{children:"• Apex development best practices"}),a.jsx("li",{children:"• Flow automation patterns"}),a.jsx("li",{children:"• SOQL optimization techniques"}),a.jsx("li",{children:"• Lightning Web Components"}),a.jsx("li",{children:"• Salesforce configuration tips"})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"Search Examples"}),a.jsxs("ul",{className:"space-y-2 text-gray-600 dark:text-gray-300",children:[a.jsx("li",{children:'• "Apex testing strategies"'}),a.jsx("li",{children:'• "Flow bulkification patterns"'}),a.jsx("li",{children:'• "SOQL best practices"'}),a.jsx("li",{children:'• "Lightning component design"'}),a.jsx("li",{children:'• "Visualforce migration"'})]})]})]})]})})]})})}function nX(){return a.jsx("div",{className:"min-h-screen bg-white dark:bg-gray-900 py-16",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-16",children:[a.jsxs("div",{className:"flex justify-center items-center mb-6",children:[a.jsx(Bo,{className:"text-sf-blue text-5xl mr-4 h-12 w-12"}),a.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-gray-900 dark:text-white","data-testid":"text-about-title",children:"About Salesforce Sage"})]}),a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto","data-testid":"text-about-subtitle",children:"Your trusted resource for Salesforce insights, tutorials, and best practices"})]}),a.jsxs("div",{className:"mb-16",children:[a.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-6","data-testid":"text-mission-title",children:"Our Mission"}),a.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300 mb-6","data-testid":"text-mission-description",children:"At Salesforce Sage, we're dedicated to empowering Salesforce professionals with expert insights, comprehensive tutorials, and practical best practices. Whether you're a developer, administrator, or business user, our content is designed to help you master the Salesforce platform and achieve your goals."}),a.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300",children:"We believe that knowledge sharing is the key to 
537success in the Salesforce ecosystem. Our team of certified experts and industry veterans work tirelessly to bring you the latest updates, in-depth technical guides, and real-world solutions to common challenges."})]}),a.jsxs("div",{className:"mb-16",children:[a.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-8","data-testid":"text-coverage-title",children:"What We Cover"}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-6 rounded-lg",children:[a.jsx("i",{className:"fas fa-project-diagram text-3xl text-[#0891B2] mb-4","data-testid":"icon-flows"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:"Flows"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Learn about Salesforce Flow automation, advanced patterns, and workflow optimization techniques."})]}),a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-6 rounded-lg",children:[a.jsx("i",{className:"fas fa-code text-3xl text-[#0891B2] mb-4","data-testid":"icon-apex"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:"Apex"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Salesforce Apex development guides, design patterns, testing strategies, and best practices."})]}),a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-6 rounded-lg",children:[a.jsx("i",{className:"fas fa-wrench text-3xl text-[#0891B2] mb-4","data-testid":"icon-configuration"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:"Salesforce Configuration"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Setup and configuration tutorials for administrators and business users."})]}),a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-6 rounded-lg",children:[a.jsx("i",{className:"fas fa-database text-3xl text-[#0891B2] mb-4","data-testid":"icon-soql"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:"SOQL/SOSL Queries"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Master Salesforce SOQL and SOSL queries with advanced techniques and optimization strategies."})]}),a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-6 rounded-lg",children:[a.jsx("i",{className:"fas fa-desktop text-3xl text-[#0891B2] mb-4","data-testid":"icon-visualforce"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:"VisualForce"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"VisualForce development tutorials and legacy application maintenance guides."})]}),a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-6 rounded-lg",children:[a.jsx("i",{className:"fas fa-bolt text-3xl text-[#0891B2] mb-4","data-testid":"icon-lwc"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:"Lightning Web Components"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Modern Lightning Web Component development with JavaScript frameworks."})]}),a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-6 rounded-lg",children:[a.jsx("i",{className:"fas fa-puzzle-piece text-3xl text-[#0891B2] mb-4","data-testid":"icon-aura"}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:"Aura Components"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Aura Component development guides and legacy Lightning framework maintenance."})]})]})]}),a.jsxs("div",{className:"mb-16",children:[a.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-6","data-testid":"text-team-title",children:"Our Expertise"}),a.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300 mb-6",children:"Our content is created by a team of Salesforce professionals with diverse backgrounds and extensive experience across all clouds and industries. We hold multiple certifications including:"}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[a.jsx("div",{className:"bg-sf-blue text-white p-4 rounded-lg text-center","data-testid":"cert-architect",children:a.jsx("strong",{children:"Technical Architect"})}),a.jsx("div",{className:"bg-sf-blue text-white p-4 rounded-lg text-center","data-testid":"cert-developer",children:a.jsx("strong",{children:"Platform Developer II"})}),a.jsx("div",{className:"bg-sf-blue text-white p-4 rounded-lg text-center","data-testid":"cert-admin",children:a.jsx("strong",{children:"Advanced Administrator"})}),a.jsx("div",{className:"bg-sf-blue text-white p-4 rounded-lg text-center","data-testid":"cert-integration",children:a.jsx("strong",{children:"Integration Architecture Designer"})})]})]}),a.jsxs("div",{className:"text-center bg-gray-50 dark:bg-gray-800 p-8 rounded-lg",children:[a.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-6","data-testid":"text-community-title",children:"Join Our Community"}),a.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300 mb-6",children:"Connect with fellow S
537alesforce professionals, share your experiences, and stay up-to-date with the latest platform developments."}),a.jsxs("div",{className:"flex justify-center space-x-6",children:[a.jsx("a",{href:"#",className:"text-sf-blue hover:text-sf-dark-blue transition-colors","data-testid":"link-community-twitter",children:a.jsx("i",{className:"fab fa-twitter text-2xl"})}),a.jsx("a",{href:"#",className:"text-sf-blue hover:text-sf-dark-blue transition-colors","data-testid":"link-community-linkedin",children:a.jsx("i",{className:"fab fa-linkedin text-2xl"})}),a.jsx("a",{href:"#",className:"text-sf-blue hover:text-sf-dark-blue transition-colors","data-testid":"link-community-github",children:a.jsx("i",{className:"fab fa-github text-2xl"})}),a.jsx("a",{href:"#",className:"text-sf-blue hover:text-sf-dark-blue transition-colors","data-testid":"link-community-youtube",children:a.jsx("i",{className:"fab fa-youtube text-2xl"})})]})]})]})})}function rX(){return a.jsx("div",{className:"min-h-screen bg-white dark:bg-gray-900 py-12",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-12",children:[a.jsx("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-4","data-testid":"text-contact-title",children:"Get in Touch"}),a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto","data-testid":"text-contact-description",children:"Have a question about Salesforce? Want to share feedback? We'd love to hear from you."})]}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center",children:[a.jsx(J7,{className:"w-5 h-5 mr-2 text-sf-blue"}),"Contact Information"]})}),a.jsxs(ne,{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx(Bk,{className:"w-5 h-5 text-sf-blue mt-0.5"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:"Email"}),a.jsx("a",{href:"mailto:[email protected]",className:"text-sf-blue hover:underline","data-testid":"link-contact-email",children:"[email protected]"})]})]}),a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx(Dk,{className:"w-5 h-5 text-sf-blue mt-0.5"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:"Response Time"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Within 24 hours"})]})]}),a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx(Fk,{className:"w-5 h-5 text-sf-blue mt-0.5"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:"LinkedIn"}),a.jsx("a",{href:"https://www.linkedin.com/company/salesforcesage",target:"_blank",rel:"noopener noreferrer",className:"text-sf-blue hover:underline","data-testid":"link-linkedin",children:"Connect with us on LinkedIn"})]})]})]})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:"Why Contact Us?"})}),a.jsx(ne,{children:a.jsxs("ul",{className:"space-y-3 text-gray-600 dark:text-gray-300",children:[a.jsxs("li",{className:"flex items-start space-x-2",children:[a.jsx("span",{className:"text-sf-blue",children:"•"}),a.jsx("span",{children:"Questions about Salesforce implementations"})]}),a.jsxs("li",{className:"flex items-start space-x-2",children:[a.jsx("span",{className:"text-sf-blue",children:"•"}),a.jsx("span",{children:"Feedback on our tutorials and guides"})]}),a.jsxs("li",{className:"flex items-start space-x-2",children:[a.jsx("span",{className:"text-sf-blue",children:"•"}),a.jsx("span",{children:"Suggestions for new content topics"})]}),a.jsxs("li",{className:"flex items-start space-x-2",children:[a.jsx("span",{className:"text-sf-blue",children:"•"}),a.jsx("span",{children:"Partnership opportunities"})]}),a.jsxs("li",{className:"flex items-start space-x-2",children:[a.jsx("span",{className:"text-sf-blue",children:"•"}),a.jsx("span",{children:"Technical support questions"})]})]})})]})]}),a.jsx("div",{className:"mt-12",children:a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:"About Salesforce Sage"})}),a.jsxs(ne,{children:[a.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:"Salesforce Sage is your go-to resource for in-depth Salesforce tutorials, best practices, and technical insights. We focus on providing practical, actionable content that helps developers and administrators master Salesforce technologies including Data Cloud, SOQL, Apex, Lightning Web Components, and Flows."}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300 leading-relaxed mt-4",children:"Whether you're just starting your Salesforce journey or looking to expand your expertise, we're here to help you succeed with clear explanations and real-world examples."})]})]})})]})})}var cm=e=>e.type==="checkbox",Ql=e=>e instanceof Date,Or=e=>e==null;const oF=e=>typeof e=="object";var bn=e=>!Or(e)&&!Array.isArray(e)&&oF(e)&&!Ql(e),aF=e=>bn(e)&&e.target?cm(e.target)?e.target.checked:e.target.value:e,sX=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,lF=(e,t)=>e.has(sX(t)),iX=e=>{const t=e.constructor&&e.constructor.prototype;return bn(t)&&t.hasOwnProperty("isPrototypeOf")},xC=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Qn(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(xC&&(e instanceof Blob||r))&&(n||bn(e)))if(t=n?[]:{},!n&&!iX(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=Qn(e[s]));else return e;return t}var hv=e=>Array.isArray(e)?e.filter(Boolean):[],yn=e=>e===void 0,ce=(e,t,n)=>{if(!t||!bn(e))return n;
vendor: 11,666 bytes, line 537
537const r=hv(t.split(/[,[\].]+?/)).reduce((s,i)=>Or(s)?s:s[i],e);return yn(r)||r===e?yn(e[t])?n:e[t]:r},is=e=>typeof e=="boolean",vC=e=>/^\w*$/.test(e),cF=e=>hv(e.replace(/["|']|\]/g,"").split(/\.|\[/)),vt=(e,t,n)=>{let r=-1;const s=vC(t)?[t]:cF(t),i=s.length,o=i-1;for(;++r<i;){const l=s[r];let c=n;if(r!==o){const u=e[l];c=bn(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const lx={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},di={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Co={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},uF=Le.createContext(null),fv=()=>Le.useContext(uF),oX=e=>{const{children:t,...n}=e;return Le.createElement(uF.Provider,{value:n},t)};var dF=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==di.all&&(t._proxyFormState[o]=!r||di.all),n&&(n[o]=!0),e[o]}});return s};function aX(e){const t=fv(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,l]=Le.useState(n._formState),c=Le.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=Le.useRef(s);return u.current=s,Le.useEffect(()=>n._subscribe({name:u.current,formState:c.current,exact:i,callback:d=>{!r&&l({...n._formState,...d})}}),[n,r,i]),Le.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),Le.useMemo(()=>dF(o,n,c.current,!1),[o,n])}var to=e=>typeof e=="string",hF=(e,t,n,r,s)=>to(e)?(r&&t.watch.add(e),ce(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),ce(n,i))):(r&&(t.watchAll=!0),n);function lX(e){const t=fv(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},l=Le.useRef(r),c=Le.useRef(s);l.current=r,Le.useEffect(()=>n._subscribe({name:l.current,formState:{values:!0},exact:o,callback:h=>!i&&d(hF(l.current,n._names,h.values||n._formValues,!1,c.current))}),[n,i,o]);const[u,d]=Le.useState(n._getWatch(r,s));return Le.useEffect(()=>n._removeUnmounted()),u}function cX(e){const t=fv(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=lF(s._names.array,n),l=lX({control:s,name:n,defaultValue:ce(s._formValues,n,ce(s._defaultValues,n,e.defaultValue)),exact:!0}),c=aX({control:s,name:n,exact:!0}),u=Le.useRef(e),d=Le.useRef(s.register(n,{...e.rules,value:l,...is(e.disabled)?{disabled:e.disabled}:{}})),h=Le.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ce(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!ce(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ce(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ce(c.validatingFields,n)},error:{enumerable:!0,get:()=>ce(c.errors,n)}}),[c,n]),f=Le.useCallback(x=>d.current.onChange({target:{value:aF(x),name:n},type:lx.CHANGE}),[n]),p=Le.useCallback(()=>d.current.onBlur({target:{value:ce(s._formValues,n),name:n},type:lx.BLUR}),[n,s._formValues]),m=Le.useCallback(x=>{const y=ce(s._fields,n);y&&x&&(y._f.ref={focus:()=>x.focus(),select:()=>x.select(),setCustomValidity:b=>x.setCustomValidity(b),reportValidity:()=>x.reportValidity()})},[s._fields,n]),g=Le.useMemo(()=>({name:n,value:l,...is(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:f,onBlur:p,ref:m}),[n,r,c.disabled,f,p,m,l]);return Le.useEffect(()=>{const x=s._options.shouldUnregister||i;s.register(n,{...u.current.rules,...is(u.current.disabled)?{disabled:u.current.disabled}:{}});const y=(b,w)=>{const E=ce(s._fields,b);E&&E._f&&(E._f.mount=w)};if(y(n,!0),x){const b=Qn(ce(s._options.defaultValues,n));vt(s._defaultValues,n,b),yn(ce(s._formValues,n))&&vt(s._formValues,n,b)}return!o&&s.register(n),()=>{(o?x&&!s._state.action:x)?s.unregister(n):y(n,!1)}},[n,s,o,i]),Le.useEffect(()=>{s._setDisabledField({disabled:r,name:n})},[r,n,s]),Le.useMemo(()=>({field:g,formState:c,fieldState:h}),[g,c,h])}const uX=e=>e.render(cX(e));var fF=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Sf=e=>Array.isArray(e)?e:[e],TO=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},QS=e=>Or(e)||!oF(e);function Aa(e,t){if(QS(e)||QS(t))return e===t;if(Ql(e)&&Ql(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(Ql(i)&&Ql(o)||bn(i)&&bn(o)||Array.isArray(i)&&Array.isArray(o)?!Aa(i,o):i!==o)return!1}}return!0}var Ar=e=>bn(e)&&!Object.keys(e).length,bC=e=>e.type==="file",hi=e=>typeof e=="function",cx=e=>{if(!xC)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},pF=e=>e.type==="select-multiple",wC=e=>e.type==="radio",dX=e=>wC(e)||cm(e),_1=e=>cx(e)&&e.isConnected;function hX(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=yn(e)?r++:e[t[r++]];return e}function fX(e){for(const t in e)if(e.hasOwnProperty(t)&&!yn(e[t]))return!1;return!0}function Rn(e,t){const n=Array.isArray(t)?t:vC(t)?[t]:cF(t),r=n.length===1?e:hX(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(bn(r)&&Ar(r)||Array.isArray(r)&&fX(r))&&Rn(e,n.slice(0,-1)),e}var mF=e=>{for(const t in e)if(hi(e[t]))return!0;return!1};function ux(e,t={}){const n=Array.isArray(e);if(bn(e)||n)for(const r in e)Array.isArray(e[r])||bn(e[r])&&!mF(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ux(e[r],t[r])):Or(e[r])||(t[r]=!0);return t}function gF(e,t,n){const r=Array.isArray(e);if(bn(e)||r)for(const s in e)Array.isArray(e[s])||bn(e[s])&&!mF(e[s])?yn(t)||QS(n[s])?n[s]=Array.isArray(e[s])?ux(e[s],[]):{...ux(e[s])}:gF(e[s],Or(t)?{}:t[s],n[s]):n[s]=!Aa(e[s],t[s]);return n}var Ch=(e,t)=>gF(e,t,ux(t));const AO={value:!1,isValid:!1},jO={value:!0,isValid:!0};var yF=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!yn(e[0].attributes.value)?yn(e[0].value)||e[0].value===""?jO:{value:e[0].value,isValid:!0}:jO:AO}return AO},xF=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>yn(e)?e:t?e===""?NaN:e&&+e:n&&to(e)?new Date(e):r?r(e):e;const OO={isValid:!1,value:null};var vF=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,OO):OO;function RO(e){const t=e.ref;return bC(t)?t.files:wC(t)?vF(e.refs).value:pF(t)?[...t.selectedOptions].map(({value:n})=>n):cm(t)?yF(e.refs).value:xF(yn(t.value)?e.ref.value:t.value,e)}var pX=(e,t,n,r)=>{const s={};for(const i of e){const o=ce(t,i);o&&vt(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},dx=e=>e instanceof RegExp,Th=e=>yn(e)?e:dx(e)?e.source:bn(e)?dx(e.value)?e.value.source:e.value:e,_O=e=>({isOnSubmit:!e||e===di.onSubmit,isOnBlur:e===di.onBlur,isOnChange:e===di.onChange,isOnAll:e===di.all,isOnTouch:e===di.onTouched});const IO="AsyncFunction";var mX=e=>!!e&&!!e.validate&&!!(hi(e.validate)&&e.validate.constructor.name===IO||bn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===IO)),gX=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),MO=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Ef=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=ce(e,s);if(i){const{_f:o,...l}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Ef(l,t))break}else if(bn(l)&&Ef(l,t))break}}};function LO(e,t,n){const r=ce(e,n);if(r||vC(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=ce(t,i),l=ce(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(l&&l.type)return{name:i,error:l};s.pop()}return{name:n}}var yX=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return Ar(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||di.all))},xX=(e,t,n)=>!e||!t||e===t||Sf(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),vX=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,bX=(e,t)=>!hv(ce(e,t)).length&&Rn(e,t),wX=(e,t,n)=>{const r=Sf(ce(e,n));return vt(r,"root",t[n]),vt(e,n,r),e},oy=e=>to(e);function PO(e,t,n="validate"){if(oy(e)||Array.isArray(e)&&e.every(oy)||is(e)&&!e)return{type:n,message:oy(e)?e:"",ref:t}}var ou=e=>bn(e)&&!dx(e)?e:{value:e,message:""},DO=async(e,t,n,r,s,i)=>{const{ref:o,refs:l,required:c,maxLength:u,minLength:d,min:h,max:f,pattern:p,validate:m,name:g,valueAsNumber:x,mount:y}=e._f,b=ce(n,g);if(!y||t.has(g))return{};const w=l?l[0]:o,E=_=>{s&&w.reportValidity&&(w.setCustomValidity(is(_)?"":_||""),w.reportValidity())},N={},k=wC(o),C=cm(o),T=k||C,j=(x||bC(o))&&yn(o.value)&&yn(b)||cx(o)&&o.value===""||b===""||Array.isArray(b)&&!b.length,S=fF.bind(null,g,r,N),R=(_,L,A,B=Co.maxLength,U=Co.minLength)=>{const V=_?L:A;N[g]={type:_?B:U,message:V,ref:o,...S(_?B:U,V)}};if(i?!Array.isArray(b)||!b.length:c&&(!T&&(j||Or(b))||is(b)&&!b||C&&!yF(l).isValid||k&&!vF(l).isValid)){const{value:_,message:L}=oy(c)?{value:!!c,message:c}:ou(c);if(_&&(N[g]={type:Co.required,message:L,ref:w,...S(Co.required,L)},!r))return E(L),N}if(!j&&(!Or(h)||!Or(f))){let _,L;const A=ou(f),B=ou(h);if(!Or(b)&&!isNaN(b)){const U=o.valueAsNumber||b&&+b;Or(A.value)||(_=U>A.value),Or(B.value)||(L=U<B.value)}else{const U=o.valueAsDate||new Date(b),V=q=>new Date(new Date().toDateString()+" "+q),P=o.type=="time",D=o.type=="week";to(A.value)&&b&&(_=P?V(b)>V(A.value):D?b>A.value:U>new Date(A.value)),to(B.value)&&b&&(L=P?V(b)<V(B.value):D?b<B.value:U<new Date(B.value))}if((_||L)&&(R(!!_,A.message,B.message,Co.max,Co.min),!r))return E(N[g].message),N}if((u||d)&&!j&&(to(b)||i&&Array.isArray(b))){const _=ou(u),L=ou(d),A=!Or(_.value)&&b.length>+_.value,B=!Or(L.value)&&b.length<+L.value;if((A||B)&&(R(A,_.message,L.message),!r))return E(N[g].message),N}if(p&&!j&&to(b)){const{value:_,message:L}=ou(p);if(dx(_)&&!b.match(_)&&(N[g]={type:Co.pattern,message:L,ref:o,...S(Co.pattern,L)},!r))return E(L),N}if(m){if(hi(m)){const _=await m(b,n),L=PO(_,w);if(L&&(N[g]={...L,...S(Co.validate,L.message)},!r))return E(L.message),N}else if(bn(m)){let _={};for(const L in m){if(!Ar(_)&&!r)break;const A=PO(await m[L](b,n),w,L);A&&(_={...A,...S(L,A.message)},E(A.message),r&&(N[g]=_))}if(!Ar(_)&&(N[g]={ref:w,..._},!r))return N}}return E(!0),N};const SX={mode:di.onSubmit,reValidateMode:di.onChange,shouldFocusError:!0};function EX(e={}){let t={...SX,...e},n={submitCount:0,isDirty:!1,isLoading:hi(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const r={};let s=bn(t.defaultValues)||bn(t.values)?Qn(t.values||t.defaultValues)||{}:{},i=t.shouldUnregister?{}:Qn(s),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...d};const f={array:TO(),state:TO()},p=_O(t.mode),m=_O(t.reValidateMode),g=t.criteriaMode===di.all,x=I=>z=>{clearTimeout(u),u=setTimeout(I,z)},y=async I=>{if(!t.disabled&&(d.isValid||h.isValid||I)){const z=t.resolver?Ar((await j()).errors):await R(r,!0);z!==n.isValid&&f.state.next({isValid:z})}},b=(I,z)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((I||Array.from(l.mount)).forEac
vendor: 9,411 bytes, line 537
537h(W=>{W&&(z?vt(n.validatingFields,W,z):Rn(n.validatingFields,W))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Ar(n.validatingFields)}))},w=(I,z=[],W,de,se=!0,ee=!0)=>{if(de&&W&&!t.disabled){if(o.action=!0,ee&&Array.isArray(ce(r,I))){const ie=W(ce(r,I),de.argA,de.argB);se&&vt(r,I,ie)}if(ee&&Array.isArray(ce(n.errors,I))){const ie=W(ce(n.errors,I),de.argA,de.argB);se&&vt(n.errors,I,ie),bX(n.errors,I)}if((d.touchedFields||h.touchedFields)&&ee&&Array.isArray(ce(n.touchedFields,I))){const ie=W(ce(n.touchedFields,I),de.argA,de.argB);se&&vt(n.touchedFields,I,ie)}(d.dirtyFields||h.dirtyFields)&&(n.dirtyFields=Ch(s,i)),f.state.next({name:I,isDirty:L(I,z),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else vt(i,I,z)},E=(I,z)=>{vt(n.errors,I,z),f.state.next({errors:n.errors})},N=I=>{n.errors=I,f.state.next({errors:n.errors,isValid:!1})},k=(I,z,W,de)=>{const se=ce(r,I);if(se){const ee=ce(i,I,yn(W)?ce(s,I):W);yn(ee)||de&&de.defaultChecked||z?vt(i,I,z?ee:RO(se._f)):U(I,ee),o.mount&&y()}},C=(I,z,W,de,se)=>{let ee=!1,ie=!1;const Re={name:I};if(!t.disabled){if(!W||de){(d.isDirty||h.isDirty)&&(ie=n.isDirty,n.isDirty=Re.isDirty=L(),ee=ie!==Re.isDirty);const st=Aa(ce(s,I),z);ie=!!ce(n.dirtyFields,I),st?Rn(n.dirtyFields,I):vt(n.dirtyFields,I,!0),Re.dirtyFields=n.dirtyFields,ee=ee||(d.dirtyFields||h.dirtyFields)&&ie!==!st}if(W){const st=ce(n.touchedFields,I);st||(vt(n.touchedFields,I,W),Re.touchedFields=n.touchedFields,ee=ee||(d.touchedFields||h.touchedFields)&&st!==W)}ee&&se&&f.state.next(Re)}return ee?Re:{}},T=(I,z,W,de)=>{const se=ce(n.errors,I),ee=(d.isValid||h.isValid)&&is(z)&&n.isValid!==z;if(t.delayError&&W?(c=x(()=>E(I,W)),c(t.delayError)):(clearTimeout(u),c=null,W?vt(n.errors,I,W):Rn(n.errors,I)),(W?!Aa(se,W):se)||!Ar(de)||ee){const ie={...de,...ee&&is(z)?{isValid:z}:{},errors:n.errors,name:I};n={...n,...ie},f.state.next(ie)}},j=async I=>{b(I,!0);const z=await t.resolver(i,t.context,pX(I||l.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return b(I),z},S=async I=>{const{errors:z}=await j(I);if(I)for(const W of I){const de=ce(z,W);de?vt(n.errors,W,de):Rn(n.errors,W)}else n.errors=z;return z},R=async(I,z,W={valid:!0})=>{for(const de in I){const se=I[de];if(se){const{_f:ee,...ie}=se;if(ee){const Re=l.array.has(ee.name),st=se._f&&mX(se._f);st&&d.validatingFields&&b([de],!0);const Je=await DO(se,l.disabled,i,g,t.shouldUseNativeValidation&&!z,Re);if(st&&d.validatingFields&&b([de]),Je[ee.name]&&(W.valid=!1,z))break;!z&&(ce(Je,ee.name)?Re?wX(n.errors,Je,ee.name):vt(n.errors,ee.name,Je[ee.name]):Rn(n.errors,ee.name))}!Ar(ie)&&await R(ie,z,W)}}return W.valid},_=()=>{for(const I of l.unMount){const z=ce(r,I);z&&(z._f.refs?z._f.refs.every(W=>!_1(W)):!_1(z._f.ref))&&Ce(I)}l.unMount=new Set},L=(I,z)=>!t.disabled&&(I&&z&&vt(i,I,z),!Aa(F(),s)),A=(I,z,W)=>hF(I,l,{...o.mount?i:yn(z)?s:to(I)?{[I]:z}:z},W,z),B=I=>hv(ce(o.mount?i:s,I,t.shouldUnregister?ce(s,I,[]):[])),U=(I,z,W={})=>{const de=ce(r,I);let se=z;if(de){const ee=de._f;ee&&(!ee.disabled&&vt(i,I,xF(z,ee)),se=cx(ee.ref)&&Or(z)?"":z,pF(ee.ref)?[...ee.ref.options].forEach(ie=>ie.selected=se.includes(ie.value)):ee.refs?cm(ee.ref)?ee.refs.length>1?ee.refs.forEach(ie=>(!ie.defaultChecked||!ie.disabled)&&(ie.checked=Array.isArray(se)?!!se.find(Re=>Re===ie.value):se===ie.value)):ee.refs[0]&&(ee.refs[0].checked=!!se):ee.refs.forEach(ie=>ie.checked=ie.value===se):bC(ee.ref)?ee.ref.value="":(ee.ref.value=se,ee.ref.type||f.state.next({name:I,values:Qn(i)})))}(W.shouldDirty||W.shouldTouch)&&C(I,se,W.shouldTouch,W.shouldDirty,!0),W.shouldValidate&&Q(I)},V=(I,z,W)=>{for(const de in z){const se=z[de],ee=`${I}.${de}`,ie=ce(r,ee);(l.array.has(I)||bn(se)||ie&&!ie._f)&&!Ql(se)?V(ee,se,W):U(ee,se,W)}},P=(I,z,W={})=>{const de=ce(r,I),se=l.array.has(I),ee=Qn(z);vt(i,I,ee),se?(f.array.next({name:I,values:Qn(i)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&W.shouldDirty&&f.state.next({name:I,dirtyFields:Ch(s,i),isDirty:L(I,ee)})):de&&!de._f&&!Or(ee)?V(I,ee,W):U(I,ee,W),MO(I,l)&&f.state.next({...n}),f.state.next({name:o.mount?I:void 0,values:Qn(i)})},D=async I=>{o.mount=!0;const z=I.target;let W=z.name,de=!0;const se=ce(r,W),ee=ie=>{de=Number.isNaN(ie)||Ql(ie)&&isNaN(ie.getTime())||Aa(ie,ce(i,W,ie))};if(se){let ie,Re;const st=z.type?RO(se._f):aF(I),Je=I.type===lx.BLUR||I.type===lx.FOCUS_OUT,lr=!gX(se._f)&&!t.resolver&&!ce(n.errors,W)&&!se._f.deps||vX(Je,ce(n.touchedFields,W),n.isSubmitted,m,p),cr=MO(W,l,Je);vt(i,W,st),Je?(se._f.onBlur&&se._f.onBlur(I),c&&c(0)):se._f.onChange&&se._f.onChange(I);const Bb=C(W,st,Je),YV=!Ar(Bb)||cr;if(!Je&&f.state.next({name:W,type:I.type,values:Qn(i)}),lr)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?Je&&y():Je||y()),YV&&f.state.next({name:W,...cr?{}:Bb});if(!Je&&cr&&f.state.next({...n}),t.resolver){const{errors:wA}=await j([W]);if(ee(st),de){const QV=LO(n.errors,r,W),SA=LO(wA,r,QV.name||W);ie=SA.error,W=SA.name,Re=Ar(wA)}}else b([W],!0),ie=(await DO(se,l.disabled,i,g,t.shouldUseNativeValidation))[W],b([W]),ee(st),de&&(ie?Re=!1:(d.isValid||h.isValid)&&(Re=await R(r,!0)));de&&(se._f.deps&&Q(se._f.deps),T(W,Re,ie,Bb))}},q=(I,z)=>{if(ce(n.errors,z)&&I.focus)return I.focus(),1},Q=async(I,z={})=>{let W,de;const se=Sf(I);if(t.resolver){const ee=await S(yn(I)?I:se);W=Ar(ee),de=I?!se.some(ie=>ce(ee,ie)):W}else I?(de=(await Promise.all(se.map(async ee=>{const ie=ce(r,ee);return await R(ie&&ie._f?{[ee]:ie}:ie)}))).every(Boolean),!(!de&&!n.isValid)&&y()):de=W=await R(r);return f.state.next({...!to(I)||(d.isValid||h.isValid)&&W!==n.isValid?{}:{name:I},...t.resolver||!I?{isValid:W}:{},errors:n.errors}),z.shouldFocus&&!de&&Ef(r,q,I?se:l.mount),de},F=I=>{const z={...o.mount?i:s};return yn(I)?z:to(I)?ce(z,I):I.map(W=>ce(z,W))},ge=(I,z)=>({invalid:!!ce((z||n).errors,I),isDirty:!!ce((z||n).dirtyFields,I),error:ce((z||n).errors,I),isValidating:!!ce(n.validatingFields,I),isTouched:!!ce((z||n).touchedFields,I)}),Ve=I=>{I&&Sf(I).forEach(z=>Rn(n.errors,z)),f.state.next({errors:I?n.errors:{}})},He=(I,z,W)=>{const de=(ce(r,I,{_f:{}})._f||{}).ref,se=ce(n.errors,I)||{},{ref:ee,message:ie,type:Re,...st}=se;vt(n.errors,I,{...st,...z,ref:de}),f.state.next({name:I,errors:n.errors,isValid:!1}),W&&W.shouldFocus&&de&&de.focus&&de.focus()},Fe=(I,z)=>hi(I)?f.state.subscribe({next:W=>I(A(void 0,z),W)}):A(I,z,!0),le=I=>f.state.subscribe({next:z=>{xX(I.name,z.name,I.exact)&&yX(z,I.formState||d,Yn,I.reRenderRoot)&&I.callback({values:{...i},...n,...z})}}).unsubscribe,Se=I=>(o.mount=!0,h={...h,...I.formState},le({...I,formState:h})),Ce=(I,z={})=>{for(const W of I?Sf(I):l.mount)l.mount.delete(W),l.array.delete(W),z.keepValue||(Rn(r,W),Rn(i,W)),!z.keepError&&Rn(n.errors,W),!z.keepDirty&&Rn(n.dirtyFields,W),!z.keepTouched&&Rn(n.touchedFields,W),!z.keepIsValidating&&Rn(n.validatingFields,W),!t.shouldUnregister&&!z.keepDefaultValue&&Rn(s,W);f.state.next({values:Qn(i)}),f.state.next({...n,...z.keepDirty?{isDirty:L()}:{}}),!z.keepIsValid&&y()},Be=({disabled:I,name:z})=>{(is(I)&&o.mount||I||l.disabled.has(z))&&(I?l.disabled.add(z):l.disabled.delete(z))},Me=(I,z={})=>{let W=ce(r,I);const de=is(z.disabled)||is(t.disabled);return vt(r,I,{...W||{},_f:{...W&&W._f?W._f:{ref:{name:I}},name:I,mount:!0,...z}}),l.mount.add(I),W?Be({disabled:is(z.disabled)?z.disabled:t.disabled,name:I}):k(I,!0,z.value),{...de?{disabled:z.disabled||t.disabled}:{},...t.progressive?{required:!!z.required,min:Th(z.min),max:Th(z.max),minLength:Th(z.minLength),maxLength:Th(z.maxLength),pattern:Th(z.pattern)}:{},name:I,onChange:D,onBlur:D,ref:se=>{if(se){Me(I,z),W=ce(r,I);const ee=yn(se.value)&&se.querySelectorAll&&se.querySelectorAll("input,select,textarea")[0]||se,ie=dX(ee),Re=W._f.refs||[];if(ie?Re.find(st=>st===ee):ee===W._f.ref)return;vt(r,I,{_f:{...W._f,...ie?{refs:[...Re.filter(_1),ee,...Array.isArray(ce(s,I))?[{}]:[]],ref:{type:ee.type,name:I}}:{ref:ee}}}),k(I,!1,void 0,ee)}else W=ce(r,I,{}),W._f&&(W._f.mount=!1),(t.shouldUnregister||z.shouldUnregister)&&!(lF(l.array,I)&&o.action)&&l.unMount.add(I)}}},Oe=()=>t.shouldFocusError&&Ef(r,q,l.mount),St=I=>{is(I)&&(f.state.next({disabled:I}),Ef(r,(z,W)=>{const de=ce(r,W);de&&(z.disabled=de._f.disabled||I,Array.isArray(de._f.refs)&&de._f.refs.forEach(se=>{se.disabled=de._f.disabled||I}))},0,!1))},Qe=(I,z)=>async W=>{let de;W&&(W.preventDefault&&W.preventDefault(),W.persist&&W.persist());let se=Qn(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:ee,values:ie}=await j();n.errors=ee,se=ie}else await R(r);if(l.disabled.size)for(const ee of l.disabled)vt(se,ee,void 0);if(Rn(n.errors,"root"),Ar(n.errors)){f.state.next({errors:{}});try{await I(se,W)}catch(ee){de=ee}}else z&&await z({...n.errors},W),Oe(),setTimeout(Oe);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ar(n.errors)&&!de,submitCount:n.submitCount+1,errors:n.errors}),de)throw de},$t=(I,z={})=>{ce(r,I)&&(yn(z.defaultValue)?P(I,Qn(ce(s,I))):(P(I,z.defaultValue),vt(s,I,Qn(z.defaultValue))),z.keepTouched||Rn(n.touchedFields,I),z.keepDirty||(Rn(n.dirtyFields,I),n.isDirty=z.defaultValue?L(I,Qn(ce(s,I))):L()),z.keepError||(Rn(n.errors,I),d.isValid&&y()),f.state.next({...n}))},En=(I,z={})=>{const W=I?Qn(I):s,de=Qn(W),se=Ar(I),ee=se?s:de;if(z.keepDefaultValues||(s=W),!z.keepValues){if(z.keepDirtyValues){const ie=new Set([...l.mount,...Object.keys(Ch(s,i))]);for(const Re of Array.from(ie))ce(n.dirtyFields,Re)?vt(ee,Re,ce(i,Re)):P(Re,ce(ee,Re))}else{if(xC&&yn(I))for(const ie of l.mount){const Re=ce(r,ie);
vendor: 11,073 bytes, line 537
537if(Re&&Re._f){const st=Array.isArray(Re._f.refs)?Re._f.refs[0]:Re._f.ref;if(cx(st)){const Je=st.closest("form");if(Je){Je.reset();break}}}}for(const ie of l.mount)P(ie,ce(ee,ie))}i=Qn(ee),f.array.next({values:{...ee}}),f.state.next({values:{...ee}})}l={mount:z.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!z.keepIsValid||!!z.keepDirtyValues,o.watch=!!t.shouldUnregister,f.state.next({submitCount:z.keepSubmitCount?n.submitCount:0,isDirty:se?!1:z.keepDirty?n.isDirty:!!(z.keepDefaultValues&&!Aa(I,s)),isSubmitted:z.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:se?{}:z.keepDirtyValues?z.keepDefaultValues&&i?Ch(s,i):n.dirtyFields:z.keepDefaultValues&&I?Ch(s,I):z.keepDirty?n.dirtyFields:{},touchedFields:z.keepTouched?n.touchedFields:{},errors:z.keepErrors?n.errors:{},isSubmitSuccessful:z.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Nn=(I,z)=>En(hi(I)?I(i):I,z),At=(I,z={})=>{const W=ce(r,I),de=W&&W._f;if(de){const se=de.refs?de.refs[0]:de.ref;se.focus&&(se.focus(),z.shouldSelect&&hi(se.select)&&se.select())}},Yn=I=>{n={...n,...I}},Ee={control:{register:Me,unregister:Ce,getFieldState:ge,handleSubmit:Qe,setError:He,_subscribe:le,_runSchema:j,_getWatch:A,_getDirty:L,_setValid:y,_setFieldArray:w,_setDisabledField:Be,_setErrors:N,_getFieldArray:B,_reset:En,_resetDefaultValues:()=>hi(t.defaultValues)&&t.defaultValues().then(I=>{Nn(I,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:_,_disableForm:St,_subjects:f,_proxyFormState:d,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(I){o=I},get _defaultValues(){return s},get _names(){return l},set _names(I){l=I},get _formState(){return n},get _options(){return t},set _options(I){t={...t,...I}}},subscribe:Se,trigger:Q,register:Me,handleSubmit:Qe,watch:Fe,setValue:P,getValues:F,reset:Nn,resetField:$t,clearErrors:Ve,unregister:Ce,setError:He,setFocus:At,getFieldState:ge};return{...Ee,formControl:Ee}}function il(e={}){const t=Le.useRef(void 0),n=Le.useRef(void 0),[r,s]=Le.useState({isDirty:!1,isValidating:!1,isLoading:hi(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:hi(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...e.formControl?e.formControl:EX(e),formState:r},e.formControl&&e.defaultValues&&!hi(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const i=t.current.control;return i._options=e,Le.useLayoutEffect(()=>i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}),reRenderRoot:!0}),[i]),Le.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Le.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),Le.useEffect(()=>{e.values&&!Aa(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),Le.useEffect(()=>{e.errors&&!Ar(e.errors)&&i._setErrors(e.errors)},[e.errors,i]),Le.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),Le.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=dF(r,i),t.current}const $O=(e,t,n)=>{if(e&&"reportValidity"in e){const r=ce(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},bF=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?$O(r.ref,n,e):r.refs&&r.refs.forEach(s=>$O(s,n,e))}},NX=(e,t)=>{t.shouldUseNativeValidation&&bF(e,t);const n={};for(const r in e){const s=ce(t.fields,r),i=Object.assign(e[r]||{},{ref:s&&s.ref});if(kX(t.names||Object.keys(e),r)){const o=Object.assign({},ce(n,r));vt(o,"root",i),vt(n,r,o)}else vt(n,r,i)}return n},kX=(e,t)=>e.some(n=>n.startsWith(t+"."));var CX=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,i=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var l=r.unionErrors[0].errors[0];n[o]={message:l.message,type:l.code}}else n[o]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(h){return e.push(h)})}),t){var c=n[o].types,u=c&&c[r.code];n[o]=fF(o,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},ol=function(e,t,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve(function(o,l){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return i.shouldUseNativeValidation&&bF({},i),{errors:{},values:n.raw?r:u}})}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(function(l){return Array.isArray(l==null?void 0:l.errors)}(o))return{values:{},errors:NX(CX(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},dt;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),o={};for(const l of i)o[l]=s[l];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(dt||(dt={}));var JS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(JS||(JS={}));const me=dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$o=e=>{switch(typeof e){case"undefined":return me.undefined;case"string":return me.string;case"number":return isNaN(e)?me.nan:me.number;case"boolean":return me.boolean;case"function":return me.function;case"bigint":return me.bigint;case"symbol":return me.symbol;case"object":return Array.isArray(e)?me.array:e===null?me.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?me.promise:typeof Map<"u"&&e instanceof Map?me.map:typeof Set<"u"&&e instanceof Set?me.set:typeof Date<"u"&&e instanceof Date?me.date:me.object;default:return me.unknown}},J=dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),TX=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class xs extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let l=r,c=0;for(;c<o.path.length;){const u=o.path[c];c===o.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(n(o))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return s(this),r}static assert(t){if(!(t instanceof xs))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,dt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}xs.create=e=>new xs(e);const Od=(e,t)=>{let n;switch(e.code){case J.invalid_type:e.received===me.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case J.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,dt.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:n=`Unrecognized key(s) in object: ${dt.joinValues(e.keys,", ")}`;break;case J.invalid_union:n="Invalid input";break;case J.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${dt.joinValues(e.options)}`;break;case J.invalid_enum_value:n=`Invalid enum value. Expected ${dt.joinValues(e.options)}, received '${e.received}'`;break;case J.invalid_arguments:n="Invalid function arguments";break;case J.invalid_return_type:n="Invalid function return type";break;case J.invalid_date:n="Invalid date";break;case J.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:dt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case J.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case J.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case J.custom:n="Invalid input";break;
vendor: 8,040 bytes, line 537
537case J.invalid_intersection_types:n="Intersection results could not be merged";break;case J.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case J.not_finite:n="Number must be finite";break;default:n=t.defaultError,dt.assertNever(e)}return{message:n}};let wF=Od;function AX(e){wF=e}function hx(){return wF}const fx=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let l="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)l=u(o,{data:t,defaultError:l}).message;return{...s,path:i,message:l}},jX=[];function ue(e,t){const n=hx(),r=fx({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Od?void 0:Od].filter(s=>!!s)});e.common.issues.push(r)}class Er{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return ze;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return Er.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return ze;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const ze=Object.freeze({status:"aborted"}),Du=e=>({status:"dirty",value:e}),_r=e=>({status:"valid",value:e}),XS=e=>e.status==="aborted",ZS=e=>e.status==="dirty",Rc=e=>e.status==="valid",hp=e=>typeof Promise<"u"&&e instanceof Promise;function px(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function SF(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var xe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(xe||(xe={}));var Yh,Qh;class ho{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const FO=(e,t)=>{if(Rc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new xs(e.common.issues);return this._error=n,this._error}}};function Ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,l)=>{var c,u;const{message:d}=e;return o.code==="invalid_enum_value"?{message:d??l.defaultError}:typeof l.data>"u"?{message:(c=d??r)!==null&&c!==void 0?c:l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:l.defaultError}},description:s}}class rt{get description(){return this._def.description}_getType(t){return $o(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:$o(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Er,ctx:{common:t.parent.common,data:t.data,parsedType:$o(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(hp(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:$o(t)},i=this._parseSync({data:t,path:s.path,parent:s});return FO(s,i)}"~validate"(t){var n,r;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:$o(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:s});return Rc(i)?{value:i.value}:{issues:s.common.issues}}catch(i){!((r=(n=i==null?void 0:i.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(i=>Rc(i)?{value:i.value}:{issues:s.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:$o(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(hp(s)?s:Promise.resolve(s));return FO(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),l=()=>i.addIssue({code:J.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new ki({schema:this,typeName:$e.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ao.create(this,this._def)}nullable(){return El.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xi.create(this)}promise(){return _d.create(this,this._def)}or(t){return gp.create([this,t],this._def)}and(t){return yp.create(this,t,this._def)}transform(t){return new ki({...Ze(this._def),schema:this,typeName:$e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Sp({...Ze(this._def),innerType:this,defaultValue:n,typeName:$e.ZodDefault})}brand(){return new SC({typeName:$e.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ep({...Ze(this._def),innerType:this,catchValue:n,typeName:$e.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return um.create(this,t)}readonly(){return Np.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const OX=/^c[^\s-]{8,}
vendor: 40,660 bytes, line 537
537$/i,RX=/^[0-9a-z]+$/,_X=/^[0-9A-HJKMNP-TV-Z]{26}$/i,IX=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,MX=/^[a-z0-9_-]{21}$/i,LX=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,PX=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,DX=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$X="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let I1;const FX=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,BX=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,UX=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,zX=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,VX=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,WX=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,EF="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",HX=new RegExp(`^${EF}$`);function NF(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function GX(e){return new RegExp(`^${NF(e)}$`)}function kF(e){let t=`${EF}T${NF(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function KX(e,t){return!!((t==="v4"||!t)&&FX.test(e)||(t==="v6"||!t)&&UX.test(e))}function qX(e,t){if(!LX.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||!s.typ||!s.alg||t&&s.alg!==t)}catch{return!1}}function YX(e,t){return!!((t==="v4"||!t)&&BX.test(e)||(t==="v6"||!t)&&zX.test(e))}class pi extends rt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==me.string){const i=this._getOrReturnCtx(t);return ue(i,{code:J.invalid_type,expected:me.string,received:i.parsedType}),ze}const r=new Er;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),ue(s,{code:J.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),ue(s,{code:J.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,l=t.data.length<i.value;(o||l)&&(s=this._getOrReturnCtx(t,s),o?ue(s,{code:J.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&ue(s,{code:J.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")DX.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"email",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")I1||(I1=new RegExp($X,"u")),I1.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"emoji",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")IX.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"uuid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")MX.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"nanoid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")OX.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"cuid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")RX.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"cuid2",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")_X.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"ulid",code:J.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ue(s,{validation:"url",code:J.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"regex",code:J.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),ue(s,{code:J.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),ue(s,{code:J.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),ue(s,{code:J.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?kF(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{code:J.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?HX.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{code:J.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?GX(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{code:J.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?PX.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"duration",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?KX(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"ip",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?qX(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"jwt",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?YX(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"cidr",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?VX.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"base64",code:J.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?WX.test(t.data)||(s=this._getOrReturnCtx(t,s),ue(s,{validation:"base64url",code:J.invalid_string,message:i.message}),r.dirty()):dt.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:J.invalid_string,...xe.errToObj(r)})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...xe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...xe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...xe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...xe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...xe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...xe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...xe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...xe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...xe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...xe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...xe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...xe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...xe.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...xe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...xe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...xe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...xe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...xe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...xe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...xe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...xe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...xe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...xe.errToObj(n)})}nonempty(t){return this.min(1,xe.errToObj(t))}trim(){return new pi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new pi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new pi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}pi.create=e=>{var t;return new pi({checks:[],typeName:$e.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};function QX(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class bl extends rt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==me.number){const i=this._getOrReturnCtx(t);return ue(i,{code:J.invalid_type,expected:me.number,received:i.parsedType}),ze}let r;const s=new Er;for(const i of this._def.checks)i.kind==="int"?dt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:J.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:J.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:J.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?QX(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ue(r,{code:J.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ue(r,{code:J.not_finite,message:i.message}),s.dirty()):dt.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,xe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,xe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,xe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,xe.toString(n))}setLimit(t,n,r,s){return new bl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:xe.toString(s)}]})}_addCheck(t){return new bl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:xe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:xe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:xe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:xe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:xe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:xe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:xe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:xe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:xe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&dt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}bl.create=e=>new bl({checks:[],typeName:$e.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class wl extends rt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==me.bigint)return this._getInvalidInput(t);let r;const s=new Er;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:J.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:J.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ue(r,{code:J.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):dt.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ue(n,{code:J.invalid_type,expected:me.bigint,received:n.parsedType}),ze}gte(t,n){return this.setLimit("min",t,!0,xe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,xe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,xe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,xe.toString(n))}setLimit(t,n,r,s){return new wl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:xe.toString(s)}]})}_addCheck(t){return new wl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:xe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:xe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:xe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:xe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:xe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}wl.create=e=>{var t;return new wl({checks:[],typeName:$e.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ze(e)})};class fp extends rt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==me.boolean){const r=this._getOrReturnCtx(t);return ue(r,{code:J.invalid_type,expected:me.boolean,received:r.parsedType}),ze}return _r(t.data)}}fp.create=e=>new fp({typeName:$e.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class _c extends rt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==me.date){const i=this._getOrReturnCtx(t);return ue(i,{code:J.invalid_type,expected:me.date,received:i.parsedType}),ze}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ue(i,{code:J.invalid_date}),ze}const r=new Er;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),ue(s,{code:J.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),ue(s,{code:J.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):dt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new _c({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:xe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:xe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}_c.create=e=>new _c({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:$e.ZodDate,...Ze(e)});class mx extends rt{_parse(t){if(this._getType(t)!==me.symbol){const r=this._getOrReturnCtx(t);return ue(r,{code:J.invalid_type,expected:me.symbol,received:r.parsedType}),ze}return _r(t.data)}}mx.create=e=>new mx({typeName:$e.ZodSymbol,...Ze(e)});class pp extends rt{_parse(t){if(this._getType(t)!==me.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:J.invalid_type,expected:me.undefined,received:r.parsedType}),ze}return _r(t.data)}}pp.create=e=>new pp({typeName:$e.ZodUndefined,...Ze(e)});class mp extends rt{_parse(t){if(this._getType(t)!==me.null){const r=this._getOrReturnCtx(t);return ue(r,{code:J.invalid_type,expected:me.null,received:r.parsedType}),ze}return _r(t.data)}}mp.create=e=>new mp({typeName:$e.ZodNull,...Ze(e)});class Rd extends rt{constructor(){super(...arguments),this._any=!0}_parse(t){return _r(t.data)}}Rd.create=e=>new Rd({typeName:$e.ZodAny,...Ze(e)});class fc extends rt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return _r(t.data)}}fc.create=e=>new fc({typeName:$e.ZodUnknown,...Ze(e)});class ta extends rt{_parse(t){const n=this._getOrReturnCtx(t);return ue(n,{code:J.invalid_type,expected:me.never,received:n.parsedType}),ze}}ta.create=e=>new ta({typeName:$e.ZodNever,...Ze(e)});class gx extends rt{_parse(t){if(this._getType(t)!==me.undefined){const r=this._getOrReturnCtx(t);return ue(r,{code:J.invalid_type,expected:me.void,received:r.parsedType}),ze}return _r(t.data)}}gx.create=e=>new gx({typeName:$e.ZodVoid,...Ze(e)});class xi extends rt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==me.array)return ue(n,{code:J.invalid_type,expected:me.array,received:n.parsedType}),ze;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,l=n.data.length<s.exactLength.value;(o||l)&&(ue(n,{code:o?J.too_big:J.too_small,minimum:l?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ue(n,{code:J.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ue(n,{code:J.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,l)=>s.type._parseAsync(new ho(n,o,n.path,l)))).then(o=>Er.mergeArray(r,o));const i=[...n.data].map((o,l)=>s.type._parseSync(new ho(n,o,n.path,l)));return Er.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new xi({...this._def,minLength:{value:t,message:xe.toString(n)}})}max(t,n){return new xi({...this._def,maxLength:{value:t,message:xe.toString(n)}})}length(t,n){return new xi({...this._def,exactLength:{value:t,message:xe.toString(n)}})}nonempty(t){return this.min(1,t)}}xi.create=(e,t)=>new xi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$e.ZodArray,...Ze(t)});function xu(e){if(e instanceof Qt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ao.create(xu(r))}return new Qt({...e._def,shape:()=>t})}else return e instanceof xi?new xi({...e._def,type:xu(e.element)}):e instanceof ao?ao.create(xu(e.unwrap())):e instanceof El?El.create(xu(e.unwrap())):e instanceof fo?fo.create(e.items.map(t=>xu(t))):e}class Qt extends rt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=dt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==me.object){const u=this._getOrReturnCtx(t);return ue(u,{code:J.invalid_type,expected:me.object,received:u.parsedType}),ze}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof ta&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||l.push(u);const c=[];for(const u of o){const d=i[u],h=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new ho(s,h,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof ta){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")l.length>0&&(ue(s,{code:J.unrecognized_keys,keys:l}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of l){const h=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new ho(s,h,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const h=await d.key,f=await d.value;u.push({key:h,value:f,alwaysSet:d.alwaysSet})}return u}).then(u=>Er.mergeObjectSync(r,u)):Er.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return xe.errToObj,new Qt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,i,o,l;const c=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(l=xe.errToObj(t).message)!==null&&l!==void 0?l:c}:{message:c}}}:{}})}strip(){return new Qt({...this._def,unknownKeys:"strip"})}passthrough(){return new Qt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Qt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Qt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$e.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Qt({...this._def,catchall:t})}pick(t){const n={};return dt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Qt({...this._def,shape:()=>n})}omit(t){const n={};return dt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Qt({...this._def,shape:()=>n})}deepPartial(){return xu(this)}partial(t){const n={};return dt.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new Qt({...this._def,shape:()=>n})}required(t){const n={};return dt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof ao;)i=i._def.innerType;n[r]=i}}),new Qt({...this._def,shape:()=>n})}keyof(){return CF(dt.objectKeys(this.shape))}}Qt.create=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strip",catchall:ta.create(),typeName:$e.ZodObject,...Ze(t)});Qt.strictCreate=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strict",catchall:ta.create(),typeName:$e.ZodObject,...Ze(t)});Qt.lazycreate=(e,t)=>new Qt({shape:e,unknownKeys:"strip",catchall:ta.create(),typeName:$e.ZodObject,...Ze(t)});class gp extends rt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const o=i.map(l=>new xs(l.ctx.common.issues));return ue(n,{code:J.invalid_union,unionErrors:o}),ze}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const l=o.map(c=>new xs(c));return ue(n,{code:J.invalid_union,unionErrors:l}),ze}}get options(){return this._def.options}}gp.create=(e,t)=>new gp({options:e,typeName:$e.ZodUnion,...Ze(t)});const _o=e=>e instanceof vp?_o(e.schema):e instanceof ki?_o(e.innerType()):e instanceof bp?[e.value]:e instanceof Sl?e.options:e instanceof wp?dt.objectValues(e.enum):e instanceof Sp?_o(e._def.innerType):e instanceof pp?[void 0]:e instanceof mp?[null]:e instanceof ao?[void 0,..._o(e.unwrap())]:e instanceof El?[null,..._o(e.unwrap())]:e instanceof SC||e instanceof Np?_o(e.unwrap()):e instanceof Ep?_o(e._def.innerType):[];class pv extends rt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==me.object)return ue(n,{code:J.invalid_type,expected:me.object,received:n.parsedType}),ze;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ue(n,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ze)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=_o(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const l of o){if(s.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);s.set(l,i)}}return new pv({typeName:$e.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ze(r)})}}function eE(e,t){const n=$o(e),r=$o(t);if(e===t)return{valid:!0,data:e};if(n===me.object&&r===me.object){const s=dt.objectKeys(t),i=dt.objectKeys(e).filter(l=>s.indexOf(l)!==-1),o={...e,...t};for(const l of i){const c=eE(e[l],t[l]);if(!c.valid)return{valid:!1};o[l]=c.data}return{valid:!0,data:o}}else if(n===me.array&&r===me.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],l=t[i],c=eE(o,l);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return n===me.date&&r===me.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class yp extends rt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(i,o)=>{if(XS(i)||XS(o))return ze;const l=eE(i.value,o.value);return l.valid?((ZS(i)||ZS(o))&&n.dirty(),{status:n.value,value:l.data}):(ue(r,{code:J.invalid_intersection_types}),ze)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}yp.create=(e,t,n)=>new yp({left:e,right:t,typeName:$e.ZodIntersection,...Ze(n)});class fo extends rt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==me.array)return ue(r,{code:J.invalid_type,expected:me.array,received:r.parsedType}),ze;if(r.data.length<this._def.items.length)return ue(r,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ze;!this._def.rest&&r.data.length>this._def.items.length&&(ue(r,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new ho(r,o,r.path,l)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>Er.mergeArray(n,o)):Er.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new fo({...this._def,rest:t})}}fo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fo({items:e,typeName:$e.ZodTuple,rest:null,...Ze(t)})};class xp extends rt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==me.object)return ue(r,{code:J.invalid_type,expected:me.object,received:r.parsedType}),ze;const s=[],i=this._def.keyType,o=this._def.valueType;for(const l in r.data)s.push({key:i._parse(new ho(r,l,r.path,l)),value:o._parse(new ho(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?Er.mergeObjectAsync(n,s):Er.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof rt?new xp({keyType:t,valueType:n,typeName:$e.ZodRecord,...Ze(r)}):new xp({keyType:pi.create(),valueType:t,typeName:$e.ZodRecord,...Ze(n)})}}class yx extends rt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==me.map)return ue(r,{code:J.invalid_type,expected:me.map,received:r.parsedType}),ze;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([l,c],u)=>({key:s._parse(new ho(r,l,r.path,[u,"key"])),value:i._parse(new ho(r,c,r.path,[u,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of o){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return ze;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(u.value,d.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const c of o){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return ze;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(u.value,d.value)}return{status:n.value,value:l}}}}yx.create=(e,t,n)=>new yx({valueType:t,keyType:e,typeName:$e.ZodMap,...Ze(n)});class Ic extends rt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==me.set)return ue(r,{code:J.invalid_type,expected:me.set,received:r.parsedType}),ze;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ue(r,{code:J.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(ue(r,{code:J.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(c){const u=new Set;for(const d of c){if(d.status==="aborted")return ze;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const l=[...r.data.values()].map((c,u)=>i._parse(new ho(r,c,r.path,u)));return r.common.async?Promise.all(l).then(c=>o(c)):o(l)}min(t,n){return new Ic({...this._def,minSize:{value:t,message:xe.toString(n)}})}max(t,n){return new Ic({...this._def,maxSize:{value:t,message:xe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ic.create=(e,t)=>new Ic({valueType:e,minSize:null,maxSize:null,typeName:$e.ZodSet,...Ze(t)});class Xu extends rt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==me.function)return ue(n,{code:J.invalid_type,expected:me.function,received:n.parsedType}),ze;function r(l,c){return fx({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,hx(),Od].filter(u=>!!u),issueData:{code:J.invalid_arguments,argumentsError:c}})}function s(l,c){return fx({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,hx(),Od].filter(u=>!!u),issueData:{code:J.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof _d){const l=this;return _r(async function(...c){const u=new xs([]),d=await l._def.args.parseAsync(c,i).catch(p=>{throw u.addIssue(r(c,p)),u}),h=await Reflect.apply(o,this,d);return await l._def.returns._def.type.parseAsync(h,i).catch(p=>{throw u.addIssue(s(h,p)),u})})}else{const l=this;return _r(function(...c){const u=l._def.args.safeParse(c,i);if(!u.success)throw new xs([r(c,u.error)]);const d=Reflect.apply(o,this,u.data),h=l._def.returns.safeParse(d,i);if(!h.success)throw new xs([s(d,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Xu({...this._def,args:fo.create(t).rest(fc.create())})}returns(t){return new Xu({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Xu({args:t||fo.create([]).rest(fc.create()),returns:n||fc.create(),typeName:$e.ZodFunction,...Ze(r)})}}class vp extends rt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}vp.create=(e,t)=>new vp({getter:e,typeName:$e.ZodLazy,...Ze(t)});class bp extends rt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ue(n,{received:n.data,code:J.invalid_literal,expected:this._def.value}),ze}return{status:"valid",value:t.data}}get value(){return this._def.value}}bp.create=(e,t)=>new bp({value:e,typeName:$e.ZodLiteral,...Ze(t)});function CF(e,t){return new Sl({values:e,typeName:$e.ZodEnum,...Ze(t)})}class Sl extends rt{constructor(){super(...arguments),Yh.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{expected:dt.joinValues(r),received:n.parsedType,code:J.invalid_type}),ze}if(px(this,Yh)||SF(this,Yh,new Set(this._def.values)),!px(this,Yh).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ue(n,{received:n.data,code:J.invalid_enum_value,options:r}),ze}return _r(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Sl.create(t,{...this._def,...n})}exclude(t,n=this._def){return Sl.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Yh=new WeakMap;Sl.create=CF;class wp extends rt{constructor(){super(...arguments),Qh.set(this,void 0)}_parse(t){const n=dt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==me.string&&r.parsedType!==me.number){const s=dt.objectValues(n);return ue(r,{expected:dt.joinValues(s),received:r.parsedType,code:J.invalid_type}),ze}if(px(this,Qh)||SF(this,Qh,new Set(dt.getValidEnumValues(this._def.values))),!px(this,Qh).has(t.data)){const s=dt.objectValues(n);return ue(r,{received:r.data,code:J.invalid_enum_value,options:s}),ze}return _r(t.data)}get enum(){return this._def.values}}Qh=new WeakMap;wp.create=(e,t)=>new wp({values:e,typeName:$e.ZodNativeEnum,...Ze(t)});class _d extends rt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==me.promise&&n.common.async===!1)return ue(n,{code:J.invalid_type,expected:me.promise,received:n.parsedType}),ze;const r=n.parsedType===me.promise?n.data:Promise.resolve(n.data);return _r(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}_d.create=(e,t)=>new _d({type:e,typeName:$e.ZodPromise,...Ze(t)});class ki extends rt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ue(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async l=>{if(n.value==="aborted")return ze;const c=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return c.status==="aborted"?ze:c.status==="dirty"||n.value==="dirty"?Du(c.value):c});{if(n.value==="aborted")return ze;const l=this._def.schema._parseSync({data:o,path:r.path,parent:r});return l.status==="aborted"?ze:l.status==="dirty"||n.value==="dirty"?Du(l.value):l}}if(s.type==="refinement"){const o=l=>{const c=s.refinement(l,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?ze:(l.status==="dirty"&&n.dirty(),o(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?ze:(l.status==="dirty"&&n.dirty(),o(l.value).then(()=>({status:n.value,value:l.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Rc(o))return o;const l=s.transform(o.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Rc(o)?Promise.resolve(s.transform(o.value,i)).then(l=>({status:n.value,value:l})):o);dt.assertNever(s)}}ki.create=(e,t,n)=>new ki({schema:e,typeName:$e.ZodEffects,effect:t,...Ze(n)});ki.createWithPreprocess=(e,t,n)=>new ki({schema:t,effect:{type:"preprocess",transform:e},typeName:$e.ZodEffects,...Ze(n)});class ao extends rt{_parse(t){return this._getType(t)===me.undefined?_r(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ao.create=(e,t)=>
vendor: 5,161 bytes, line 537
537new ao({innerType:e,typeName:$e.ZodOptional,...Ze(t)});class El extends rt{_parse(t){return this._getType(t)===me.null?_r(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}El.create=(e,t)=>new El({innerType:e,typeName:$e.ZodNullable,...Ze(t)});class Sp extends rt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===me.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Sp.create=(e,t)=>new Sp({innerType:e,typeName:$e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class Ep extends rt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return hp(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new xs(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new xs(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ep.create=(e,t)=>new Ep({innerType:e,typeName:$e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class xx extends rt{_parse(t){if(this._getType(t)!==me.nan){const r=this._getOrReturnCtx(t);return ue(r,{code:J.invalid_type,expected:me.nan,received:r.parsedType}),ze}return{status:"valid",value:t.data}}}xx.create=e=>new xx({typeName:$e.ZodNaN,...Ze(e)});const JX=Symbol("zod_brand");class SC extends rt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class um extends rt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ze:i.status==="dirty"?(n.dirty(),Du(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ze:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new um({in:t,out:n,typeName:$e.ZodPipeline})}}class Np extends rt{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Rc(s)&&(s.value=Object.freeze(s.value)),s);return hp(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Np.create=(e,t)=>new Np({innerType:e,typeName:$e.ZodReadonly,...Ze(t)});function BO(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function TF(e,t={},n){return e?Rd.create().superRefine((r,s)=>{var i,o;const l=e(r);if(l instanceof Promise)return l.then(c=>{var u,d;if(!c){const h=BO(t,r),f=(d=(u=h.fatal)!==null&&u!==void 0?u:n)!==null&&d!==void 0?d:!0;s.addIssue({code:"custom",...h,fatal:f})}});if(!l){const c=BO(t,r),u=(o=(i=c.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0;s.addIssue({code:"custom",...c,fatal:u})}}):Rd.create()}const XX={object:Qt.lazycreate};var $e;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($e||($e={}));const ZX=(e,t={message:`Input not instance of ${e.name}`})=>TF(n=>n instanceof e,t),AF=pi.create,jF=bl.create,eZ=xx.create,tZ=wl.create,OF=fp.create,nZ=_c.create,rZ=mx.create,sZ=pp.create,iZ=mp.create,oZ=Rd.create,aZ=fc.create,lZ=ta.create,cZ=gx.create,uZ=xi.create,dZ=Qt.create,hZ=Qt.strictCreate,fZ=gp.create,pZ=pv.create,mZ=yp.create,gZ=fo.create,yZ=xp.create,xZ=yx.create,vZ=Ic.create,bZ=Xu.create,wZ=vp.create,SZ=bp.create,EZ=Sl.create,NZ=wp.create,kZ=_d.create,UO=ki.create,CZ=ao.create,TZ=El.create,AZ=ki.createWithPreprocess,jZ=um.create,OZ=()=>AF().optional(),RZ=()=>jF().optional(),_Z=()=>OF().optional(),IZ={string:e=>pi.create({...e,coerce:!0}),number:e=>bl.create({...e,coerce:!0}),boolean:e=>fp.create({...e,coerce:!0}),bigint:e=>wl.create({...e,coerce:!0}),date:e=>_c.create({...e,coerce:!0})},MZ=ze;var Ye=Object.freeze({__proto__:null,defaultErrorMap:Od,setErrorMap:AX,getErrorMap:hx,makeIssue:fx,EMPTY_PATH:jX,addIssueToContext:ue,ParseStatus:Er,INVALID:ze,DIRTY:Du,OK:_r,isAborted:XS,isDirty:ZS,isValid:Rc,isA
537sync:hp,get util(){return dt},get objectUtil(){return JS},ZodParsedType:me,getParsedType:$o,ZodType:rt,datetimeRegex:kF,ZodString:pi,ZodNumber:bl,ZodBigInt:wl,ZodBoolean:fp,ZodDate:_c,ZodSymbol:mx,ZodUndefined:pp,ZodNull:mp,ZodAny:Rd,ZodUnknown:fc,ZodNever:ta,ZodVoid:gx,ZodArray:xi,ZodObject:Qt,ZodUnion:gp,ZodDiscriminatedUnion:pv,ZodIntersection:yp,ZodTuple:fo,ZodRecord:xp,ZodMap:yx,ZodSet:Ic,ZodFunction:Xu,ZodLazy:vp,ZodLiteral:bp,ZodEnum:Sl,ZodNativeEnum:wp,ZodPromise:_d,ZodEffects:ki,ZodTransformer:ki,ZodOptional:ao,ZodNullable:El,ZodDefault:Sp,ZodCatch:Ep,ZodNaN:xx,BRAND:JX,ZodBranded:SC,ZodPipeline:um,ZodReadonly:Np,custom:TF,Schema:rt,ZodSchema:rt,late:XX,get ZodFirstPartyTypeKind(){return $e},coerce:IZ,any:oZ,array:uZ,bigint:tZ,boolean:OF,date:nZ,discriminatedUnion:pZ,effect:UO,enum:EZ,function:bZ,instanceof:ZX,intersection:mZ,lazy:wZ,literal:SZ,map:xZ,nan:eZ,nativeEnum:NZ,never:lZ,null:iZ,nullable:TZ,number:jF,object:dZ,oboolean:_Z,onumber:RZ,optional:CZ,ostring:OZ,pipeline:jZ,preprocess:AZ,promise:kZ,record:yZ,set:vZ,strictObject:hZ,string:AF,symbol:rZ,transformer:UO,tuple:gZ,undefined:sZ,union:fZ,unknown:aZ,void:cZ,NEVER:MZ,ZodIssueCode:J,quotelessJson:TX,ZodError:xs});const fs=v.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:be("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));fs.displayName="Textarea";var LZ="Label",RF=v.forwardRef((e,t)=>a.jsx(je.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));RF.displayName=LZ;var _F=RF;const PZ=Xd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ls=v.forwardRef(({className:e,...t},n)=>a.jsx(_F,{ref:n,className:be(PZ(),e),...t}));ls.displayName=_F.displayName;const al=oX,IF=v.createContext({}),ct=({...e})=>a.jsx(IF.Provider,{value:{name:e.name},children:a.jsx(uX,{...e})}),mv=()=>{const e=v.useContext(IF),t=v.useContext(MF),{getFieldState:n,formState:r}=fv(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},MF=v.createContext({}),it=v.forwardRef(({className:e,...t},n)=>{const r=v.useId();return a.jsx(MF.Provider,{value:{id:r},children:a.jsx("div",{ref:n,className:be("space-y-2",e),...t})})});it.displayName="FormItem";const ot=v.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=mv();return a.jsx(ls,{ref:n,className:be(r&&"text-destructive",e),htmlFor:s,...t})});ot.displayName="FormLabel";const at=v.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=mv();return a.jsx(OP,{ref:t,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...e})});at.displayName="FormControl";const DZ=v.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=mv();return a.jsx("p",{ref:n,id:r,className:be("text-sm text-muted-foreground",e),...t})});DZ.displayName="FormDescription";const ft=v.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:i}=mv(),o=s?String((s==null?void 0:s.message)??""):t;return o?a.jsx("p",{ref:r,id:i,className:be("text-sm font-medium text-destructive",e),...n,children:o}):null});ft.displayName="FormMessage";var EC="Switch",[$Z,uAe]=As(EC),[FZ,BZ]=$Z(EC),LF=v.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:u,form:d,...h}=e,[f,p]=v.useState(null),m=gt(t,w=>p(w)),g=v.useRef(!1),x=f?d||!!f.closest("form"):!0,[y=!1,b]=Xo({prop:s,defaultProp:i,onChange:u});return a.jsxs(FZ,{scope:n,checked:y,disabled:l,children:[a.jsx(je.button,{type:"button",role:"switch","aria-checked":y,"aria-required":o,"data-state":$F(y),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:m,onClick:ae(e.onClick,w=>{b(E=>!E),x&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),x&&a.jsx(UZ,{control:f,bubbles:!g.current,name:r,value:c,checked:y,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});LF.displayName=EC;var PF="SwitchThumb",DF=v.forwardRef((e,t)=>
537{const{__scopeSwitch:n,...r}=e,s=BZ(PF,n);return a.jsx(je.span,{"data-state":$F(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});DF.displayName=PF;var UZ=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,i=v.useRef(null),o=gC(n),l=Yk(t);return v.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&h){const f=new Event("click",{bubbles:r});h.call(c,n),c.dispatchEvent(f)}},[o,n,r]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function $F(e){return e?"checked":"unchecked"}var FF=LF,zZ=DF;const Nf=v.forwardRef(({className:e,...t},n)=>a.jsx(FF,{className:be("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:a.jsx(zZ,{className:be("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Nf.displayName=FF.displayName;function Zn(e){this.content=e}Zn.prototype={constructor:Zn,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,s=r.find(e),i=r.content.slice();return s==-1?i.push(n||e,t):(i[s+1]=t,n&&(i[s]=n)),new Zn(i)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Zn(n)},addToStart:function(e,t){return new Zn([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Zn(n)},addBefore:function(e,t,n){var r=this.remove(t),s=r.content.slice(),i=r.find(e);return s.splice(i==-1?s.length:i,0,t,n),new Zn(s)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Zn.from(e),e.size?new Zn(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Zn.from(e),e.size?new Zn(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Zn.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Zn.from=function(e){if(e instanceof Zn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Zn(t)};function BF(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let s=e.child(r),i=t.child(r);if(s==i){n+=s.nodeSize;continue}if(!s.sameMarkup(i))return n;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)n++;return n}if(s.content.size||i.content.size){let o=BF(s.content,i.content,n+1);if(o!=null)return o}n+=s.nodeSize}}function UF(e,t,n,r){for(let s=e.childCount,i=t.childCount;;){if(s==0||i==0)return s==i?null:{a:n,b:r};let o=e.child(--s),l=t.child(--i),c=o.nodeSize;if(o==l){n-=c,r-=c;continue}if(!o.sameMarkup(l))return{a:n,b:r};if(o.isText&&o.text!=l.text){let u=0,d=Math.min(o.text.length,l.text.length);for(;u<d&&o.text[o.text.length-u-1]==l.text[l.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(o.content.size||l.content.size){let u=UF(o.content,l.content,n-1,r-1);if(u)return u}n-=c,r-=c}}class Y{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,s=0,i){for(let o=0,l=0;l<n;o++){let c=this.content[o],u=l+c.nodeSize;if(u>t&&r(c,s+l,i||null,o)!==!1&&c.content.size){let d=l+1;c.nodesBetween(Math.max(0,t-d),Math.min(c.content.size,n-d),r,s+d)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}
vendor: 4,161 bytes, line 537
537textBetween(t,n,r,s){let i="",o=!0;return this.nodesBetween(t,n,(l,c)=>{let u=l.isText?l.text.slice(Math.max(t,c)-c,n-c):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=u},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,s=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(s[s.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)s.push(t.content[i]);return new Y(s,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],s=0;if(n>t)for(let i=0,o=0;o<n;i++){let l=this.content[i],c=o+l.nodeSize;c>t&&((o<t||c>n)&&(l.isText?l=l.cut(Math.max(0,t-o),Math.min(l.text.length,n-o)):l=l.cut(Math.max(0,t-o-1),Math.min(l.content.size,n-o-1))),r.push(l),s+=l.nodeSize),o=c}return new Y(r,s)}cutByIndex(t,n){return t==n?Y.empty:t==0&&n==this.content.length?this:new Y(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let s=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return s[t]=n,new Y(s,i)}addToStart(t){return new Y([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Y(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let s=this.content[n];t(s,r,n),r+=s.nodeSize}}findDiffStart(t,n=0){return BF(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return UF(this,t,n,r)}findIndex(t){if(t==0)return dg(0,t);if(t==this.size)return dg(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let s=this.child(n),i=r+s.nodeSize;if(i>=t)return i==t?dg(n+1,i):dg(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Y.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Y(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Y.empty;let n,r=0;for(let s=0;s<t.length;s++){let i=t[s];r+=i.nodeSize,s&&i.isText&&t[s-1].sameMarkup(i)?(n||(n=t.slice(0,s)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Y(n||t,r)}static from(t){if(!t)return Y.empty;if(t instanceof Y)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Y([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Y.empty=new Y([],0);const M1={index:0,offset:0};function dg(e,t){return M1.index=e,M1.offset=t,M1}function vx(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!vx(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!vx(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let Rt=class tE{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let s=0;s<t.length;s++){let i=t[s];if(this.eq(i))return t;if(this.type.excludes(i.type))n||(n=t.slice(0,s));else{if(i.type.excludes(this.type))return t;!r&&i.type.rank>this.type.rank&&(n||(n=t.slice(0,s)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&vx(this.attrs,t.attrs)}
vendor: 7,153 bytes, line 537
537toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=r.create(n.attrs);return r.checkAttrs(s.attrs),s}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return tE.none;if(t instanceof tE)return[t];let n=t.slice();return n.sort((r,s)=>r.type.rank-s.type.rank),n}};Rt.none=[];class bx extends Error{}class oe{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=VF(this.content,t+this.openStart,n);return r&&new oe(r,this.openStart,this.openEnd)}removeBetween(t,n){return new oe(zF(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return oe.empty;let r=n.openStart||0,s=n.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new oe(Y.fromJSON(t,n.content),r,s)}static maxOpen(t,n=!0){let r=0,s=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)s++;return new oe(t,r,s)}}oe.empty=new oe(Y.empty,0,0);function zF(e,t,n){let{index:r,offset:s}=e.findIndex(t),i=e.maybeChild(r),{index:o,offset:l}=e.findIndex(n);if(s==t||i.isText){if(l!=n&&!e.child(o).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(zF(i.content,t-s-1,n-s-1)))}function VF(e,t,n,r){let{index:s,offset:i}=e.findIndex(t),o=e.maybeChild(s);if(i==t||o.isText)return r&&!r.canReplace(s,s,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=VF(o.content,t-i-1,n,o);return l&&e.replaceChild(s,o.copy(l))}function VZ(e,t,n){if(n.openStart>e.depth)throw new bx("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new bx("Inconsistent open depths");return WF(e,t,n,0)}function WF(e,t,n,r){let s=e.index(r),i=e.node(r);if(s==t.index(r)&&r<e.depth-n.openStart){let o=WF(e,t,n,r+1);return i.copy(i.content.replaceChild(s,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let o=e.parent,l=o.content;return mc(o,l.cut(0,e.parentOffset).append(n.content).append(l.cut(t.parentOffset)))}else{let{start:o,end:l}=WZ(n,e);return mc(i,GF(e,o,l,t,r))}else return mc(i,wx(e,t,r))}function HF(e,t){if(!t.type.compatibleContent(e.type))throw new bx("Cannot join "+t.type.name+" onto "+e.type.name)}function nE(e,t,n){let r=e.node(n);return HF(r,t.node(n)),r}function pc(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function kf(e,t,n,r){let s=(t||e).node(n),i=0,o=t?t.index(n):s.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(pc(e.nodeAfter,r),i++));for(let l=i;l<o;l++)pc(s.child(l),r);t&&t.depth==n&&t.textOffset&&pc(t.nodeBefore,r)}function mc(e,t){return e.type.checkContent(t),e.copy(t)}function GF(e,t,n,r,s){let i=e.depth>s&&nE(e,t,s+1),o=r.depth>s&&nE(n,r,s+1),l=[];return kf(null,e,s,l),i&&o&&t.index(s)==n.index(s)?(HF(i,o),pc(mc(i,GF(e,t,n,r,s+1)),l)):(i&&pc(mc(i,wx(e,t,s+1)),l),kf(t,n,s,l),o&&pc(mc(o,wx(n,r,s+1)),l)),kf(r,null,s,l),new Y(l)}function wx(e,t,n){let r=[];if(kf(null,e,n,r),e.depth>n){let s=nE(e,t,n+1);pc(mc(s,wx(e,t,n+1)),r)}return kf(t,null,n,r),new Y(r)}function WZ(e,t){let n=t.depth-e.openStart,s=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)s=t.node(i).copy(Y.from(s));return{start:s.resolveNoCache(e.openStart+n),end:s.resolveNoCache(s.content.size-e.openEnd-n)}}class kp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=t.child(n);return r?t.child(n).cut(r):s}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let i=0;i<t;i++)s+=r.child(i).nodeSize;return s}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Rt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),s=t.maybeChild(n);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,s=t.parent.maybeChild(t.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Sx(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],s=0,i=n;for(let o=t;;){let{index:l,offset:c}=o.content.findIndex(i),u=i-c;if(r.push(o,l,s+c),!u||(o=o.child(l),o.isText))break;i=u-1,s+=c+1}return new kp(n,r,i)}
vendor: 4,383 bytes, line 537
537static resolveCached(t,n){let r=zO.get(t);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==n)return o}else zO.set(t,r=new HZ);let s=r.elts[r.i]=kp.resolve(t,n);return r.i=(r.i+1)%GZ,s}}class HZ{constructor(){this.elts=[],this.i=0}}const GZ=12,zO=new WeakMap;class Sx{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const KZ=Object.create(null);let ll=class rE{constructor(t,n,r,s=Rt.none){this.type=t,this.attrs=n,this.marks=s,this.content=r||Y.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,s=0){this.content.nodesBetween(t,n,r,s,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,s){return this.content.textBetween(t,n,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&vx(this.attrs,n||t.defaultAttrs||KZ)&&Rt.sameSet(this.marks,r||Rt.none)}copy(t=null){return t==this.content?this:new rE(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new rE(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return oe.empty;let s=this.resolve(t),i=this.resolve(n),o=r?0:s.sharedDepth(n),l=s.start(o),u=s.node(o).content.cut(s.pos-l,i.pos-l);return new oe(u,s.depth-o,i.depth-o)}replace(t,n,r){return VZ(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:s}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(s==t||n.isText)return n;t-=s+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let s=this.content.child(n-1);return{node:s,index:n-1,offset:r-s.nodeSize}}resolve(t){return kp.resolveCached(this,t)}resolveNoCache(t){return kp.resolve(this,t)}rangeHasMark(t,n,r){let s=!1;return n>t&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),KF(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=Y.empty,s=0,i=r.childCount){let o=this.contentMatchAt(t).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let c=s;c<i;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(t,n,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(t).matchType(r),o=i&&i.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Rt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!Rt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}
537`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let s=Y.fromJSON(t,n.content),i=t.nodeType(n.type).create(n.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};ll.prototype.text=void 0;class Ex extends ll{constructor(t,n,r,s){if(super(t,n,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):KF(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Ex(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Ex(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function KF(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Mc{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new qZ(t,n);if(r.next==null)return Mc.empty;let s=qF(r);r.next&&r.err("Unexpected trailing text");let i=tee(eee(s));return nee(i,r),i}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let s=this;for(let i=n;s&&i<r;i++)s=s.matchType(t.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let s=[this];function i(o,l){let c=o.matchFragment(t,r);if(c&&(!n||c.validEnd))return Y.from(l.map(u=>u.createAndFill()));for(let u=0;u<o.next.length;u++){let{type:d,next:h}=o.next[u];if(!(d.isText||d.hasRequiredAttrs())&&s.indexOf(h)==-1){s.push(h);let f=i(h,l.concat(d));if(f)return f}}return null}return i(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(t)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:c}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!s.type||c.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let s=0;s<r.next.length;s++)t.indexOf(r.next[s].next)==-1&&n(r.next[s].next)}return n(this),t.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+t.indexOf(r.next[o].next);return i}).join(`
538`)}}Mc.empty=new Mc(!0);class qZ{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function qF(e){let t=[];do t.push(YZ(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function YZ(e){let t=[];do t.push(QZ(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function QZ(e){let t=ZZ(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=JZ(e,t);else break;return t}function VO(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function JZ(e,t){let n=VO(e),r=n;return e.eat(",")&&(e.next!="}"?r=VO(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function XZ(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let s=[];for(let i in n){let o=n[i];o.isInGroup(t)&&s.push(o)}return s.length==0&&e.err("No node type or group '"+t+"' found"),s}function ZZ(e){if(e.eat("(")){let t=qF(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=XZ(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function eee(e){let t=[[]];return s(i(e,0),n()),t;function n(){return t.push([])-1}function r(o,l,c){let u={term:c,to:l};return t[o].push(u),u}function s(o,l){o.forEach(c=>c.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((c,u)=>c.concat(i(u,l)),[]);if(o.type=="seq")for(let c=0;;c++){let u=i(o.exprs[c],l);if(c==o.exprs.length-1)return u;s(u,l=n())}else if(o.type=="star"){let c=n();return r(l,c),s(i(o.expr,c),c),[r(c)]}else if(o.type=="plus"){let c=n();return s(i(o.expr,l),c),s(i(o.expr,c),c),[r(c)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let c=l;for(let u=0;u<o.min;u++){let d=n();s(i(o.expr,c),d),c=d}if(o.max==-1)s(i(o.expr,c),c);else for(let u=o.min;u<o.max;u++){let d=n();r(c,d),s(i(o.expr,c),d),c=d}return[r(c)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function YF(e,t){return t-e}function WO(e,t){let n=[];return r(t),n.sort(YF);function r(s){let i=e[s];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(s);for(let o=0;o<i.length;o++){let{term:l,to:c}=i[o];!l&&n.indexOf(c)==-1&&r(c)}}}function tee(e){let t=Object.create(null);return n(WO(e,0));function n(r){let s=[];r.forEach(o=>
vendor: 4,644 bytes, line 538
538{e[o].forEach(({term:l,to:c})=>{if(!l)return;let u;for(let d=0;d<s.length;d++)s[d][0]==l&&(u=s[d][1]);WO(e,c).forEach(d=>{u||s.push([l,u=[]]),u.indexOf(d)==-1&&u.push(d)})})});let i=t[r.join(",")]=new Mc(r.indexOf(e.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(YF);i.next.push({type:s[o][0],next:t[l.join(",")]||n(l)})}return i}}function nee(e,t){for(let n=0,r=[e];n<r.length;n++){let s=r[n],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:c,next:u}=s.next[l];o.push(c.name),i&&!(c.isText||c.hasRequiredAttrs())&&(i=!1),r.indexOf(u)==-1&&r.push(u)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function QF(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function JF(e,t){let n=Object.create(null);for(let r in e){let s=t&&t[r];if(s===void 0){let i=e[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=s}return n}function XF(e,t,n,r){for(let s in t)if(!(s in e))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${s}`);for(let s in e){let i=e[s];i.validate&&i.validate(t[s])}}function ZF(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new see(e,r,t[r]);return n}let HO=class e3{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ZF(t,r.attrs),this.defaultAttrs=QF(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Mc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:JF(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ll(this,this.computeAttrs(t),Y.from(n),Rt.setFrom(r))}createChecked(t=null,n,r){return n=Y.from(n),this.checkContent(n),new ll(this,this.computeAttrs(t),n,Rt.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=Y.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let s=this.contentMatch.matchFragment(n),i=s&&s.fillBefore(Y.empty,!0);return i?new ll(this,t,n.append(i),Rt.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){XF(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:Rt.none:t}static compile(t,n){let r=Object.create(null);t.forEach((i,o)=>r[i]=new e3(i,n,o));let s=n.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function ree(e,t,n){let r=n.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}class see{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?ree(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class gv{constructor(t,n,r,s){this.name=t,this.rank=n,this.schema=r,this.spec=s,this.attrs=ZF(t,s.attrs),this.excluded=null;let i=QF(this.attrs);this.instance=i?new Rt(this,i):null}create(t=null){return!t&&this.instance?this.instance:new Rt(this,JF(this.attrs,t))}static compile(t,n){let r=Object.create(null),s=0;return t.forEach((i,o)=>r[i]=new gv(i,s++,n,o)),r}removeFromSet(t){for(var n=0;n<t.length;
vendor: 4,461 bytes, line 538
538n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){XF(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class t3{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in t)n[s]=t[s];n.nodes=Zn.from(t.nodes),n.marks=Zn.from(t.marks||{}),this.nodes=HO.compile(this.spec.nodes,this),this.marks=gv.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=Mc.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?GO(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:GO(this,o.split(" "))}this.nodeFromJSON=s=>ll.fromJSON(this,s),this.markFromJSON=s=>Rt.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,s){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof HO){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,s)}text(t,n){let r=this.nodes.text;return new Ex(r,r.defaultAttrs,t,Rt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function GO(e,t){let n=[];for(let r=0;r<t.length;r++){let s=t[r],i=e.marks[s],o=i;if(i)n.push(i);else for(let l in e.marks){let c=e.marks[l];(s=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(s)>-1)&&n.push(o=c)}if(!o)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function iee(e){return e.tag!=null}function oee(e){return e.style!=null}class cl{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(s=>{if(iee(s))this.tags.push(s);else if(oee(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=t.nodes[s.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new qO(this,n,!1);return r.addAll(t,Rt.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new qO(this,n,!0);return r.addAll(t,Rt.none,n.from,n.to),oe.maxOpen(r.finish())}matchTag(t,n,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(cee(t,i.tag)&&(i.namespace===void 0||t.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(t);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(t,n,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(t)!=0||o.context&&!r.matchesContext(o.context)||l.length>t.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=n))){if(o.getAttrs){let c=o.getAttrs(n);if(c===!1)continue;o.attrs=c||void 0}return o}}}static schemaRules(t){let n=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<n.length;o++){let l=n[o];if((l.priority==null?50:l.priority)<i)break}n.splice(o,0,s)}for(let s in t.marks){let i=t.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=YO(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in t.nodes){let i=t.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=YO(o)),o.node||o.ignore||o.mark||(o.node=s)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new cl(t,cl.schemaRules(t)))}}const n3={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},aee={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},r3={ol:!0,ul:!0},Cp=1,sE=2,Cf=4;function KO(e,t,n){return t!=null?(t?Cp:0)|(t==="full"?sE:0):e&&e.
vendor: 9,273 bytes, lines 538-540
538whitespace=="pre"?Cp|sE:n&~Cf}class hg{constructor(t,n,r,s,i,o){this.type=t,this.attrs=n,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=Rt.none,this.match=i||(o&Cf?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Y.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(t.type))?(this.match=r,s):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Cp)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let n=Y.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Y.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!n3.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class qO{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=n.topNode,i,o=KO(null,n.preserveWhitespace,0)|(r?Cf:0);s?i=new hg(s.type,s.attrs,Rt.none,!0,n.topMatch||s.type.contentMatch,o):r?i=new hg(null,null,Rt.none,!0,null,o):i=new hg(t.schema.topNodeType,null,Rt.none,!0,null,o),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,s=this.top,i=s.options&sE?"full":this.localPreserveWS||(s.options&Cp)>0;if(i==="full"||s.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
539`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=s.content[s.content.length-1],l=t.previousSibling;(!o||l&&l.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let s=this.localPreserveWS,i=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let o=t.nodeName.toLowerCase(),l;r3.hasOwnProperty(o)&&this.parser.normalizeLists&&lee(t);let c=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(l=this.parser.matchTag(t,this,r));e:if(c?c.ignore:aee.hasOwnProperty(o))this.findInside(t),this.ignoreFallback(t,n);else if(!c||c.skip||c.closeParent){c&&c.closeParent?this.open=Math.max(0,this.open-1):c&&c.skip.nodeType&&(t=c.skip);let u,d=this.needsBlock;if(n3.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let h=c&&c.skip?n:this.readStyles(t,n);h&&this.addAll(t,h),u&&this.sync(i),this.needsBlock=d}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,c,u,c.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
540`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let c=this.parser.matchStyle(i,o,this,l);if(!c)break;if(c.ignore)return null;if(c.clearMark?n=n.filter(u=>!c.clearMark(u)):n=n.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)l=c;else break}}return n}addElementByRule(t,n,r,s){let i,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let c=this.enter(o,n.attrs||null,r,n.preserveWhitespace);c&&(i=!0,r=c)}else{let c=this.parser.schema.marks[n.mark];r=r.concat(c.create(n.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(t);else if(s)this.addElement(t,r,s);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(c=>this.insertNode(c,r,!1));else{let c=t;typeof n.contentElement=="string"?c=t.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(t):n.contentElement&&(c=n.contentElement),this.findAround(t,c,!0),this.addAll(c,r),this.findAround(t,c,!1)}i&&this.sync(l)&&this.open--}addAll(t,n,r,s){let i=r||0;for(let o=r?t.childNodes[r]:t.firstChild,l=s==null?null:t.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o,n);this.findAtPoint(t,i)}findPlace(t,n,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let c=this.nodes[o],u=c.findWrapping(t);if(u&&(!s||s.length>u.length+l)&&(s=u,i=c,!u.length))break;if(c.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)n=this.enterInner(s[o],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let s=this.findPlace(t,n,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(t.type));let o=Rt.none;for(let l of s.concat(t.marks))(i.type?i.type.allowsMarkType(l.type):QO(l.type,t.type))&&(o=l.addToSet(o));return i.content.push(t.mark(o)),!0}return!1}enter(t,n,r,s){let i=this.findPlace(t.create(n),r,!1);return i&&(i=this.enterInner(t,n,r,!0,s)),i}enterInner(t,n,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(t);let l=KO(t,i,o.options);o.options&Cf&&o.content.length==0&&(l|=Cf);let c=Rt.none;return r=r.filter(u=>(o.type?o.type.allowsMarkType(u.type):QO(u.type,t))?(c=u.addToSet(c),!1):!0),this.nodes.push(new hg(t,n,c,s,null,l)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Cp)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let s=r.length-1;s>=0;s--)t+=r[s].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&t.nodeType==1&&t.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,c)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;c>=i;c--)if(o(l-1,c))return!0;return!1}else{let d=c>0||c==0&&s?this.nodes[c].type:r&&c>=i?r.node(c-i).type:null;if(!d||d.name!=u&&!d.isInGroup(u))return!1;c--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function lee(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&r3.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function cee(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function YO(e){let t={};for(let n in e)t[n]=e[n];return t}function QO(e,t){let n=t.schema.nodes;for(let r in n){let s=n[r];if(!s.allowsMarkType(e))continue;let i=[],o=l=>{i.push(l);for(let c=0;c<l.edgeCount;c++){let{type:u,next:d}=l.edge(c);if(u==t||i.indexOf(d)<0&&o(d))return!0}};if(o(s.contentMatch))return!0}}class Jc{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=L1(n).createDocumentFragment());let s=r,i=[];return t.forEach(o=>{if(i.length||o.marks.length){let l=0,c=0;for(;l<i.length&&c<o.marks.length;){let u=o.marks[c];if(!this.marks[u.type.name]){c++;continue}if(!u.eq(i[l][0])||u.type.spec.spanning===!1)break;l++,c++}for(;l<i.length;)s=i.pop()[1];for(;c<o.marks.length;){let u=o.marks[c++],d=this.serializeMark(u,o.isInline,n);d&&(i.push([u,s]),s.appendChild(d.dom),s=d.contentDOM||d.dom)}}s.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:s}
vendor: 6,552 bytes, line 540
540=ay(L1(n),this.nodes[t.type.name](t),null,t.attrs);if(s){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,s)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let s=t.marks.length-1;s>=0;s--){let i=this.serializeMark(t.marks[s],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let s=this.marks[t.type.name];return s&&ay(L1(r),s(t,n),null,t.attrs)}static renderSpec(t,n,r=null,s){return ay(t,n,r,s)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Jc(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=JO(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return JO(t.marks)}}function JO(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function L1(e){return e.document||window.document}const XO=new WeakMap;function uee(e){let t=XO.get(e);return t===void 0&&XO.set(e,t=dee(e)),t}function dee(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let s=0;s<r.length;s++)n(r[s]);else for(let s in r)n(r[s])}return n(e),t}function ay(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let s=t[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=uee(r))&&i.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(n=s.slice(0,o),s=s.slice(o+1));let l,c=n?e.createElementNS(n,s):e.createElement(s),u=t[1],d=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){d=2;for(let h in u)if(u[h]!=null){let f=h.indexOf(" ");f>0?c.setAttributeNS(h.slice(0,f),h.slice(f+1),u[h]):h=="style"&&c.style?c.style.cssText=u[h]:c.setAttribute(h,u[h])}}for(let h=d;h<t.length;h++){let f=t[h];if(f===0){if(h<t.length-1||h>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:p,contentDOM:m}=ay(e,f,n,r);if(c.appendChild(p),m){if(l)throw new RangeError("Multiple content holes");l=m}}}return{dom:c,contentDOM:l}}const s3=65535,i3=Math.pow(2,16);function hee(e,t){return e+t*i3}function ZO(e){return e&s3}function fee(e){return(e-(e&s3))/i3}const o3=1,a3=2,ly=4,l3=8;class iE{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&l3)>0}get deletedBefore(){return(this.delInfo&(o3|ly))>0}get deletedAfter(){return(this.delInfo&(a3|ly))>0}get deletedAcross(){return(this.delInfo&ly)>0}}class cs{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&cs.empty)return cs.empty}recover(t){let n=0,r=ZO(t);if(!this.inverted)for(let s=0;s<r;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+n+fee(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?s:0);if(c>t)break;let u=this.ranges[l+i],d=this.ranges[l+o],h=c+u;if(t<=h){let f=u?t==c?-1:t==h?1:n:n,p=c+s+(f<0?0:d);if(r)return p;let m=t==(n<0?c:h)?null:hee(l/3,t-c),g=t==c?a3:t==h?o3:ly;return(n<0?t!=c:t!=h)&&(g|=l3),new iE(p,g,m)}s+=d-u}return r?t+s:new iE(t+s,0,null)}touches(t,n){let r=0,s=ZO(n),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?r:0);if(c>t)break;let u=this.ranges[l+i],d=c+u;if(t<=d&&l==s*3)return!0;r+=this.ranges[l+o]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),c=o+(this.inverted?0:i),u=this.ranges[s+n],d=this.ranges[s+r];t(l,l+u,c,c+d),i+=d-u}}invert(){return new cs(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?cs.empty:new cs(t<0?[0,-t,0]:[0,0,t])}}cs.empty=new cs([]);class Tp{constructor(t,n,r=0,s=t?t.length:0){this.mirror=n,this.from=r,this.to=s,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Tp(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let s=t.getMirror(n);this.appendMap(t._maps[n],s!=null&&s<n?r+s:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let s=t.getMirror(n);this.appendMap(t._maps[n].invert(),s!=null&&s>n?r-s-1:void 0)}}invert(){let t=new Tp;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(t,n);if(l.recover!=null){let c=this.getMirror(i);if(c!=null&&c>i&&c<this.to){i=c,t=this._maps[c].recover(l.recover);continue}}s|=l.delInfo,t=l.pos}return r?t:new iE(t,s,null)}}const P1=Object.create(null);class kr{getMap(){return cs.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=P1[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in P1)throw new RangeError("Duplicate use of step JSON ID "+t);return P1[t]=n,n.prototype.jsonID=t,n}}class An{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new An(t,null)}static fail(t){return new An(null,t)}static fromReplace(t,n,r,s){try{return An.ok(t.replace(n,r,s))}catch(i){if(i instanceof bx)return An.fail(i.message);throw i}}}function NC(e,t,n){let r=[];for(let s=0;s<e.childCount;s++){let i=e.child(s);i.content.size&&(i=i.copy(NC(i.content,t,i))),i.isInline&&(i=t(i,n,s)),r.push(i)}return Y.fromArray(r)}class Ka extends kr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),s=r.no
vendor: 7,435 bytes, line 540
540de(r.sharedDepth(this.to)),i=new oe(NC(n.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),n.openStart,n.openEnd);return An.fromReplace(t,this.from,this.to,i)}invert(){return new mi(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ka(n.pos,r.pos,this.mark)}merge(t){return t instanceof Ka&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ka(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ka(n.from,n.to,t.markFromJSON(n.mark))}}kr.jsonID("addMark",Ka);class mi extends kr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new oe(NC(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),t),n.openStart,n.openEnd);return An.fromReplace(t,this.from,this.to,r)}invert(){return new Ka(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new mi(n.pos,r.pos,this.mark)}merge(t){return t instanceof mi&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new mi(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new mi(n.from,n.to,t.markFromJSON(n.mark))}}kr.jsonID("removeMark",mi);class qa extends kr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return An.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return An.fromReplace(t,this.pos,this.pos+1,new oe(Y.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(r))return new qa(this.pos,n.marks[s]);return new qa(this.pos,this.mark)}}return new Lc(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new qa(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new qa(n.pos,t.markFromJSON(n.mark))}}kr.jsonID("addNodeMark",qa);class Lc extends kr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return An.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return An.fromReplace(t,this.pos,this.pos+1,new oe(Y.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new qa(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Lc(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Lc(n.pos,t.markFromJSON(n.mark))}}kr.jsonID("removeNodeMark",Lc);class zn extends kr{constructor(t,n,r,s=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=s}apply(t){return this.structure&&oE(t,this.from,this.to)?An.fail("Structure replace would overwrite content"):An.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new cs([this.from,this.to-this.from,this.slice.size])}invert(t){return new zn(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new zn(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(t){if(!(t instanceof zn)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?oe.empty:new oe(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new zn(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?oe.empty:new oe(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new zn(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new zn(n.from,n.to,oe.fromJSON(t,n.slice),!!n.structure)}}kr.jsonID("replace",zn);class Hn extends kr{constructor(t,n,r,s,i,o,l=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(t){if(this.structure&&(oE(t,this.from,this.gapFrom)||oE(t,this.gapTo,this.to)))return An.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return An.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?An.fromReplace(t,this.from,this.to,r):An.fail("Content does not fit in gap")}getMap(){return new cs([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Hn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||s<n.pos||i>r.pos?null:new Hn(n.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Hn(n.from,n.to,n.gapFrom,n.gapTo,oe.fromJSON(t,n.slice),n.insert,!!n.structure)}}kr.jsonID("replaceAround",Hn);function oE(e,t,n){let r=e.resolve(t),s=n-t,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function pee(e,t,n,r){let s=[],i=[],o,l;e.doc.nodesBetween(t,n,(c,u,d)=>{if(!c.isInline)return;let h=c.marks;if(!r.isInSet(h)&&d.type.allowsMarkType(r.type)){let f=Math.max(u,t),p=Math.min(u+c.nodeSize,n),m=r.addToSet(h);for(let g=0;g<h.length;g++)h[g].isInSet(m)||(o&&o.to==f&&o.mark.eq(h[g])?o.to=p:s.push(o=new mi(f,p,h[g])));l&&l.to==f?l.to=p:i.push(l=new Ka(f,p,r))}}
vendor: 17,049 bytes, lines 540-541
540),s.forEach(c=>e.step(c)),i.forEach(c=>e.step(c))}function mee(e,t,n,r){let s=[],i=0;e.doc.nodesBetween(t,n,(o,l)=>{if(!o.isInline)return;i++;let c=null;if(r instanceof gv){let u=o.marks,d;for(;d=r.isInSet(u);)(c||(c=[])).push(d),u=d.removeFromSet(u)}else r?r.isInSet(o.marks)&&(c=[r]):c=o.marks;if(c&&c.length){let u=Math.min(l+o.nodeSize,n);for(let d=0;d<c.length;d++){let h=c[d],f;for(let p=0;p<s.length;p++){let m=s[p];m.step==i-1&&h.eq(s[p].style)&&(f=m)}f?(f.to=u,f.step=i):s.push({style:h,from:Math.max(l,t),to:u,step:i})}}}),s.forEach(o=>e.step(new mi(o.from,o.to,o.style)))}function kC(e,t,n,r=n.contentMatch,s=!0){let i=e.doc.nodeAt(t),o=[],l=t+1;for(let c=0;c<i.childCount;c++){let u=i.child(c),d=l+u.nodeSize,h=r.matchType(u.type);if(!h)o.push(new zn(l,d,oe.empty));else{r=h;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new mi(l,d,u.marks[f]));if(s&&u.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,m;for(;f=p.exec(u.text);)m||(m=new oe(Y.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),o.push(new zn(l+f.index,l+f.index+f[0].length,m))}}l=d}if(!r.validEnd){let c=r.fillBefore(Y.empty,!0);e.replace(l,l,new oe(c,0,0))}for(let c=o.length-1;c>=0;c--)e.step(o[c])}function gee(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function sh(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let s=e.$from.node(r),i=e.$from.index(r),o=e.$to.indexAfter(r);if(r<e.depth&&s.canReplace(i,o,n))return r;if(r==0||s.type.spec.isolating||!gee(s,i,o))break}return null}function yee(e,t,n){let{$from:r,$to:s,depth:i}=t,o=r.before(i+1),l=s.after(i+1),c=o,u=l,d=Y.empty,h=0;for(let m=i,g=!1;m>n;m--)g||r.index(m)>0?(g=!0,d=Y.from(r.node(m).copy(d)),h++):c--;let f=Y.empty,p=0;for(let m=i,g=!1;m>n;m--)g||s.after(m+1)<s.end(m)?(g=!0,f=Y.from(s.node(m).copy(f)),p++):u++;e.step(new Hn(c,u,o,l,new oe(d.append(f),h,p),d.size-h,!0))}function CC(e,t,n=null,r=e){let s=xee(e,t),i=s&&vee(r,t);return i?s.map(eR).concat({type:t,attrs:n}).concat(i.map(eR)):null}function eR(e){return{type:e,attrs:null}}function xee(e,t){let{parent:n,startIndex:r,endIndex:s}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let o=i.length?i[0]:t;return n.canReplaceWith(r,s,o)?i:null}function vee(e,t){let{parent:n,startIndex:r,endIndex:s}=e,i=n.child(r),o=t.contentMatch.findWrapping(i.type);if(!o)return null;let c=(o.length?o[o.length-1]:t).contentMatch;for(let u=r;c&&u<s;u++)c=c.matchType(n.child(u).type);return!c||!c.validEnd?null:o}function bee(e,t,n){let r=Y.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let l=n[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Y.from(n[o].type.create(n[o].attrs,r))}let s=t.start,i=t.end;e.step(new Hn(s,i,s,i,new oe(r,0,0),n.length,!0))}function wee(e,t,n,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(o,l)=>{let c=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,c)&&See(e.doc,e.mapping.slice(i).map(l),r)){let u=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?u=!1:!p&&m&&(u=!0)}u===!1&&u3(e,o,l,i),kC(e,e.mapping.slice(i).map(l,1),r,void 0,u===null);let d=e.mapping.slice(i),h=d.map(l,1),f=d.map(l+o.nodeSize,1);return e.step(new Hn(h,f,h+1,f-1,new oe(Y.from(r.create(c,null,o.marks)),0,0),1,!0)),u===!0&&c3(e,o,l,i),!1}})}function c3(e,t,n,r){t.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let c=e.mapping.slice(r).map(n+1+i+o.index);e.replaceWith(c,c+1,t.type.schema.linebreakReplacement.create())}}})}function u3(e,t,n,r){t.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=e.mapping.slice(r).map(n+1+i);e.replaceWith(o,o+1,t.type.schema.text(`
541`))}})}function See(e,t,n){let r=e.resolve(t),s=r.index();return r.parent.canReplaceWith(s,s+1,n)}function Eee(e,t,n,r,s){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let o=n.create(r,null,s||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,o);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Hn(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new oe(Y.from(o),0,0),1,!0))}function Zu(e,t,n=1,r){let s=e.resolve(t),i=s.depth-n,o=r&&r[r.length-1]||s.parent;if(i<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!o.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let u=s.depth-1,d=n-2;u>i;u--,d--){let h=s.node(u),f=s.index(u);if(h.type.spec.isolating)return!1;let p=h.content.cutByIndex(f,h.childCount),m=r&&r[d+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let g=r&&r[d]||h;if(!h.canReplace(f+1,h.childCount)||!g.type.validContent(p))return!1}let l=s.indexAfter(i),c=r&&r[0];return s.node(i).canReplaceWith(l,l,c?c.type:s.node(i+1).type)}function Nee(e,t,n=1,r){let s=e.doc.resolve(t),i=Y.empty,o=Y.empty;for(let l=s.depth,c=s.depth-n,u=n-1;l>c;l--,u--){i=Y.from(s.node(l).copy(i));let d=r&&r[u];o=Y.from(d?d.type.create(d.attrs,o):s.node(l).copy(o))}e.step(new zn(t,t,new oe(i.append(o),n,n),!0))}function $l(e,t){let n=e.resolve(t),r=n.index();return d3(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function kee(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let s=0;s<t.childCount;s++){let i=t.child(s),o=i.type==r?e.type.schema.nodes.text:i.type;if(n=n.matchType(o),!n||!e.type.allowsMarks(i.marks))return!1}return n.validEnd}function d3(e,t){return!!(e&&t&&!e.isLeaf&&kee(e,t))}function yv(e,t,n=-1){let r=e.resolve(t);for(let s=r.depth;;s--){let i,o,l=r.index(s);if(s==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(s+1),l++,o=r.node(s).maybeChild(l)):(i=r.node(s).maybeChild(l-1),o=r.node(s+1)),i&&!i.isTextblock&&d3(i,o)&&r.node(s).canReplace(l,l+1))return t;if(s==0)break;t=n<0?r.before(s):r.after(s)}}function Cee(e,t,n){let r=null,{linebreakReplacement:s}=e.doc.type.schema,i=e.doc.resolve(t-n),o=i.node().type;if(s&&o.inlineContent){let d=o.whitespace=="pre",h=!!o.contentMatch.matchType(s);d&&!h?r=!1:!d&&h&&(r=!0)}let l=e.steps.length;if(r===!1){let d=e.doc.resolve(t+n);u3(e,d.node(),d.before(),l)}o.inlineContent&&kC(e,t+n-1,o,i.node().contentMatchAt(i.index()),r==null);let c=e.mapping.slice(l),u=c.map(t-n);if(e.step(new zn(u,c.map(t+n,-1),oe.empty,!0)),r===!0){let d=e.doc.resolve(u);c3(e,d.node(),d.before(),e.steps.length)}return e}function Tee(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let s=r.depth-1;s>=0;s--){let i=r.index(s);if(r.node(s).canReplaceWith(i,i,n))return r.before(s+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let s=r.depth-1;s>=0;s--){let i=r.indexAfter(s);if(r.node(s).canReplaceWith(i,i,n))return r.after(s+1);if(i<r.node(s).childCount)return null}return null}function h3(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let s=n.content;for(let i=0;i<n.openStart;i++)s=s.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let o=r.depth;o>=0;o--){let l=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,c=r.index(o)+(l>0?1:0),u=r.node(o),d=!1;if(i==1)d=u.canReplace(c,c,s);else{let h=u.contentMatchAt(c).findWrapping(s.firstChild.type);d=h&&u.canReplaceWith(c,c,h[0])}if(d)return l==0?r.pos:l<0?r.before(o+1):r.after(o+1)}return null}function xv(e,t,n=t,r=oe.empty){if(t==n&&!r.size)return null;let s=e.resolve(t),i=e.resolve(n);return f3(s,i,r)?new zn(t,n,r):new Aee(s,i,r).fit()}function f3(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class Aee{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Y.empty;for(let s=0;s<=t.depth;s++){let i=t.node(s);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(s))})}for(let s=t.depth;s>0;s--)this.placed=Y.from(t.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,s=this.close(t<0?this.$to:r.doc.resolve(t));if(!s)return null;let i=this.placed,o=r.depth,l=s.depth;for(;o&&l&&i.childCount==1;)i=i.firstChild.content,o--,l--;let c=new oe(i,o,l);return t>-1?new Hn(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new zn(r.pos,s.pos,c):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,s=this.unplaced.openEnd;r<t;r++){let i=n.firstChild;if(n.childCount>1&&(s=0),i.type.spec.isolating&&s<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let s,i=null;r?(i=D1(this.unplaced.content,r-1).firstChild,s=i.content):s=this.unplaced.content;let o=s.firstChild;for(let l=this.depth;l>=0;l--){let{type:c,match:u}=this.frontier[l],d,h=null;if(n==1&&(o?u.matchType(o.type)||(h=u.fillBefore(Y.from(o),!1)):i&&c.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:h};if(n==2&&o&&(d=u.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:d};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,s=D1(t,n);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new oe(t,n+1,Math.max(r,s.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,s=D1(t,n);if(s.childCount<=1&&n>0){let i=t.size-n<=n+s.size;this.unplaced=new oe(Jh(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new oe(Jh(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:s,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g<i.length;g++)this.openFrontierNode(i[g]);let o=this.unplaced,l=r?r.content:o.content,c=o.openStart-t,u=0,d=[],{match:h,type:f}=this.frontier[n];if(s){for(let g=0;g<s.childCount;g++)d.push(s.child(g));h=h.matchFragment(s)}let p=l.size+t-(o.content.size-o.openEnd);for(;u<l.childCount;){let g=l.child(u),x=h.matchType(g.type);if(!x)break;u++,(u>1||c==0||g.content.size)&&(h=x,d.push(p3(g.mark(f.allowedMarks(g.marks)),u==1?c:0,u==l.childCount?p:-1)))}let m=u==l.childCount;m||(p=-1),this.placed=Xh(this.placed,n,Y.from(d)),this.frontier[n].match=h,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,x=l;g<p;g++){let y=x.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),x=y.content}this.unplaced=m?t==0?oe.empty:new oe(Jh(o.content,t-1,1),t-1,p<0?o.openEnd:t-1):new oe(Jh(o.content,t,u),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!$1(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,s=this.$to.after(r);for(;r>1&&s==this.$to.end(--r);)++s;return s}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:s}=this.frontier[n],i=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),o=$1(t,n,s,r,i);if(o){for(let l=n-1;l>=0;l--){let{match:c,type:u}=this.frontier[l],d=$1(t,l,u,c,!0);if(!d||d.childCount)continue e}return{depth:n,fit:o,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Xh(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let s=t.node(r),i=s.type.contentMatch.fillBefore(s.content,!0,t.index(r));this.openFrontierNode(s.type,s.attrs,i)}return t}openFrontierNode(t,n=null,r){let s=this.frontier[this.depth];s.match=s.match.matchType(t),this.placed=Xh(this.placed,this.depth,Y.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Y.empty,!0);n.childCount&&(this.placed=Xh(this.placed,this.frontier.length,n))}}function Jh(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Jh(e.firstChild.content,t-1,n)))}function Xh(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Xh(e.lastChild.content,t-1,n)))}function D1(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function p3(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,p3(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Y.empty,!0)))),e.copy(r)}function $1(e,t,n,r,s){let i=e.node(t),o=s?e.indexAfter(t):e.index(t);if(o==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,o);return l&&!jee(n,i.content,o)?l:null}function jee(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function Oee(e){return e.spec.defining||e.spec.definingForContent}function Ree(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let s=e.doc.resolve(t),i=e.doc.resolve(n);if(f3(s,i,r))return e.step(new zn(t,n,r));let o=g3(s,e.doc.resolve(n));o[o.length-1]==0&&o.pop();let l=-(s.depth+1);o.unshift(l);for(let f=s.depth,p=s.pos-1;f>0;f--,p--){let m=s.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;o.indexOf(f)>-1?l=f:s.before(f)==p&&o.splice(1,0,-f)}let c=o.indexOf(l),u=[],d=r.openStart;for(let f=r.content,p=0;;p++){let m=f.firstChild;if(u.push(m),p==r.openStart)break;f=m.content}for(let f=d-1;f>=0;f--){let p=u[f],m=Oee(p.type);if(m&&!p.sameMarkup(s.node(Math.abs(l)-1)))d=f;else if(m||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+d+1)%(r.openStart+1),m=u[p];if(m)for(let g=0;g<o.length;g++){let x=o[(g+c)%o.length],y=!0;x<0&&(y=!1,x=-x);let b=s.node(x-1),w=s.index(x-1);if(b.canReplaceWith(w,w,m.type,m.marks))return e.replace(s.before(x),y?i.after(x):n,new oe(m3(r.content,0,r.openStart,p),p,r.openEnd))}}let h=e.steps.length;for(let f=o.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>h));f--){let p=o[f];p<0||(t=s.before(p),n=i.after(p))}}function m3(e,t,n,r,s){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(m3(i.content,t+1,n,r,i)))}if(t>r){let i=s.contentMatchAt(0),o=i.fillBefore(e).append(e);e=o.append(i.matchFragment(o).fillBefore(Y.empty,!0))}return e}function _ee(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let s=Tee(e.doc,t,r.type);s!=null&&(t=n=s)}e.replaceRange(t,n,new oe(Y.from(r),0,0))}function Iee(e,t,n){let r=e.doc.resolve(t),s=e.doc.resolve(n),i=g3(r,s);for(let o=0;o<i.length;o++){let l=i[o],c=o==i.length-1;if(c&&l==0||r.node(l).type.contentMatch.validEnd)return e.delete(r.start(l),s.end(l));if(l>0&&(c||r.node(l-1).canReplace(r.index(l-1),s.indexAfter(l-1))))return e.delete(r.before(l),s.after(l))}for(let o=1;o<=r.depth&&o<=s.depth;o++)if(t-r.start(o)==r.depth-o&&n>r.end(o)&&s.end(o)-n!=s.depth-o&&r.start(o-1)==s.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),s.index(o-1)))return e.delete(r.before(o),n);e.delete(t,n)}function g3(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let s=r;s>=0;s--){let i=e.start(s);if(i<e.pos-(e.depth-s)||t.end(s)>t.pos+(t.depth-s)||e.node(s).type.spec.isolating||t.node(s).type.spec.isolating)break;(i==t.start(s)||s==e.depth&&s==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&s&&t.start(s-1)==i-1)&&n.push(s)}return n}class ed extends kr{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return An.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let s=n.type.create(r,null,n.marks);return An.fromReplace(t,this.pos,this.pos+1,new oe(Y.from(s),0,n.isLeaf?0:1))}getMap(){return cs.empty}invert(t){return new ed(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new ed(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new ed(n.pos,n.attr,n.value)}}kr.jsonID("attr",ed);class Ap extends kr{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let s in t.attrs)n[s]=t.attrs[s];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return An.ok(r)}getMap(){return cs.empty}invert(t){return new Ap(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ap(n.attr,n.value)}}kr.jsonID("docAttr",Ap);
vendor: 4,186 bytes, line 541
541let Id=class extends Error{};Id=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Id.prototype=Object.create(Error.prototype);Id.prototype.constructor=Id;Id.prototype.name="TransformError";class TC{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Tp}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Id(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=oe.empty){let s=xv(this.doc,t,n,r);return s&&this.step(s),this}replaceWith(t,n,r){return this.replace(t,n,new oe(Y.from(r),0,0))}delete(t,n){return this.replace(t,n,oe.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return Ree(this,t,n,r),this}replaceRangeWith(t,n,r){return _ee(this,t,n,r),this}deleteRange(t,n){return Iee(this,t,n),this}lift(t,n){return yee(this,t,n),this}join(t,n=1){return Cee(this,t,n),this}wrap(t,n){return bee(this,t,n),this}setBlockType(t,n=t,r,s=null){return wee(this,t,n,r,s),this}setNodeMarkup(t,n,r=null,s){return Eee(this,t,n,r,s),this}setNodeAttribute(t,n,r){return this.step(new ed(t,n,r)),this}setDocAttribute(t,n){return this.step(new Ap(t,n)),this}addNodeMark(t,n){return this.step(new qa(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof Rt)n.isInSet(r.marks)&&this.step(new Lc(t,n));else{let s=r.marks,i,o=[];for(;i=n.isInSet(s);)o.push(new Lc(t,i)),s=i.removeFromSet(s);for(let l=o.length-1;l>=0;l--)this.step(o[l])}return this}split(t,n=1,r){return Nee(this,t,n,r),this}addMark(t,n,r){return pee(this,t,n,r),this}removeMark(t,n,r){return mee(this,t,n,r),this}clearIncompatible(t,n,r){return kC(this,t,n,r),this}}const F1=Object.create(null);class Pe{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new y3(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=oe.empty){let r=n.content.lastChild,s=null;for(let l=0;l<n.openEnd;l++)s=r,r=r.lastChild;let i=t.steps.length,o=this.ranges;for(let l=0;l<o.length;l++){let{$from:c,$to:u}=o[l],d=t.mapping.slice(i);t.replaceRange(d.map(c.pos),d.map(u.pos),l?oe.empty:n),l==0&&rR(t,i,(r?r.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,s=this.ranges;for(let i=0;i<s.length;i++){let{$from:o,$to:l}=s[i],c=t.mapping.slice(r),u=c.map(o.pos),d=c.map(l.pos);i?t.deleteRange(u,d):(t.replaceRangeWith(u,d,n),rR(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let s=t.parent.inlineContent?new Ae(t):vu(t.node(0),t.parent,t.pos,t.index(),n,r);if(s)return s;for(let i=t.depth-1;i>=0;i--){let o=n<0?vu(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):vu(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(o)return o}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Gs(t.node(0))}static atStart(t){return vu(t,t,0,0,1)||new Gs(t)}static atEnd(t){return vu(t,t,t.content.size,t.childCount,-1)||new Gs(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=F1[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in F1)throw new RangeError("Duplicate use of selection JSON ID "+t);return F1[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Ae.between(this.$anchor,this.$head).getBookmark()}}Pe.prototype.visible=!0;class y3{constructor(t,n){this.$from=t,this.$to=n}}let tR=!1;function nR(e){!tR&&!e.parent.inlineContent&&(tR=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ae extends Pe{constructor(t,n=t){nR(t),nR(n),super(t,n)}
vendor: 6,233 bytes, line 541
541get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Pe.near(r);let s=t.resolve(n.map(this.anchor));return new Ae(s.parent.inlineContent?s:r,r)}replace(t,n=oe.empty){if(super.replace(t,n),n==oe.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Ae&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new vv(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ae(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let s=t.resolve(n);return new this(s,r==n?s:t.resolve(r))}static between(t,n,r){let s=t.pos-n.pos;if((!r||s)&&(r=s>=0?1:-1),!n.parent.inlineContent){let i=Pe.findFrom(n,r,!0)||Pe.findFrom(n,-r,!0);if(i)n=i.$head;else return Pe.near(n,r)}return t.parent.inlineContent||(s==0?t=n:(t=(Pe.findFrom(t,-r,!0)||Pe.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=s<0&&(t=n))),new Ae(t,n)}}Pe.jsonID("text",Ae);class vv{constructor(t,n){this.anchor=t,this.head=n}map(t){return new vv(t.map(this.anchor),t.map(this.head))}resolve(t){return Ae.between(t.resolve(this.anchor),t.resolve(this.head))}}class ke extends Pe{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:s}=n.mapResult(this.anchor),i=t.resolve(s);return r?Pe.near(i):new ke(i)}content(){return new oe(Y.from(this.node),0,0)}eq(t){return t instanceof ke&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new AC(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ke(t.resolve(n.anchor))}static create(t,n){return new ke(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}ke.prototype.visible=!1;Pe.jsonID("node",ke);class AC{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new vv(r,r):new AC(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&ke.isSelectable(r)?new ke(n):Pe.near(n)}}class Gs extends Pe{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=oe.empty){if(n==oe.empty){t.delete(0,t.doc.content.size);let r=Pe.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new Gs(t)}map(t){return new Gs(t)}eq(t){return t instanceof Gs}getBookmark(){return Mee}}Pe.jsonID("all",Gs);const Mee={map(){return this},resolve(e){return new Gs(e)}};function vu(e,t,n,r,s,i=!1){if(t.inlineContent)return Ae.create(e,n);for(let o=r-(s>0?0:1);s>0?o<t.childCount:o>=0;o+=s){let l=t.child(o);if(l.isAtom){if(!i&&ke.isSelectable(l))return ke.create(e,n-(s<0?l.nodeSize:0))}else{let c=vu(e,l,n+s,s<0?l.childCount:0,s,i);if(c)return c}n+=l.nodeSize*s}return null}function rR(e,t,n){let r=e.steps.length-1;if(r<t)return;let s=e.steps[r];if(!(s instanceof zn||s instanceof Hn))return;let i=e.mapping.maps[r],o;i.forEach((l,c,u,d)=>{o==null&&(o=d)}),e.setSelection(Pe.near(e.doc.resolve(o),n))}const sR=1,fg=2,iR=4;class Lee extends TC{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|sR)&~fg,this.storedMarks=null,this}get selectionSet(){return(this.updated&sR)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=fg,this}ensureMarks(t){return Rt.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&fg)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~fg,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Rt.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let s=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(s.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let o=this.doc.resolve(n);i=r==n?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,s.text(t,i)),this.selection.empty||this.setSelection(Pe.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=iR,this}get scrolledIntoView(){return(this.updated&iR)>0}}function oR(e,t){return!t||!e?e:e.bind(t)}class Zh{constructor(t,n,r){this.name=t,this.init=oR(n.init,r),this.apply=oR(n.apply,r)}}const Pee=[new Zh("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Zh("selection",{init(e,t){return e.selection||Pe.atStart(t.doc)},apply(e){return e.selection}}),new Zh("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Zh("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class B1{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Pee.slice(),n&&n.forEac
vendor: 4,219 bytes, line 541
541h(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Zh(r.key,r.spec.state,r))})}}class $u{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let s=this.config.plugins[r];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),s=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let l=this.config.plugins[o];if(l.spec.appendTransaction){let c=s?s[o].n:0,u=s?s[o].state:this,d=c<n.length&&l.spec.appendTransaction.call(l,c?n.slice(c):n,u,r);if(d&&r.filterTransaction(d,o)){if(d.setMeta("appendedTransaction",t),!s){s=[];for(let h=0;h<this.config.plugins.length;h++)s.push(h<o?{state:r,n:n.length}:{state:this,n:0})}n.push(d),r=r.applyInner(d),i=!0}s&&(s[o]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new $u(this.config),r=this.config.fields;for(let s=0;s<r.length;s++){let i=r[s];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new Lee(this)}static create(t){let n=new B1(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new $u(n);for(let s=0;s<n.fields.length;s++)r[n.fields[s].name]=n.fields[s].init(t,r);return r}reconfigure(t){let n=new B1(this.schema,t.plugins),r=n.fields,s=new $u(n);for(let i=0;i<r.length;i++){let o=r[i].name;s[o]=this.hasOwnProperty(o)?this[o]:r[i].init(t,s)}return s}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=t[r],i=s.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(s,this[s.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let s=new B1(t.schema,t.plugins),i=new $u(s);return s.fields.forEach(o=>{if(o.name=="doc")i.doc=ll.fromJSON(t.schema,n.doc);else if(o.name=="selection")i.selection=Pe.fromJSON(i.doc,n.selection);else if(o.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let l in r){let c=r[l],u=c.spec.state;if(c.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[o.name]=u.fromJSON.call(c,t,n[l],i);return}}i[o.name]=o.init(t,i)}}),i}}function x3(e,t,n){for(let r in e){let s=e[r];s instanceof Function?s=s.bind(t):r=="handleDOMEvents"&&(s=x3(s,t,{})),n[r]=s}return n}class qt{constructor(t){this.spec=t,this.props={},t.props&&x3(t.props,this,this.props),this.key=t.key?t.key.key:v3("plugin")}getState(t){return t[this.key]}}const U1=Object.create(null);function v3(e){return e in U1?e+"$"+ ++U1[e]:(U1[e]=0,e+"$")}class wn{constructor(t="key"){this.key=v3(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const rr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Md=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let aE=null;const Po=function(e,t,n){let r=aE||(aE=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Dee=function(){aE=null},Pc=function(e,t,n,r){return n&&(aR(e,t,n,r,-1)||aR(e,t,n,r,1))},$ee=/^(img|br|input|textarea|hr)$/i;function aR(e,t,n,r,s){for(var i;;){if(e==n&&t==r)return!0;if(t==(s<0?0:Bs(e))){let o=e.parentNode;if(!o||o.nodeType!=1||dm(e)||$ee.test(e.nodeName)||e.contentEditable=="false")return!1;t=rr(e)+(s<0?0:1),e=o}else if(e.nodeType==1){let o=e.childNodes[t+(s<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((i=o.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)t+=s;else return!1;else e=o,t=s<0?Bs(e):0}else return!1}}
vendor: 17,715 bytes, lines 541-542
541function Bs(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Fee(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Bs(e)}else if(e.parentNode&&!dm(e))t=rr(e),e=e.parentNode;else return null}}function Bee(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!dm(e))t=rr(e)+1,e=e.parentNode;else return null}}function Uee(e,t,n){for(let r=t==0,s=t==Bs(e);r||s;){if(e==n)return!0;let i=rr(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,s=s&&i==Bs(e)}}function dm(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const bv=function(e){return e.focusNode&&Pc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Gl(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function zee(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Vee(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(Bs(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(Bs(r.startContainer),r.startOffset)}}}const po=typeof navigator<"u"?navigator:null,lR=typeof document<"u"?document:null,Fl=po&&po.userAgent||"",lE=/Edge\/(\d+)/.exec(Fl),b3=/MSIE \d/.exec(Fl),cE=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Fl),Xr=!!(b3||cE||lE),ul=b3?document.documentMode:cE?+cE[1]:lE?+lE[1]:0,Ci=!Xr&&/gecko\/(\d+)/i.test(Fl);Ci&&+(/Firefox\/(\d+)/.exec(Fl)||[0,0])[1];const uE=!Xr&&/Chrome\/(\d+)/.exec(Fl),vr=!!uE,w3=uE?+uE[1]:0,Ir=!Xr&&!!po&&/Apple Computer/.test(po.vendor),Ld=Ir&&(/Mobile\/\w+/.test(Fl)||!!po&&po.maxTouchPoints>2),Ps=Ld||(po?/Mac/.test(po.platform):!1),Wee=po?/Win/.test(po.platform):!1,Wo=/Android \d/.test(Fl),hm=!!lR&&"webkitFontSmoothing"in lR.documentElement.style,Hee=hm?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Gee(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function To(e,t){return typeof e=="number"?e:e[t]}function Kee(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function cR(e,t,n){let r=e.someProp("scrollThreshold")||0,s=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(o.nodeType!=1){o=Md(o);continue}let l=o,c=l==i.body,u=c?Gee(i):Kee(l),d=0,h=0;if(t.top<u.top+To(r,"top")?h=-(u.top-t.top+To(s,"top")):t.bottom>u.bottom-To(r,"bottom")&&(h=t.bottom-t.top>u.bottom-u.top?t.top+To(s,"top")-u.top:t.bottom-u.bottom+To(s,"bottom")),t.left<u.left+To(r,"left")?d=-(u.left-t.left+To(s,"left")):t.right>u.right-To(r,"right")&&(d=t.right-u.right+To(s,"right")),d||h)if(c)i.defaultView.scrollBy(d,h);else{let p=l.scrollLeft,m=l.scrollTop;h&&(l.scrollTop+=h),d&&(l.scrollLeft+=d);let g=l.scrollLeft-p,x=l.scrollTop-m;t={left:t.left-g,top:t.top-x,right:t.right-g,bottom:t.bottom-x}}let f=c?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(f))break;o=f=="absolute"?o.offsetParent:Md(o)}}function qee(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,s;for(let i=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let l=e.root.elementFromPoint(i,o);if(!l||l==e.dom||!e.dom.contains(l))continue;let c=l.getBoundingClientRect();if(c.top>=n-20){r=l,s=c.top;break}}return{refDOM:r,refTop:s,stack:S3(e.dom)}}function S3(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Md(r));return t}function Yee({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;E3(n,r==0?0:r-t)}function E3(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:s,left:i}=e[n];r.scrollTop!=s+t&&(r.scrollTop=s+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let au=null;function Qee(e){if(e.setActive)return e.setActive();if(au)return e.focus(au);let t=S3(e);e.focus(au==null?{get preventScroll(){return au={preventScroll:!0},!0}}:void 0),au||(au=!1,E3(t,0))}function N3(e,t){let n,r=2e8,s,i=0,o=t.top,l=t.top,c,u;for(let d=e.firstChild,h=0;d;d=d.nextSibling,h++){let f;if(d.nodeType==1)f=d.getClientRects();else if(d.nodeType==3)f=Po(d).getClientRects();else continue;for(let p=0;p<f.length;p++){let m=f[p];if(m.top<=o&&m.bottom>=l){o=Math.max(m.bottom,o),l=Math.min(m.top,l);let g=m.left>t.left?m.left-t.left:m.right<t.left?t.left-m.right:0;if(g<r){n=d,r=g,s=g&&n.nodeType==3?{left:m.right<t.left?m.right:m.left,top:t.top}:t,d.nodeType==1&&g&&(i=h+(t.left>=(m.left+m.right)/2?1:0));continue}}else m.top>t.top&&!c&&m.left<=t.left&&m.right>=t.left&&(c=d,u={left:Math.max(m.left,Math.min(m.right,t.left)),top:m.top});!n&&(t.left>=m.right&&t.top>=m.top||t.left>=m.left&&t.top>=m.bottom)&&(i=h+1)}}return!n&&c&&(n=c,s=u,r=0),n&&n.nodeType==3?Jee(n,s):!n||r&&n.nodeType==1?{node:e,offset:i}:N3(n,s)}function Jee(e,t){let n=e.nodeValue.length,r=document.createRange();for(let s=0;s<n;s++){r.setEnd(e,s+1),r.setStart(e,s);let i=ba(r,1);if(i.top!=i.bottom&&jC(t,i))return{node:e,offset:s+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function jC(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Xee(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function Zee(e,t,n){let{node:r,offset:s}=N3(t,n),i=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();i=o.left!=o.right&&n.left>(o.left+o.right)/2?1:-1}return e.docView.posFromDOM(r,s,i)}function ete(e,t,n,r){let s=-1;for(let i=t,o=!1;i!=e.dom;){let l=e.docView.nearestDesc(i,!0),c;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((c=l.dom.getBoundingClientRect()).width||c.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!o&&c.left>r.left||c.top>r.top?s=l.posBefore:(!o&&c.right<r.left||c.bottom<r.top)&&(s=l.posAfter),o=!0),!l.contentDOM&&s<0&&!l.node.isText))return(l.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?l.posBefore:l.posAfter;i=l.dom.parentNode}return s>-1?s:e.docView.posFromDOM(t,n,-1)}function k3(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let s=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=s;;){let o=e.childNodes[i];if(o.nodeType==1){let l=o.getClientRects();for(let c=0;c<l.length;c++){let u=l[c];if(jC(t,u))return k3(o,t,u)}}if((i=(i+1)%r)==s)break}return e}function tte(e,t){let n=e.dom.ownerDocument,r,s=0,i=Vee(n,t.left,t.top);i&&({node:r,offset:s}=i);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),l;if(!o||!e.dom.contains(o.nodeType!=1?o.parentNode:o)){let u=e.dom.getBoundingClientRect();if(!jC(t,u)||(o=k3(e.dom,t,u),!o))return null}if(Ir)for(let u=o;r&&u;u=Md(u))u.draggable&&(r=void 0);if(o=Xee(o,t),r){if(Ci&&r.nodeType==1&&(s=Math.min(s,r.childNodes.length),s<r.childNodes.length)){let d=r.childNodes[s],h;d.nodeName=="IMG"&&(h=d.getBoundingClientRect()).right<=t.left&&h.bottom>t.top&&s++}let u;hm&&s&&r.nodeType==1&&(u=r.childNodes[s-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&s--,r==e.dom&&s==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:(s==0||r.nodeType!=1||r.childNodes[s-1].nodeName!="BR")&&(l=ete(e,r,s,t))}l==null&&(l=Zee(e,o,t));let c=e.docView.nearestDesc(o,!0);return{pos:l,inside:c?c.posAtStart-c.border:-1}}function uR(e){return e.top<e.bottom||e.left<e.right}function ba(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(uR(r))return r}return Array.prototype.find.call(n,uR)||e.getBoundingClientRect()}const nte=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function C3(e,t,n){let{node:r,offset:s,atom:i}=e.docView.domFromPos(t,n<0?-1:1),o=hm||Ci;if(r.nodeType==3)if(o&&(nte.test(r.nodeValue)||(n<0?!s:s==r.nodeValue.length))){let c=ba(Po(r,s,s),n);if(Ci&&s&&/\s/.test(r.nodeValue[s-1])&&s<r.nodeValue.length){let u=ba(Po(r,s-1,s-1),-1);if(u.top==c.top){let d=ba(Po(r,s,s+1),-1);if(d.top!=c.top)return Ah(d,d.left<u.left)}}return c}else{let c=s,u=s,d=n<0?1:-1;return n<0&&!s?(u++,d=-1):n>=0&&s==r.nodeValue.length?(c--,d=1):n<0?c--:u++,Ah(ba(Po(r,c,u),d),d<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&s&&(n<0||s==Bs(r))){let c=r.childNodes[s-1];if(c.nodeType==1)return z1(c.getBoundingClientRect(),!1)}if(i==null&&s<Bs(r)){let c=r.childNodes[s];if(c.nodeType==1)return z1(c.getBoundingClientRect(),!0)}return z1(r.getBoundingClientRect(),n>=0)}if(i==null&&s&&(n<0||s==Bs(r))){let c=r.childNodes[s-1],u=c.nodeType==3?Po(c,Bs(c)-(o?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(u)return Ah(ba(u,1),!1)}if(i==null&&s<Bs(r)){let c=r.childNodes[s];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let u=c?c.nodeType==3?Po(c,0,o?0:1):c.nodeType==1?c:null:null;if(u)return Ah(ba(u,-1),!0)}return Ah(ba(r.nodeType==3?Po(r):r,-n),n>=0)}function Ah(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function z1(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function T3(e,t,n){let r=e.state,s=e.root.activeElement;r!=t&&e.updateState(t),s!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),s!=e.dom&&s&&s.focus()}}function rte(e,t,n){let r=t.selection,s=n=="up"?r.$from:r.$to;return T3(e,t,()=>{let{node:i}=e.docView.domFromPos(s.pos,n=="up"?-1:1);for(;;){let l=e.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let o=C3(e,s.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let c;if(l.nodeType==1)c=l.getClientRects();else if(l.nodeType==3)c=Po(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;u<c.length;u++){let d=c[u];if(d.bottom>d.top+1&&(n=="up"?o.top-d.top>(d.bottom-o.top)*2:d.bottom-o.bottom>(o.bottom-d.top)*2))return!1}}return!0})}const ste=/[\u0590-\u08ac]/;function ite(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let s=r.parentOffset,i=!s,o=s==r.parent.content.size,l=e.domSelection();return l?!ste.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:o:T3(e,t,()=>{let{focusNode:c,focusOffset:u,anchorNode:d,anchorOffset:h}=e.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:m,focusOffset:g}=e.domSelectionRange(),x=m&&!p.contains(m.nodeType==1?m:m.parentNode)||c==m&&u==g;try{l.collapse(d,h),c&&(c!=d||u!=h)&&l.extend&&l.extend(c,u)}catch{}return f!=null&&(l.caretBidiLevel=f),x}):r.pos==r.start()||r.pos==r.end()}let dR=null,hR=null,fR=!1;function ote(e,t,n){return dR==t&&hR==n?fR:(dR=t,hR=n,fR=n=="up"||n=="down"?rte(e,t,n):ite(e,t,n))}const Ks=0,pR=1,Jl=2,mo=3;class fm{constructor(t,n,r,s){this.parent=t,this.children=n,this.dom=r,this.contentDOM=s,this.dirty=Ks,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let s=this.children[n];if(s==t)return r;r+=s.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let i,o;if(t==this.contentDOM)i=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.previousSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(o)+o.size:this.posAtStart}else{let i,o;if(t==this.contentDOM)i=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.nextSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(o):this.posAtEnd}let s;if(t==this.dom&&this.contentDOM)s=n>rr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){s=!1;break}if(i.previousSibling)break}if(s==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){s=!0;break}if(i.nextSibling)break}}return s??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,s=t;s;s=s.parentNode){let i=this.getDesc(s),o;if(i&&(!n||i.node))if(r&&(o=i.nodeDOM)&&!(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let s=t;s;s=s.parentNode){let i=this.getDesc(s);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let s=this.children[n],i=r+s.size;if(r==t&&i!=r){for(;!s.border&&s.children.length;)for(let o=0;o<s.children.length;o++){let l=s.children[o];if(l.size){s=l;break}}return s}if(t<i)return s.descAt(t-r-s.border);r=i}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,s=0;for(let i=0;r<this.children.length;r++){let o=this.children[r],l=i+o.size;if(l>t||o instanceof j3){s=t-i;break}i=l}if(s)return this.children[r].domFromPos(s-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof A3&&i.side>=0;r--);if(n<=0){let i,o=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,o=!1);return i&&n&&o&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?rr(i.dom)+1:0}}else{let i,o=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,o=!1);return i&&o&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?rr(i.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,i=-1;for(let o=r,l=0;;l++){let c=this.children[l],u=o+c.size;if(s==-1&&t<=u){let d=o+c.border;if(t>=d&&n<=u-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(t,n,d);t=o;for(let h=l;h>0;h--){let f=this.children[h-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){s=rr(f.dom)+1;break}t-=f.size}s==-1&&(s=0)}if(s>-1&&(u>n||l==this.children.length-1)){n=u;for(let d=l+1;d<this.children.length;d++){let h=this.children[d];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){i=rr(h.dom);break}n+=h.size}i==-1&&(i=this.contentDOM.childNodes.length);break}o=u}return{node:this.contentDOM,from:t,to:n,fromOffset:s,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,s=!1){let i=Math.min(t,n),o=Math.max(t,n);for(let p=0,m=0;p<this.children.length;p++){let g=this.children[p],x=m+g.size;if(i>m&&o<x)return g.setSelection(t-m-g.border,n-m-g.border,r,s);m=x}let l=this.domFromPos(t,t?-1:1),c=n==t?l:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),d=r.domSelectionRange(),h=!1;if((Ci||Ir)&&t==n){let{node:p,offset:m}=l;if(p.nodeType==3){if(h=!!(m&&p.nodeValue[m-1]==`
542`),h&&m==p.nodeValue.length)for(let g=p,x;g;g=g.parentNode){if(x=g.nextSibling){x.nodeName=="BR"&&(l=c={node:x.parentNode,offset:rr(x)+1});break}let y=g.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let g=p.childNodes[m-1];h=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(Ci&&d.focusNode&&d.focusNode!=c.node&&d.focusNode.nodeType==1){let p=d.focusNode.childNodes[d.focusOffset];p&&p.contentEditable=="false"&&(s=!0)}if(!(s||h&&Ir)&&Pc(l.node,l.offset,d.anchorNode,d.anchorOffset)&&Pc(c.node,c.offset,d.focusNode,d.focusOffset))return;let f=!1;if((u.extend||t==n)&&!h){u.collapse(l.node,l.offset);try{t!=n&&u.extend(c.node,c.offset),f=!0}catch{}}if(!f){if(t>n){let m=l;l=c,c=m}let p=document.createRange();p.setEnd(c.node,c.offset),p.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,s=0;s<this.children.length;s++){let i=this.children[s],o=r+i.size;if(r==o?t<=o&&n>=r:t<o&&n>r){let l=r+i.border,c=o-i.border;if(t>=l&&n<=c){this.dirty=t==r||n==o?Jl:pR,t==l&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=mo:i.markDirty(t-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Jl:mo}r=o}this.dirty=Jl}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Jl:pR;n.dirty<r&&(n.dirty=r)}
vendor: 4,104 bytes, line 542
542}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class A3 extends fm{constructor(t,n,r,s){let i,o=n.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!i)return s;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(o.nodeType!=1){let l=document.createElement("span");l.appendChild(o),o=l}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==Ks&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class ate extends fm{constructor(t,n,r,s){super(t,[],n,null),this.textDOM=r,this.text=s}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Dc extends fm{constructor(t,n,r,s,i){super(t,[],r,s),this.mark=n,this.spec=i}static create(t,n,r,s){let i=s.nodeViews[n.type.name],o=i&&i(n,s,r);return(!o||!o.dom)&&(o=Jc.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Dc(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&mo||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=mo&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Ks){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Ks}}slice(t,n,r){let s=Dc.create(this.parent,this.mark,!0,r),i=this.children,o=this.size;n<o&&(i=hE(i,n,o,r)),t>0&&(i=hE(i,0,t,r));for(let l=0;l<i.length;l++)i[l].parent=s;return s.children=i,s}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class dl extends fm{constructor(t,n,r,s,i,o,l,c,u){super(t,[],i,o),this.node=n,this.outerDeco=r,this.innerDeco=s,this.nodeDOM=l}static create(t,n,r,s,i,o){let l=i.nodeViews[n.type.name],c,u=l&&l(n,i,()=>{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,s),d=u&&u.dom,h=u&&u.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:h}=Jc.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!h&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let f=d;return d=_3(d,r,n),u?c=new lte(t,n,r,s,d,h||null,f,u,i,o+1):n.isText?new wv(t,n,r,s,d,f,i):new dl(t,n,r,s,d,h||null,f,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Y.empty)}return t}matchesNode(t,n,r){return this.dirty==Ks&&t.eq(this.node)&&Nx(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,s=n,i=t.composing?this.localCompositionInfo(t,n):null,o=i&&i.pos>-1?i:null,l=i&&i.pos<0,c=new ute(this,o&&o.node,t);fte(this.node,this.innerDeco,(u,d,h)=>{u.spec.marks?c.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!h&&c.syncToMarks(d==this.node.childCount?Rt.none:this.node.child(d).marks,r,t),c.placeWidget(u,t,s
vendor: 22,645 bytes, line 542
542)},(u,d,h,f)=>{c.syncToMarks(u.marks,r,t);let p;c.findNodeMatch(u,d,h,f)||l&&t.state.selection.from>s&&t.state.selection.to<s+u.nodeSize&&(p=c.findIndexWithChild(i.node))>-1&&c.updateNodeAt(u,d,h,p,t)||c.updateNextNode(u,d,h,t,f,s)||c.addNode(u,d,h,t,s),s+=u.nodeSize}),c.syncToMarks([],r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==Jl)&&(o&&this.protectLocalComposition(t,o),O3(this.contentDOM,this.children,t),Ld&&pte(this.dom))}localCompositionInfo(t,n){let{from:r,to:s}=t.state.selection;if(!(t.state.selection instanceof Ae)||r<n||s>n+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let o=i.nodeValue,l=mte(this.node.content,o,r-n,s-n);return l<0?null:{node:i,pos:l,text:o}}else return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:s}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new ate(this,i,n,s);t.input.compositionNodes.push(o),this.children=hE(this.children,r,r+s.length,t,o)}update(t,n,r,s){return this.dirty==mo||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,s),!0)}updateInner(t,n,r,s){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=Ks}updateOuterDeco(t){if(Nx(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=R3(this.dom,this.nodeDOM,dE(this.outerDeco,this.node,n),dE(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function mR(e,t,n,r,s){_3(r,t,e);let i=new dl(void 0,e,t,n,r,r,r,s,0);return i.contentDOM&&i.updateChildren(s,0),i}class wv extends dl{constructor(t,n,r,s,i,o,l){super(t,n,r,s,i,null,o,l,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,s){return this.dirty==mo||this.dirty!=Ks&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Ks||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=t,this.dirty=Ks,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let s=this.node.cut(t,n),i=document.createTextNode(s.text);return new wv(this.parent,s,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=mo)}get domAtom(){return!1}isText(t){return this.node.text==t}}class j3 extends fm{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Ks&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class lte extends dl{constructor(t,n,r,s,i,o,l,c,u,d){super(t,n,r,s,i,o,l,u,d),this.spec=c}update(t,n,r,s){if(this.dirty==mo)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,s),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,s){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function O3(e,t,n){let r=e.firstChild,s=!1;for(let i=0;i<t.length;i++){let o=t[i],l=o.dom;if(l.parentNode==e){for(;l!=r;)r=gR(r),s=!0;r=r.nextSibling}else s=!0,e.insertBefore(l,r);if(o instanceof Dc){let c=r?r.previousSibling:e.lastChild;O3(o.contentDOM,o.children,n),r=c?c.nextSibling:e.firstChild}}for(;r;)r=gR(r),s=!0;s&&n.trackWrites==e&&(n.trackWrites=null)}const Tf=function(e){e&&(this.nodeName=e)};Tf.prototype=Object.create(null);const Xl=[new Tf];function dE(e,t,n){if(e.length==0)return Xl;let r=n?Xl[0]:new Tf,s=[r];for(let i=0;i<e.length;i++){let o=e[i].type.attrs;if(o){o.nodeName&&s.push(r=new Tf(o.nodeName));for(let l in o){let c=o[l];c!=null&&(n&&s.length==1&&s.push(r=new Tf(t.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+c:l=="style"?r.style=(r.style?r.style+";":"")+c:l!="nodeName"&&(r[l]=c))}}}return s}function R3(e,t,n,r){if(n==Xl&&r==Xl)return t;let s=t;for(let i=0;i<r.length;i++){let o=r[i],l=n[i];if(i){let c;l&&l.nodeName==o.nodeName&&s!=e&&(c=s.parentNode)&&c.nodeName.toLowerCase()==o.nodeName||(c=document.createElement(o.nodeName),c.pmIsDeco=!0,c.appendChild(s),l=Xl[0]),s=c}cte(s,l||Xl[0],o)}return s}function cte(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],s=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)s.indexOf(r[i])==-1&&e.classList.remove(r[i]);for(let i=0;i<s.length;i++)r.indexOf(s[i])==-1&&e.classList.add(s[i]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=r.exec(t.style);)e.style.removeProperty(s[1])}n.style&&(e.style.cssText+=n.style)}}function _3(e,t,n){return R3(e,e,Xl,dE(t,n,e.nodeType!=1))}function Nx(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function gR(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class ute{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=dte(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r){let s=0,i=this.stack.length>>1,o=Math.min(i,t.length);for(;s<o&&(s==i-1?this.top:this.stack[s+1<<1]).matchesMark(t[s])&&t[s].type.spec.spanning!==!1;)s++;for(;s<i;)this.destroyRest(),this.top.dirty=Ks,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<t.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let c=this.index;c<Math.min(this.index+3,this.top.children.length);c++){let u=this.top.children[c];if(u.matchesMark(t[i])&&!this.isLocked(u.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=Dc.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,s){let i=-1,o;if(s>=this.preMatch.index&&(o=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&o.matchesNode(t,n,r))i=this.top.children.indexOf(o,this.index);else for(let l=this.index,c=Math.min(this.top.children.length,l+5);l<c;l++){let u=this.top.children[l];if(u.matchesNode(t,n,r)&&!this.preMatch.matched.has(u)){i=l;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(t,n,r,s,i){let o=this.top.children[s];return o.dirty==mo&&o.dom==o.contentDOM&&(o.dirty=Jl),o.update(t,n,r,i)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==r)return s}return-1}t=n}}updateNextNode(t,n,r,s,i,o){for(let l=this.index;l<this.top.children.length;l++){let c=this.top.children[l];if(c instanceof dl){let u=this.preMatch.matched.get(c);if(u!=null&&u!=i)return!1;let d=c.dom,h,f=this.isLocked(d)&&!(t.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==t.text&&c.dirty!=mo&&Nx(n,c.outerDeco));if(!f&&c.update(t,n,r,s))return this.destroyBetween(this.index,l),c.dom!=d&&(this.changed=!0),this.index++,!0;if(!f&&(h=this.recreateWrapper(c,t,n,r,s,o)))return this.destroyBetween(this.index,l),this.top.children[this.index]=h,h.contentDOM&&(h.dirty=Jl,h.updateChildren(s,o+1),h.dirty=Ks),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,s,i,o){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!Nx(r,t.outerDeco)||!s.eq(t.innerDeco))return null;let l=dl.create(this.top,n,r,s,i,o);if(l.contentDOM){l.children=t.children,t.children=[];for(let c of l.children)c.parent=l}return t.destroy(),l}addNode(t,n,r,s,i){let o=dl.create(this.top,t,n,r,s,i);o.contentDOM&&o.updateChildren(s,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(t,n,r){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(t)&&(t==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let i=new A3(this.top,t,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Dc;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof wv)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Ir||vr)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let s=new j3(this.top,[],r,null);n!=this.top?n.children.push(s):n.children.splice(this.index++,0,s),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function dte(e,t){let n=t,r=n.children.length,s=e.childCount,i=new Map,o=[];e:for(;s>0;){let l;for(;;)if(r){let u=n.children[r-1];if(u instanceof Dc)n=u,r=u.children.length;else{l=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=l.node;if(c){if(c!=e.child(s-1))break;--s,i.set(l,s),o.push(l)}}return{index:s,matched:i,matches:o.reverse()}}function hte(e,t){return e.type.side-t.type.side}function fte(e,t,n,r){let s=t.locals(e),i=0;if(s.length==0){for(let u=0;u<e.childCount;u++){let d=e.child(u);r(d,s,t.forChild(i,d),u),i+=d.nodeSize}return}let o=0,l=[],c=null;for(let u=0;;){let d,h;for(;o<s.length&&s[o].to==i;){let x=s[o++];x.widget&&(d?(h||(h=[d])).push(x):d=x)}if(d)if(h){h.sort(hte);for(let x=0;x<h.length;x++)n(h[x],u,!!c)}else n(d,u,!!c);let f,p;if(c)p=-1,f=c,c=null;else if(u<e.childCount)p=u,f=e.child(u++);else break;for(let x=0;x<l.length;x++)l[x].to<=i&&l.splice(x--,1);for(;o<s.length&&s[o].from<=i&&s[o].to>i;)l.push(s[o++]);let m=i+f.nodeSize;if(f.isText){let x=m;o<s.length&&s[o].from<x&&(x=s[o].from);for(let y=0;y<l.length;y++)l[y].to<x&&(x=l[y].to);x<m&&(c=f.cut(x-i),f=f.cut(0,x-i),m=x,p=-1)}else for(;o<s.length&&s[o].to<m;)o++;let g=f.isInline&&!f.isLeaf?l.filter(x=>!x.inline):l.slice();r(f,g,t.forChild(i,f),p),i=m}}function pte(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function mte(e,t,n,r){for(let s=0,i=0;s<e.childCount&&i<=r;){let o=e.child(s++),l=i;if(i+=o.nodeSize,!o.isText)continue;let c=o.text;for(;s<e.childCount;){let u=e.child(s++);if(i+=u.nodeSize,!u.isText)break;c+=u.text}if(i>=n){if(i>=r&&c.slice(r-t.length-l,r-l)==t)return r-t.length;let u=l<r?c.lastIndexOf(t,r-l-1):-1;if(u>=0&&u+t.length+l>=n)return l+u;if(n==r&&c.length>=r+t.length-l&&c.slice(r-l,r-l+t.length)==t)return r}}return-1}function hE(e,t,n,r,s){let i=[];for(let o=0,l=0;o<e.length;o++){let c=e[o],u=l,d=l+=c.size;u>=n||d<=t?i.push(c):(u<t&&i.push(c.slice(0,t-u,r)),s&&(i.push(s),s=void 0),d>n&&i.push(c.slice(n-u,c.size,r)))}return i}function OC(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let s=e.docView.nearestDesc(n.focusNode),i=s&&s.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let l=r.resolve(o),c,u;if(bv(n)){for(c=o;s&&!s.node;)s=s.parent;let h=s.node;if(s&&h.isAtom&&ke.isSelectable(h)&&s.parent&&!(h.isInline&&Uee(n.focusNode,n.focusOffset,s.dom))){let f=s.posBefore;u=new ke(o==f?l:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=o,f=o;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);h=Math.min(h,e.docView.posFromDOM(m.startContainer,m.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(h<0)return null;[c,o]=f==e.state.selection.anchor?[f,h]:[h,f],l=r.resolve(o)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let d=r.resolve(c);if(!u){let h=t=="pointer"||e.state.selection.head<l.pos&&!i?1:-1;u=RC(e,d,l,h)}return u}function I3(e){return e.editable?e.hasFocus():L3(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Go(e,t=!1){let n=e.state.selection;if(M3(e,n),!!I3(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&vr){let r=e.domSelectionRange(),s=e.domObserver.currentSelection;if(r.anchorNode&&s.anchorNode&&Pc(r.anchorNode,r.anchorOffset,s.anchorNode,s.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)yte(e);else{let{anchor:r,head:s}=n,i,o;yR&&!(n instanceof Ae)&&(n.$from.parent.inlineContent||(i=xR(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=xR(e,n.to))),e.docView.setSelection(r,s,e,t),yR&&(i&&vR(i),o&&vR(o)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&gte(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const yR=Ir||vr&&w3<63;function xR(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),s=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Ir&&s&&s.contentEditable=="false")return V1(s);if((!s||s.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(s)return V1(s);if(i)return V1(i)}}function V1(e){return e.contentEditable="true",Ir&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function vR(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function gte(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,s=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=s)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!I3(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function yte(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,s=r.nodeName=="IMG";s?n.setStart(r.parentNode,rr(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!s&&!e.state.selection.visible&&Xr&&ul<=11&&(r.disabled=!0,r.disabled=!1)}function M3(e,t){if(t instanceof ke){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(bR(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else bR(e)}function bR(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function RC(e,t,n,r){return e.someProp("createSelectionBetween",s=>s(e,t,n))||Ae.between(t,n,r)}function wR(e){return e.editable&&!e.hasFocus()?!1:L3(e)}function L3(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function xte(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Pc(t.node,t.offset,n.anchorNode,n.anchorOffset)}function fE(e,t){let{$anchor:n,$head:r}=e.selection,s=t>0?n.max(r):n.min(r),i=s.parent.inlineContent?s.depth?e.doc.resolve(t>0?s.after():s.before()):null:s;return i&&Pe.findFrom(i,t)}function Ea(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function SR(e,t,n){let r=e.state.selection;if(r instanceof Ae)if(n.indexOf("s")>-1){let{$head:s}=r,i=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=e.state.doc.resolve(s.pos+i.nodeSize*(t<0?-1:1));return Ea(e,new Ae(r.$anchor,o))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let s=fE(e.state,t);return s&&s instanceof ke?Ea(e,s):!1}else if(!(Ps&&n.indexOf("m")>-1)){let s=r.$head,i=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter,o;if(!i||i.isText)return!1;let l=t<0?s.pos-i.nodeSize:s.pos;return i.isAtom||(o=e.docView.descAt(l))&&!o.contentDOM?ke.isSelectable(i)?Ea(e,new ke(t<0?e.state.doc.resolve(s.pos-i.nodeSize):s)):hm?Ea(e,new Ae(e.state.doc.resolve(t<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof ke&&r.node.isInline)return Ea(e,new Ae(t>0?r.$to:r.$from));{let s=fE(e.state,t);return s?Ea(e,s):!1}}}function kx(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Af(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function lu(e,t){return t<0?vte(e):bte(e)}function vte(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let s,i,o=!1;for(Ci&&n.nodeType==1&&r<kx(n)&&Af(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Af(l,-1))s=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(P3(n))break;{let l=n.previousSibling;for(;l&&Af(l,-1);)s=n.parentNode,i=rr(l),l=l.previousSibling;if(l)n=l,r=kx(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}o?pE(e,n,r):s&&pE(e,s,i)}function bte(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let s=kx(n),i,o;for(;;)if(r<s){if(n.nodeType!=1)break;let l=n.childNodes[r];if(Af(l,1))i=n,o=++r;else break}else{if(P3(n))break;{let l=n.nextSibling;for(;l&&Af(l,1);)i=l.parentNode,o=rr(l)+1,l=l.nextSibling;if(l)n=l,r=0,s=kx(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}i&&pE(e,i,o)}function P3(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function wte(e,t){for(;e&&t==e.childNodes.length&&!dm(e);)t=rr(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function Ste(e,t){for(;e&&!t&&!dm(e);)t=rr(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function pE(e,t,n){if(t.nodeType!=3){let i,o;(o=wte(t,n))?(t=o,n=0):(i=Ste(t,n))&&(t=i,n=i.nodeValue.length)}let r=e.domSelection();if(!r)return;if(bv(r)){let i=document.createRange();i.setEnd(t,n),i.setStart(t,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:s}=e;setTimeout(()=>{e.state==s&&Go(e)},50)}function ER(e,t){let n=e.state.doc.resolve(t);if(!(vr||Wee)&&n.parent.inlineContent){let s=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left<s.left?"ltr":"rtl"}if(t<n.end()){let i=e.coordsAtPos(t+1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left>s.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function NR(e,t,n){let r=e.state.selection;if(r instanceof Ae&&!r.empty||n.indexOf("s")>-1||Ps&&n.indexOf("m")>-1)return!1;let{$from:s,$to:i}=r;if(!s.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let o=fE(e.state,t);if(o&&o instanceof ke)return Ea(e,o)}if(!s.parent.inlineContent){let o=t<0?s:i,l=r instanceof Gs?Pe.near(o,t):Pe.findFrom(o,t);return l?Ea(e,l):!1}return!1}function kR(e,t){if(!(e.state.selection instanceof Ae))return!0;let{$head:n,$anchor:r,empty:s}=e.state.selection;if(!n.sameParent(r))return!0;if(!s)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let o=e.state.tr;return t<0?o.delete(n.pos-i.nodeSize,n.pos):o.delete(n.pos,n.pos+i.nodeSize),e.dispatch(o),!0}return!1}function CR(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Ete(e){if(!Ir||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;CR(e,r,"true"),setTimeout(()=>CR(e,r,"false"),20)}return!1}function Nte(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function kte(e,t){let n=t.keyCode,r=Nte(t);if(n==8||Ps&&n==72&&r=="c")return kR(e,-1)||lu(e,-1);if(n==46&&!t.shiftKey||Ps&&n==68&&r=="c")return kR(e,1)||lu(e,1);if(n==13||n==27)return!0;if(n==37||Ps&&n==66&&r=="c"){let s=n==37?ER(e,e.state.selection.from)=="ltr"?-1:1:-1;return SR(e,s,r)||lu(e,s)}else if(n==39||Ps&&n==70&&r=="c"){let s=n==39?ER(e,e.state.selection.from)=="ltr"?1:-1:1;return SR(e,s,r)||lu(e,s)}else{if(n==38||Ps&&n==80&&r=="c")return NR(e,-1,r)||lu(e,-1);if(n==40||Ps&&n==78&&r=="c")return Ete(e)||NR(e,1,r)||lu(e,1);if(r==(Ps?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function _C(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:s,openEnd:i}=t;for(;s>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){s--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let o=e.someProp("clipboardSerializer")||Jc.fromSchema(e.state.schema),l=z3(
vendor: 4,424 bytes, lines 542-545
542),c=l.createElement("div");c.appendChild(o.serializeFragment(r,{document:l}));let u=c.firstChild,d,h=0;for(;u&&u.nodeType==1&&(d=U3[u.nodeName.toLowerCase()]);){for(let p=d.length-1;p>=0;p--){let m=l.createElement(d[p]);for(;c.firstChild;)m.appendChild(c.firstChild);c.appendChild(m),h++}u=c.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${s} ${i}${h?` -${h}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
543
544`);return{dom:c,text:f,slice:t}}function D3(e,t,n,r,s){let i=s.parent.type.spec.code,o,l;if(!n&&!t)return null;let c=t&&(r||i||!n);if(c){if(e.someProp("transformPastedText",f=>{t=f(t,i||r,e)}),i)return t?new oe(Y.from(e.state.schema.text(t.replace(/\r\n?/g,`
545`))),0,0):oe.empty;let h=e.someProp("clipboardTextParser",f=>f(t,s,r,e));if(h)l=h;else{let f=s.marks(),{schema:p}=e.state,m=Jc.fromSchema(p);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(g=>{let x=o.appendChild(document.createElement("p"));g&&x.appendChild(m.serializeNode(p.text(g,f)))})}}else e.someProp("transformPastedHTML",h=>{n=h(n,e)}),o=jte(n),hm&&Ote(o);let u=o&&o.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let h=+d[3];h>0;h--){let f=o.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;o=f}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||cl.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||d),context:s,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!Cte.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)l=Rte(TR(l,+d[1],+d[2]),d[4]);else if(l=oe.maxOpen(Tte(l.content,s),!0),l.openStart||l.openEnd){let h=0,f=0;for(let p=l.content.firstChild;h<l.openStart&&!p.type.spec.isolating;h++,p=p.firstChild);for(let p=l.content.lastChild;f<l.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);l=TR(l,h,f)}return e.someProp("transformPasted",h=>{l=h(l,e)}),l}const Cte=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Tte(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let s=t.node(n).contentMatchAt(t.index(n)),i,o=[];if(e.forEach(l=>{if(!o)return;let c=s.findWrapping(l.type),u;if(!c)return o=null;if(u=o.length&&i.length&&F3(c,i,l,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=B3(o[o.length-1],i.length));let d=$3(l,c);o.push(d),s=s.matchType(d.type),i=c}}),o)return Y.from(o)}return e}function $3(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Y.from(e));return e}function F3(e,t,n,r,s){if(s<e.length&&s<t.length&&e[s]==t[s]){let i=F3(e,t,n,r.lastChild,s+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(s==e.length-1?n.type:e[s+1]))return r.copy(r.content.append(Y.from($3(n,e,s+1))))}}function B3(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,B3(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Y.empty,!0);return e.copy(n.append(r))}function mE(e,t,n,r,s,i){let o=t<0?e.firstChild:e.lastChild,l=o.content;return e.childCount>1&&(i=0),s<r-1&&(l=mE(l,t,n,r,s+1,i)),s>=n&&(l=t<0?o.contentMatchAt(0).fillBefore(l,i<=s).append(l):l.append(o.contentMatchAt(o.childCount).fillBefore(Y.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(l))}function TR(e,t,n){return t<e.openStart&&(e=new oe(mE(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new oe(mE(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const U3={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let AR=null;function z3(){return AR||(AR=document.implementation.createHTMLDocument("title"))}let W1=null;function Ate(e){let t=window.trustedTypes;return t?(W1||(W1=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),W1.createHTML(e)):e}function jte(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=z3().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),s;if((s=r&&U3[r[1].toLowerCase()])&&(e=s.map(i=>"<"+i+">").join("")+e+s.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=Ate(e),s)for(let i=0;i<s.length;i++)n=n.querySelector(s[i])||n;return n}function Ote(e){let t=e.querySelectorAll(vr?"span:not([class]):not
545([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function Rte(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:s,openStart:i,openEnd:o}=e;for(let l=r.length-2;l>=0;l-=2){let c=n.nodes[r[l]];if(!c||c.hasRequiredAttrs())break;s=Y.from(c.create(r[l+1],s)),i++,o++}return new oe(s,i,o)}const Mr={},Lr={},_te={touchstart:!0,touchmove:!0};class Ite{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Mte(e){for(let t in Mr){let n=Mr[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{Pte(e,r)&&!IC(e,r)&&(e.editable||!(r.type in Lr))&&n(e,r)},_te[t]?{passive:!0}:void 0)}Ir&&e.dom.addEventListener("input",()=>null),gE(e)}function Ya(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Lte(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function gE(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>IC(e,r))})}function IC(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function Pte(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Dte(e,t){!IC(e,t)&&Mr[t.type]&&(e.editable||!(t.type in Lr))&&Mr[t.type](e,t)}Lr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!W3(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Wo&&vr&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Ld&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",s=>s(e,Gl(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||kte(e,n)?n.preventDefault():Ya(e,"key")};Lr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Lr.keypress=(e,t)=>{let n=t;if(W3(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ps&&n.metaKey)return;if(e.someProp("handleKeyPress",s=>s(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Ae)||!r.$from.sameParent(r.$to)){let s=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!e.someProp("handleTextInput",o=>o(e,r.$from.pos,r.$to.pos,s,i))&&e.dispatch(i()),n.preventDefault()}};function Sv(e){return{left:e.clientX,top:e.clientY}}function $te(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function MC(e,t,n,r,s){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let o=i.depth+1;o>0;o--)if(e.someProp(t,l=>o>i.depth?l(e,n,i.nodeAfter,i.before(o),s,!0):l(e,n,i.node(o),i.before(o),s,!1)))return!0;return!1}function td(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function Fte(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&ke.isSelectable(r)?(td(e,new ke(n)),!0):!1}function Bte(e,t){if(t==-1)return!1;let n=e.state.selection,r,s;n instanceof ke&&(r=n.node);let i=e.state.doc.resolve(t);for(let o=i.depth+1;o>0;o--){let l=o>i.depth?i.nodeAfter:i.node(o);if(ke.isSelectable(l)){r&&n.$from.depth>0&&o>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?s=i.before(n.$from.depth):s=i.before(o);break}}return s!=null?(td(e,ke.create(e.state.doc,s)),!0):!1}
vendor: 28,246 bytes, line 545
545function Ute(e,t,n,r,s){return MC(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(s?Bte(e,n):Fte(e,n))}function zte(e,t,n,r){return MC(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",s=>s(e,t,r))}function Vte(e,t,n,r){return MC(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",s=>s(e,t,r))||Wte(e,n,r)}function Wte(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(td(e,Ae.create(r,0,r.content.size)),!0):!1;let s=r.resolve(t);for(let i=s.depth+1;i>0;i--){let o=i>s.depth?s.nodeAfter:s.node(i),l=s.before(i);if(o.inlineContent)td(e,Ae.create(r,l+1,l+1+o.content.size));else if(ke.isSelectable(o))td(e,ke.create(r,l));else continue;return!0}}function LC(e){return Cx(e)}const V3=Ps?"metaKey":"ctrlKey";Mr.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=LC(e),s=Date.now(),i="singleClick";s-e.input.lastClick.time<500&&$te(n,e.input.lastClick)&&!n[V3]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:i,button:n.button};let o=e.posAtCoords(Sv(n));o&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Hte(e,o,n,!!r)):(i=="doubleClick"?zte:Vte)(e,o.pos,o.inside,n)?n.preventDefault():Ya(e,"pointer"))};class Hte{constructor(t,n,r,s){this.view=t,this.pos=n,this.event=r,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[V3],this.allowDefault=r.shiftKey;let i,o;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),o=n.inside;else{let d=t.state.doc.resolve(n.pos);i=d.parent,o=d.depth?d.before():0}const l=s?null:r.target,c=l?t.docView.nearestDesc(l,!0):null;this.target=c&&c.dom.nodeType==1?c.dom:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof ke&&u.from<=o&&u.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ci&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ya(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Go(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Sv(t))),this.updateAllowDefault(t),this.allowDefault||!n?Ya(this.view,"pointer"):Ute(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Ir&&this.mightDrag&&!this.mightDrag.node.isAtom||vr&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(td(this.view,Pe.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Ya(this.view,"pointer")}move(t){this.updateAllowDefault(t),Ya(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Mr.touchstart=e=>{e.input.lastTouch=Date.now(),LC(e),Ya(e,"pointer")};Mr.touchmove=e=>{e.input.lastTouch=Date.now(),Ya(e,"pointer")};Mr.contextmenu=e=>LC(e);function W3(e,t){return e.composing?!0:Ir&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const Gte=Wo?5e3:-1;Lr.compositionstart=Lr.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Ae&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Cx(e,!0),e.markCursor=null;else if(Cx(e,!t.selection.empty),Ci&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let s=r.focusNode,i=r.focusOffset;s&&s.nodeType==1&&i!=0;){let o=i<0?s.lastChild:s.childNodes[i-1];if(!o)break;if(o.nodeType==3){let l=e.domSelection();l&&l.collapse(o,o.nodeValue.length);break}else s=o,i=-1}}e.input.composing=!0}H3(e,Gte)};Lr.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,H3(e,20))};function H3(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Cx(e),t))}function G3(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=qte());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Kte(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=Fee(t.focusNode,t.focusOffset),r=Bee(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let s=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!s||!s.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function qte(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Cx(e,t=!1){if(!(Wo&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),G3(e),t||e.docView&&e.docView.dirty){let n=OC(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function Yte(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),s=document.createRange();s.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const jp=Xr&&ul<15||Ld&&Hee<604;Mr.copy=Lr.cut=(e,t)=>{let n=t,r=e.state.selection,s=n.type=="cut";if(r.empty)return;let i=jp?null:n.clipboardData,o=r.content(),{dom:l,text:c}=_C(e,o);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",c)):Yte(e,l),s&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Qte(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Jte(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let s=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Op(e,r.value,null,s,t):Op(e,r.textContent,r.innerHTML,s,t)},50)}function Op(e,t,n,r,s){let i=D3(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",c=>c(e,s,i||oe.empty)))return!0;if(!i)return!1;let o=Qte(i),l=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(i);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function K3(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Lr.paste=(e,t)=>{let n=t;if(e.composing&&!Wo)return;let r=jp?null:n.clipboardData,s=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Op(e,K3(r),r.getData("text/html"),s,n)?n.preventDefault():Jte(e,n)};class q3{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const Xte=Ps?"altKey":"ctrlKey";function Y3(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[Xte]}Mr.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let s=e.state.selection,i=s.empty?null:e.posAtCoords(Sv(n)),o;if(!(i&&i.pos>=s.from&&i.pos<=(s instanceof ke?s.to-1:s.to))){if(r&&r.mightDrag)o=ke.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=e.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=e.docView&&(o=ke.create(e.state.doc,h.posBefore))}}let l=(o||e.state.selection).content(),{dom:c,text:u,slice:d}=_C(e,l);(!n.dataTransfer.files.length||!vr||w3>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(jp?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",jp||n.dataTransfer.setData("text/plain",u),e.dragging=new q3(d,Y3(e,n),o)};Mr.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Lr.dragover=Lr.dragenter=(e,t)=>t.preventDefault();Lr.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let s=e.posAtCoords(Sv(n));if(!s)return;let i=e.state.doc.resolve(s.pos),o=r&&r.slice;o?e.someProp("transformPasted",m=>{o=m(o,e)}):o=D3(e,K3(n.dataTransfer),jp?null:n.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&Y3(e,n));if(e.someProp("handleDrop",m=>m(e,n,o||oe.empty,l))){n.preventDefault();return}if(!o)return;n.preventDefault();let c=o?h3(e.state.doc,i.pos,o):i.pos;c==null&&(c=i.pos);let u=e.state.tr;if(l){let{node:m}=r;m?m.replace(u):u.deleteSelection()}let d=u.mapping.map(c),h=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,f=u.doc;if(h?u.replaceRangeWith(d,d,o.content.firstChild):u.replaceRange(d,d,o),u.doc.eq(f))return;let p=u.doc.resolve(d);if(h&&ke.isSelectable(o.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new ke(p));else{let m=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((g,x,y,b)=>m=b),u.setSelection(RC(e,p,u.doc.resolve(m)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};Mr.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Go(e)},20))};Mr.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Mr.beforeinput=(e,t)=>{if(vr&&Wo&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Gl(8,"Backspace")))))return;let{$cursor:s}=e.state.selection;s&&s.pos>0&&e.dispatch(e.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let e in Lr)Mr[e]=Lr[e];function Rp(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Tx{constructor(t,n){this.toDOM=t,this.spec=n||gc,this.side=this.spec.side||0}map(t,n,r,s){let{pos:i,deleted:o}=t.mapResult(n.from+s,this.side<0?-1:1);return o?null:new Vn(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Tx&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Rp(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class hl{constructor(t,n){this.attrs=t,this.spec=n||gc}map(t,n,r,s){let i=t.map(n.from+s,this.spec.inclusiveStart?-1:1)-r,o=t.map(n.to+s,this.spec.inclusiveEnd?1:-1)-r;return i>=o?null:new Vn(i,o,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof hl&&Rp(this.attrs,t.attrs)&&Rp(this.spec,t.spec)}static is(t){return t.type instanceof hl}destroy(){}}class PC{constructor(t,n){this.attrs=t,this.spec=n||gc}map(t,n,r,s){let i=t.mapResult(n.from+s,1);if(i.deleted)return null;let o=t.mapResult(n.to+s,-1);return o.deleted||o.pos<=i.pos?null:new Vn(i.pos-r,o.pos-r,this)}valid(t,n){let{index:r,offset:s}=t.content.findIndex(n.from),i;return s==n.from&&!(i=t.child(r)).isText&&s+i.nodeSize==n.to}eq(t){return this==t||t instanceof PC&&Rp(this.attrs,t.attrs)&&Rp(this.spec,t.spec)}destroy(){}}class Vn{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new Vn(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new Vn(t,t,new Tx(n,r))}static inline(t,n,r,s){return new Vn(t,n,new hl(r,s))}static node(t,n,r,s){return new Vn(t,n,new PC(r,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof hl}get widget(){return this.type instanceof Tx}}const bu=[],gc={};class Mt{constructor(t,n){this.local=t.length?t:bu,this.children=n.length?n:bu}static create(t,n){return n.length?Ax(n,t,0,gc):gr}find(t,n,r){let s=[];return this.findInner(t??0,n??1e9,s,0,r),s}findInner(t,n,r,s,i){for(let o=0;o<this.local.length;o++){let l=this.local[o];l.from<=n&&l.to>=t&&(!i||i(l.spec))&&r.push(l.copy(l.from+s,l.to+s))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<n&&this.children[o+1]>t){let l=this.children[o]+1;this.children[o+2].findInner(t-l,n-l,r,s+l,i)}}map(t,n,r){return this==gr||t.maps.length==0?this:this.mapInner(t,n,0,0,r||gc)}mapInner(t,n,r,s,i){let o;for(let l=0;l<this.local.length;l++){let c=this.local[l].map(t,r,s);c&&c.type.valid(n,c)?(o||(o=[])).push(c):i.onRemove&&i.onRemove(this.local[l].spec)}return this.children.length?Zte(this.children,o||[],t,n,r,s,i):o?new Mt(o.sort(yc),bu):gr}add(t,n){return n.length?this==gr?Mt.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let s,i=0;t.forEach((l,c)=>{let u=c+r,d;if(d=J3(n,l,u)){for(s||(s=this.children.slice());i<s.length&&s[i]<c;)i+=3;s[i]==c?s[i+2]=s[i+2].addInner(l,d,u+1):s.splice(i,0,c,c+l.nodeSize,Ax(d,l,u+1,gc)),i+=3}});let o=Q3(i?X3(n):n,-r);for(let l=0;l<o.length;l++)o[l].type.valid(t,o[l])||o.splice(l--,1);return new Mt(o.length?this.local.concat(o).sort(yc):this.local,s||this.children)}remove(t){return t.length==0||this==gr?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,s=this.local;for(let i=0;i<r.length;i+=3){let o,l=r[i]+n,c=r[i+1]+n;for(let d=0,h;d<t.length;d++)(h=t[d])&&h.from>l&&h.to<c&&(t[d]=null,(o||(o=[])).push(h));if(!o)continue;r==this.children&&(r=this.children.slice());let u=r[i+2].removeInner(o,l+1);u!=gr?r[i+2]=u:(r.splice(i,3),i-=3)}if(s.length){for(let i=0,o;i<t.length;i++)if(o=t[i])for(let l=0;l<s.length;l++)s[l].eq(o,n)&&(s==this.local&&(s=this.local.slice()),s.splice(l--,1))}return r==this.children&&s==this.local?this:s.length||r.length?new Mt(s,r):gr}forChild(t,n){if(this==gr)return this;if(n.isLeaf)return Mt.empty;let r,s;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=t){this.children[l]==t&&(r=this.children[l+2]);break}let i=t+1,o=i+n.content.size;for(let l=0;l<this.local.length;l++){let c=this.local[l];if(c.from<o&&c.to>i&&c.type instanceof hl){let u=Math.max(i,c.from)-i,d=Math.min(o,c.to)-i;u<d&&(s||(s=[])).push(c.copy(u,d))}}if(s){let l=new Mt(s.sort(yc),bu);return r?new ja([l,r]):l}return r||gr}eq(t){if(this==t)return!0;if(!(t instanceof Mt)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return DC(this.localsInner(t))}localsInner(t){if(this==gr)return bu;if(t.inlineContent||!this.local.some(hl.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof hl||n.push(this.local[r]);return n}forEachSet(t){t(this)}}Mt.empty=new Mt([],[]);Mt.removeOverlap=DC;const gr=Mt.empty;class ja{constructor(t){this.members=t}map(t,n){const r=this.members.map(s=>s.map(t,n,gc));return ja.from(r)}forChild(t,n){if(n.isLeaf)return Mt.empty;let r=[];for(let s=0;s<this.members.length;s++){let i=this.members[s].forChild(t,n);i!=gr&&(i instanceof ja?r=r.concat(i.members):r.push(i))}return ja.from(r)}eq(t){if(!(t instanceof ja)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let s=0;s<this.members.length;s++){let i=this.members[s].localsInner(t);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let o=0;o<i.length;o++)n.push(i[o])}}return n?DC(r?n:n.sort(yc)):bu}static from(t){switch(t.length){case 0:return gr;case 1:return t[0];default:return new ja(t.every(n=>n instanceof Mt)?t:t.reduce((n,r)=>n.concat(r instanceof Mt?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function Zte(e,t,n,r,s,i,o){let l=e.slice();for(let u=0,d=i;u<n.maps.length;u++){let h=0;n.maps[u].forEach((f,p,m,g)=>{let x=g-m-(p-f);for(let y=0;y<l.length;y+=3){let b=l[y+1];if(b<0||f>b+d-h)continue;let w=l[y]+d-h;p>=w?l[y+1]=f<=w?-2:-1:f>=d&&x&&(l[y]+=x,l[y+1]+=x)}h+=x}),d=n.maps[u].map(d,-1)}let c=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){c=!0,l[u+1]=-1;continue}let d=n.map(e[u]+i),h=d-s;if(h<0||h>=r.content.size){c=!0;continue}let f=n.map(e[u+1]+i,-1),p=f-s,{index:m,offset:g}=r.content.findIndex(h),x=r.maybeChild(m);if(x&&g==h&&g+x.nodeSize==p){let y=l[u+2].mapInner(n,x,d+1,e[u]+i+1,o);y!=gr?(l[u]=h,l[u+1]=p,l[u+2]=y):(l[u+1]=-2,c=!0)}else c=!0}if(c){let u=ene(l,e,t,n,s,i,o),d=Ax(u,r,0,o);t=d.local;for(let h=0;h<l.length;h+=3)l[h+1]<0&&(l.splice(h,3),h-=3);for(let h=0,f=0;h<d.children.length;h+=3){let p=d.children[h];for(;f<l.length&&l[f]<p;)f+=3;l.splice(f,0,d.children[h],d.children[h+1],d.children[h+2])}}return new Mt(t.sort(yc),l)}function Q3(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let s=e[r];n.push(new Vn(s.from+t,s.to+t,s.type))}return n}function ene(e,t,n,r,s,i,o){function l(c,u){for(let d=0;d<c.local.length;d++){let h=c.local[d].map(r,s,u);h?n.push(h):o.onRemove&&o.onRemove(c.local[d].spec)}for(let d=0;d<c.children.length;d+=3)l(c.children[d+2],c.children[d]+u+1)}for(let c=0;c<e.length;c+=3)e[c+1]==-1&&l(e[c+2],t[c]+i+1);return n}function J3(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,s=null;for(let i=0,o;i<e.length;i++)(o=e[i])&&o.from>n&&o.to<r&&((s||(s=[])).push(o),e[i]=null);return s}function X3(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Ax(e,t,n,r){let s=[],i=!1;t.forEach((l,c)=>{let u=J3(e,l,c+n);if(u){i=!0;let d=Ax(u,l,n+c+1,r);d!=gr&&s.push(c,c+l.nodeSize,d)}});let o=Q3(i?X3(e):e,-n).sort(yc);for(let l=0;l<o.length;l++)o[l].type.valid(t,o[l])||(r.onRemove&&r.onRemove(o[l].spec),o.splice(l--,1));return o.length||s.length?new Mt(o,s):gr}function yc(e,t){return e.from-t.from||e.to-t.to}function DC(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let s=n+1;s<t.length;s++){let i=t[s];if(i.from==r.from){i.to!=r.to&&(t==e&&(t=e.slice()),t[s]=i.copy(i.from,r.to),jR(t,s+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),jR(t,s,r.copy(i.from,r.to)));break}}}return t}function jR(e,t,n){for(;t<e.length&&yc(n,e[t])>0;)t++;e.splice(t,0,n)}function H1(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=gr&&t.push(r)}),e.cursorWrapper&&t.push(Mt.create(e.state.doc,[e.cursorWrapper.deco])),ja.from(t)}const tne={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},nne=Xr&&ul<=11;class rne{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class sne{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new rne,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let s=0;s<r.length;s++)this.queue.push(r[s]);Xr&&ul<=11&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),nne&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,tne)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(wR(this.view)){if(this.suppressingSelectionUpdates)return Go(this.view);if(Xr&&ul<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Pc(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=Md(i))n.add(i);for(let i=t.anchorNode;i;i=Md(i))if(n.has(i)){r=i;break}let s=r&&this.view.docView.nearestDesc(r);if(s&&s.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&wR(t)&&!this.ignoreSelectionChange(r),i=-1,o=-1,l=!1,c=[];if(t.editable)for(let d=0;d<n.length;d++){let h=this.registerMutation(n[d],c);h&&(i=i<0?h.from:Math.min(h.from,i),o=o<0?h.to:Math.max(h.to,o),h.typeOver&&(l=!0))}if(Ci&&c.length){let d=c.filter(h=>h.nodeName=="BR");if(d.length==2){let[h,f]=d;h.parentNode&&h.parentNode.parentNode==f.parentNode?f.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let f of d){let p=f.parentNode;p&&p.nodeName=="LI"&&(!h||ane(t,h)!=p)&&f.remove()}}}let u=null;i<0&&s&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&bv(r)&&(u=OC(t))&&u.eq(Pe.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Go(t),this.currentSelection.set(r),t.scrollToSelection()):(i>-1||s)&&(i>-1&&(t.docView.markDirty(i,o),ine(t)),this.handleDOMChange(i,o,l,c),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Go(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let d=0;d<t.addedNodes.length;d++){let h=t.addedNodes[d];n.push(h),h.nodeType==3&&(this.lastChangedTextNode=h)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let s=t.previousSibling,i=t.nextSibling;if(Xr&&ul<=11&&t.addedNodes.length)for(let d=0;d<t.addedNodes.length;d++){let{previousSibling:h,nextSibling:f}=t.addedNodes[d];(!h||Array.prototype.indexOf.call(t.addedNodes,h)<0)&&(s=h),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(i=f)}let o=s&&s.parentNode==t.target?rr(s)+1:0,l=r.localPosFromDOM(t.target,o,-1),c=i&&i.parentNode==t.target?rr(i):t.target.childNodes.length,u=r.localPosFromDOM(t.target,c,1);return{from:l,to:u}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let OR=new WeakMap,RR=!1;function ine(e){if(!OR.has(e)&&(OR.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Ci,RR)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),RR=!0}}function _R(e,t){let n=t.startContainer,r=t.startOffset,s=t.endContainer,i=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return Pc(o.node,o.offset,s,i)&&([n,r,s,i]=[s,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:i}}function one(e,t){if(t.getComposedRanges){let s=t.getComposedRanges(e.root)[0];if(s)return _R(e,s)}let n;function r(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?_R(e,n):null}function ane(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function lne(e,t,n){let{node:r,fromOffset:s,toOffset:i,from:o,to:l}=e.docView.parseRange(t,n),c=e.domSelectionRange(),u,d=c.anchorNode;if(d&&e.dom.contains(d.nodeType==1?d:d.parentNode)&&(u=[{node:d,offset:c.anchorOffset}],bv(c)||u.push({node:c.focusNode,offset:c.focusOffset})),vr&&e.input.lastKeyCode===8)for(let x=i;x>s;x--){let y=r.childNodes[x-1],b=y.pmViewDesc;if(y.nodeName=="BR"&&!b){i=x;break}if(!b||b.size)break}let h=e.state.doc,f=e.someProp("domParser")||cl.fromSchema(e.state.schema),p=h.resolve(o),m=null,g=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:s,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:cne,context:p});if(u&&u[0].pos!=null){let x=u[0].pos,y=u[1]&&u[1].pos;y==null&&(y=x),m={anchor:x+o,head:y+o}}return{doc:g,sel:m,from:o,to:l}}function cne(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Ir&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Ir&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const une=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function dne(e,t,n,r,s){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let T=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,j=OC(e,T);
vendor: 4,499 bytes, line 545
545if(j&&!e.state.selection.eq(j)){if(vr&&Wo&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",R=>R(e,Gl(13,"Enter"))))return;let S=e.state.tr.setSelection(j);T=="pointer"?S.setMeta("pointer",!0):T=="key"&&S.scrollIntoView(),i&&S.setMeta("composition",i),e.dispatch(S)}return}let o=e.state.doc.resolve(t),l=o.sharedDepth(n);t=o.before(l+1),n=e.state.doc.resolve(n).after(l+1);let c=e.state.selection,u=lne(e,t,n),d=e.state.doc,h=d.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p="end"):(f=e.state.selection.from,p="start"),e.input.lastKeyCode=null;let m=pne(h.content,u.doc.content,u.from,f,p);if(m&&e.input.domChangeCount++,(Ld&&e.input.lastIOSEnter>Date.now()-225||Wo)&&s.some(T=>T.nodeType==1&&!une.test(T.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",T=>T(e,Gl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof Ae&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(u.sel){let T=IR(e,e.state.doc,u.sel);if(T&&!T.eq(e.state.selection)){let j=e.state.tr.setSelection(T);i&&j.setMeta("composition",i),e.dispatch(j)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof Ae&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),Xr&&ul<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>u.from&&u.doc.textBetween(m.start-u.from-1,m.start-u.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let g=u.doc.resolveNoCache(m.start-u.from),x=u.doc.resolveNoCache(m.endB-u.from),y=d.resolve(m.start),b=g.sameParent(x)&&g.parent.inlineContent&&y.end()>=m.endA,w;if((Ld&&e.input.lastIOSEnter>Date.now()-225&&(!b||s.some(T=>T.nodeName=="DIV"||T.nodeName=="P"))||!b&&g.pos<u.doc.content.size&&(!g.sameParent(x)||!g.parent.inlineContent)&&!/\S/.test(u.doc.textBetween(g.pos,x.pos,"",""))&&(w=Pe.findFrom(u.doc.resolve(g.pos+1),1,!0))&&w.head>g.pos)&&e.someProp("handleKeyDown",T=>T(e,Gl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&fne(d,m.start,m.endA,g,x)&&e.someProp("handleKeyDown",T=>T(e,Gl(8,"Backspace")))){Wo&&vr&&e.domObserver.suppressSelectionUpdates();return}vr&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),Wo&&!b&&g.start()!=x.start()&&x.parentOffset==0&&g.depth==x.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==m.endA&&(m.endB-=2,x=u.doc.resolveNoCache(m.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(T){return T(e,Gl(13,"Enter"))})},20));let E=m.start,N=m.endA,k=T=>{let j=T||e.state.tr.replace(E,N,u.doc.slice(m.start-u.from,m.endB-u.from));if(u.sel){let S=IR(e,j.doc,u.sel);S&&!(vr&&e.composing&&S.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(S.head==E||S.head==j.mapping.map(N)-1)||Xr&&S.empty&&S.head==E)&&j.setSelection(S)}return i&&j.setMeta("composition",i),j.scrollIntoView()},C;if(b){if(g.pos==x.pos){Xr&&ul<=11&&g.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Go(e),20));let T=k(e.state.tr.delete(E,N)),j=d.resolve(m.start).marksAcross(d.resolve(m.endA));j&&T.ensureMarks(j),e.dispatch(T)}else if(m.endA==m.endB&&(C=hne(g.parent.content.cut(g.parentOffset,x.parentOffset),y.parent.content.cut(y.parentOffset,m.endA-y.start())))){let T=k(e.state.tr);C.type=="add"?T.addMark(E,N,C.mark):T.removeMark(E,N,C.mark),e.dispatch(T)}else if(g.parent.child(g.index()).isText&&g.index()==x.index()-(x.textOffset?0:1)){let T=g.parent.textBetween(g.parentOffset,x.parentOffset),j=()=>k(e.state.tr.insertText(T,E,N));e.someProp("handleTextInput",S=>S(e,E,N,T,j))||e.dispatch(j())}}else e.dispatch(k())}function IR(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:RC(e,t.resolve(n.anchor),t.resolve(n.head))}function hne(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,s=n,i=r,o,l,c;for(let d=0;d<r.length;d++)s=r[d].removeFromSet(s);for(let d=0;d<n.length;d++)i=n[d].removeFromSet(i);if(s.length==1&&i.length==0)l=s[0],o="add",c=d=>d.mark(l.addToSet(d.marks));else if(s.length==0&&i.length==1)l=i[0],o="remove",c=d=>d.mark(l.removeFromSet(d.marks));else return null;let u=[];for(let d=0;d<t.childCount;d++)u.push(c(t.child(d)));if(Y.from(u).eq(e))return{mark:l,type:o}}
vendor: 5,187 bytes, line 545
545function fne(e,t,n,r,s){if(n-t<=s.pos-r.pos||G1(r,!0,!1)<s.pos)return!1;let i=e.resolve(t);if(!r.parent.isTextblock){let l=i.nodeAfter;return l!=null&&n==t+l.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let o=e.resolve(G1(i,!0,!0));return!o.parent.isTextblock||o.pos>n||G1(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function G1(e,t,n){let r=e.depth,s=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,s++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,s++}return s}function pne(e,t,n,r,s){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:o,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if(s=="end"){let c=Math.max(0,i-Math.min(o,l));r-=o+c-i}if(o<i&&e.size<t.size){let c=r<=i&&r>=o?i-r:0;i-=c,i&&i<t.size&&MR(t.textBetween(i-1,i+1))&&(i+=c?1:-1),l=i+(l-o),o=i}else if(l<i){let c=r<=i&&r>=l?i-r:0;i-=c,i&&i<e.size&&MR(e.textBetween(i-1,i+1))&&(i+=c?1:-1),o=i+(o-l),l=i}return{start:i,endA:o,endB:l}}function MR(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class Z3{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Ite,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(FR),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=DR(this),PR(this),this.nodeViews=$R(this),this.docView=mR(this.state.doc,LR(this),H1(this),this.dom,this),this.domObserver=new sne(this,(r,s,i,o)=>dne(this,r,s,i,o)),this.domObserver.start(),Mte(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&gE(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(FR),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let s=this.state,i=!1,o=!1;t.storedMarks&&this.composing&&(G3(this),o=!0),this.state=t;let l=s.plugins!=t.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=$R(this);gne(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&gE(this),this.editable=DR(this),PR(this);let c=H1(this),u=LR(this),d=s.plugins!=t.plugins&&!s.doc.eq(t.doc)?"reset":t.scrollToSelection>s.scrollToSelection?"to selection":"preserve",h=i||!this.docView.matchesNode(t.doc,u,c);(h||!t.selection.eq(s.selection))&&(o=!0);let f=d=="preserve"&&o&&this.dom.style.overflowAnchor==null&&qee(this);if(o){this.domObserver.stop();let p=h&&(Xr||vr)&&!this.composing&&!s.selection.empty&&!t.selection.empty&&mne(s.selection,t.selection);if(h){let m=vr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Kte(this)),(i||!this.docView.update(t.doc,u,c,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=mR(t.doc,u,c,this.dom,this)),m&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&xte(this))?Go(this,p):(M3(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((r=this.dragging)===null||r===void 0)&&r.node&&!s.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,s),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():f&&Yee(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof ke){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&cR(this,n.getBoundingClientRect(),t)}else cR(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,s=-1;if(this.state.doc.nodeAt(r.from)==r.node)s=r.from;
vendor: 15,069 bytes, lines 545-546
545else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(s=i)}this.dragging=new q3(t.slice,t.move,s<0?void 0:ke.create(this.state.doc,s))}someProp(t,n){let r=this._props&&this._props[t],s;if(r!=null&&(s=n?n(r):r))return s;for(let o=0;o<this.directPlugins.length;o++){let l=this.directPlugins[o].props[t];if(l!=null&&(s=n?n(l):l))return s}let i=this.state.plugins;if(i)for(let o=0;o<i.length;o++){let l=i[o].props[t];if(l!=null&&(s=n?n(l):l))return s}}hasFocus(){if(Xr){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Qee(this.dom),Go(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return tte(this,t)}coordsAtPos(t,n=1){return C3(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let s=this.docView.posFromDOM(t,n,r);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(t,n){return ote(this,n||this.state,t)}pasteHTML(t,n){return Op(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Op(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return _C(this,t)}destroy(){this.docView&&(Lte(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],H1(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Dee())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return Dte(this,t)}domSelectionRange(){let t=this.domSelection();return t?Ir&&this.root.nodeType===11&&zee(this.dom.ownerDocument)==this.dom&&one(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Z3.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function LR(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Vn.node(0,e.state.doc.content.size,t)]}function PR(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Vn.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function DR(e){return!e.someProp("editable",t=>t(e.state)===!1)}function mne(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function $R(e){let t=Object.create(null);function n(r){for(let s in r)Object.prototype.hasOwnProperty.call(t,s)||(t[s]=r[s])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function gne(e,t){let n=0,r=0;for(let s in e){if(e[s]!=t[s])return!0;n++}for(let s in t)r++;return n!=r}function FR(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Nl={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},jx={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},yne=typeof navigator<"u"&&/Mac/.test(navigator.platform),xne=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var sr=0;sr<10;sr++)Nl[48+sr]=Nl[96+sr]=String(sr);for(var sr=1;sr<=24;sr++)Nl[sr+111]="F"+sr;for(var sr=65;sr<=90;sr++)Nl[sr]=String.fromCharCode(sr+32),jx[sr]=String.fromCharCode(sr);for(var K1 in Nl)jx.hasOwnProperty(K1)||(jx[K1]=Nl[K1]);function vne(e){var t=yne&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||xne&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?jx:Nl)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const bne=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),wne=typeof navigator<"u"&&/Win/.test(navigator.platform);function Sne(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,s,i,o;for(let l=0;l<t.length-1;l++){let c=t[l];if(/^(cmd|meta|m)$/i.test(c))o=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))bne?o=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),s&&(n="Ctrl-"+n),o&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function Ene(e){let t=Object.create(null);for(let n in e)t[Sne(n)]=e[n];return t}function q1(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function Nne(e){return new qt({props:{handleKeyDown:$C(e)}})}function $C(e){let t=Ene(e);return function(n,r){let s=vne(r),i,o=t[q1(s,r)];if(o&&o(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(r.shiftKey){let l=t[q1(s,r,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(wne&&r.ctrlKey&&r.altKey)&&(i=Nl[r.keyCode])&&i!=s){let l=t[q1(i,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}const kne=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function e5(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const Cne=(e,t,n)=>{let r=e5(e,n);if(!r)return!1;let s=FC(r);if(!s){let o=r.blockRange(),l=o&&sh(o);return l==null?!1:(t&&t(e.tr.lift(o,l).scrollIntoView()),!0)}let i=s.nodeBefore;if(s5(e,s,t,-1))return!0;if(r.parent.content.size==0&&(Pd(i,"end")||ke.isSelectable(i)))for(let o=r.depth;;o--){let l=xv(e.doc,r.before(o),r.after(o),oe.empty);if(l&&l.slice.size<l.to-l.from){if(t){let c=e.tr.step(l);c.setSelection(Pd(i,"end")?Pe.findFrom(c.doc.resolve(c.mapping.map(s.pos,-1)),-1):ke.create(c.doc,s.pos-i.nodeSize)),t(c.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return i.isAtom&&s.depth==r.depth-1?(t&&t(e.tr.delete(s.pos-i.nodeSize,s.pos).scrollIntoView()),!0):!1},Tne=(e,t,n)=>{let r=e5(e,n);if(!r)return!1;let s=FC(r);return s?t5(e,s,t):!1},Ane=(e,t,n)=>{let r=n5(e,n);if(!r)return!1;let s=BC(r);return s?t5(e,s,t):!1};function t5(e,t,n){let r=t.nodeBefore,s=r,i=t.pos-1;for(;!s.isTextblock;i--){if(s.type.spec.isolating)return!1;let d=s.lastChild;if(!d)return!1;s=d}let o=t.nodeAfter,l=o,c=t.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let d=l.firstChild;if(!d)return!1;l=d}let u=xv(e.doc,i,c,oe.empty);if(!u||u.from!=i||u instanceof zn&&u.slice.size>=c-i)return!1;if(n){let d=e.tr.step(u);d.setSelection(Ae.create(d.doc,i)),n(d.scrollIntoView())}return!0}function Pd(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const jne=(e,t,n)=>{let{$head:r,empty:s}=e.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=FC(r)}let o=i&&i.nodeBefore;return!o||!ke.isSelectable(o)?!1:(t&&t(e.tr.setSelection(ke.create(e.doc,i.pos-o.nodeSize)).scrollIntoView()),!0)};function FC(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function n5(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const One=(e,t,n)=>{let r=n5(e,n);if(!r)return!1;let s=BC(r);if(!s)return!1;let i=s.nodeAfter;if(s5(e,s,t,1))return!0;if(r.parent.content.size==0&&(Pd(i,"start")||ke.isSelectable(i))){let o=xv(e.doc,r.before(),r.after(),oe.empty);if(o&&o.slice.size<o.to-o.from){if(t){let l=e.tr.step(o);l.setSelection(Pd(i,"start")?Pe.findFrom(l.doc.resolve(l.mapping.map(s.pos)),1):ke.create(l.doc,l.mapping.map(s.pos))),t(l.scrollIntoView())}return!0}}return i.isAtom&&s.depth==r.depth-1?(t&&t(e.tr.delete(s.pos,s.pos+i.nodeSize).scrollIntoView()),!0):!1},Rne=(e,t,n)=>{let{$head:r,empty:s}=e.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=BC(r)}let o=i&&i.nodeAfter;return!o||!ke.isSelectable(o)?!1:(t&&t(e.tr.setSelection(ke.create(e.doc,i.pos)).scrollIntoView()),!0)};function BC(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const _ne=(e,t)=>{let n=e.selection,r=n instanceof ke,s;if(r){if(n.node.isTextblock||!$l(e.doc,n.from))return!1;s=n.from}else if(s=yv(e.doc,n.from,-1),s==null)return!1;if(t){let i=e.tr.join(s);r&&i.setSelection(ke.create(i.doc,s-e.doc.resolve(s).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},Ine=(e,t)=>{let n=e.selection,r;if(n instanceof ke){if(n.node.isTextblock||!$l(e.doc,n.to))return!1;r=n.to}else if(r=yv(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},Mne=(e,t)=>{let{$from:n,$to:r}=e.selection,s=n.blockRange(r),i=s&&sh(s);return i==null?!1:(t&&t(e.tr.lift(s,i).scrollIntoView()),!0)},Lne=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
546`).scrollIntoView()),!0)};function r5(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Pne=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let s=n.node(-1),i=n.indexAfter(-1),o=r5(s.contentMatchAt(i));if(!o||!s.canReplaceWith(i,i,o))return!1;if(t){let l=n.after(),c=e.tr.replaceWith(l,l,o.createAndFill());c.setSelection(Pe.near(c.doc.resolve(l),1)),t(c.scrollIntoView())}return!0},Dne=(e,t)=>{let n=e.selection,{$from:r,$to:s}=n;if(n instanceof Gs||r.parent.inlineContent||s.parent.inlineContent)return!1;let i=r5(s.parent.contentMatchAt(s.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let o=(!r.parentOffset&&s.index()<s.parent.childCount?r:s).pos,l=e.tr.insert(o,i.createAndFill());l.setSelection(Ae.create(l.doc,o+1)),t(l.scrollIntoView())}return!0},$ne=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Zu(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),s=r&&sh(r);return s==null?!1:(t&&t(e.tr.lift(r,s).scrollIntoView()),!0)},Fne=(e,t)=>{let{$from:n,to:r}=e.selection,s,i=n.sharedDepth(r);return i==0?!1:(s=n.before(i),t&&t(e.tr.setSelection(ke.create(e.doc,s))),!0)};function Bne(e,t,n){let r=t.nodeBefore,s=t.nodeAfter,i=t.index();return!r||!s||!r.type.compatibleContent(s.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(s.isTextblock||$l(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function s5(e,t,n,r){let s=t.nodeBefore,i=t.nodeAfter,o,l,c=s.type.spec.isolating||i.type.spec.isolating;if(!c&&Bne(e,t,n))return!0;let u=!c&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(o=(l=s.contentMatchAt(s.childCount)).findWrapping(i.type))&&l.matchType(o[0]||i.type).validEnd){if(n){let p=t.pos+i.nodeSize,m=Y.empty;for(let y=o.length-1;y>=0;y--)m=Y.from(o[y].create(null,m));m=Y.from(s.copy(m));let g=e.tr.step(new Hn(t.pos-1,p,t.pos,p,new oe(m,1,0),o.length,!0)),x=g.doc.resolve(p+2*o.length);x.nodeAfter&&x.nodeAfter.type==s.type&&$l(g.doc,x.pos)&&g.join(x.pos),n(g.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&c?null:Pe.findFrom(t,1),h=d&&d.$from.blockRange(d.$to),f=h&&sh(h);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(h,f).scrollIntoView()),!0;if(u&&Pd(i,"start",!0)&&Pd(s,"end")){let p=s,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let g=i,x=1;for(;!g.isTextblock;g=g.firstChild)x++;if(p.canReplace(p.childCount,p.childCount,g.content)){if(n){let y=Y.empty;for(let w=m.length-1;w>=0;w--)y=Y.from(m[w].copy(y));let b=e.tr.step(new Hn(t.pos-m.length,t.pos+i.nodeSize,t.pos+x,t.pos+i.nodeSize-x,new oe(y,m.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function i5(e){return function(t,n){let r=t.selection,s=e<0?r.$from:r.$to,i=s.depth;for(;s.node(i).isInline;){if(!i)return!1;i--}return s.node(i).isTextblock?(n&&n(t.tr.setSelection(Ae.create(t.doc,e<0?s.start(i):s.end(i)))),!0):!1}}const Une=i5(-1),zne=i5(1);function Vne(e,t=null){return function(n,r){let{$from:s,$to:i}=n.selection,o=s.blockRange(i),l=o&&CC(o,e,t);return l?(r&&r(n.tr.wrap(o,l).scrollIntoView()),!0):!1}}function BR(e,t=null){return function(n,r){let s=!1;for(let i=0;i<n.selection.ranges.length&&!s;i++){let{$from:{pos:o},$to:{pos:l}}=n.selection.ranges[i];n.doc.nodesBetween(o,l,(c,u)=>{if(s)return!1;if(!(!c.isTextblock||c.hasMarkup(e,t)))if(c.type==e)s=!0;else{let d=n.doc.resolve(u),h=d.index();s=d.parent.canReplaceWith(h,h+1,e)}})}if(!s)return!1;if(r){let i=n.tr;for(let o=0;o<n.selection.ranges.length;o++){let{$from:{pos:l},$to:{pos:c}}=n.selection.ranges[o];i.setBlockType(l,c,e,t)}r(i.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function Wne(e,t=null){return function(n,r){let{$from:s,$to:i}=n.selection,o=s.blockRange(i);if(!o)return!1;let l=r?n.tr:null;return Hne(l,o,e,t)?(r&&r(l.scrollIntoView()),!0):!1}}function Hne(e,t,n,r=null){let s=!1,i=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let c=o.resolve(t.start-2);i=new Sx(c,c,t.depth),t.endIndex<t.parent.childCount&&(t=new Sx(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),s=!0}let l=CC(i,n,r,t);return l?(e&&Gne(e,t,l,s,n),!0):!1}
vendor: 67,555 bytes, lines 546-621
546function Gne(e,t,n,r,s){let i=Y.empty;for(let d=n.length-1;d>=0;d--)i=Y.from(n[d].type.create(n[d].attrs,i));e.step(new Hn(t.start-(r?2:0),t.end,t.start,t.end,new oe(i,0,0),n.length,!0));let o=0;for(let d=0;d<n.length;d++)n[d].type==s&&(o=d+1);let l=n.length-o,c=t.start+n.length-(r?2:0),u=t.parent;for(let d=t.startIndex,h=t.endIndex,f=!0;d<h;d++,f=!1)!f&&Zu(e.doc,c,l)&&(e.split(c,l),c+=2*l),c+=u.child(d).nodeSize;return e}function Kne(e){return function(t,n){let{$from:r,$to:s}=t.selection,i=r.blockRange(s,o=>o.childCount>0&&o.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?qne(t,n,e,i):Yne(t,n,i):!0:!1}}function qne(e,t,n,r){let s=e.tr,i=r.end,o=r.$to.end(r.depth);i<o&&(s.step(new Hn(i-1,o,i,o,new oe(Y.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Sx(s.doc.resolve(r.$from.pos),s.doc.resolve(o),r.depth));const l=sh(r);if(l==null)return!1;s.lift(r,l);let c=s.doc.resolve(s.mapping.map(i,-1)-1);return $l(s.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&s.join(c.pos),t(s.scrollIntoView()),!0}function Yne(e,t,n){let r=e.tr,s=n.parent;for(let p=n.end,m=n.endIndex-1,g=n.startIndex;m>g;m--)p-=s.child(m).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),o=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,c=n.endIndex==s.childCount,u=i.node(-1),d=i.index(-1);if(!u.canReplace(d+(l?0:1),d+1,o.content.append(c?Y.empty:Y.from(s))))return!1;let h=i.pos,f=h+o.nodeSize;return r.step(new Hn(h-(l?1:0),f+(c?1:0),h+1,f-1,new oe((l?Y.empty:Y.from(s.copy(Y.empty))).append(c?Y.empty:Y.from(s.copy(Y.empty))),l?0:1,c?0:1),l?0:1)),t(r.scrollIntoView()),!0}function Qne(e){return function(t,n){let{$from:r,$to:s}=t.selection,i=r.blockRange(s,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let o=i.startIndex;if(o==0)return!1;let l=i.parent,c=l.child(o-1);if(c.type!=e)return!1;if(n){let u=c.lastChild&&c.lastChild.type==l.type,d=Y.from(u?e.create():null),h=new oe(Y.from(e.create(null,Y.from(l.type.create(null,d)))),u?3:1,0),f=i.start,p=i.end;n(t.tr.step(new Hn(f-(u?3:1),p,f,p,h,1,!0)).scrollIntoView())}return!0}}var Jne=Object.defineProperty,o5=(e,t)=>{for(var n in t)Jne(e,n,{get:t[n],enumerable:!0})};function Ev(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:s}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return s},get tr(){return r=n.selection,s=n.doc,i=n.storedMarks,n}}}var Nv=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:s}=n,i=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([o,l])=>[o,(...u)=>{const d=l(...u)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,o=[],l=!!e,c=e||s.tr,u=()=>(!l&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(c),o.every(h=>h===!0)),d={...Object.fromEntries(Object.entries(n).map(([h,f])=>[h,(...m)=>{const g=this.buildProps(c,t),x=f(...m)(g);return o.push(x),d}])),run:u};return d}createCan(e){const{rawCommands:t,state:n}=this,r=!1,s=e||n.tr,i=this.buildProps(s,r);return{...Object.fromEntries(Object.entries(t).map(([l,c])=>[l,(...u)=>c(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,o={tr:e,editor:r,view:i,state:Ev({state:s,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)(o)]))}};return o}},Xne=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){const n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}};function a5(e,t){const n=new TC(e);return t.forEach(r=>{r.steps.forEach(s=>{n.step(s)})}),n}var l5=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&l5(r)}return e};function pg(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return l5(n)}function _p(e,t,n){if(e instanceof ll||e instanceof Y)return e;n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,s=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return Y.fromArray(e.map(l=>t.nodeFromJSON(l)));const o=t.nodeFromJSON(e);return n.errorOnInvalidContent&&o.check(),o}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",i),_p("",t,n)}if(s){if(n.errorOnInvalidContent){let o=!1,l="";const c=new t3({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,l=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?cl.fromSchema(c).parseSlice(pg(e),n.parseOptions):cl.fromSchema(c).parse(pg(e),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const i=cl.fromSchema(t);return n.slice?i.parseSlice(pg(e),n.parseOptions).content:i.parse(pg(e),n.parseOptions)}return _p("",t,n)}function yE(e,t,n={},r={}){return _p(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}function Zne(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function ere(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,(s,i)=>{n(s)&&r.push({node:s,pos:i})}),r}function c5(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function kv(e){return t=>c5(t.$from,e)}function we(e,t,n){return e.config[t]===void 0&&e.parent?we(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?we(e.parent,t,n):null}):e.config[t]}function UC(e){return e.map(t=>{const n={name:t.name,options:t.options,storage:t.storage},r=we(t,"addExtensions",n);return r?[t,...UC(r())]:t}).flat(10)}function zC(e,t){const n=Jc.fromSchema(t).serializeFragment(e),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(n),s.innerHTML}function u5(e){return typeof e=="function"}function bt(e,t=void 0,...n){return u5(e)?t?e.bind(t)(...n):e(...n):e}function tre(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Ip(e){const t=e.filter(s=>s.type==="extension"),n=e.filter(s=>s.type==="node"),r=e.filter(s=>s.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function d5(e){const t=[],{nodeExtensions:n,markExtensions:r}=Ip(e),s=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(o=>{const l={name:o.name,options:o.options,storage:o.storage,extensions:s},c=we(o,"addGlobalAttributes",l);if(!c)return;c().forEach(d=>{d.types.forEach(h=>{Object.entries(d.attributes).forEach(([f,p])=>{t.push({type:h,name:f,attribute:{...i,...p}})})})})}),s.forEach(o=>{const l={name:o.name,options:o.options,storage:o.storage},c=we(o,"addAttributes",l);if(!c)return;const u=c();Object.entries(u).forEach(([d,h])=>{const f={...i,...h};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,t.push({type:o.name,name:d,attribute:f})})}),t}function Wt(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([s,i])=>{if(!r[s]){r[s]=i;return}if(s==="class"){const l=i?String(i).split(" "):[],c=r[s]?r[s].split(" "):[],u=l.filter(d=>!c.includes(d));r[s]=[...c,...u].join(" ")}else if(s==="style"){const l=i?i.split(";").map(d=>d.trim()).filter(Boolean):[],c=r[s]?r[s].split(";").map(d=>d.trim()).filter(Boolean):[],u=new Map;c.forEach(d=>{const[h,f]=d.split(":").map(p=>p.trim());u.set(h,f)}),l.forEach(d=>{const[h,f]=d.split(":").map(p=>p.trim());u.set(h,f)}),r[s]=Array.from(u.entries()).map(([d,h])=>`${d}: ${h}`).join("; ")}else r[s]=i}),r},{})}function Ox(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>Wt(n,r),{})}function nre(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function UR(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const s=t.reduce((i,o)=>{const l=o.attribute.parseHTML?o.attribute.parseHTML(n):nre(n.getAttribute(o.name));return l==null?i:{...i,[o.name]:l}},{});return{...r,...s}}}}function zR(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&tre(n)?!1:n!=null))}function rre(e,t){var n;const r=d5(e),{nodeExtensions:s,markExtensions:i}=Ip(e),o=(n=s.find(u=>we(u,"topNode")))==null?void 0:n.name,l=Object.fromEntries(s.map(u=>{const d=r.filter(y=>y.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((y,b)=>{const w=we(b,"extendNodeSchema",h);return{...y,...w?w(u):{}}},{}),p=zR({...f,content:bt(we(u,"content",h)),marks:bt(we(u,"marks",h)),group:bt(we(u,"group",h)),inline:bt(we(u,"inline",h)),atom:bt(we(u,"atom",h)),selectable:bt(we(u,"selectable",h)),draggable:bt(we(u,"draggable",h)),code:bt(we(u,"code",h)),whitespace:bt(we(u,"whitespace",h)),linebreakReplacement:bt(we(u,"linebreakReplacement",h)),defining:bt(we(u,"defining",h)),isolating:bt(we(u,"isolating",h)),attrs:Object.fromEntries(d.map(y=>{var b,w;return[y.name,{default:(b=y==null?void 0:y.attribute)==null?void 0:b.default,validate:(w=y==null?void 0:y.attribute)==null?void 0:w.validate}]}))}),m=bt(we(u,"parseHTML",h));m&&(p.parseDOM=m.map(y=>UR(y,d)));const g=we(u,"renderHTML",h);g&&(p.toDOM=y=>g({node:y,HTMLAttributes:Ox(y,d)}));const x=we(u,"renderText",h);return x&&(p.toText=x),[u.name,p]})),c=Object.fromEntries(i.map(u=>{const d=r.filter(x=>x.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((x,y)=>{const b=we(y,"extendMarkSchema",h);return{...x,...b?b(u):{}}},{}),p=zR({...f,inclusive:bt(we(u,"inclusive",h)),excludes:bt(we(u,"excludes",h)),group:bt(we(u,"group",h)),spanning:bt(we(u,"spanning",h)),code:bt(we(u,"code",h)),attrs:Object.fromEntries(d.map(x=>{var y,b;return[x.name,{default:(y=x==null?void 0:x.attribute)==null?void 0:y.default,validate:(b=x==null?void 0:x.attribute)==null?void 0:b.validate}]}))}),m=bt(we(u,"parseHTML",h));m&&(p.parseDOM=m.map(x=>UR(x,d)));const g=we(u,"renderHTML",h);return g&&(p.toDOM=x=>g({mark:x,HTMLAttributes:Ox(x,d)})),[u.name,p]}));return new t3({topNode:o,nodes:l,marks:c})}function sre(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function VC(e){return e.sort((n,r)=>{const s=we(n,"priority")||100,i=we(r,"priority")||100;return s>i?-1:s<i?1:0})}function h5(e){const t=VC(UC(e)),n=sre(t.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),t}function f5(e,t,n){const{from:r,to:s}=t,{blockSeparator:i=`
547
548`,textSerializers:o={}}=n||{};let l="";return e.nodesBetween(r,s,(c,u,d,h)=>{var f;c.isBlock&&u>r&&(l+=i);const p=o==null?void 0:o[c.type.name];if(p)return d&&(l+=p({node:c,pos:u,parent:d,index:h,range:t})),!1;c.isText&&(l+=(f=c==null?void 0:c.text)==null?void 0:f.slice(Math.max(r,u)-u,s-u))}),l}function ire(e,t){const n={from:0,to:e.content.size};return f5(e,n,t)}function p5(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function la(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function m5(e,t){const n=la(t,e.schema),{from:r,to:s,empty:i}=e.selection,o=[];i?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,s,c=>{o.push(...c.marks)});const l=o.find(c=>c.type.name===n.name);return l?{...l.attrs}:{}}function jn(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function ore(e,t){const n=jn(t,e.schema),{from:r,to:s}=e.selection,i=[];e.doc.nodesBetween(r,s,l=>{i.push(l)});const o=i.reverse().find(l=>l.type.name===n.name);return o?{...o.attrs}:{}}function Cv(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function g5(e,t){const n=Cv(typeof t=="string"?t:t.name,e.schema);return n==="node"?ore(e,t):n==="mark"?m5(e,t):{}}function are(e,t=JSON.stringify){const n={};return e.filter(r=>{const s=t(r);return Object.prototype.hasOwnProperty.call(n,s)?!1:n[s]=!0})}function lre(e){const t=are(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,o)=>o!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function y5(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((s,i)=>{const o=[];if(s.ranges.length)s.forEach((l,c)=>{o.push({from:l,to:c})});else{const{from:l,to:c}=n[i];if(l===void 0||c===void 0)return;o.push({from:l,to:c})}o.forEach(({from:l,to:c})=>{const u=t.slice(i).map(l,-1),d=t.slice(i).map(c),h=t.invert().map(u,-1),f=t.invert().map(d);r.push({oldRange:{from:h,to:f},newRange:{from:u,to:d}})})}),lre(r)}function WC(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Rx(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(s=>n.strict?t[s]===e[s]:WC(t[s])?t[s].test(e[s]):t[s]===e[s]):!0}function x5(e,t,n={}){return e.find(r=>r.type===t&&Rx(Object.fromEntries(Object.keys(n).map(s=>[s,r.attrs[s]])),n))}function VR(e,t,n={}){return!!x5(e,t,n)}function HC(e,t,n){var r;if(!e||!t)return;let s=e.parent.childAfter(e.parentOffset);if((!s.node||!s.node.marks.some(d=>d.type===t))&&(s=e.parent.childBefore(e.parentOffset)),!s.node||!s.node.marks.some(d=>d.type===t)||(n=n||((r=s.node.marks[0])==null?void 0:r.attrs),!x5([...s.node.marks],t,n)))return;let o=s.index,l=e.start()+s.offset,c=o+1,u=l+s.node.nodeSize;for(;o>0&&VR([...e.parent.child(o-1).marks],t,n);)o-=1,l-=e.parent.child(o).nodeSize;for(;c<e.parent.childCount&&VR([...e.parent.child(c).marks],t,n);)u+=e.parent.child(c).nodeSize,c+=1;return{from:l,to:u}}function GC(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(s=>{const i=n.resolve(e),o=HC(i,s.type);o&&r.push({mark:s,...o})}):n.nodesBetween(e,t,(s,i)=>{!s||(s==null?void 0:s.nodeSize)===void 0||r.push(...s.marks.map(o=>({from:i,to:i+s.nodeSize,mark:o})))}),r}var cre=(e,t,n,r=20)=>{const s=e.doc.resolve(n);let i=r,o=null;for(;i>0&&o===null;){const l=s.node(i);(l==null?void 0:l.type.name)===t?o=l:i-=1}return[o,i]};function Y1(e,t){return t.nodes[e]||t.marks[e]||null}function cy(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const s=e.find(i=>i.type===t&&i.name===r);return s?s.attribute.keepOnSplit:!1}))}var ure=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(s,i,o,l)=>{var c,u;const d=((u=(c=s.type.spec).toText)==null?void 0:u.call(c,{node:s,pos:i,parent:o,index:l}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?d:d.slice(0,Math.max(0,r-i))}),n};function xE(e,t,n={}){const{empty:r,ranges:s}=e.selection,i=t?la(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(h=>i?i.name===h.type.name:!0).find(h=>Rx(h.attrs,n,{strict:!1}));let o=0;const l=[];if(s.forEach(({$from:h,$to:f})=>{const p=h.pos,m=f.pos;e.doc.nodesBetween(p,m,(g,x)=>{if(!g.isText&&!g.marks.length)return;const y=Math.max(p,x),b=Math.min(m,x+g.nodeSize),w=b-y;o+=w,l.push(...g.marks.map(E=>({mark:E,from:y,to:b})))})}),o===0)return!1;const c=l.filter(h=>i?i.name===h.mark.type.name:!0).filter(h=>Rx(h.mark.attrs,n,{strict:!1})).reduce((h,f)=>h+f.to-f.from,0),u=l.filter(h=>i?h.mark.type!==i&&h.mark.type.excludes(i):!0).reduce((h,f)=>h+f.to-f.from,0);return(c>0?c+u:c)>=o}function kl(e,t,n={}){const{from:r,to:s,empty:i}=e.selection,o=t?jn(t,e.schema):null,l=[];e.doc.nodesBetween(r,s,(h,f)=>{if(h.isText)return;const p=Math.max(r,f),m=Math.min(s,f+h.nodeSize);l.push({node:h,from:p,to:m})});const c=s-r,u=l.filter(h=>o?o.name===h.node.type.name:!0).filter(h=>Rx(h.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((h,f)=>h+f.to-f.from,0)>=c}function dre(e,t,n={}){if(!t)return kl(e,null,n)||xE(e,null,n);const r=Cv(t,e.schema);return r==="node"?kl(e,t,n):r==="mark"?xE(e,t,n):!1}var hre=(e,t)=>{const{$from:n,$to:r,$anchor:s}=e.selection;if(t){const i=kv(l=>l.type.name===t)(e.selection);if(!i)return!1;const o=e.doc.resolve(i.pos+1);return s.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},fre=e=>{const{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function WR(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function HR(e,t){const{nodeExtensions:n}=Ip(t),r=n.find(o=>o.name===e);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},i=bt(we(r,"group",s));return typeof i!="string"?!1:i.split(" ").includes("list")}function Tv(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let s=!0;return e.content.forEach(i=>{s!==!1&&(Tv(i,{ignoreWhitespace:n,checkChildren:t})||(s=!1))}),s}return!1}function v5(e){return e instanceof ke}function b5(e){return e instanceof Ae}function Zl(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function w5(e,t=null){if(!t)return null;const n=Pe.atStart(e),r=Pe.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const s=n.from,i=r.to;return t==="all"?Ae.create(e,Zl(0,s,i),Zl(e.content.size,s,i)):Ae.create(e,Zl(t,s,i),Zl(t,s,i))}function pre(e,t,n){const r=e.steps.length-1;if(r<t)return;const s=e.steps[r];if(!(s instanceof zn||s instanceof Hn))return;const i=e.mapping.maps[r];let o=0;i.forEach((l,c,u,d)=>{o===0&&(o=d)}),e.setSelection(Pe.near(e.doc.resolve(o),n))}var Av=class{constructor(e){this.find=e.find,this.handler=e.handler}},mre=(e,t)=>{if(WC(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function mg(e){var t;const{editor:n,from:r,to:s,text:i,rules:o,plugin:l}=e,{view:c}=n;if(c.composing)return!1;const u=c.state.doc.resolve(r);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let d=!1;const h=ure(u)+i;return o.forEach(f=>{if(d)return;const p=mre(h,f.find);if(!p)return;const m=c.state.tr,g=Ev({state:c.state,transaction:m}),x={from:r-(p[0].length-i.length),to:s},{commands:y,chain:b,can:w}=new Nv({editor:n,state:g});f.handler({state:g,range:x,match:p,commands:y,chain:b,can:w})===null||!m.steps.length||(m.setMeta(l,{transform:m,from:r,to:s,text:i}),c.dispatch(m),d=!0)}),d}function gre(e){const{editor:t,rules:n}=e,r=new qt({state:{init(){return null},apply(s,i,o){const l=s.getMeta(r);if(l)return l;const c=s.getMeta("applyInputRules");return!!c&&setTimeout(()=>{let{text:d}=c;typeof d=="string"?d=d:d=zC(Y.from(d),o.schema);const{from:h}=c,f=h+d.length;mg({editor:t,from:h,to:f,text:d,rules:n,plugin:r})}),s.selectionSet||s.docChanged?null:i}},props:{handleTextInput(s,i,o,l){return mg({editor:t,from:i,to:o,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:i}=s.state.selection;i&&mg({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(s,i){if(i.key!=="Enter")return!1;const{$cursor:o}=s.state.selection;return o?mg({editor:t,from:o.pos,to:o.pos,text:`
549`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function yre(e){return Object.prototype.toString.call(e).slice(8,-1)}function gg(e){return yre(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function S5(e,t){const n={...e};return gg(e)&&gg(t)&&Object.keys(t).forEach(r=>{gg(t[r])&&gg(e[r])?n[r]=S5(e[r],t[r]):n[r]=t[r]}),n}var KC=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...bt(we(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...bt(we(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){const t=this.extend({...this.config,addOptions:()=>S5(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Xc=class E5 extends KC{constructor(){super(...arguments),this.type="mark"}static create(t={}){const n=typeof t=="function"?t():t;return new E5(n)}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,s=t.state.selection.$from;if(s.pos===s.end()){const o=s.marks();if(!!!o.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const c=o.find(u=>(u==null?void 0:u.type.name)===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",s.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}};function xre(e){return typeof e=="number"}var vre=class{constructor(e){this.find=e.find,this.handler=e.handler}},bre=(e,t,n)=>{if(WC(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(s=>{const i=[s.text];return i.index=s.index,i.input=e,i.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(s.replaceWith)),i}):[]};function wre(e){const{editor:t,state:n,from:r,to:s,rule:i,pasteEvent:o,dropEvent:l}=e,{commands:c,chain:u,can:d}=new Nv({editor:t,state:n}),h=[];return n.doc.nodesBetween(r,s,(p,m)=>{if(!p.isTextblock||p.type.spec.code)return;const g=Math.max(r,m),x=Math.min(s,m+p.content.size),y=p.textBetween(g-m,x-m,void 0,"");bre(y,i.find,o).forEach(w=>{if(w.index===void 0)return;const E=g+w.index+1,N=E+w[0].length,k={from:n.tr.mapping.map(E),to:n.tr.mapping.map(N)},C=i.handler({state:n,range:k,match:w,commands:c,chain:u,can:d,pasteEvent:o,dropEvent:l});h.push(C)})}),h.every(p=>p!==null)}var yg=null,Sre=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function Ere(e){const{editor:t,rules:n}=e;let r=null,s=!1,i=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const c=({state:d,from:h,to:f,rule:p,pasteEvt:m})=>{const g=d.tr,x=Ev({state:d,transaction:g});if(!(!wre({editor:t,state:x,from:Math.max(h-1,0),to:f.b-1,rule:p,pasteEvent:m,dropEvent:l})||!g.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g}};return n.map(d=>new qt({view(h){const f=m=>{var g;r=(g=h.dom.parentElement)!=null&&g.contains(m.target)?h.dom.parentElement:null,r&&(yg=t)},p=()=>{yg&&(yg=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(h,f)=>{if(i=r===h.dom.parentElement,l=f,!i){const p=yg;p!=null&&p.isEditable&&setTimeout(()=>{const m=p.state.selection;m&&p.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(h,f)=>{var p;const m=(p=f.clipboardData)==null?void 0:p.getData("text/html");return o=f,s=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(h,f,p)=>{const m=h[0],g=m.getMeta("uiEvent")==="paste"&&!s,x=m.getMeta("uiEvent")==="drop"&&!i,y=m.getMeta("applyPasteRules"),b=!!y;if(!g&&!x&&!b)return;if(b){let{text:N}=y;typeof N=="string"?N=N:N=zC(Y.from(N),p.schema);const{from:k}=y,C=k+N.length,T=Sre(N);return c({rule:d,state:p,from:k,to:{b:C},pasteEvt:T})}const w=f.doc.content.findDiffStart(p.doc.content),E=f.doc.content.findDiffEnd(p.doc.content);if(!(!xre(w)||!E||w===E.b))return c({rule:d,state:p,from:w,to:E,pasteEvt:o})}}))}var jv=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=h5(e),this.schema=rre(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{const n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Y1(t.name,this.schema)},r=we(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){const{editor:e}=this,t=VC([...this.extensions].reverse()),n=[],r=[],s=t.map(i=>{const o={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:Y1(i.name,this.schema)},l=[],c=we(i,"addKeyboardShortcuts",o);let u={};if(i.type==="mark"&&we(i,"exitable",o)&&(u.ArrowRight=()=>Xc.handleExit({editor:e,mark:i})),c){const m=Object.fromEntries(Object.entries(c()).map(([g,x])=>[g,()=>x({editor:e})]));u={...u,...m}}const d=Nne(u);l.push(d);const h=we(i,"addInputRules",o);WR(i,e.options.enableInputRules)&&h&&n.push(...h());const f=we(i,"addPasteRules",o);WR(i,e.options.enablePasteRules)&&f&&r.push(...f());const p=we(i,"addProseMirrorPlugins",o);if(p){const m=p();l.push(...m)}return l}).flat();return[gre({editor:e,rules:n}),...Ere({editor:e,rules:r}),...s]}get attributes(){return d5(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Ip(this.extensions);return Object.fromEntries(t.filter(n=>!!we(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:jn(n.name,this.schema)},i=we(n,"addNodeView",s);if(!i)return[];const o=(l,c,u,d,h)=>{const f=Ox(l,r);return i()({node:l,view:c,getPos:u,decorations:d,innerDecorations:h,editor:e,extension:n,HTMLAttributes:f})};return[n.name,o]}))}get markViews(){const{editor:e}=this,{markExtensions:t}=Ip(this.extensions);return Object.fromEntries(t.filter(n=>!!we(n,"addMarkView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:la(n.name,this.schema)},i=we(n,"addMarkView",s);if(!i)return[];const o=(l,c,u)=>{const d=Ox(l,r);return i()({mark:l,view:c,inline:u,editor:e,extension:n,HTMLAttributes:d,updateAttributes:h=>{$se(l,e,h)}})};return[n.name,o]}))}setupExtensions(){const e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;const r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Y1(t.name,this.schema)};t.type==="mark"&&((n=bt(we(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);const s=we(t,"onBeforeCreate",r),i=we(t,"onCreate",r),o=we(t,"onUpdate",r),l=we(t,"onSelectionUpdate",r),c=we(t,"onTransaction",r),u=we(t,"onFocus",r),d=we(t,"onBlur",r),h=we(t,"onDestroy",r);s&&this.editor.on("beforeCreate",s),i&&this.editor.on("create",i),o&&this.editor.on("update",o),l&&this.editor.on("selectionUpdate",l),c&&this.editor.on("transaction",c),u&&this.editor.on("focus",u),d&&this.editor.on("blur",d),h&&this.editor.on("destroy",h)})}};jv.resolve=h5;jv.sort=VC;jv.flatten=UC;var Nre={};o5(Nre,{ClipboardTextSerializer:()=>k5,Commands:()=>A5,Delete:()=>j5,Drop:()=>O5,Editable:()=>R5,FocusEvents:()=>I5,Keymap:()=>M5,Paste:()=>L5,Tabindex:()=>P5,focusEventsPluginKey:()=>_5});var mn=class N5 extends KC{constructor(){super(...arguments),this.type="extension"}static create(t={}){const n=typeof t=="function"?t():t;return new N5(n)}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}},k5=mn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new qt({key:new wn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:s}=t,{ranges:i}=s,o=Math.min(...i.map(d=>d.$from.pos)),l=Math.max(...i.map(d=>d.$to.pos)),c=p5(n);return f5(r,{from:o,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:c})}}})]}}),C5={};o5(C5,{blur:()=>kre,clearContent:()=>Cre,clearNodes:()=>Tre,command:()=>Are,createParagraphNear:()=>jre,cut:()=>Ore,deleteCurrentNode:()=>Rre,deleteNode:()=>_re,deleteRange:()=>Ire,deleteSelection:()=>Mre,enter:()=>Lre,exitCode:()=>Pre,extendMarkRange:()=>Dre,first:()=>$re,focus:()=>Bre,forEach:()=>Ure,insertContent:()=>zre,insertContentAt:()=>Wre,joinBackward:()=>Kre,joinDown:()=>Gre,joinForward:()=>qre,joinItemBackward:()=>Yre,joinItemForward:()=>Qre,joinTextblockBackward:()=>Jre,joinTextblockForward:()=>Xre,joinUp:()=>Hre,keyboardShortcut:()=>ese,lift:()=>tse,liftEmptyBlock:()=>nse,liftListItem:()=>rse,newlineInCode:()=>sse,resetAttributes:()=>ise,scrollIntoView:()=>ose,selectAll:()=>ase,selectNodeBackward:()=>lse,selectNodeForward:()=>cse,selectParentNode:()=>use,selectTextblockEnd:()=>dse,selectTextblockStart:()=>hse,setContent:()=>fse,setMark:()=>mse,setMeta:()=>gse,setNode:()=>yse,setNodeSelection:()=>xse,setTextSelection:()=>vse,sinkListItem:()=>bse,splitBlock:()=>wse,splitListItem:()=>Sse,toggleList:()=>Ese,toggleMark:()=>Nse,toggleNode:()=>kse,toggleWrap:()=>Cse,undoInputRule:()=>Tse,unsetAllMarks:()=>Ase,unsetMark:()=>jse,updateAttributes:()=>Ose,wrapIn:()=>Rse,wrapInList:()=>_se});var kre=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),Cre=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),Tre=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:s}=r;return n&&s.forEach(({$from:i,$to:o})=>{e.doc.nodesBetween(i.pos,o.pos,(l,c)=>{if(l.type.isText)return;const{doc:u,mapping:d}=t,h=u.resolve(d.map(c)),f=u.resolve(d.map(c+l.nodeSize)),p=h.blockRange(f);if(!p)return;const m=sh(p);if(l.type.isTextblock){const{defaultType:g}=h.parent.contentMatchAt(h.index());t.setNodeMarkup(p.start,g)}(m||m===0)&&t.lift(p,m)})}),!0},Are=e=>t=>e(t),jre=()=>({state:e,dispatch:t})=>Dne(e,t),Ore=(e,t)=>({editor:n,tr:r})=>{const{state:s}=n,i=s.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const o=r.mapping.map(t);return r.insert(o,i.content),r.setSelection(new Ae(r.doc.resolve(Math.max(o-1,0)))),!0},Rre=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const s=e.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===r.type){if(t){const l=s.before(i),c=s.after(i);e.delete(l,c).scrollIntoView()}return!0}return!1},_re=e=>({tr:t,state:n,dispatch:r})=>{const s=jn(e,n.schema),i=t.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===s){if(r){const c=i.before(o),u=i.after(o);t.delete(c,u).scrollIntoView()}return!0}return!1},Ire=e=>({tr:t,dispatch:n})=>{const{from:r,to:s}=e;return n&&t.delete(r,s),!0},Mre=()=>({state:e,dispatch:t})=>kne(e,t),Lre=()=>({commands:e})=>e.keyboardShortcut("Enter"),Pre=()=>({state:e,dispatch:t})=>Pne(e,t),Dre=(e,t={})=>({tr:n,state:r,dispatch:s})=>{const i=la(e,r.schema),{doc:o,selection:l}=n,{$from:c,from:u,to:d}=l;if(s){const h=HC(c,i,t);if(h&&h.from<=u&&h.to>=d){const f=Ae.create(o,h.from,h.to);n.setSelection(f)}}return!0},$re=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function Fre(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function qC(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}var Bre=(e=null,t={})=>({editor:n,view:r,tr:s,dispatch:i})=>{t={scrollIntoView:!0,...t};const o=()=>{(qC()||Fre())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!b5(n.state.selection))return o(),!0;const l=w5(s.doc,e)||n.state.selection,c=n.state.selection.eq(l);return i&&(c||s.setSelection(l),c&&s.storedMarks&&s.setStoredMarks(s.storedMarks),o()),!0},Ure=(e,t)=>n=>e.every((r,s)=>t(r,{...n,index:s})),zre=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),Vre=e=>!("type"in e),Wre=(e,t,n)=>({tr:r,dispatch:s,editor:i})=>{var o;if(s){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l;const{selection:c}=i.state,u=y=>{i.emit("contentError",{editor:i,error:y,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},d={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{_p(t,i.schema,{parseOptions:d,errorOnInvalidContent:!0})}catch(y){u(y)}try{l=_p(t,i.schema,{parseOptions:d,errorOnInvalidContent:(o=n.errorOnInvalidContent)!=null?o:i.options.enableContentCheck})}catch(y){return u(y),!1}let{from:h,to:f}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},p=!0,m=!0;if((Vre(l)?l:[l]).forEach(y=>{y.check(),p=p?y.isText&&y.marks.length===0:!1,m=m?y.isBlock:!1}),h===f&&m){const{parent:y}=r.doc.resolve(h);y.isTextblock&&!y.type.spec.code&&!y.childCount&&(h-=1,f+=1)}let x;if(p){if(Array.isArray(t))x=t.map(y=>y.text||"").join("");else if(t instanceof Y){let y="";t.forEach(b=>{b.text&&(y+=b.text)}),x=y}else typeof t=="object"&&t&&t.text?x=t.text:x=t;r.insertText(x,h,f)}else{x=l;const y=c.$from.parentOffset===0,b=c.$from.node().isText||c.$from.node().isTextblock,w=c.$from.node().content.size>0;y&&b&&w&&(h=Math.max(0,h-1)),r.replaceWith(h,f,x)}n.updateSelection&&pre(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:h,text:x}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:h,text:x})}return!0},Hre=()=>({state:e,dispatch:t})=>_ne(e,t),Gre=()=>({state:e,dispatch:t})=>Ine(e,t),Kre=()=>({state:e,dispatch:t})=>Cne(e,t),qre=()=>({state:e,dispatch:t})=>One(e,t),Yre=()=>({state:e,dispatch:t,tr:n})=>{try{const r=yv(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},Qre=()=>({state:e,dispatch:t,tr:n})=>{try{const r=yv(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},Jre=()=>({state:e,dispatch:t})=>Tne(e,t),Xre=()=>({state:e,dispatch:t})=>Ane(e,t);function T5(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Zre(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,s,i,o;for(let l=0;l<t.length-1;l+=1){const c=t[l];if(/^(cmd|meta|m)$/i.test(c))o=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))qC()||T5()?o=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${c}`)}return r&&(n=`Alt-${n}`),s&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var ese=e=>({editor:t,view:n,tr:r,dispatch:s})=>{const i=Zre(e).split(/-(?!$)/),o=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),c=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,l))});return c==null||c.steps.forEach(u=>{const d=u.map(r.mapping);d&&s&&r.maybeStep(d)}),!0},tse=(e,t={})=>({state:n,dispatch:r})=>{const s=jn(e,n.schema);return kl(n,s,t)?Mne(n,r):!1},nse=()=>({state:e,dispatch:t})=>$ne(e,t),rse=e=>({state:t,dispatch:n})=>{const r=jn(e,t.schema);return Kne(r)(t,n)},sse=()=>({state:e,dispatch:t})=>Lne(e,t);function GR(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,s)=>(n.includes(s)||(r[s]=e[s]),r),{})}var ise=(e,t)=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null;const l=Cv(typeof e=="string"?e:e.name,r.schema);return l?(l==="node"&&(i=jn(e,r.schema)),l==="mark"&&(o=la(e,r.schema)),s&&n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,d)=>{i&&i===u.type&&n.setNodeMarkup(d,void 0,GR(u.attrs,t)),o&&u.marks.length&&u.marks.forEach(h=>{o===h.type&&n.addMark(d,d+u.nodeSize,o.create(GR(h.attrs,t)))})})}),!0):!1},ose=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),ase=()=>({tr:e,dispatch:t})=>{if(t){const n=new Gs(e.doc);e.setSelection(n)}return!0},lse=()=>({state:e,dispatch:t})=>jne(e,t),cse=()=>({state:e,dispatch:t})=>Rne(e,t),use=()=>({state:e,dispatch:t})=>Fne(e,t),dse=()=>({state:e,dispatch:t})=>zne(e,t),hse=()=>({state:e,dispatch:t})=>Une(e,t),fse=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:s,tr:i,dispatch:o,commands:l})=>{const{doc:c}=i;if(r.preserveWhitespace!=="full"){const u=yE(e,s.schema,r,{errorOnInvalidContent:t??s.options.enableContentCheck});return o&&i.replaceWith(0,c.content.size,u).setMeta("preventUpdate",!n),!0}return o&&i.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:t??s.options.enableContentCheck})};function pse(e,t,n){var r;const{selection:s}=t;let i=null;if(b5(s)&&(i=s.$cursor),i){const l=(r=e.storedMarks)!=null?r:i.marks();return!!n.isInSet(l)||!l.some(c=>c.type.excludes(n))}const{ranges:o}=s;return o.some(({$from:l,$to:c})=>{let u=l.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(l.pos,c.pos,(d,h,f)=>{if(u)return!1;if(d.isInline){const p=!f||f.type.allowsMarkType(n),m=!!n.isInSet(d.marks)||!d.marks.some(g=>g.type.excludes(n));u=p&&m}return!u}),u})}var mse=(e,t={})=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=n,{empty:o,ranges:l}=i,c=la(e,r.schema);if(s)if(o){const u=m5(r,c);n.addStoredMark(c.create({...u,...t}))}else l.forEach(u=>{const d=u.$from.pos,h=u.$to.pos;r.doc.nodesBetween(d,h,(f,p)=>{const m=Math.max(p,d),g=Math.min(p+f.nodeSize,h);f.marks.find(y=>y.type===c)?f.marks.forEach(y=>{c===y.type&&n.addMark(m,g,c.create({...y.attrs,...t}))}):n.addMark(m,g,c.create(t))})});return pse(r,n,c)},gse=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),yse=(e,t={})=>({state:n,dispatch:r,chain:s})=>{const i=jn(e,n.schema);let o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:l})=>BR(i,{...o,...t})(n)?!0:l.clearNodes()).command(({state:l})=>BR(i,{...o,...t})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},xse=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,s=Zl(e,0,r.content.size),i=ke.create(r,s);t.setSelection(i)}return!0},vse=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:s,to:i}=typeof e=="number"?{from:e,to:e}:e,o=Ae.atStart(r).from,l=Ae.atEnd(r).to,c=Zl(s,o,l),u=Zl(i,o,l),d=Ae.create(r,c,u);t.setSelection(d)}return!0},bse=e=>({state:t,dispatch:n})=>{const r=jn(e,t.schema);return Qne(r)(t,n)};function KR(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(s=>t==null?void 0:t.includes(s.type.name));e.tr.ensureMarks(r)}}var wse=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:s})=>{const{selection:i,doc:o}=t,{$from:l,$to:c}=i,u=s.extensionManager.attributes,d=cy(u,l.node().type.name,l.node().attrs);if(i instanceof ke&&i.node.isBlock)return!l.parentOffset||!Zu(o,l.pos)?!1:(r&&(e&&KR(n,s.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const h=c.parentOffset===c.parent.content.size,f=l.depth===0?void 0:Zne(l.node(-1).contentMatchAt(l.indexAfter(-1)));let p=h&&f?[{type:f,attrs:d}]:void 0,m=Zu(t.doc,t.mapping.map(l.pos),1,p);if(!p&&!m&&Zu(t.doc,t.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(m=!0,p=f?[{type:f,attrs:d}]:void 0),r){if(m&&(i instanceof Ae&&t.deleteSelection(),t.split(t.mapping.map(l.pos),1,p),f&&!h&&!l.parentOffset&&l.parent.type!==f)){const g=t.mapping.map(l.before()),x=t.doc.resolve(g);l.node(-1).canReplaceWith(x.index(),x.index()+1,f)&&t.setNodeMarkup(t.mapping.map(l.before()),f)}e&&KR(n,s.extensionManager.splittableMarks),t.scrollIntoView()}return m},Sse=(e,t={})=>({tr:n,state:r,dispatch:s,editor:i})=>{var o;const l=jn(e,r.schema),{$from:c,$to:u}=r.selection,d=r.selection.node;if(d&&d.isBlock||c.depth<2||!c.sameParent(u))return!1;const h=c.node(-1);if(h.type!==l)return!1;const f=i.extensionManager.attributes;if(c.parent.content.size===0&&c.node(-1).childCount===c.indexAfter(-1)){if(c.depth===2||c.node(-3).type!==l||c.index(-2)!==c.node(-2).childCount-1)return!1;if(s){let y=Y.empty;const b=c.index(-1)?1:c.index(-2)?2:3;for(let T=c.depth-b;T>=c.depth-3;T-=1)y=Y.from(c.node(T).copy(y));const w=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,E={...cy(f,c.node().type.name,c.node().attrs),...t},N=((o=l.contentMatch.defaultType)==null?void 0:o.createAndFill(E))||void 0;y=y.append(Y.from(l.createAndFill(null,N)||void 0));const k=c.before(c.depth-(b-1));n.replace(k,c.after(-w),new oe(y,4-b,0));let C=-1;n.doc.nodesBetween(k,n.doc.content.size,(T,j)=>{if(C>-1)return!1;T.isTextblock&&T.content.size===0&&(C=j+1)}),C>-1&&n.setSelection(Ae.near(n.doc.resolve(C))),n.scrollIntoView()}return!0}const p=u.pos===c.end()?h.contentMatchAt(0).defaultType:null,m={...cy(f,h.type.name,h.attrs),...t},g={...cy(f,c.node().type.name,c.node().attrs),...t};n.delete(c.pos,u.pos);const x=p?[{type:l,attrs:m},{type:p,attrs:g}]:[{type:l,attrs:m}];if(!Zu(n.doc,c.pos,2))return!1;if(s){const{selection:y,storedMarks:b}=r,{splittableMarks:w}=i.extensionManager,E=b||y.$to.parentOffset&&y.$from.marks();if(n.split(c.pos,2,x).scrollIntoView(),!E||!s)return!0;const N=E.filter(k=>w.includes(k.type.name));n.ensureMarks(N)}return!0},Q1=(e,t)=>{const n=kv(o=>o.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const s=e.doc.nodeAt(r);return n.node.type===(s==null?void 0:s.type)&&$l(e.doc,n.pos)&&e.join(n.pos),!0},J1=(e,t)=>{const n=kv(o=>o.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const s=e.doc.nodeAt(r);return n.node.type===(s==null?void 0:s.type)&&$l(e.doc,r)&&e.join(r),!0},Ese=(e,t,n,r={})=>({editor:s,tr:i,state:o,dispatch:l,chain:c,commands:u,can:d})=>{const{extensions:h,splittableMarks:f}=s.extensionManager,p=jn(e,o.schema),m=jn(t,o.schema),{selection:g,storedMarks:x}=o,{$from:y,$to:b}=g,w=y.blockRange(b),E=x||g.$to.parentOffset&&g.$from.marks();if(!w)return!1;const N=kv(k=>HR(k.type.name,h))(g);if(w.depth>=1&&N&&w.depth-N.depth<=1){if(N.node.type===p)return u.liftListItem(m);if(HR(N.node.type.name,h)&&p.validContent(N.node.content)&&l)return c().command(()=>(i.setNodeMarkup(N.pos,p),!0)).command(()=>Q1(i,p)).command(()=>J1(i,p)).run()}return!n||!E||!l?c().command(()=>d().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>Q1(i,p)).command(()=>J1(i,p)).run():c().command(()=>{const k=d().wrapInList(p,r),C=E.filter(T=>f.includes(T.type.name));return i.ensureMarks(C),k?!0:u.clearNodes()}).wrapInList(p,r).command(()=>Q1(i,p)).command(()=>J1(i,p)).run()},Nse=(e,t={},n={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:i=!1}=n,o=la(e,r.schema);return xE(r,o,t)?s.unsetMark(o,{extendEmptyMarkRange:i}):s.setMark(o,t)},kse=(e,t,n={})=>({state:r,commands:s})=>{const i=jn(e,r.schema),o=jn(t,r.schema),l=kl(r,i,n);let c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),l?s.setNode(o,c):s.setNode(i,{...c,...n})},Cse=(e,t={})=>({state:n,commands:r})=>{const s=jn(e,n.schema);return kl(n,s,t)?r.lift(s):r.wrapIn(s,t)},Tse=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const s=n[r];let i;if(s.spec.isInputRules&&(i=s.getState(e))){if(t){const o=e.tr,l=i.transform;for(let c=l.steps.length-1;c>=0;c-=1)o.step(l.steps[c].invert(l.docs[c]));if(i.text){const c=o.doc.resolve(i.from).marks();o.replaceWith(i.from,i.to,e.schema.text(i.text,c))}else o.delete(i.from,i.to)}return!0}}return!1},Ase=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:s}=n;return r||t&&s.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},jse=(e,t={})=>({tr:n,state:r,dispatch:s})=>{var i;const{extendEmptyMarkRange:o=!1}=t,{selection:l}=n,c=la(e,r.schema),{$from:u,empty:d,ranges:h}=l;if(!s)return!0;if(d&&o){let{from:f,to:p}=l;const m=(i=u.marks().find(x=>x.type===c))==null?void 0:i.attrs,g=HC(u,c,m);g&&(f=g.from,p=g.to),n.removeMark(f,p,c)}else h.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,c)});return n.removeStoredMark(c),!0},Ose=(e,t={})=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null;const l=Cv(typeof e=="string"?e:e.name,r.schema);return l?(l==="node"&&(i=jn(e,r.schema)),l==="mark"&&(o=la(e,r.schema)),s&&n.selection.ranges.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;let h,f,p,m;n.selection.empty?r.doc.nodesBetween(u,d,(g,x)=>{i&&i===g.type&&(p=Math.max(x,u),m=Math.min(x+g.nodeSize,d),h=x,f=g)}):r.doc.nodesBetween(u,d,(g,x)=>{x<u&&i&&i===g.type&&(p=Math.max(x,u),m=Math.min(x+g.nodeSize,d),h=x,f=g),x>=u&&x<=d&&(i&&i===g.type&&n.setNodeMarkup(x,void 0,{...g.attrs,...t}),o&&g.marks.length&&g.marks.forEach(y=>{if(o===y.type){const b=Math.max(x,u),w=Math.min(x+g.nodeSize,d);n.addMark(b,w,o.create({...y.attrs,...t}))}}))}),f&&(h!==void 0&&n.setNodeMarkup(h,void 0,{...f.attrs,...t}),o&&f.marks.length&&f.marks.forEach(g=>{o===g.type&&n.addMark(p,m,o.create({...g.attrs,...t}))}))}),!0):!1},Rse=(e,t={})=>({state:n,dispatch:r})=>{const s=jn(e,n.schema);return Vne(s,t)(n,r)},_se=(e,t={})=>({state:n,dispatch:r})=>{const s=jn(e,n.schema);return Wne(s,t)(n,r)},A5=mn.create({name:"commands",addCommands(){return{...C5}}}),j5=mn.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,s;const i=()=>{var o,l,c,u;if((u=(c=(l=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:l.filterTransaction)==null?void 0:c.call(l,e))!=null?u:e.getMeta("y-sync$"))return;const d=a5(e.before,[e,...t]);y5(d).forEach(p=>{d.mapping.mapResult(p.oldRange.from).deletedAfter&&d.mapping.mapResult(p.oldRange.to).deletedBefore&&d.before.nodesBetween(p.oldRange.from,p.oldRange.to,(m,g)=>{const x=g+m.nodeSize-2,y=p.oldRange.from<=g&&x<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:m,from:g,to:x,newFrom:d.mapping.map(g),newTo:d.mapping.map(x),deletedRange:p.oldRange,newRange:p.newRange,partial:!y,editor:this.editor,transaction:e,combinedTransform:d})})});const f=d.mapping;d.steps.forEach((p,m)=>{var g,x;if(p instanceof mi){const y=f.slice(m).map(p.from,-1),b=f.slice(m).map(p.to),w=f.invert().map(y,-1),E=f.invert().map(b),N=(g=d.doc.nodeAt(y-1))==null?void 0:g.marks.some(C=>C.eq(p.mark)),k=(x=d.doc.nodeAt(b))==null?void 0:x.marks.some(C=>C.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:w,to:E},newRange:{from:y,to:b},partial:!!(k||N),editor:this.editor,transaction:e,combinedTransform:d})}})};(s=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||s?setTimeout(i,0):i()}}),O5=mn.create({name:"drop",addProseMirrorPlugins(){return[new qt({key:new wn("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),R5=mn.create({name:"editable",addProseMirrorPlugins(){return[new qt({key:new wn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),_5=new wn("focusEvents"),I5=mn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new qt({key:_5,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),M5=mn.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:l})=>{const{selection:c,doc:u}=l,{empty:d,$anchor:h}=c,{pos:f,parent:p}=h,m=h.parent.isTextblock&&f>0?l.doc.resolve(f-1):h,g=m.parent.type.spec.isolating,x=h.pos-h.parentOffset,y=g&&m.parent.childCount===1?x===h.pos:Pe.atStart(u).from===f;return!d||!p.type.isTextblock||p.textContent.length||!y||y&&h.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return qC()||T5()?i:s},addProseMirrorPlugins(){return[new qt({key:new wn("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(g=>g.getMeta("composition")))return;const r=e.some(g=>g.docChanged)&&!t.doc.eq(n.doc),s=e.some(g=>g.getMeta("preventClearDocument"));if(!r||s)return;const{empty:i,from:o,to:l}=t.selection,c=Pe.atStart(t.doc).from,u=Pe.atEnd(t.doc).to;if(i||!(o===c&&l===u)||!Tv(n.doc))return;const f=n.tr,p=Ev({state:n,transaction:f}),{commands:m}=new Nv({editor:this.editor,state:p});if(m.clearNodes(),!!f.steps.length)return f}})]}}),L5=mn.create({name:"paste",addProseMirrorPlugins(){return[new qt({key:new wn("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),P5=mn.create({name:"tabindex",addProseMirrorPlugins(){return[new qt({key:new wn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),Ise=class wu{constructor(t,n,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=s}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new wu(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new wu(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new wu(t,this.editor)}get children(){const t=[];return this.node.content.forEach((n,r)=>{const s=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,o=this.pos+r+(i?0:1);if(o<0||o>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(o);if(!s&&l.depth<=this.depth)return;const c=new wu(l,this.editor,s,s?n:null);s&&(c.actualDepth=this.depth+1),t.push(new wu(l,this.editor,s,s?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===t)if(Object.keys(n).length>0){const i=s.node.attrs,o=Object.keys(n);for(let l=0;l<o.length;l+=1){const c=o[l];if(i[c]!==n[c])break}}else r=s;s=s.parent}return r}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const i=Object.keys(n);return this.children.forEach(o=>{r&&s.length>0||(o.node.type.name===t&&i.every(c=>n[c]===o.node.attrs[c])&&s.push(o),!(r&&s.length>0)&&(s=s.concat(o.querySelectorAll(t,n,r))))}),s}setAttribute(t){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},Mse=`.ProseMirror {
550  position: relative;
551}
552
553.ProseMirror {
554  word-wrap: break-word;
555  white-space: pre-wrap;
556  white-space: break-spaces;
557  -webkit-font-variant-ligatures: none;
558  font-variant-ligatures: none;
559  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
560}
561
562.ProseMirror [contenteditable="false"] {
563  white-space: normal;
564}
565
566.ProseMirror [contenteditable="false"] [contenteditable="true"] {
567  white-space: pre-wrap;
568}
569
570.ProseMirror pre {
571  white-space: pre-wrap;
572}
573
574img.ProseMirror-separator {
575  display: inline !important;
576  border: none !important;
577  margin: 0 !important;
578  width: 0 !important;
579  height: 0 !important;
580}
581
582.ProseMirror-gapcursor {
583  display: none;
584  pointer-events: none;
585  position: absolute;
586  margin: 0;
587}
588
589.ProseMirror-gapcursor:after {
590  content: "";
591  display: block;
592  position: absolute;
593  top: -2px;
594  width: 20px;
595  border-top: 1px solid black;
596  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
597}
598
599@keyframes ProseMirror-cursor-blink {
600  to {
601    visibility: hidden;
602  }
603}
604
605.ProseMirror-hideselection *::selection {
606  background: transparent;
607}
608
609.ProseMirror-hideselection *::-moz-selection {
610  background: transparent;
611}
612
613.ProseMirror-hideselection * {
614  caret-color: transparent;
615}
616
617.ProseMirror-focused .ProseMirror-gapcursor {
618  display: block;
619}`;function Lse(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const s=document.createElement("style");return t&&s.setAttribute("nonce",t),s.setAttribute("data-tiptap-style",""),s.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(s),s}var Pse=class extends Xne{constructor(e={}){super(),this.css=null,this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:s,moved:i})=>this.options.onDrop(r,s,i)),this.on("paste",({event:r,slice:s})=>this.options.onPaste(r,s)),this.on("delete",this.options.onDelete);const t=this.createDoc(),n=w5(t,this.options.autofocus);this.editorState=$u.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const e=this.editorView.dom;e!=null&&e.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=Lse(Mse,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.editorState=this.state.apply(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){const n=u5(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let n=t;if([].concat(e).forEach(s=>{const i=typeof s=="string"?`${s}$`:s.key;n=n.filter(o=>!o.key.startsWith(i))}),t.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;const r=[...this.options.enableCoreExtensions?[R5,k5.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),A5,I5,M5,P5,O5,L5,j5].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new jv(r,this)}createCommandManager(){this.commandManager=new Nv({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=yE(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=yE(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){var t;this.editorView=new Z3(e,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)==null?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass(),this.injectCSS();const r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var d;return(d=this.capturedTransaction)==null?void 0:d.step(u)});return}const{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),s=n.includes(e),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!s)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),l=o==null?void 0:o.getMeta("focus"),c=o==null?void 0:o.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:o}),c&&this.emit("blur",{editor:this,event:c.event,transaction:o}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||i.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return g5(this.state,e)}isActive(e,t){const n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return dre(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return zC(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
620
621`,textSerializers:n={}}=e||{};return ire(this.state.doc,{blockSeparator:t,textSerializers:{...p5(this.schema),...n}})}get isEmpty(){return Tv(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new Ise(t,this)}get $doc(){return this.$pos(0)}};function Dd(e){return new Av({find:e.find,handler:({state:t,range:n,match:r})=>{const s=bt(e.getAttributes,void 0,r);if(s===!1||s===null)return null;const{tr:i}=t,o=r[r.length-1],l=r[0];if(o){const c=l.search(/\S/),u=n.from+l.indexOf(o),d=u+o.length;if(GC(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(g=>g===e.type&&g!==p.mark.type)).filter(p=>p.to>u).length)return null;d<n.to&&i.delete(d,n.to),u>n.from&&i.delete(n.from+c,u);const f=n.from+c+o.length;i.addMark(n.from+c,f,e.type.create(s||{})),i.removeStoredMark(e.type)}}})}function D5(e){return new Av({find:e.find,handler:({state:t,range:n,match:r})=>{const s=bt(e.getAttributes,void 0,r)||{},{tr:i}=t,o=n.from;let l=n.to;const c=e.type.create(s);if(r[1]){const u=r[0].lastIndexOf(r[1]);let d=o+u;d>l?d=l:l=d+r[1].length;const h=r[0][r[0].length-1];i.insertText(h,o+r[0].length-1),i.replaceWith(d,l,c)}else if(r[0]){const u=e.type.isInline?o:o-1;i.insert(u,e.type.create(s)).delete(i.mapping.map(o),i.mapping.map(l))}i.scrollIntoView()}})}function vE(e){return new Av({find:e.find,handler:({state:t,range:n,match:r})=>{const s=t.doc.resolve(n.from),i=bt(e.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}})}function $d(e){return new Av({find:e.find,handler:({state:t,range:n,match:r,chain:s})=>{const i=bt(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),c=o.doc.resolve(n.from).blockRange(),u=c&&CC(c,e.type,i);if(!u)return null;if(o.wrap(c,u),e.keepMarks&&e.editor){const{selection:h,storedMarks:f}=t,{splittableMarks:p}=e.editor.extensionManager,m=f||h.$to.parentOffset&&h.$from.marks();if(m){const g=m.filter(x=>p.includes(x.type.name));o.ensureMarks(g)}}if(e.keepAttributes){const h=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(h,i).run()}const d=o.doc.resolve(n.from-1).nodeBefore;d&&d.type===e.type&&$l(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,d))&&o.join(n.from-1)}})}function Dse(e,t){const{selection:n}=e,{$from:r}=n;if(n instanceof ke){const i=r.index();return r.parent.canReplaceWith(i,i+1,t)}let s=r.depth;for(;s>=0;){const i=r.index(s);if(r.node(s).contentMatchAt(i).matchType(t))return!0;s-=1}return!1}function $se(e,t,n={}){const{state:r}=t,{doc:s,tr:i}=r,o=e;s.descendants((l,c)=>{const u=i.mapping.map(c),d=i.mapping.map(c)+l.nodeSize;let h=null;if(l.marks.forEach(p=>{if(p!==o)return!1;h=p}),!h)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==h.attrs[p]&&(f=!0)}),f){const p=e.type.create({...e.attrs,...n});i.removeMark(u,d,e.type),i.addMark(u,d,p)}}),i.docChanged&&t.view.dispatch(i)}var Kn=class $5 extends KC{constructor(){super(...arguments),this.type="node"}static create(t={}){const n=typeof t=="function"?t():t;return new $5(n)}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}};function $c(e){return new vre({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:s})=>{const i=bt(e.getAttributes,void 0,r,s);if(i===!1||i===null)return null;const{tr:o}=t,l=r[r.length-1],c=r[0];let u=n.to;if(l){const d=c.search(/\S/),h=n.from+c.indexOf(l),f=h+l.length;if(GC(n.from,n.to,t.doc).filter(m=>m.mark.type.excluded.find(x=>x===e.type&&x!==m.mark.type)).filter(m=>m.to>h).length)return null;f<n.to&&o.delete(f,n.to),h>n.from&&o.delete(n.from+d,h),u=n.from+d+l.length,o.addMark(n.from+d,u,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}var Fse=function e(t,n){if(t===n)return!0;
621if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!e(t[s],n[s]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(s of t.entries())if(!n.has(s[0]))return!1;for(s of t.entries())if(!e(s[1],n.get(s[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(s of t.entries())if(!n.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(r=t.length,r!=n.length)return!1;for(s=r;s--!==0;)if(t[s]!==n[s])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;s--!==0;){var o=i[s];if(!(o==="_owner"&&t.$$typeof)&&!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n};const Bse=Jp(Fse);var F5={exports:{}},B5={};/**
622 * @license React
623 * use-sync-external-store-shim/with-selector.production.js
624 *
625 * Copyright (c) Meta Platforms, Inc. and affiliates.
626 *
627 * This source code is licensed under the MIT license found in the
628 * LICENSE file in the root directory of this source tree.
629 */var Ov=v,Use=z0;function zse(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vse=typeof Object.is=="function"?Object.is:zse,Wse=Use.useSyncExternalStore,Hse=Ov.useRef,Gse=Ov.useEffect,Kse=Ov.useMemo,qse=Ov.useDebugValue;B5.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var i=Hse(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=Kse(function(){function c(p){if(!u){if(u=!0,d=p,p=r(p),s!==void 0&&o.hasValue){var m=o.value;if(s(m,p))return h=m}return h=p}if(m=h,Vse(d,p))return m;var g=r(p);return s!==void 0&&s(m,g)?(d=p,m):(d=p,h=g)}var u=!1,d,h,f=n===void 0?null:n;return[function(){return c(t())},f===null?void 0:function(){return c(f())}]},[t,n,r,s]);var l=Wse(e,i[0],i[1]);return Gse(function(){o.hasValue=!0,o.value=l},[l]),qse(l),l};F5.exports=B5;var U5=F5.exports;const Yse=Jp(U5);var Qse=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},Jse=({contentComponent:e})=>{const t=z0.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return a.jsx(a.Fragment,{children:Object.values(t)})};function Xse(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:rP.createPortal(r.reactElement,r.element,n)},e.forEach(s=>s())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(s=>s())}}}var Zse=class extends Le.Component{constructor(e){var t;super(e),this.editorContentRef=Le.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=Xse(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!((e=t.options.element)!=null&&e.firstChild)))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:e,innerRef:t,...n}=this.props;return a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:Qse(t,this.editorContentRef),...n}),(e==null?void 0:e.contentComponent)&&a.jsx(Jse,{contentComponent:e.contentComponent})]})}},eie=v.forwardRef((e,t)=>
629{const n=Le.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Le.createElement(Zse,{key:n,innerRef:t,...e})}),tie=Le.memo(eie),nie=typeof window<"u"?v.useLayoutEffect:v.useEffect,rie=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function sie(e){var t;const[n]=v.useState(()=>new rie(e.editor)),r=U5.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:Bse);return nie(()=>n.watch(e.editor),[e.editor,n]),v.useDebugValue(r),r}var iie=!1,bE=typeof window>"u",oie=bE||!!(typeof window<"u"&&window.next),aie=class z5{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return bE||oie?null:this.createEditor();if(this.options.current.immediatelyRender&&bE&&iie)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const t={...this.options.current,onBeforeCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onBeforeCreate)==null?void 0:i.call(s,...r)},onBlur:(...r)=>{var s,i;return(i=(s=this.options.current).onBlur)==null?void 0:i.call(s,...r)},onCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onCreate)==null?void 0:i.call(s,...r)},onDestroy:(...r)=>{var s,i;return(i=(s=this.options.current).onDestroy)==null?void 0:i.call(s,...r)},onFocus:(...r)=>{var s,i;return(i=(s=this.options.current).onFocus)==null?void 0:i.call(s,...r)},onSelectionUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onSelectionUpdate)==null?void 0:i.call(s,...r)},onTransaction:(...r)=>{var s,i;return(i=(s=this.options.current).onTransaction)==null?void 0:i.call(s,...r)},onUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onUpdate)==null?void 0:i.call(s,...r)},onContentError:(...r)=>{var s,i;return(i=(s=this.options.current).onContentError)==null?void 0:i.call(s,...r)},onDrop:(...r)=>{var s,i;return(i=(s=this.options.current).onDrop)==null?void 0:i.call(s,...r)},onPaste:(...r)=>{var s,i;return(i=(s=this.options.current).onPaste)==null?void 0:i.call(s,...r)},onDelete:(...r)=>{var s,i;return(i=(s=this.options.current).onDelete)==null?void 0:i.call(s,...r)}};return new Pse(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((s,i)=>{var o;return s===((o=n.extensions)==null?void 0:o[i])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?z5.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){
629if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,s)=>r===t[s]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){const t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function lie(e={},t=[]){const n=v.useRef(e);n.current=e;const[r]=v.useState(()=>new aie(n)),s=z0.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return v.useDebugValue(s),v.useEffect(r.onRender(t)),sie({editor:s,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&i===0?0:i+1}),s}var cie=v.createContext({editor:null});cie.Consumer;var uie=v.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),die=()=>v.useContext(uie);Le.forwardRef((e,t)=>{const{onDragStart:n}=die(),r=e.as||"div";return a.jsx(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});Le.createContext({markViewContentRef:()=>{}});var _x=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);const{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]},hie=/^\s*>\s$/,fie=Kn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return _x("blockquote",{...Wt(this.options.HTMLAttributes,e),children:_x("slot",{})})},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[$d({find:hie,type:this.type})]}}),pie=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,mie=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,gie=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,yie=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,xie=Xc.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return _x("strong",{...Wt(this.options.HTMLAttributes,e),children:_x("slot",{})})},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Dd({find:pie,type:this.type}),Dd({find:gie,type:this.type})]},addPasteRules(){return[$c({find:mie,type:this.type}),$c({find:yie,type:this.type})]}}),vie=/(^|[^`])`([^`]+)`(?!`)/,bie=/(^|[^`])`([^`]+)`(?!`)/g,wie=Xc.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",Wt(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Dd({find:vie,type:this.type})]},addPasteRules(){return[$c({find:bie,type:this.type})]}}),Sie=/^```([a-z]+)?[\s\n]$/,Eie=/^~~~([a-z]+)?[\s\n]$/,Nie=Kn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,i=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",Wt(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>
vendor: 3,345 bytes, lines 629-633
629{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
630
631`);return!i||!o?!1:e.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:s,empty:i}=n;if(!i||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const l=s.after();return l===void 0?!1:r.nodeAt(l)?e.commands.command(({tr:u})=>(u.setSelection(Pe.near(r.resolve(l))),!0)):e.commands.exitCode()}}},addInputRules(){return[vE({find:Sie,type:this.type,getAttributes:e=>({language:e[1]})}),vE({find:Eie,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new qt({key:new wn("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,i=s==null?void 0:s.mode;if(!n||!i)return!1;const{tr:o,schema:l}=e.state,c=l.text(n.replace(/\r\n?/g,`
632`));return o.replaceSelectionWith(this.type.create({language:i},c)),o.selection.$from.parent.type!==this.type&&o.setSelection(Ae.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),e.dispatch(o),!0}}})]}}),kie=Kn.create({name:"doc",topNode:!0,content:"block+"}),Cie=Kn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Wt(this.options.HTMLAttributes,e)]},renderText(){return`
633`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:s,storedMarks:i}=n;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:l}=r.extensionManager,c=i||s.$to.parentOffset&&s.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:d})=>{if(d&&c&&o){const h=c.filter(f=>l.includes(f.type.name));u.ensureMarks(h)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Tie=Kn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Wt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>vE({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}}
633)\\s$`),type:this.type,getAttributes:{level:e}}))}}),Aie=Kn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Wt(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!Dse(t,t.schema.nodes[this.name]))return!1;const{selection:n}=t,{$to:r}=n,s=e();return v5(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:i,dispatch:o})=>{var l;if(o){const{$to:c}=i.selection,u=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?i.setSelection(Ae.create(i.doc,c.pos+1)):c.nodeAfter.isBlock?i.setSelection(ke.create(i.doc,c.pos)):i.setSelection(Ae.create(i.doc,c.pos));else{const d=(l=c.parent.type.contentMatch.defaultType)==null?void 0:l.create();d&&(i.insert(u,d),i.setSelection(Ae.create(i.doc,u+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[D5({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),jie=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Oie=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Rie=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,_ie=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Iie=Xc.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Wt(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Dd({find:jie,type:this.type}),Dd({find:Rie,type:this.type})]},addPasteRules(){return[$c({find:Oie,type:this.type}),$c({find:_ie,type:this.type})]}});const Mie="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
633ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Lie="ελ1υ2бг1ел3дети4ею2католик6ом3мÐ
633ºÐ´2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3Õ°Õ¡Õµ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1ì»´2삼성2한국2",wE="numeric",SE="ascii",EE="alpha",jf="asciinumeric",ef="alphanumeric",NE="domain",V5="emoji",Pie="scheme",Die="slashscheme",X1="whitespace";function $ie(e,t){return e in t||(t[e]=[]),t[e]}function ec(e,t,n){t[wE]&&(t[jf]=!0,t[ef]=!0),t[SE]&&(t[jf]=!0,t[EE]=!0),t[jf]&&(t[ef]=!0),t[EE]&&(t[ef]=!0),t[ef]&&(t[NE]=!0),t[V5]&&(t[NE]=!0);for(const r in t){const s=$ie(r,n);s.indexOf(e)<0&&s.push(e)}}function Fie(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Kr(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Kr.groups={};Kr.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const s=t.jr[r][0],i=t.jr[r][1];if(i&&s.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let s=0;s<e.length;s++)this.tt(e[s],t,n,r)},tr(e,t,n,r){r=r||Kr.groups;let s;return t&&t.j?s=t:(s=new Kr(t),n&&r&&ec(t,n,r)),this.jr.push([e,s]),s},ts(e,t,n,r){let s=this;const i=e.length;if(!i)return s;for(let o=0;o<i-1;o++)s=s.tt(e[o]);return s.tt(e[i-1],t,n,r)},tt(e,t,n,r){r=r||Kr.groups;const s=this;if(t&&t.j)return s.j[e]=t,t;const i=t;let o,l=s.go(e);if(l?(o=new Kr,Object.assign(o.j,l.j),o.jr.push.apply(o.jr,l.jr),o.jd=l.jd,o.t=l.t):o=new Kr,i){if(r)if(o.t&&typeof o.t=="string"){const c=Object.assign(Fie(o.t,r),n);ec(i,c,r)}else n&&ec(i,n,r);o.t=i}return s.j[e]=o,o}};const nt=(e,t,n,r,s)=>e.ta(t,n,r,s),on=(e,t,n,r,s)=>e.tr(t,n,r,s),qR=(e,t,n,r,s)=>e.ts(t,n,r,s),X=(e,t,n,r,s)=>e.tt(t,n,r,s),Io="WORD",kE="UWORD",W5="ASCIINUMERICAL",H5="ALPHANUMERICAL",Mp="LOCALHOST",CE="TLD",TE="UTLD",uy="SCHEME",Su="SLASH_SCHEME",YC="NUM",AE="WS",QC="NL",Of="OPENBRACE",Rf="CLOSEBRACE",Ix="OPENBRACKET",Mx="CLOSEBRACKET",Lx="OPENPAREN",Px="CLOSEPAREN",Dx="OPENANGLEBRACKET",$x="CLOSEANGLEBRACKET",Fx="FULLWIDTHLEFTPAREN",Bx="FULLWIDTHRIGHTPAREN",Ux="LEFTCORNERBRACKET",zx="RIGHTCORNERBRACKET",Vx="LEFTWHITECORNERBRACKET",Wx="RIGHTWHITECORNERBRACKET",Hx="FULLWIDTHLESSTHAN",Gx="FULLWIDTHGREATERTHAN",Kx="AMPERSAND",qx="APOSTROPHE",Yx="ASTERISK",Na="AT",Qx="BACKSLASH",Jx="BACKTICK",Xx="CARET",Oa="COLON",JC="COMMA",Zx="DOLLAR",Ui="DOT",e0="EQUALS",XC="EXCLAMATION",Is="HYPHEN",_f="PERCENT",t0="PIPE",n0="PLUS",r0="POUND",If="QUERY",ZC="QUOTE",G5="FULLWIDTHMIDDLEDOT",eT="SEMI",zi="SLASH",Mf="TILDE",s0="UNDERSCORE",K5="EMOJI",i0="SYM";var q5=Object.freeze({__proto__:null,ALPHANUMERICAL:H5,AMPERSAND:Kx,APOSTROPHE:qx,ASCIINUMERICAL:W5,ASTERISK:Yx,AT:Na,BACKSLASH:Qx,BACKTICK:Jx,CARET:Xx,CLOSEANGLEBRACKET:$x,CLOSEBRACE:Rf,CLOSEBRACKET:Mx,CLOSEPAREN:Px,COLON:Oa,COMMA:JC,DOLLAR:Zx,DOT:Ui,EMOJI:K5,EQUALS:e0,EXCLAMATION:XC,FULLWIDTHGREATERTHAN:Gx,FULLWIDTHLEFTPAREN:Fx,FULLWIDTHLESSTHAN:Hx,FULLWIDTHMIDDLEDOT:G5,FULLWIDTHRIGHTPAREN:Bx,HYPHEN:Is,LEFTCORNERBRACKET:Ux,LEFTWHITECORNERBRACKET:Vx,LOCALHOST:Mp,NL:QC,NUM:YC,OPENANGLEBRACKET:Dx,OPENBRACE:Of,OPENBRACKET:Ix,OPENPAREN:Lx,PERCENT:_f,PIPE:t0,PLUS:n0,POUND:r0,QUERY:If,QUOTE:ZC,RIGHTCORNERBRACKET:zx,RIGHTWHITECORNERBRACKET:Wx,SCHEME:uy,SEMI:eT,SLASH:zi,SLASH_SCHEME:Su,SYM:i0,TILDE:Mf,TLD:CE,UNDERSCORE:s0,UTLD:TE,UWORD:kE,WORD:Io,WS:AE});const Ao=/[a-z]/,jh=new RegExp("\\p{L}","u"),Z1=new RegExp("\\p{Emoji}","u"),jo=/\d/,ew=/\s/,YR="\r",tw=`
634`,Bie="️",Uie="‍",nw="";let xg=null,vg=null;function zie(e=[]){const t={};Kr.groups=t;const n=new Kr;xg==null&&(xg=QR(Mie)),vg==null&&(vg=QR(Lie)),X(n,"'",qx),X(n,"{",Of),X(n,"}",Rf),X(n,"[",Ix),X(n,"]",Mx),X(n,"(",Lx),X(n,")",Px),X(n,"<",Dx),X(n,">",$x),X(n,"(",Fx),X(n,")",Bx),X(n,"「",Ux),X(n,"」",zx),X(n,"『",Vx),X(n,"』",Wx),X(n,"<",Hx),X(n,">",Gx),X(n,"&",Kx),X(n,"*",Yx),X(n,"@",Na),X(n,"`",Jx),X(n,"^",Xx),X(n,":",Oa),X(n,",",JC),X(n,"$",Zx),X(n,".",Ui),X(n,"=",e0),X(n,"!",XC),X(n,"-",Is),X(n,"%",_f),X(n,"|",t0),X(n,"+",n0),X(n,"#",r0),X(n,"?",If),X(n,'"',ZC),X(n,"/",zi),X(n,";",eT),X(n,"~",Mf),X(n,"_",s0),X(n,"\\",Qx),X(n,"・",G5);const r=on(n,jo,YC,{[wE]:!0});on(r,jo,r);const s=on(r,Ao,W5,{[jf]:!0}),i=on(r,jh,H5,{[ef]:!0}),o=on(n,Ao,Io,{[SE]:!0});on(o,jo,s),on(o,Ao,o),on(s,jo,s),on(s,Ao,s);const l=on(n,jh,kE,{[EE]:!0});on(l,Ao),on(l,jo,i),on(l,jh,l),on(i,jo,i),on(i,Ao),on(i,jh,i);const c=X(n,tw,QC,{[X1]:!0}),u=X(n,YR,AE,{[X1]:!0}),d=on(n,ew,AE,{[X1]:!0});X(n,nw,d),X(u,tw,c),X(u,nw,d),on(u,ew,d),X(d,YR),X(d,tw),on(d,ew,d),X(d,nw,d);const h=on(n,Z1,K5,{[V5]:!0});X(h,"#"),on(h,Z1,h),X(h,Bie,h);const f=X(h,Uie);X(f,"#"),on(f,Z1,h);const p=[[Ao,o],[jo,s]],m=[[Ao,null],[jh,l],[jo,i]];for(let g=0;g<xg.length;g++)ga(n,xg[g],CE,Io,p);for(let g=0;g<vg.length;
vendor: 26,180 bytes, lines 634-637
634g++)ga(n,vg[g],TE,kE,m);ec(CE,{tld:!0,ascii:!0},t),ec(TE,{utld:!0,alpha:!0},t),ga(n,"file",uy,Io,p),ga(n,"mailto",uy,Io,p),ga(n,"http",Su,Io,p),ga(n,"https",Su,Io,p),ga(n,"ftp",Su,Io,p),ga(n,"ftps",Su,Io,p),ec(uy,{scheme:!0,ascii:!0},t),ec(Su,{slashscheme:!0,ascii:!0},t),e=e.sort((g,x)=>g[0]>x[0]?1:-1);for(let g=0;g<e.length;g++){const x=e[g][0],b=e[g][1]?{[Pie]:!0}:{[Die]:!0};x.indexOf("-")>=0?b[NE]=!0:Ao.test(x)?jo.test(x)?b[jf]=!0:b[SE]=!0:b[wE]=!0,qR(n,x,x,b)}return qR(n,"localhost",Mp,{ascii:!0}),n.jd=new Kr(i0),{start:n,tokens:Object.assign({groups:t},q5)}}function Y5(e,t){const n=Vie(t.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,s=[];let i=0,o=0;for(;o<r;){let l=e,c=null,u=0,d=null,h=-1,f=-1;for(;o<r&&(c=l.go(n[o]));)l=c,l.accepts()?(h=0,f=0,d=l):h>=0&&(h+=n[o].length,f++),u+=n[o].length,i+=n[o].length,o++;i-=h,o-=f,u-=h,s.push({t:d.t,v:t.slice(i-u,i),s:i-u,e:i})}return s}function Vie(e){const t=[],n=e.length;let r=0;for(;r<n;){let s=e.charCodeAt(r),i,o=s<55296||s>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function ga(e,t,n,r,s){let i;const o=t.length;for(let l=0;l<o-1;l++){const c=t[l];e.j[c]?i=e.j[c]:(i=new Kr(r),i.jr=s.slice(),e.j[c]=i),e=i}return i=new Kr(n),i.jr=s.slice(),e.j[t[o-1]]=i,i}function QR(e){const t=[],n=[];let r=0,s="0123456789";for(;r<e.length;){let i=0;for(;s.indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let o=parseInt(e.substring(r,r+i),10);o>0;o--)n.pop();r+=i}else n.push(e[r]),r++}return t}const Lp={defaultProtocol:"http",events:null,format:JR,formatHref:JR,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function tT(e,t=null){let n=Object.assign({},Lp);e&&(n=Object.assign(n,e instanceof tT?e.o:e));const r=n.ignoreTags,s=[];for(let i=0;i<r.length;i++)s.push(r[i].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=s}tT.prototype={o:Lp,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let s=this.o[e];return s&&(typeof s=="object"?(s=n.t in s?s[n.t]:Lp[e],typeof s=="function"&&r&&(s=s(t,n))):typeof s=="function"&&r&&(s=s(t,n.t,n)),s)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function JR(e){return e}function Q5(e,t){this.t="token",this.v=e,this.tk=t}Q5.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Lp.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),s=e.get("tagName",n,t),i=this.toFormattedString(e),o={},l=e.get("className",n,t),c=e.get("target",n,t),u=e.get("rel",n,t),d=e.getObj("attributes",n,t),h=e.getObj("events",n,t);return o.href=r,l&&(o.class=l),c&&(o.target=c),u&&(o.rel=u),d&&Object.assign(o,d),{tagName:s,attributes:o,content:i,eventListeners:h}}};function Rv(e,t){class n extends Q5{constructor(s,i){super(s,i),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const XR=Rv("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),ZR=Rv("text"),Wie=Rv("nl"),bg=Rv("url",{isLink:!0,toHref(e=Lp.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Mp&&e[1].t===Oa}}),Rs=e=>new Kr(e);function Hie({groups:e}){const t=e.domain.concat([Kx,Yx,Na,Qx,Jx,Xx,Zx,e0,Is,YC,_f,t0,n0,r0,zi,i0,Mf,s0]),n=[qx,Oa,JC,Ui,XC,_f,If,ZC,eT,Dx,$x,Of,Rf,Mx,Ix,Lx,Px,Fx,Bx,Ux,zx,Vx,Wx,Hx,Gx],r=[Kx,qx,Yx,Qx,Jx,Xx,Zx,e0,Is,Of,Rf,_f,t0,n0,r0,If,zi,i0,Mf,s0],s=Rs(),i=X(s,Mf);nt(i,r,i),nt(i,e.domain,i);const o=Rs(),l=Rs(),c=Rs();nt(s,e.domain,o),nt(s,e.scheme,l),nt(s,e.slashscheme,c),nt(o,r,i),nt(o,e.domain,o);const u=X(o,Na);X(i,Na,u),X(l,Na,u),X(c,Na,u);const d=X(i,Ui);nt(d,r,i),nt(d,e.domain,i);const h=Rs();nt(u,e.domain,h),nt(h,e.domain,h);const f=X(h,Ui);nt(f,e.domain,h);const p=Rs(XR);nt(f,e.tld,p),nt(f,e.utld,p),X(u,Mp,p);const m=X(h,Is);X(m,Is,m),nt(m,e.domain,h),nt(p,e.domain,h),X(p,Ui,f),X(p,Is,m);const g=X(p,Oa);nt(g,e.numeric,XR);const x=X(o,Is),y=X(o,Ui);X(x,Is,x),nt(x,e.domain,o),nt(y,r,i),nt(y,e.domain,o);const b=Rs(bg);nt(y,e.tld,b),nt(y,e.utld,b),nt(b,e.domain,o),nt(b,r,i),X(b,Ui,y),X(b,Is,x),X(b,Na,u);const w=X(b,Oa),E=Rs(bg);nt(w,e.numeric,E);const N=Rs(bg),k=Rs();nt(N,t,N),nt(N,n,k),nt(k,t,N),nt(k,n,k),X(b,zi,N),X(E,zi,N);const C=X(l,Oa),T=X(c,Oa),j=X(T,zi),S=X(j,zi);nt(l,e.domain,o),X(l,Ui,y),X(l,Is,x),nt(c,e.domain,o),X(c,Ui,y),X(c,Is,x),nt(C,e.domain,N),X(C,zi,N),X(C,If,N),nt(S,e.domain,N),nt(S,t,N),X(S,zi,N);const R=[[Of,Rf],[Ix,Mx],[Lx,Px],[Dx,$x],[Fx,Bx],[Ux,zx],[Vx,Wx],[Hx,Gx]];for(let _=0;_<R.length;_++){const[L,A]=R[_],B=X(N,L);X(k,L,B),X(B,A,N);const U=Rs(bg);nt(B,t,U);const V=Rs();nt(B,n),nt(U,t,U),nt(U,n,V),nt(V,t,U),nt(V,n,V),X(U,A,N),X(V,A,N)}return X(s,Mp,b),X(s,QC,Wie),{start:s,tokens:q5}}function Gie(e,t,n){let r=n.length,s=0,i=[],o=[];for(;s<r;){let l=e,c=null,u=null,d=0,h=null,f=-1;for(;s<r&&!(c=l.go(n[s].t));)o.push(n[s++]);for(;s<r&&(u=c||l.go(n[s].t));)c=null,l=u,l.accepts()?(f=0,h=l):f>=0&&f++,s++,d++;if(f<0)s-=d,s<r&&(o.push(n[s]),s++);else{o.length>0&&(i.push(rw(ZR,t,o)),o=[]),s-=f,d-=f;const p=h.t,m=n.slice(s-d,s);i.push(rw(p,t,m))}}return o.length>0&&i.push(rw(ZR,t,o)),i}function rw(e,t,n){const r=n[0].s,s=n[n.length-1].e,i=t.slice(r,s);return new e(i,n)}const Kie=typeof console<"u"&&console&&console.warn||(()=>{}),qie="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",zt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Yie(){return Kr.groups={},zt.scanner=null,zt.parser=null,zt.tokenQueue=[],zt.pluginQueue=[],zt.customSchemes=[],zt.initialized=!1,zt}function e_(e,t=!1){if(zt.initialized&&Kie(`linkifyjs: already initialized - will not register custom scheme "${e}" ${qie}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
6351. Must only contain digits, lowercase ASCII letters or "-"
6362. Cannot start or end with "-"
6373. "-" cannot repeat`);zt.customSchemes.push([e,t])}function Qie(){zt.scanner=zie(zt.customSchemes);for(let e=0;e<zt.tokenQueue.length;e++)zt.tokenQueue[e][1]({scanner:zt.scanner});zt.parser=Hie(zt.scanner.tokens);for(let e=0;e<zt.pluginQueue.length;e++)zt.pluginQueue[e][1]({scanner:zt.scanner,parser:zt.parser});return zt.initialized=!0,zt}function nT(e){return zt.initialized||Qie(),Gie(zt.parser.start,e,Y5(zt.scanner.start,e))}nT.scan=Y5;function J5(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new tT(n),s=nT(e),i=[];for(let o=0;o<s.length;o++){const l=s[o];l.isLink&&(!t||l.t===t)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}var rT="[\0-   ᠎ -\u2029  ]",Jie=new RegExp(rT),Xie=new RegExp(`${rT}$`),Zie=new RegExp(rT,"g");function eoe(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function toe(e){return new qt({key:new wn("autolink"),appendTransaction:(t,n,r)=>{const s=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!s||i)return;const{tr:o}=r,l=a5(n.doc,[...t]);if(y5(l).forEach(({newRange:u})=>{const d=ere(r.doc,u,p=>p.isTextblock);let h,f;if(d.length>1)h=d[0],f=r.doc.textBetween(h.pos,h.pos+h.node.nodeSize,void 0," ");else if(d.length){const p=r.doc.textBetween(u.from,u.to," "," ");if(!Xie.test(p))return;h=d[0],f=r.doc.textBetween(h.pos,u.to,void 0," ")}if(h&&f){const p=f.split(Jie).filter(Boolean);if(p.length<=0)return!1;const m=p[p.length-1],g=h.pos+f.lastIndexOf(m);if(!m)return!1;const x=nT(m).map(y=>y.toObject(e.defaultProtocol));if(!eoe(x))return!1;x.filter(y=>y.isLink).map(y=>({...y,from:g+y.start+1,to:g+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>e.validate(y.value)).filter(y=>e.shouldAutoLink(y.value)).forEach(y=>{GC(y.from,y.to,r.doc).some(b=>b.mark.type===e.type)||o.addMark(y.from,y.to,e.type.create({href:y.href}))})}}),!!o.steps.length)return o}})}function noe(e){return new qt({key:new wn("handleClickLink"),props:{handleClick:(t,n,r)=>{var s,i;if(r.button!==0||!t.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{let d=r.target;const h=[];for(;d.nodeName!=="DIV";)h.push(d),d=d.parentNode;o=h.find(f=>f.nodeName==="A")}if(!o)return!1;const l=g5(t.state,e.type.name),c=(s=o==null?void 0:o.href)!=null?s:l.href,u=(i=o==null?void 0:o.target)!=null?i:l.target;return e.enableClickSelection&&e.editor.commands.extendMarkRange(e.type.name),o&&c?(window.open(c,u),!0):!1}}})}function roe(e){return new qt({key:new wn("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:s}=t,{selection:i}=s,{empty:o}=i;if(o)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});const c=J5(l,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!c?!1:e.editor.commands.setMark(e.type,{href:c.href})}}})}function Ul(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!e||e.replace(Zie,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var soe=Xc.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){e_(e);return}e_(e.scheme,e.optionalSlashes)})},onDestroy(){Yie()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!Ul(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!Ul(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!Ul(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Wt(this.options.HTMLAttributes,e),0]:["a",Wt(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Ul(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Ul(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[$c({find:e=>{const t=[];if(e){const{protocols:n,defaultProtocol:r}=this.options,s=J5(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:o=>!!Ul(o,n),protocols:n,defaultProtocol:r}));s.length&&s.forEach(i=>t.push({text:i.value,data:{href:i.href},index:i.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(toe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!Ul(s,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&e.push(noe({type:this.type,editor:this.editor,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(roe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}}),ioe=Object.defineProperty,ooe=(e,t)=>{for(var n in t)ioe(e,n,{get:t[n],enumerable:!0})},aoe="listItem",t_="textStyle",n_=/^\s*([-+*])\s$/,X5=Kn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",Wt(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(aoe,this.editor.getAttributes(t_)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=$d({find:n_,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=$d({find:n_,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(t_),editor:this.editor})),[e]}}),Z5=Kn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Wt(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),loe={};ooe(loe,{findListItemPos:()=>pm,getNextListDepth:()=>sT,handleBackspace:()=>jE,handleDelete:()=>OE,hasListBefore:()=>eB,hasListItemAfter:()=>coe,hasListItemBefore:()=>tB,listItemHasSubList:()=>nB,nextListIsDeeper:()=>rB,nextListIsHigher:()=>sB});var pm=(e,t)=>{const{$from:n}=t.selection,r=jn(e,t.schema);let s=null,i=n.depth,o=n.pos,l=null;for(;i>0&&l===null;)s=n.node(i),s.type===r?l=i:(i-=1,o-=1);return l===null?null:{$pos:t.doc.resolve(o),depth:l}},sT=(e,t)=>{const n=pm(e,t);if(!n)return!1;const[,r]=cre(t,e,n.$pos.pos+4);return r},eB=(e,t,n)=>{const{$anchor:r}=e.selection,s=Math.max(0,r.pos-2),i=e.doc.resolve(s).node();return!(!i||!n.includes(i.type.name))},tB=(e,t)=>{var n;const{$anchor:r}=t.selection,s=t.doc.resolve(r.pos-2);return!(s.index()===0||((n=s.nodeBefore)==null?void 0:n.type.name)!==e)},nB=(e,t,n)=>{if(!n)return!1;const r=jn(e,t.schema);let s=!1;return n.descendants(i=>{i.type===r&&(s=!0)}),s},jE=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!kl(e.state,t)&&eB(e.state,t,n)){const{$anchor:l}=e.state.selection,c=e.state.doc.resolve(l.before()-1),u=[];c.node().descendants((f,p)=>{f.type.name===t&&u.push({node:f,pos:p})});const d=u.at(-1);if(!d)return!1;const h=e.state.doc.resolve(c.start()+d.pos+1);return e.chain().cut({from:l.start()-1,to:l.end()+1},h.end()).joinForward().run()}if(!kl(e.state,t)||!fre(e.state))return!1;const r=pm(t,e.state);if(!r)return!1;const i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=nB(t,e.state,i);return tB(t,e.state)&&!o?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},rB=(e,t)=>{const n=sT(e,t),r=pm(e,t);return!r||!n?!1:n>r.depth},sB=(e,t)=>{const n=sT(e,t),r=pm(e,t);return!r||!n?!1:n<r.depth},OE=(e,t)=>{if(!kl(e.state,t)||!hre(e.state,t))return!1;const{selection:n}=e.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:rB(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():sB(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},coe=(e,t)=>{var n;const{$anchor:r}=t.selection,s=t.doc.resolve(r.pos-r.parentOffset-2);return!(s.index()===s.parent.childCount-1||((n=s.nodeAfter)==null?void 0:n.type.name)!==e)},iB=mn.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&OE(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&OE(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&jE(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&jE(e,n,r)&&(t=!0)}),t}}}}),uoe="listItem",r_="textStyle",s_=/^(\d+)\.\s$/,oB=Kn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",Wt(this.options.HTMLAttributes,n),0]:["ol",Wt(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(uoe,this.editor.getAttributes(r_)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=$d({find:s_,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=$d({find:s_,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(r_)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),doe=/^\s*(\[([( |x])?\])\s$/,hoe=Kn.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{const t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",Wt(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{const s=document.createElement("li"),i=document.createElement("label"),o=document.createElement("span"),l=document.createElement("input"),c=document.createElement("div"),u=d=>{var h,f;l.ariaLabel=((f=(h=this.options.a11y)==null?void 0:h.checkboxLabel)==null?void 0:f.call(h,d,l.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};return u(e),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",d=>d.preventDefault()),l.addEventListener("change",d=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:h}=d.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{const p=n();if(typeof p!="number")return!1;const m=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...m==null?void 0:m.attrs,checked:h}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,h)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,h])=>{s.setAttribute(d,h)}),s.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,i.append(l,o),s.append(i,c),Object.entries(t).forEach(([d,h])=>{s.setAttribute(d,h)}),{dom:s,contentDOM:c,update:d=>d.type!==this.type?!1:(s.dataset.checked=d.attrs.checked,l.checked=d.attrs.checked,u(d),!0)}}},addInputRules(){return[$d({find:doe,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),foe=Kn.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",Wt(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});mn.create({name:"listKit",addExtensions(){const e=[];return this.options.bulletList!==!1&&e.push(X5.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(Z5.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(iB.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(oB.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(hoe.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(foe.configure(this.options.taskList)),e}});var poe=Kn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Wt(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),moe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,goe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,yoe=Xc.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Wt(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Dd({find:moe,type:this.type})]},addPasteRules(){return[$c({find:goe,type:this.type})]}}),xoe=Kn.create({name:"text",group:"inline"}),voe=Xc.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Wt(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function boe(e={}){return new qt({view(t){return new woe(t,e)}})}class woe{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let i=o=>{this[s](o)};return t.dom.addEventListener(s,i),{name:s,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,s=this.editorView.dom,i=s.getBoundingClientRect(),o=i.width/s.offsetWidth,l=i.height/s.offsetHeight;if(n){let h=t.nodeBefore,f=t.nodeAfter;if(h||f){let p=this.editorView.nodeDOM(this.cursorPos-(h?h.nodeSize:0));if(p){let m=p.getBoundingClientRect(),g=h?m.bottom:m.top;h&&f&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let x=this.width/2*l;r={left:m.left,right:m.right,top:g-x,bottom:g+x}}}}if(!r){let h=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;
vendor: 3,727 bytes, line 637
637r={left:h.left-f,right:h.left+f,top:h.top,bottom:h.bottom}}let c=this.editorView.dom.offsetParent;this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,d;if(!c||c==document.body&&getComputedStyle(c).position=="static")u=-pageXOffset,d=-pageYOffset;else{let h=c.getBoundingClientRect(),f=h.width/c.offsetWidth,p=h.height/c.offsetHeight;u=h.left-c.scrollLeft*f,d=h.top-c.scrollTop*p}this.element.style.left=(r.left-u)/o+"px",this.element.style.top=(r.top-d)/l+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,n,t):s;if(n&&!i){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=h3(this.editorView.state.doc,o,this.editorView.dragging.slice);l!=null&&(o=l)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}class dn extends Pe{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return dn.valid(r)?new dn(r):Pe.near(r)}content(){return oe.empty}eq(t){return t instanceof dn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new dn(t.resolve(n.pos))}getBookmark(){return new iT(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!Soe(t)||!Eoe(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(t.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&dn.valid(t))return t;let s=t.pos,i=null;for(let o=t.depth;;o--){let l=t.node(o);if(n>0?t.indexAfter(o)<l.childCount:t.index(o)>0){i=l.child(n>0?t.indexAfter(o):t.index(o)-1);break}else if(o==0)return null;s+=n;let c=t.doc.resolve(s);if(dn.valid(c))return c}for(;;){let o=n>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!ke.isSelectable(i)){t=t.doc.resolve(s+i.nodeSize*n),r=!1;continue e}break}i=o,s+=n;let l=t.doc.resolve(s);if(dn.valid(l))return l}return null}}}dn.prototype.visible=!1;dn.findFrom=dn.findGapCursorFrom;Pe.jsonID("gapcursor",dn);class iT{constructor(t){this.pos=t}map(t){return new iT(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return dn.valid(n)?new dn(n):Pe.near(n)}}function Soe(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||s.isAtom||s.type.spec.isolating)return!0;if(s.inlineContent)return!1}}return!0}function Eoe(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||s.isAtom||s.type.spec.isolating)return!0;if(s.inlineContent)return!1}}return!0}function Noe(){return new qt({props:{decorations:Aoe,createSelectionBetween(e,t,n){return t.pos==n.pos&&dn.valid(n)?new dn(n):null}
vendor: 15,028 bytes, line 637
637,handleClick:Coe,handleKeyDown:koe,handleDOMEvents:{beforeinput:Toe}}})}const koe=$C({ArrowLeft:wg("horiz",-1),ArrowRight:wg("horiz",1),ArrowUp:wg("vert",-1),ArrowDown:wg("vert",1)});function wg(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,s,i){let o=r.selection,l=t>0?o.$to:o.$from,c=o.empty;if(o instanceof Ae){if(!i.endOfTextblock(n)||l.depth==0)return!1;c=!1,l=r.doc.resolve(t>0?l.after():l.before())}let u=dn.findGapCursorFrom(l,t,c);return u?(s&&s(r.tr.setSelection(new dn(u))),!0):!1}}function Coe(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!dn.valid(r))return!1;let s=e.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&ke.isSelectable(e.state.doc.nodeAt(s.inside))?!1:(e.dispatch(e.state.tr.setSelection(new dn(r))),!0)}function Toe(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof dn))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let s=Y.empty;for(let o=r.length-1;o>=0;o--)s=Y.from(r[o].createAndFill(null,s));let i=e.state.tr.replace(n.pos,n.pos,new oe(s,0,0));return i.setSelection(Ae.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function Aoe(e){if(!(e.selection instanceof dn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Mt.create(e.doc,[Vn.widget(e.selection.head,t,{key:"gapcursor"})])}var o0=200,Gn=function(){};Gn.prototype.append=function(t){return t.length?(t=Gn.from(t),!this.length&&t||t.length<o0&&this.leafAppend(t)||this.length<o0&&t.leafPrepend(this)||this.appendInner(t)):this};Gn.prototype.prepend=function(t){return t.length?Gn.from(t).append(this):this};Gn.prototype.appendInner=function(t){return new joe(this,t)};Gn.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?Gn.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Gn.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Gn.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};Gn.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(i,o){return s.push(t(i,o))},n,r),s};Gn.from=function(t){return t instanceof Gn?t:t&&t.length?new aB(t):Gn.empty};var aB=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(s,i){return s==0&&i==this.length?this:new t(this.values.slice(s,i))},t.prototype.getInner=function(s){return this.values[s]},t.prototype.forEachInner=function(s,i,o,l){for(var c=i;c<o;c++)if(s(this.values[c],l+c)===!1)return!1},t.prototype.forEachInvertedInner=function(s,i,o,l){for(var c=i-1;c>=o;c--)if(s(this.values[c],l+c)===!1)return!1},t.prototype.leafAppend=function(s){if(this.length+s.length<=o0)return new t(this.values.concat(s.flatten()))},t.prototype.leafPrepend=function(s){if(this.length+s.length<=o0)return new t(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Gn);Gn.empty=new aB([]);var joe=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,s,i,o){var l=this.left.length;if(s<l&&this.left.forEachInner(r,s,Math.min(i,l),o)===!1||i>l&&this.right.forEachInner(r,Math.max(s-l,0),Math.min(this.length,i)-l,o+l)===!1)return!1},t.prototype.forEachInvertedInner=function(r,s,i,o){var l=this.left.length;if(s>l&&this.right.forEachInvertedInner(r,s-l,Math.max(i,l)-l,o+l)===!1||i<l&&this.left.forEachInvertedInner(r,Math.min(s,l),i,o)===!1)return!1},t.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(r,s):r>=i?this.right.slice(r-i,s-i):this.left.slice(r,i).append(this.right.slice(0,s-i))},t.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new t(this.left,s)},t.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new t(s,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(Gn);const Ooe=500;class fi{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,i;n&&(s=this.remapping(r,this.items.length),i=s.maps.length);let o=t.tr,l,c,u=[],d=[];return this.items.forEach((h,f)=>{if(!h.step){s||(s=this.remapping(r,f+1),i=s.maps.length),i--,d.push(h);return}if(s){d.push(new Vi(h.map));let p=h.step.map(s.slice(i)),m;p&&o.maybeStep(p).doc&&(m=o.mapping.maps[o.mapping.maps.length-1],u.push(new Vi(m,void 0,void 0,u.length+d.length))),i--,m&&s.appendMap(m,i)}else o.maybeStep(h.step);if(h.selection)return l=s?h.selection.map(s.slice(i)):h.selection,c=new fi(this.items.slice(0,r).append(d.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:l}}addTransform(t,n,r,s){let i=[],o=this.eventCount,l=this.items,c=!s&&l.length?l.get(l.length-1):null;for(let d=0;d<t.steps.length;d++){let h=t.steps[d].invert(t.docs[d]),f=new Vi(t.mapping.maps[d],h,n),p;(p=c&&c.merge(f))&&(f=p,d?i.pop():l=l.slice(0,l.length-1)),i.push(f),n&&(o++,n=void 0),s||(c=f)}let u=o-r.depth;return u>_oe&&(l=Roe(l,u),o-=u),new fi(l.append(i),o)}remapping(t,n){let r=new Tp;return this.items.forEach((s,i)=>{let o=s.mirrorOffset!=null&&i-s.mirrorOffset>=t?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,o)},t,n),r}addMaps(t){return this.eventCount==0?this:new fi(this.items.append(t.map(n=>new Vi(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),i=t.mapping,o=t.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},s);let c=n;this.items.forEach(f=>{let p=i.getMirror(--c);if(p==null)return;o=Math.min(o,p);let m=i.maps[p];if(f.step){let g=t.steps[p].invert(t.docs[p]),x=f.selection&&f.selection.map(i.slice(c+1,p));x&&l++,r.push(new Vi(m,g,x))}else r.push(new Vi(m))},s);let u=[];for(let f=n;f<o;f++)u.push(new Vi(i.maps[f]));let d=this.items.slice(0,s).append(u).append(r),h=new fi(d,l);return h.emptyItemCount()>Ooe&&(h=h.compress(this.items.length-r.length)),h}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,s=[],i=0;return this.items.forEach((o,l)=>{if(l>=t)s.push(o),o.selection&&i++;else if(o.step){let c=o.step.map(n.slice(r)),u=c&&c.getMap();if(r--,u&&n.appendMap(u,r),c){let d=o.selection&&o.selection.map(n.slice(r));d&&i++;let h=new Vi(u.invert(),c,d),f,p=s.length-1;(f=s.length&&s[p].merge(h))?s[p]=f:s.push(h)}}else o.map&&r--},this.items.length,0),new fi(Gn.from(s.reverse()),i)}}fi.empty=new fi(Gn.empty,0);function Roe(e,t){let n;return e.forEach((r,s)=>{if(r.selection&&t--==0)return n=s,!1}),e.slice(n)}class Vi{constructor(t,n,r,s){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=s}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new Vi(n.getMap().invert(),n,this.selection)}}}class ka{constructor(t,n,r,s,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=i}}const _oe=20;function Ioe(e,t,n,r){let s=n.getMeta(xc),i;if(s)return s.historyState;n.getMeta(Poe)&&(e=new ka(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(o&&o.getMeta(xc))return o.getMeta(xc).redo?new ka(e.done.addTransform(n,void 0,r,dy(t)),e.undone,i_(n.mapping.maps),e.prevTime,e.prevComposition):new ka(e.done,e.undone.addTransform(n,void 0,r,dy(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),c=e.prevTime==0||!o&&e.prevComposition!=l&&(e.prevTime<(n.time||0)-r.newGroupDelay||!Moe(n,e.prevRanges)),u=o?sw(e.prevRanges,n.mapping):i_(n.mapping.maps);return new ka(e.done.addTransform(n,c?t.selection.getBookmark():void 0,r,dy(t)),fi.empty,u,n.time,l??e.prevComposition)}else return(i=n.getMeta("rebased"))?new ka(e.done.rebased(n,i),e.undone.rebased(n,i),sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new ka(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function Moe(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,s)=>{for(let i=0;i<t.length;i+=2)r<=t[i+1]&&s>=t[i]&&(n=!0)}),n}function i_(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,s,i,o)=>t.push(i,o));return t}function sw(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let s=t.map(e[r],1),i=t.map(e[r+1],-1);s<=i&&n.push(s,i)}return n}function Loe(e,t,n){let r=dy(t),s=xc.get(t).spec.config,i=(n?e.undone:e.done).popEvent(t,r);if(!i)return null;let o=i.selection.resolve(i.transform.doc),l=(n?e.done:e.undone).addTransform(i.transform,t.selection.getBookmark(),s,r),c=new ka(n?l:i.remaining,n?i.remaining:l,null,0,-1);return i.transform.setSelection(o).setMeta(xc,{redo:n,historyState:c})}let iw=!1,o_=null;function dy(e){let t=e.plugins;if(o_!=t){iw=!1,o_=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){iw=!0;break}}return iw}const xc=new wn("history"),Poe=new wn("closeHistory");function Doe(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new qt({key:xc,state:{init(){return new ka(fi.empty,fi.empty,null,0,-1)},apply(t,n,r){return Ioe(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,s=r=="historyUndo"?cB:r=="historyRedo"?uB:null;return s?(n.preventDefault(),s(t.state,t.dispatch)):!1}}}})}function lB(e,t){return(n,r)=>{let s=xc.getState(n);if(!s||(e?s.undone:s.done).eventCount==0)return!1;if(r){let i=Loe(s,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}const cB=lB(!1,!0),uB=lB(!0,!0);mn.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){const r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new qt({key:new wn("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;const s=this.options.limit;if(s==null||s===0){e=!0;return}const i=this.storage.characters({node:r.doc});if(i>s){const o=i-s,l=0,c=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);const u=r.tr.deleteRange(l,c);return e=!0,u}e=!0},filterTransaction:(t,n)=>{const r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;const s=this.storage.characters({node:n.doc}),i=this.storage.characters({node:t.doc});if(i<=r||s>r&&i>r&&i<=s)return!0;if(s>r&&i>r&&i>s||!t.getMeta("paste"))return!1;const l=t.selection.$head.pos,c=i-r,u=l-c,d=l;return t.deleteRange(u,d),!(this.storage.characters({node:t.doc})>r)}})]}});var $oe=mn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[boe(this.options)]}});mn.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new qt({key:new wn("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:s}=t,i=[];if(!n||!r)return Mt.create(e,[]);let o=0;this.options.mode==="deepest"&&e.descendants((c,u)=>{if(c.isText)return;if(!(s>=u&&s<=u+c.nodeSize-1))return!1;o+=1});let l=0;return e.descendants((c,u)=>{if(c.isText||!(s>=u&&s<=u+c.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&o-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";i.push(Vn.node(u,u+c.nodeSize,{class:this.options.className}))}),Mt.create(e,i)}}})]}});var Foe=mn.create({name:"gapCursor",addProseMirrorPlugins(){return[Noe()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=bt(we(e,"allowGapCursor",n)))!=null?t:null}}});mn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new qt({key:new wn("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,s=[];if(!n)return null;const i=this.editor.isEmpty;return e.descendants((o,l)=>{const c=r>=l&&r<=l+o.nodeSize,u=!o.isLeaf&&Tv(o);if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];i&&d.push(this.options.emptyEditorClass);const h=Vn.node(l,l+o.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:l,hasAnchor:c}):this.options.placeholder});s.push(h)}return this.options.includeChildren}),Mt.create(e,s)}}})]}});mn.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new qt({key:new wn("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||v5(n.selection)||e.view.dragging?null:Mt.create(n.doc,[Vn.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function a_({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var Boe=mn.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:[]}},addProseMirrorPlugins(){const e=new wn(this.name),t=Object.entries(this.editor.schema.nodes).map(([,n])=>n).filter(n=>(this.options.notAfter||[]).concat(this.options.node).includes(n.name));return[new qt({key:e,appendTransaction:(n,r,s)=>{const{doc:i,tr:o,schema:l}=s,c=e.getState(s),u=i.content.size,d=l.nodes[this.options.node];if(c)return o.insert(u,d.create())},state:{init:(n,r)=>{const s=r.tr.doc.lastChild;
637return!a_({node:s,types:t})},apply:(n,r)=>{if(!n.docChanged)return r;const s=n.doc.lastChild;return!a_({node:s,types:t})}}})]}}),Uoe=mn.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>cB(e,t),redo:()=>({state:e,dispatch:t})=>uB(e,t)}},addProseMirrorPlugins(){return[Doe(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),zoe=mn.create({name:"starterKit",addExtensions(){var e,t,n,r;const s=[];return this.options.bold!==!1&&s.push(xie.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(fie.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(X5.configure(this.options.bulletList)),this.options.code!==!1&&s.push(wie.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(Nie.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(kie.configure(this.options.document)),this.options.dropcursor!==!1&&s.push($oe.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(Foe.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(Cie.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(Tie.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(Uoe.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(Aie.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(Iie.configure(this.options.italic)),this.options.listItem!==!1&&s.push(Z5.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(iB.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&s.push(soe.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&s.push(oB.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(poe.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(yoe.configure(this.options.strike)),this.options.text!==!1&&s.push(xoe.configure(this.options.text)),this.options.underline!==!1&&s.push(voe.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&s.push(Boe.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),Voe=zoe,RE,_E;if(typeof WeakMap<"u"){let e=new WeakMap;RE=t=>e.get(t),_E=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;RE=r=>{for(let s=0;s<e.length;s+=2)if(e[s]==r)return e[s+1]},_E=(r,s)=>(n==10&&(n=0),e[n++]=r,e[n++]=s)}var hn=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,s=t/this.width|0;let i=r+1,o=s+1;for(let l=1;i<this.width&&this.map[t+l]==n;l++)i++;for(let l=1;o<this.height&&this.map[t+this.width*l]==n;l++)o++;return{left:r,top:s,right:i,bottom:o}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:s,top:i,bottom:o}=this.findCell(e);return t=="horiz"?(n<0?r==0:s==this.width)?null:this.map[i*this.width+(n<0?r-1:s)]:(n<0?i==0:o==this.height)?null:this.map[r+this.width*(n<0?i-1:o)]}rectBetween(e,t){const{left:n,right:r,top:s,bottom:i}=this.findCell(e),{left:o,right:l,top:c,bottom:u}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(s,c),right:Math.max(r,l),bottom:Math.max(i,u)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let s=e.left;s<e.right;s++){const i=r*this.width+s,o=this.map[i];n[o]||(n[o]=!0,!(s==e.left&&s&&this.map[i-1]==o||r==e.top&&r&&this.map[i-this.width]==o)&&t.push(o))}return t}positionAt(e,t,n){for(let r=0,s=0;;r++){const i=s+n.child(r).nodeSize;if(r==e){let o=t+e*this.width;const l=(e+1)*this.width;for(;o<l&&this.map[o]<s;)o++;return o==l?i-1:this.map[o]}s=i}}static get(e){return RE(e)||_E(e,Woe(e))}};function Woe(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.n
637ame);const t=Hoe(e),n=e.childCount,r=[];let s=0,i=null;const o=[];for(let u=0,d=t*n;u<d;u++)r[u]=0;for(let u=0,d=0;u<n;u++){const h=e.child(u);d++;for(let m=0;;m++){for(;s<r.length&&r[s]!=0;)s++;if(m==h.childCount)break;const g=h.child(m),{colspan:x,rowspan:y,colwidth:b}=g.attrs;for(let w=0;w<y;w++){if(w+u>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:d,n:y-w});break}const E=s+w*t;for(let N=0;N<x;N++){r[E+N]==0?r[E+N]=d:(i||(i=[])).push({type:"collision",row:u,pos:d,n:x-N});const k=b&&b[N];if(k){const C=(E+N)%t*2,T=o[C];T==null||T!=k&&o[C+1]==1?(o[C]=k,o[C+1]=1):T==k&&o[C+1]++}}}s+=x,d+=g.nodeSize}const f=(u+1)*t;let p=0;for(;s<f;)r[s++]==0&&p++;p&&(i||(i=[])).push({type:"missing",row:u,n:p}),d++}(t===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const l=new hn(t,n,r,i);let c=!1;for(let u=0;!c&&u<o.length;u+=2)o[u]!=null&&o[u+1]<n&&(c=!0);return c&&Goe(l,o,e),l}function Hoe(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const s=e.child(r);let i=0;if(n)for(let o=0;o<r;o++){const l=e.child(o);for(let c=0;c<l.childCount;c++){const u=l.child(c);o+u.attrs.rowspan>r&&(i+=u.attrs.colspan)}}for(let o=0;o<s.childCount;o++){const l=s.child(o);i+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}t==-1?t=i:t!=i&&(t=Math.max(t,i))}return t}function Goe(e,t,n){e.problems||(e.problems=[]);const r={};for(let s=0;s<e.map.length;s++){const i=e.map[s];if(r[i])continue;r[i]=!0;const o=n.nodeAt(i);if(!o)throw new RangeError(`No cell with offset ${i} found`);let l=null;const c=o.attrs;for(let u=0;u<c.colspan;u++){const d=(s+u)%e.width,h=t[d*2];h!=null&&(!c.colwidth||c.colwidth[u]!=h)&&((l||(l=Koe(c)))[u]=h)}l&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:l})}}function Koe(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Nr(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],s=r.spec.tableRole;s&&(t[s]=r)}}return t}var Ra=new wn("selectingCells");function ih(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function qoe(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function Oi(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function _v(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=ih(t.$head)||Yoe(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function Yoe(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function IE(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function Qoe(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function oT(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function dB(e,t,n){const r=e.node(-1),s=hn.get(r),i=e.start(-1),o=s.nextCell(e.pos-i,t,n);return o==null?null:e.node(0).resolve(i+o)}function Fc(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(s=>s>0)||(r.colwidth=null)),r}function hB(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let s=0;s<n;s++)r.colwidth.splice(t,0,0)}return r}function Joe(e,t,n){const r=Nr(t.type.schema).header_cell;for(let s=0;s<e.height;s++)if(t.nodeAt(e.map[n+s*e.width]).type!=r)return!1;return!0}var Dt=class Mo extends Pe{constructor(t,n=t){const r=t.node(-1),s=hn.get(r),i=t.start(-1),o=s.rectBetween(t.pos-i,n.pos-i),l=t.node(0),c=s.cellsInRect(o).filter(d=>d!=n.pos-i);c.unshift(n.pos-i);const u=c.map(d=>{const h=r.nodeAt(d);if(!h)throw RangeError(`No cell with offset ${d} found`);const f=i+d+1;return new y3(l.resolve(f),l.resolve(f+h.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){const r=t.resolve(n.map(this.$anchorCell.pos)),s=t.resolve(n.map(this.$headCell.pos));if(IE(r)&&IE(s)&&oT(r,s)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?Mo.rowSelection(r,s):i&&this.isColSelection()?Mo.colSelection(r,s):new Mo(r,s)}return Ae.between(r,s)}content(){const t=this.$anchorCell.node(-1),n=hn.get(t),r=this.$anchorCell.start(-1),s=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},o=[];for(let c=s.top;c<s.bottom;c++){const u=[];for(let d=c*n.width+s.left,h=s.left;h<s.right;h++,d++){const f=n.map[d];if(i[f])continue;i[f]=!0;const p=n.findCell(f);let m=t.nodeAt(f);if(!m)throw RangeError(`No cell with offset ${f} found`);const g=s.left-p.left,x=p.right-s.right;if(g>0||x>0){let y=m.attrs;if(g>0&&(y=Fc(y,0,g)),x>0&&(y=Fc(y,y.colspan-x,x)),p.left<s.left){if(m=m.type.createAndFill(y),!m)throw RangeError(`Could not create cell with attrs ${JSON.stringify(y)}`)}else m=m.type.create(y,m.content)}if(p.top<s.top||p.bottom>s.bottom){const y={...m.attrs,rowspan:Math.min(p.bottom,s.bottom)-Math.max(p.top,s.top)};p.top<s.top?m=m.type.createAndFill(y):m=m.type.create(y,m.content)}u.push(m)}o.push(t.child(c).copy(Y.from(u)))}const l=this.isColSelection()&&this.isRowSelection()?t:o;return new oe(Y.from(l),1,1)}replace(t,n=oe.empty){const r=t.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){const{$from:l,$to:c}=s[o],u=t.mapping.slice(r);t.replace(u.map(l.pos),u.map(c.pos),o?oe.empty:n)}const i=Pe.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);i&&t.setSelection(i)}replaceWith(t,n){this.replace(t,new oe(Y.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),r=hn.get(n),s=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-s,this.$headCell.pos-s));for(let o=0;o<i.length;o++)t(n.nodeAt(i[o]),s+i[o])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const r=t+this.$anchorCell.nodeAfter.attrs.rowspan,s=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,s)==this.$headCell.node(-1).childCount}
vendor: 4,579 bytes, line 637
637static colSelection(t,n=t){const r=t.node(-1),s=hn.get(r),i=t.start(-1),o=s.findCell(t.pos-i),l=s.findCell(n.pos-i),c=t.node(0);return o.top<=l.top?(o.top>0&&(t=c.resolve(i+s.map[o.left])),l.bottom<s.height&&(n=c.resolve(i+s.map[s.width*(s.height-1)+l.right-1]))):(l.top>0&&(n=c.resolve(i+s.map[l.left])),o.bottom<s.height&&(t=c.resolve(i+s.map[s.width*(s.height-1)+o.right-1]))),new Mo(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=hn.get(t),r=this.$anchorCell.start(-1),s=n.colCount(this.$anchorCell.pos-r),i=n.colCount(this.$headCell.pos-r);if(Math.min(s,i)>0)return!1;const o=s+this.$anchorCell.nodeAfter.attrs.colspan,l=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,l)==n.width}eq(t){return t instanceof Mo&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const r=t.node(-1),s=hn.get(r),i=t.start(-1),o=s.findCell(t.pos-i),l=s.findCell(n.pos-i),c=t.node(0);return o.left<=l.left?(o.left>0&&(t=c.resolve(i+s.map[o.top*s.width])),l.right<s.width&&(n=c.resolve(i+s.map[s.width*(l.top+1)-1]))):(l.left>0&&(n=c.resolve(i+s.map[l.top*s.width])),o.right<s.width&&(t=c.resolve(i+s.map[s.width*(o.top+1)-1]))),new Mo(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new Mo(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new Mo(t.resolve(n),t.resolve(r))}getBookmark(){return new Xoe(this.$anchorCell.pos,this.$headCell.pos)}};Dt.prototype.visible=!1;Pe.jsonID("cell",Dt);var Xoe=class fB{constructor(t,n){this.anchor=t,this.head=n}map(t){return new fB(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),r=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&oT(n,r)?new Dt(n,r):Pe.near(r,1)}};function Zoe(e){if(!(e.selection instanceof Dt))return null;const t=[];return e.selection.forEachCell((n,r)=>{t.push(Vn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),Mt.create(e.doc,t)}function eae({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,s=e.depth;for(;s>=0&&!(e.after(s+1)<e.end(s));s--,n++);for(let i=t.depth;i>=0&&!(t.before(i+1)>t.start(i));i--,r--);return n==r&&/row|table/.test(e.node(s).type.spec.tableRole)}function tae({$from:e,$to:t}){let n,r;for(let s=e.depth;s>0;s--){const i=e.node(s);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let s=t.depth;s>0;s--){const i=t.node(s);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&t.parentOffset===0}function nae(e,t,n){const r=(t||e).selection,s=(t||e).doc;let i,o;if(r instanceof ke&&(o=r.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")i=Dt.create(s,r.from);else if(o=="row"){const l=s.resolve(r.from+1);i=Dt.rowSelection(l,l)}else if(!n){const l=hn.get(r.node),c=r.from+1,u=c+l.map[l.width*l.height-1];i=Dt.create(s,c+1,u)}}else r instanceof Ae&&eae(r)?i=Ae.create(s,r.from):r instanceof Ae&&tae(r)&&(i=Ae.create(s,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}var rae=new wn("fix-tables");function pB(e,t,n,r){const s=e.childCount,i=t.childCount;e:for(let o=0,l=0;o<i;o++){const c=t.child(o);for(let u=l,d=Math.min(s,o+3);u<d;u++)if(e.child(u)==c){l=u+1,n+=c.nodeSize;continue e}r(c,n),l<s&&e.child(l).sameMarkup(c)?pB(e.child(l),c,n+1,r):c.nodesBetween(0,c.content.size,r,n+1),n+=c.nodeSize}}function mB(e,t){let n;const r=(s,i)=>{s.type.spec.tableRole=="table"&&(n=sae(e,s,i,n))};return t?t.doc!=e.doc&&pB(t.doc,e.doc,0,r):e.doc.descendants(r),n}function sae(e,t,n,r){const s=hn.get(t);if(!s.problems)return r;r||(r=e.tr);const i=[];for(let c=0;c<s.height;c++)i.push(0);for(let c=0;c<s.problems.length;c++){const u=s.problems[c];if(u.type=="collision"){const d=t.nodeAt(u.pos);if(!d)continue;const h=d.attrs;for(let f=0;f<h.rowspan;f++)i[u.row+f]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,Fc(h,h.colspan-u.n,u.n))}else if(u.type=="missing")i[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const d=t.nodeAt(u.pos);if(!d)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const d=t.nodeAt(u.pos);if(!d)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...d.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){const d=r.mapping.map(n);r.delete(d,d+t.nodeSize)}}let o,l;for(let c=0;c<i.length;c++)i[c]&&(o==null&&(o=c),l=c);for(let c=0,u=n+1;c<s.height;
637c++){const d=t.child(c),h=u+d.nodeSize,f=i[c];if(f>0){let p="cell";d.firstChild&&(p=d.firstChild.type.spec.tableRole);const m=[];for(let x=0;x<f;x++){const y=Nr(e.schema)[p].createAndFill();y&&m.push(y)}const g=(c==0||o==c-1)&&l==c?u+1:h-1;r.insert(r.mapping.map(g),m)}u=h}return r.setMeta(rae,{fixTables:!0})}function xo(e){const t=e.selection,n=_v(e),r=n.node(-1),s=n.start(-1),i=hn.get(r);return{...t instanceof Dt?i.rectBetween(t.$anchorCell.pos-s,t.$headCell.pos-s):i.findCell(n.pos-s),tableStart:s,map:i,table:r}}function gB(e,{map:t,tableStart:n,table:r},s){let i=s>0?-1:0;Joe(t,r,s+i)&&(i=s==0||s==t.width?null:0);for(let o=0;o<t.height;o++){const l=o*t.width+s;if(s>0&&s<t.width&&t.map[l-1]==t.map[l]){const c=t.map[l],u=r.nodeAt(c);e.setNodeMarkup(e.mapping.map(n+c),null,hB(u.attrs,s-t.colCount(c))),o+=u.attrs.rowspan-1}else{const c=i==null?Nr(r.type.schema).cell:r.nodeAt(t.map[l+i]).type,u=t.positionAt(o,s,r);e.insert(e.mapping.map(n+u),c.createAndFill())}}return e}function iae(e,t){if(!Oi(e))return!1;if(t){const n=xo(e);t(gB(e.tr,n,n.left))}return!0}function oae(e,t){if(!Oi(e))return!1;if(t){const n=xo(e);t(gB(e.tr,n,n.right))}return!0}function aae(e,{map:t,table:n,tableStart:r},s){const i=e.mapping.maps.length;for(let o=0;o<t.height;){const l=o*t.width+s,c=t.map[l],u=n.nodeAt(c),d=u.attrs;if(s>0&&t.map[l-1]==c||s<t.width-1&&t.map[l+1]==c)e.setNodeMarkup(e.mapping.slice(i).map(r+c),null,Fc(d,s-t.colCount(c)));else{const h=e.mapping.slice(i).map(r+c);e.delete(h,h+u.nodeSize)}o+=d.rowspan}}function lae(e,t){if(!Oi(e))return!1;if(t){const n=xo(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let s=n.right-1;aae(r,n,s),s!=n.left;s--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=hn.get(i)}t(r)}return!0}function cae(e,t,n){var r;const s=Nr(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if(((r=t.nodeAt(e.map[i+n*e.width]))==null?void 0:r.type)!=s)return!1;return!0}function yB(e,{map:t,tableStart:n,table:r},s){var i;let o=n;for(let u=0;u<s;u++)o+=r.child(u).nodeSize;const l=[];let c=s>0?-1:0;cae(t,r,s+c)&&(c=s==0||s==t.height?null:0);for(let u=0,d=t.width*s;u<t.width;u++,d++)if(s>0&&s<t.height&&t.map[d]==t.map[d-t.width]){const h=t.map[d],f=r.nodeAt(h).attrs;e.setNodeMarkup(n+h,null,{...f,rowspan:f.rowspan+1}),u+=f.colspan-1}else{const h=c==null?Nr(r.type.schema).cell:(i=r.nodeAt(t.map[d+c*t.width]))==null?void 0:i.type,f=h==null?void 0:h.createAndFill();f&&l.push(f)}return e.insert(o,Nr(r.type.schema).row.create(null,l)),e}function uae(e,t){if(!Oi(e))return!1;if(t){const n=xo(e);t(yB(e.tr,n,n.top))}return!0}function dae(e,t){if(!Oi(e))return!1;if(t){const n=xo(e);t(yB(e.tr,n,n.bottom))}return!0}function hae(e,{map:t,table:n,tableStart:r},s){let i=0;for(let u=0;u<s;u++)i+=n.child(u).nodeSize;const o=i+n.child(s).nodeSize,l=e.mapping.maps.length;e.delete(i+r,o+r);const c=new Set;for(let u=0,d=s*t.width;u<t.width;u++,d++){const h=t.map[d];if(!c.has(h)){if(c.add(h),s>0&&h==t.map[d-t.width]){const f=n.nodeAt(h).attrs;e.setNodeMarkup(e.mapping.slice(l).map(h+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(s<t.height&&h==t.map[d+t.width]){const f=n.nodeAt(h),p=f.attrs,m=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),g=t.positionAt(s+1,u,n);e.insert(e.mapping.slice(l).map(r+g),m),u+=p.colspan-1}}}}function fae(e,t){if(!Oi(e))return!1;if(t){const n=xo(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let s=n.bottom-1;hae(r,n,s),s!=n.top;s--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=hn.get(n.table)}t(r)}return!0}function l_(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function pae({width:e,height:t,map:n},r){let s=r.top*e+r.left,i=s,o=(r.bottom-1)*e+r.left,l=s+(r.right-r.left-1);for(let c=r.top;c<r.bottom;c++){if(r.left>0&&n[i]==n[i-1]||r.right<e&&n[l]==n[l+1])return!0;i+=e,l+=e}for(let c=r.left;c<r.right;c++){if(r.top>0&&n[s]==n[s-e]||r.bottom<t&&n[o]==n[o+e])return!0;s++,o++}return!1}function c_(e,t){const n=e.selection;if(!(n instanceof Dt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=xo(e),{map:s}=r;if(pae(s,r))return!1;if(t){const i=e.tr,o={};let l=Y.empty,c,u;for(let d=r.top;d<r.bottom;d++)for(let h=r.left;h<r.right;h++){const f=s.map[d*s.width+h],p=r.table.nodeAt(f);if(!(o[f]||!p))if(o[f]=!0,c==null)c=f,u=p;
vendor: 4,128 bytes, line 637
637else{l_(p)||(l=l.append(p.content));const m=i.mapping.map(f+r.tableStart);i.delete(m,m+p.nodeSize)}}if(c==null||u==null)return!0;if(i.setNodeMarkup(c+r.tableStart,null,{...hB(u.attrs,u.attrs.colspan,r.right-r.left-u.attrs.colspan),rowspan:r.bottom-r.top}),l.size){const d=c+1+u.content.size,h=l_(u)?c+1:d;i.replaceWith(h+r.tableStart,d+r.tableStart,l)}i.setSelection(new Dt(i.doc.resolve(c+r.tableStart))),t(i)}return!0}function u_(e,t){const n=Nr(e.schema);return mae(({node:r})=>n[r.type.spec.tableRole])(e,t)}function mae(e){return(t,n)=>{var r;const s=t.selection;let i,o;if(s instanceof Dt){if(s.$anchorCell.pos!=s.$headCell.pos)return!1;i=s.$anchorCell.nodeAfter,o=s.$anchorCell.pos}else{if(i=qoe(s.$from),!i)return!1;o=(r=ih(s.$from))==null?void 0:r.pos}if(i==null||o==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let l=i.attrs;const c=[],u=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const d=xo(t),h=t.tr;for(let p=0;p<d.right-d.left;p++)c.push(u?{...l,colwidth:u&&u[p]?[u[p]]:null}:l);let f;for(let p=d.top;p<d.bottom;p++){let m=d.map.positionAt(p,d.left,d.table);p==d.top&&(m+=i.nodeSize);for(let g=d.left,x=0;g<d.right;g++,x++)g==d.left&&p==d.top||h.insert(f=h.mapping.map(m+d.tableStart,1),e({node:i,row:p,col:g}).createAndFill(c[x]))}h.setNodeMarkup(o,e({node:i,row:d.top,col:d.left}),c[0]),s instanceof Dt&&h.setSelection(new Dt(h.doc.resolve(s.$anchorCell.pos),f?h.doc.resolve(f):void 0)),n(h)}return!0}}function gae(e,t){return function(n,r){if(!Oi(n))return!1;const s=_v(n);if(s.nodeAfter.attrs[e]===t)return!1;if(r){const i=n.tr;n.selection instanceof Dt?n.selection.forEachCell((o,l)=>{o.attrs[e]!==t&&i.setNodeMarkup(l,null,{...o.attrs,[e]:t})}):i.setNodeMarkup(s.pos,null,{...s.nodeAfter.attrs,[e]:t}),r(i)}return!0}}function yae(e){return function(t,n){if(!Oi(t))return!1;if(n){const r=Nr(t.schema),s=xo(t),i=t.tr,o=s.map.cellsInRect(e=="column"?{left:s.left,top:0,right:s.right,bottom:s.map.height}:e=="row"?{left:0,top:s.top,right:s.map.width,bottom:s.bottom}:s),l=o.map(c=>s.table.nodeAt(c));for(let c=0;c<o.length;c++)l[c].type==r.header_cell&&i.setNodeMarkup(s.tableStart+o[c],r.cell,l[c].attrs);if(i.steps.length==0)for(let c=0;c<o.length;c++)i.setNodeMarkup(s.tableStart+o[c],r.header_cell,l[c].attrs);n(i)}return!0}}function d_(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let s=0;s<r.length;s++){const i=t.table.nodeAt(r[s]);if(i&&i.type!==n.header_cell)return!1}return!0}function Pp(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?yae(e):function(n,r){if(!Oi(n))return!1;if(r){const s=Nr(n.schema),i=xo(n),o=n.tr,l=d_("row",i,s),c=d_("column",i,s),d=(e==="column"?l:e==="row"?c:!1)?1:0,h=e=="column"?{left:0,top:d,right:1,bottom:i.map.height}:e=="row"?{left:d,top:0,right:i.map.width,bottom:1}:i,f=e=="column"?c?s.cell:s.header_cell:e=="row"?l?s.cell:s.header_cell:s.cell;i.map.cellsInRect(h).forEach(p=>{const m=p+i.tableStart,g=o.doc.nodeAt(m);g&&o.setNodeMarkup(m,f,g.attrs)}),r(o)}return!0}}Pp("row",{useDeprecatedLogic:!0});Pp("column",{useDeprecatedLogic:!0});var xae=Pp("cell",{useDeprecatedLogic:!0});function vae(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,s=e.before();r>=0;r--){const i=e.node(-1).child(r),o=i.lastChild;if(o)return s-1-o.nodeSize;s-=i.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let r=e.indexAfter(-1),s=e.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return s+1;s+=i.nodeSize}}return null}function h_(e){return function(t,n){if(!Oi(t))return!1;const r=vae(_v(t),e);if(r==null)return!1;if(n){const s=t.doc.resolve(r);n(t.tr.setSelection(Ae.between(s,Qoe(s))).scrollIntoView())}return!0}}function bae(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Sg(e,t){const n=e.selection;if(!(n instanceof Dt))return!1;if(t){const r=e.tr,s=Nr(e.schema).cell.createAndFill().content;
637n.forEachCell((i,o)=>{i.content.eq(s)||r.replace(r.mapping.map(o+1),r.mapping.map(o+i.nodeSize-1),new oe(s,0,0))}),r.docChanged&&t(r)}return!0}function wae(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const s=t.child(0),i=s.type.spec.tableRole,o=s.type.schema,l=[];if(i=="row")for(let c=0;c<t.childCount;c++){let u=t.child(c).content;const d=c?0:Math.max(0,n-1),h=c<t.childCount-1?0:Math.max(0,r-1);(d||h)&&(u=ME(Nr(o).row,new oe(u,d,h)).content),l.push(u)}else if(i=="cell"||i=="header_cell")l.push(n||r?ME(Nr(o).row,new oe(t,n,r)).content:t);else return null;return Sae(o,l)}function Sae(e,t){const n=[];for(let s=0;s<t.length;s++){const i=t[s];for(let o=i.childCount-1;o>=0;o--){const{rowspan:l,colspan:c}=i.child(o).attrs;for(let u=s;u<s+l;u++)n[u]=(n[u]||0)+c}}let r=0;for(let s=0;s<n.length;s++)r=Math.max(r,n[s]);for(let s=0;s<n.length;s++)if(s>=t.length&&t.push(Y.empty),n[s]<r){const i=Nr(e).cell.createAndFill(),o=[];for(let l=n[s];l<r;l++)o.push(i);t[s]=t[s].append(Y.from(o))}return{height:t.length,width:r,rows:t}}function ME(e,t){const n=e.createAndFill();return new TC(n).replace(0,n.content.size,t).doc}function Eae({width:e,height:t,rows:n},r,s){if(e!=r){const i=[],o=[];for(let l=0;l<n.length;l++){const c=n[l],u=[];for(let d=i[l]||0,h=0;d<r;h++){let f=c.child(h%c.childCount);d+f.attrs.colspan>r&&(f=f.type.createChecked(Fc(f.attrs,f.attrs.colspan,d+f.attrs.colspan-r),f.content)),u.push(f),d+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)i[l+p]=(i[l+p]||0)+f.attrs.colspan}o.push(Y.from(u))}n=o,e=r}if(t!=s){const i=[];for(let o=0,l=0;o<s;o++,l++){const c=[],u=n[l%t];for(let d=0;d<u.childCount;d++){let h=u.child(d);o+h.attrs.rowspan>s&&(h=h.type.create({...h.attrs,rowspan:Math.max(1,s-h.attrs.rowspan)},h.content)),c.push(h)}i.push(Y.from(c))}n=i,t=s}return{width:e,height:t,rows:n}}function Nae(e,t,n,r,s,i,o){const l=e.doc.type.schema,c=Nr(l);let u,d;if(s>t.width)for(let h=0,f=0;h<t.height;h++){const p=n.child(h);f+=p.nodeSize;const m=[];let g;p.lastChild==null||p.lastChild.type==c.cell?g=u||(u=c.cell.createAndFill()):g=d||(d=c.header_cell.createAndFill());for(let x=t.width;x<s;x++)m.push(g);e.insert(e.mapping.slice(o).map(f-1+r),m)}if(i>t.height){const h=[];for(let m=0,g=(t.height-1)*t.width;m<Math.max(t.width,s);m++){const x=m>=t.width?!1:n.nodeAt(t.map[g+m]).type==c.header_cell;h.push(x?d||(d=c.header_cell.createAndFill()):u||(u=c.cell.createAndFill()))}const f=c.row.create(null,Y.from(h)),p=[];for(let m=t.height;m<i;m++)p.push(f);e.insert(e.mapping.slice(o).map(r+n.nodeSize-2),p)}return!!(u||d)}function f_(e,t,n,r,s,i,o,l){if(o==0||o==t.height)return!1;let c=!1;for(let u=s;u<i;u++){const d=o*t.width+u,h=t.map[d];if(t.map[d-t.width]==h){c=!0;const f=n.nodeAt(h),{top:p,left:m}=t.findCell(h);e.setNodeMarkup(e.mapping.slice(l).map(h+r),null,{...f.attrs,rowspan:o-p}),e.insert(e.mapping.slice(l).map(t.positionAt(o,m,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-o})),u+=f.attrs.colspan-1}}return c}function p_(e,t,n,r,s,i,o,l){if(o==0||o==t.width)return!1;let c=!1;for(let u=s;u<i;u++){const d=u*t.width+o,h=t.map[d];if(t.map[d-1]==h){c=!0;const f=n.nodeAt(h),p=t.colCount(h),m=e.mapping.slice(l).map(h+r);e.setNodeMarkup(m,null,Fc(f.attrs,o-p,f.attrs.colspan-(o-p))),e.insert(m+f.nodeSize,f.type.createAndFill(Fc(f.attrs,0,o-p))),u+=f.attrs.rowspan-1}}return c}function m_(e,t,n,r,s){let i=n?e.doc.nodeAt(n-1):e.doc;if(!i)throw new Error("No table found");let o=hn.get(i);const{top:l,left:c}=r,u=c+s.width,d=l+s.height,h=e.tr;let f=0;function p(){if(i=n?h.doc.nodeAt(n-1):h.doc,!i)throw new Error("No table found");o=hn.get(i),f=h.mapping.maps.length}Nae(h,o,i,n,u,d,f)&&p(),f_(h,o,i,n,c,u,l,f)&&p(),f_(h,o,i,n,c,u,d,f)&&p(),p_(h,o,i,n,l,d,c,f)&&p(),p_(h,o,i,n,l,d,u,f)&&p();for(let m=l;m<d;m++){const g=o.positionAt(m,c,i),x=o.positionAt(m,u,i);h.replace(h.mapping.slice(f).map(g+n),h.mapping.slice(f).map(x+n),new oe(s.rows[m-l],0,0))}p(),h.setSelection(new Dt(h.doc.resolve(n+o.positionAt(l,c,i)),h.doc.resolve(n+o.positionAt(d-1,u-1,i)))),t(h)}var kae=$C({ArrowLeft:Eg("horiz",-1),ArrowRight:Eg("horiz",1),ArrowUp:Eg("vert",
637-1),ArrowDown:Eg("vert",1),"Shift-ArrowLeft":Ng("horiz",-1),"Shift-ArrowRight":Ng("horiz",1),"Shift-ArrowUp":Ng("vert",-1),"Shift-ArrowDown":Ng("vert",1),Backspace:Sg,"Mod-Backspace":Sg,Delete:Sg,"Mod-Delete":Sg});function hy(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Eg(e,t){return(n,r,s)=>{if(!s)return!1;const i=n.selection;if(i instanceof Dt)return hy(n,r,Pe.near(i.$headCell,t));if(e!="horiz"&&!i.empty)return!1;const o=xB(s,e,t);if(o==null)return!1;if(e=="horiz")return hy(n,r,Pe.near(n.doc.resolve(i.head+t),t));{const l=n.doc.resolve(o),c=dB(l,e,t);let u;return c?u=Pe.near(c,1):t<0?u=Pe.near(n.doc.resolve(l.before(-1)),-1):u=Pe.near(n.doc.resolve(l.after(-1)),1),hy(n,r,u)}}}function Ng(e,t){return(n,r,s)=>{if(!s)return!1;const i=n.selection;let o;if(i instanceof Dt)o=i;else{const c=xB(s,e,t);if(c==null)return!1;o=new Dt(n.doc.resolve(c))}const l=dB(o.$headCell,e,t);return l?hy(n,r,new Dt(o.$anchorCell,l)):!1}}function Cae(e,t){const n=e.state.doc,r=ih(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new Dt(r))),!0):!1}function Tae(e,t,n){if(!Oi(e.state))return!1;let r=wae(n);const s=e.state.selection;if(s instanceof Dt){r||(r={width:1,height:1,rows:[Y.from(ME(Nr(e.state.schema).cell,n))]});const i=s.$anchorCell.node(-1),o=s.$anchorCell.start(-1),l=hn.get(i).rectBetween(s.$anchorCell.pos-o,s.$headCell.pos-o);return r=Eae(r,l.right-l.left,l.bottom-l.top),m_(e.state,e.dispatch,o,l,r),!0}else if(r){const i=_v(e.state),o=i.start(-1);return m_(e.state,e.dispatch,o,hn.get(i.node(-1)).findCell(i.pos-o),r),!0}else return!1}function Aae(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=g_(e,t.target);let s;if(t.shiftKey&&e.state.selection instanceof Dt)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(s=ih(e.state.selection.$anchor))!=null&&((n=ow(e,t))==null?void 0:n.pos)!=s.pos)i(s,t),t.preventDefault();else if(!r)return;function i(c,u){let d=ow(e,u);const h=Ra.getState(e.state)==null;
637if(!d||!oT(c,d))if(h)d=c;else return;const f=new Dt(c,d);if(h||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);h&&p.setMeta(Ra,c.pos),e.dispatch(p)}}function o(){e.root.removeEventListener("mouseup",o),e.root.removeEventListener("dragstart",o),e.root.removeEventListener("mousemove",l),Ra.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Ra,-1))}function l(c){const u=c,d=Ra.getState(e.state);let h;if(d!=null)h=e.state.doc.resolve(d);else if(g_(e,u.target)!=r&&(h=ow(e,t),!h))return o();h&&i(h,u)}e.root.addEventListener("mouseup",o),e.root.addEventListener("dragstart",o),e.root.addEventListener("mousemove",l)}function xB(e,t,n){if(!(e.state.selection instanceof Ae))return null;const{$head:r}=e.state.selection;for(let s=r.depth-1;s>=0;s--){const i=r.node(s);if((n<0?r.index(s):r.indexAfter(s))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const l=r.before(s),c=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(c)?l:null}}return null}function g_(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function ow(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?ih(e.state.doc.resolve(n.pos)):null}var jae=class{constructor(t,n){this.node=t,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),LE(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,LE(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function LE(e,t,n,r,s,i){var o;let l=0,c=!0,u=t.firstChild;const d=e.firstChild;if(d){for(let h=0,f=0;h<d.childCount;h++){const{colspan:p,colwidth:m}=d.child(h).attrs;for(let g=0;g<p;g++,f++){const x=s==f?i:m&&m[g],y=x?x+"px":"";if(l+=x||r,x||(c=!1),u)u.style.width!=y&&(u.style.width=y),u=u.nextSibling;else{const b=document.createElement("col");b.style.width=y,t.appendChild(b)}}}for(;u;){const h=u.nextSibling;(o=u.parentNode)==null||o.removeChild(u),u=h}c?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var us=new wn("tableColumnResizing");function Oae({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=jae,lastColumnResizable:s=!0}={}){const i=new qt({key:us,state:{init(o,l){var c,u;const d=(u=(c=i.spec)==null?void 0:c.props)==null?void 0:u.nodeViews,h=Nr(l.schema).table.name;return r&&d&&(d[h]=(f,p)=>new r(f,n,p)),new Rae(-1,!1)},apply(o,l){return l.apply(o)}},props:{attributes:o=>{const l=us.getState(o);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,l)=>{_ae(o,l,e,s)},mouseleave:o=>{Iae(o)},mousedown:(o,l)=>{Mae(o,l,t,n)}},decorations:o=>{const l=us.getState(o);if(l&&l.activeHandle>-1)return Fae(o,l.activeHandle)},nodeViews:{}}});return i}var Rae=class fy{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,r=t.getMeta(us);if(r&&r.setHandle!=null)return new fy(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new fy(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let s=t.mapping.map(n.activeHandle,-1);return IE(t.doc.resolve(s))||(s=-1),new fy(s,n.dragging)}return n}};function _ae(e,t,n,r){if(!e.editable)return;const s=us.getState(e.state);if(s&&!s.dragging){const i=Pae(t.target);let o=-1;if(i){const{left:l,right:c}=i.getBoundingClientRect();t.clientX-l<=n?o=y_(e,t,"left",n):c-t.clientX<=n&&(o=y_(e,t,"right",n))}if(o!=s.activeHandle){if(!r&&o!==-1){const l=e.state.doc.resolve(o),c=l.node(-1),u=hn.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}vB(e,o)}}}function Iae(e){if(!e.editable)return;const t=us.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&vB(e,-1)}function Mae(e,t,n,r){var s;if(!e.editable)return!1;const i=(s=e.dom.ownerDocument.defaultView)!=null?s:window,o=us.getState(e.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const l=e.state.doc.nodeAt(o.activeHandle),c=Lae(e,o.activeHandle,l.attrs);e.dispatch(e.state.tr.setMeta(us,{setDragging:{startX:t.clientX,startWidth:c}}));function u(h){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",d);const f=us.getState(e.state);f!=null&&f.dragging&&(Dae(e,f.activeHandle,x_(f.dragging,h,n)),e.dispatch(e.state.tr.setMeta(us,{setDragging:null})))}function d(h){if(!h.which)return u(h);const f=us.getState(e.state);if(f&&f.dragging){const p=x_(f.dragging,h,n);v_(e,f.activeHandle,p,r)}}return v_(e,o.activeHandle,c,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",d),t.preventDefault(),!0}function Lae(e,t,{colspan:n,colwidth:r}){const s=r&&r[r.length-1];if(s)return s;const i=e.domAtPos(t);let l=i.node.childNodes[i.offset].offsetWidth,c=n;if(r)for(let u=0;u<n;u++)r[u]&&(l-=r[u],c--);return l/c}function Pae(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function y_(e,t,n,r){const s=n=="right"?-r:r,i=e.posAtCoords({left:t.clientX+s,top:t.clientY});if(!i)return-1;const{pos:o}=i,l=ih(e.state.doc.resolve(o));if(!l)return-1;if(n=="right")return l.pos;const c=hn.get(l.node(-1)),u=l.start(-1),d=c.map.indexOf(l.pos-u);return d%c.width==0?-1:u+c.map[d-1]}function x_(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function vB(e,t){e.dispatch(e.state.tr.setMeta(us,{setHandle:t}))}
637function Dae(e,t,n){const r=e.state.doc.resolve(t),s=r.node(-1),i=hn.get(s),o=r.start(-1),l=i.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,c=e.state.tr;for(let u=0;u<i.height;u++){const d=u*i.width+l;if(u&&i.map[d]==i.map[d-i.width])continue;const h=i.map[d],f=s.nodeAt(h).attrs,p=f.colspan==1?0:l-i.colCount(h);if(f.colwidth&&f.colwidth[p]==n)continue;const m=f.colwidth?f.colwidth.slice():$ae(f.colspan);m[p]=n,c.setNodeMarkup(o+h,null,{...f,colwidth:m})}c.docChanged&&e.dispatch(c)}function v_(e,t,n,r){const s=e.state.doc.resolve(t),i=s.node(-1),o=s.start(-1),l=hn.get(i).colCount(s.pos-o)+s.nodeAfter.attrs.colspan-1;let c=e.domAtPos(s.start(-1)).node;for(;c&&c.nodeName!="TABLE";)c=c.parentNode;c&&LE(i,c.firstChild,c,r,l,n)}function $ae(e){return Array(e).fill(0)}function Fae(e,t){var n;const r=[],s=e.doc.resolve(t),i=s.node(-1);if(!i)return Mt.empty;const o=hn.get(i),l=s.start(-1),c=o.colCount(s.pos-l)+s.nodeAfter.attrs.colspan-1;for(let u=0;u<o.height;u++){const d=c+u*o.width;if((c==o.width-1||o.map[d]!=o.map[d+1])&&(u==0||o.map[d]!=o.map[d-o.width])){const h=o.map[d],f=l+h+i.nodeAt(h).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",(n=us.getState(e))!=null&&n.dragging&&r.push(Vn.node(l+h,l+h+i.nodeAt(h).nodeSize,{class:"column-resize-dragging"})),r.push(Vn.widget(f,p))}}return Mt.create(e.doc,r)}function Bae({allowTableNodeSelection:e=!1}={}){return new qt({key:Ra,state:{init(){return null},apply(t,n){const r=t.getMeta(Ra);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:s,pos:i}=t.mapping.mapResult(n);return s?null:i}},props:{decorations:Zoe,handleDOMEvents:{mousedown:Aae},createSelectionBetween(t){return Ra.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Cae,handleKeyDown:kae,handlePaste:Tae},appendTransaction(t,n,r){return nae(r,mB(r,n),e)}})}var bB=Kn.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",Wt(this.options.HTMLAttributes,e),0]}}),wB=Kn.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",Wt(this.options.HTMLAttributes,e),0]}}),SB=Kn.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",Wt(this.options.HTMLAttributes,e),0]}});function PE(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function b_(e,t,n,r,s,i){var o;let l=0,c=!0,u=t.firstChild;const d=e.firstChild;if(d!==null)for(let h=0,f=0;h<d.childCount;h+=1){const{colspan:p,colwidth:m}=d.child(h).attrs;for(let g=0;g<p;g+=1,f+=1){const x=s===f?i:m&&m[g],y=x?`${x}px`:"";if(l+=x||r,x||(c=!1),u){if(u.style.width!==y){const[b,w]=PE(r,x);u.style.setProperty(b,w)}u=u.nextSibling}else{const b=document.createElement("col"),[w,E]=PE(r,x);b.style.setProperty(w,E),t.appendChild(b)}}}for(;u;){const h=u.nextSibling;(o=u.parentNode)==null||o.removeChild(u),u=h}c?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}var Uae=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),b_(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,b_(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}};function zae(e,t,n,r){let s=0,i=!0;const o=[],l=e.firstChild;if(!l)return{};for(let h=0,f=0;h<l.childCount;h+=1){const{colspan:p,colwidth:m}=l.child(h).attrs;for(let g=0;g<p;g+=1,f+=1){const x=n===f?r:m&&m[g];s+=x||t,x||(i=!1);const[y,b]=PE(t,x);o.push(["col",{style:`${y}: ${b}`}])}}const c=i?`${s}px`:"",u=i?"":`${s}px`;return{colgroup:["colgroup",{},...o],tableWidth:c,tableMinWidth:u}}function w_(e,t){return e.createAndFill()}
637function Vae(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function Wae(e,t,n,r,s){const i=Vae(e),o=[],l=[];for(let u=0;u<n;u+=1){const d=w_(i.cell);if(d&&l.push(d),r){const h=w_(i.header_cell);h&&o.push(h)}}const c=[];for(let u=0;u<t;u+=1)c.push(i.row.createChecked(null,r&&u===0?o:l));return i.table.createChecked(null,c)}function Hae(e){return e instanceof Dt}var kg=({editor:e})=>{const{selection:t}=e.state;if(!Hae(t))return!1;let n=0;const r=c5(t.ranges[0].$from,i=>i.type.name==="table");return r==null||r.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},EB=Kn.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:Uae,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){const{colgroup:n,tableWidth:r,tableMinWidth:s}=zae(e,this.options.cellMinWidth);return["table",Wt(this.options.HTMLAttributes,t,{style:r?`width: ${r}`:`min-width: ${s}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:s,editor:i})=>{const o=Wae(i.schema,e,t,n);if(s){const l=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection(Ae.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>iae(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>oae(e,t),deleteColumn:()=>({state:e,dispatch:t})=>lae(e,t),addRowBefore:()=>({state:e,dispatch:t})=>uae(e,t),addRowAfter:()=>({state:e,dispatch:t})=>dae(e,t),deleteRow:()=>({state:e,dispatch:t})=>fae(e,t),deleteTable:()=>({state:e,dispatch:t})=>bae(e,t),mergeCells:()=>({state:e,dispatch:t})=>c_(e,t),splitCell:()=>({state:e,dispatch:t})=>u_(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Pp("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Pp("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>xae(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>c_(e,t)?!0:u_(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>gae(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>h_(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>h_(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&mB(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){const r=Dt.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:kg,"Mod-Backspace":kg,Delete:kg,"Mod-Delete":kg}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Oae({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Bae({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){const t={name:e.name,options:e.options,storage:e.storage};return{tableRole:bt(we(e,"tableRole",t))}}});mn.create({name:"tableKit",addExtensions(){const e=[];return this.options.table!==!1&&e.push(EB.configure(this.options.table)),this.options.tableCell!==!1&&e.push(bB.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(wB.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(SB.configure(this.options.tableRow)),e}});var Gae=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Kae=Kn.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Wt(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}}
637,addInputRules(){return[D5({find:Gae,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),qae=mn.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{const t=e.style.textAlign;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign?{style:`text-align: ${e.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).every(n=>n):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).every(t=>t),toggleTextAlign:e=>({editor:t,commands:n})=>this.options.alignments.includes(e)?t.isActive({textAlign:e})?n.unsetTextAlign():n.setTextAlign(e):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});function NB({content:e,onChange:t,placeholder:n,className:r}){const[s,i]=v.useState(!1),o=v.useRef(null),{toast:l}=Fr(),c=lie({extensions:[Voe,EB.configure({resizable:!0}),SB,wB,bB,Kae.configure({HTMLAttributes:{class:"max-w-full h-auto rounded-lg shadow-md my-4"}}),qae.configure({types:["heading","paragraph"]})],content:e,onUpdate:({editor:E})=>{t(E.getHTML())},editorProps:{attributes:{class:"prose prose-sm sm:prose lg:prose-lg xl:prose-2xl mx-auto focus:outline-none min-h-[400px] p-4 border-0"}}}),u=async E=>{try{i(!0);const N=await fetch("/api/objects/upload",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`,"Content-Type":"application/json"}});if(!N.ok)throw new Error("Failed to get upload URL");const{uploadURL:k}=await N.json();if(!(await fetch(k,{method:"PUT",body:E,headers:{"Content-Type":E.type}})).ok)throw new Error("Failed to upload image");const T=await fetch("/api/objects/normalize",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("adminToken")}`,"Content-Type":"application/json"},body:JSON.stringify({rawPath:k.split("?")[0]})});if(!T.ok)throw new Error("Failed to normalize image URL");const{objectPath:j}=await T.json();c&&c.chain().focus().setImage({src:j}).run(),l({title:"Success!",description:"Image uploaded and inserted successfully."})}catch(N){console.error("Upload error:",N),l({title:"Upload failed",description:"Failed to upload image. Please try again.",variant:"destructive"})}finally{i(!1)}},d=E=>{var k;const N=(k=E.target.files)==null?void 0:k[0];if(N){if(!N.type.startsWith("image/")){l({title:"Invalid file type",description:"Please select an image file (JPG, PNG, GIF, WebP)",variant:"destructive"});return}if(N.size>5*1024*1024){l({title:"File too large",description:"Please select an image smaller than 5MB",variant:"destructive"});return}u(N),o.current&&(o.current.value="")}},h=()=>{c==null||c.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},f=()=>{c==null||c.chain().focus().addColumnBefore().run()},p=()=>{c==null||c.chain().focus().addColumnAfter().run()},m=()=>{c==null||c.chain().focus().deleteColumn().run()},g=()=>{c==null||c.chain().focus().addRowBefore().run()},x=()=>{c==null||c.chain().focus().addRowAfter().run()},y=()=>{c==null||c.chain().focus().deleteRow().run()},b=()=>{c==null||c.chain().focus().deleteTable().run()};if(!c)return null;const w=c.isActive("table");return a.jsxs("div",{className:`border border-gray-300 dark:border-gray-600 rounded-lg overflow-hidden ${r}`,children:[a.jsx("input",{ref:o,type:"file",accept:"image/*",onChange:d,className:"hidden","data-testid":"input-image-upload-editor"}),a.jsx("div",{className:"border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 p-2",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[a.jsx(H,{type:"button",size:"sm",variant:"ghost",onClick:()=>
637c.chain().focus().undo().run(),disabled:!c.can().undo(),"data-testid":"button-undo",children:a.jsx(mG,{className:"h-4 w-4"})}),a.jsx(H,{type:"button",size:"sm",variant:"ghost",onClick:()=>c.chain().focus().redo().run(),disabled:!c.can().redo(),"data-testid":"button-redo",children:a.jsx(sG,{className:"h-4 w-4"})}),a.jsx("div",{className:"h-6 w-px bg-gray-300 dark:bg-gray-600 mx-1"}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive("heading",{level:1})?"default":"ghost",onClick:()=>c.chain().focus().toggleHeading({level:1}).run(),"data-testid":"button-h1",children:a.jsx(U7,{className:"h-4 w-4"})}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive("heading",{level:2})?"default":"ghost",onClick:()=>c.chain().focus().toggleHeading({level:2}).run(),"data-testid":"button-h2",children:a.jsx(z7,{className:"h-4 w-4"})}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive("heading",{level:3})?"default":"ghost",onClick:()=>c.chain().focus().toggleHeading({level:3}).run(),"data-testid":"button-h3",children:a.jsx(V7,{className:"h-4 w-4"})}),a.jsx("div",{className:"h-6 w-px bg-gray-300 dark:bg-gray-600 mx-1"}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive("bold")?"default":"ghost",onClick:()=>c.chain().focus().toggleBold().run(),"data-testid":"button-bold",children:a.jsx(_7,{className:"h-4 w-4"})}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive("italic")?"default":"ghost",onClick:()=>c.chain().focus().toggleItalic().run(),"data-testid":"button-italic",children:a.jsx(H7,{className:"h-4 w-4"})}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive("strike")?"default":"ghost",onClick:()=>c.chain().focus().toggleStrike().run(),"data-testid":"button-strike",children:a.jsx(aG,{className:"h-4 w-4"})}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive("code")?"default":"ghost",onClick:()=>c.chain().focus().toggleCode().run(),"data-testid":"button-code",children:a.jsx(Ku,{className:"h-4 w-4"})}),a.jsx("div",{className:"h-6 w-px bg-gray-300 dark:bg-gray-600 mx-1"}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive({textAlign:"left"})?"default":"ghost",onClick:()=>c.chain().focus().setTextAlign("left").run(),"data-testid":"button-align-left",children:a.jsx(A7,{className:"h-4 w-4"})}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive({textAlign:"center"})?"default":"ghost",onClick:()=>c.chain().focus().setTextAlign("center").run(),"data-testid":"button-align-center",children:a.jsx(T7,{className:"h-4 w-4"})}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive({textAlign:"right"})?"default":"ghost",onClick:()=>c.chain().focus().setTextAlign("right").run(),"data-testid":"button-align-right",children:a.jsx(j7,{className:"h-4 w-4"})}),a.jsx("div",{className:"h-6 w-px bg-gray-300 dark:bg-gray-600 mx-1"}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive("bulletList")?"default":"ghost",onClick:()=>c.chain().focus().toggleBulletList().run(),"data-testid":"button-bullet-list",children:a.jsx(Y7,{className:"h-4 w-4"})}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive("orderedList")?"default":"ghost",onClick:()=>c.chain().focus().toggleOrderedList().run(),"data-testid":"button-ordered-list",children:a.jsx(q7,{className:"h-4 w-4"})}),a.jsx("div",{className:"h-6 w-px bg-gray-300 dark:bg-gray-600 mx-1"}),a.jsx(H,{type:"button",size:"sm",variant:c.isActive("blockquote")?"default":"ghost",onClick:()=>c.chain().focus().toggleBlockquote().run(),"data-testid":"button-quote",children:a.jsx(rG,{className:"h-4 w-4"})}),a.jsx("div",{className:"h-6 w-px bg-gray-300 dark:bg-gray-600 mx-1"}),a.jsx(H,{type:"button",size:"sm",variant:"ghost",onClick:()=>{var E;return(E=o.current)==null?void 0:E.click()},disabled:s,"data-testid":"button-insert-image",children:s?a.jsx(gG,{className:"h-4 w-4 animate-spin"}):a.jsx(W7,{className:"h-4 w-4"})}),a.jsx("div",{className:"h-6 w-px bg-gray-300 dark:bg-gray-600 mx-1"}),a.jsx(H,{type:"button",size:"sm",variant:"ghost",onClick:h,"data-testid":"button-insert-table",children:a.jsx(uG,{className:"h-4 w-4"})}),w&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"h-6 w-px bg-gray-300 dark:bg-gray-600 mx-1"}),a.jsxs(H,{type:"button",size:"sm",variant:"ghost",onClick:f,title:"Add column before","data-testid":"button-add-column-before",children:[a.jsx(Hh,{className:"h-3 w-3"}),a.jsx("div",{className:"w-1 h-3 bg-current ml-1"})]}),a.jsxs(H,{type:"button",size:"sm",variant:"ghost",onClick:p,title:"Add column after","data-testid":"button-add-column-after",children:[a.jsx("div",{className:"w-1 h-3 bg-current mr-1"}),a.jsx(Hh,{className:"h-3 w-3"})]}),a.jsxs(H,{type:"button",size:"sm",variant:"ghost",onClick:m,title:"Delete column","data-testid":"button-delete-column",children:[a.jsx(b1,{className:"h-3 w-3"}),a.jsx("div",{className:"w-1 h-3 bg-current ml-1"})]}),a.jsx("div",{className:"h-6 w-px bg-gray-300 dark:bg-gray-600 mx-1"}),a.jsxs(H,{type:"button",size:"sm",variant:"ghost",onClick:g,title:"Add row before","data-testid":"button-add-row-before",children:[a.jsx(Hh,{className:"h-3 w-3"}),a.jsx("div",{className:"h-1 w-3 bg-current mt-1"})]}),a.jsxs(H,{type:"button",size:"sm",variant:"ghost",onClick:x,title:"Add row after","data-testid":"button-add-row-after",children:[a.jsx("div",{className:"h-1 w-3 bg-current mb-1"}),a.jsx(Hh,{className:"h-3 w-3"})]}),a.jsxs(H,{type:"button",size:"sm",variant:"ghost",onClick:y,title:"Delete row","data-testid":"button-delete-row",children:[a.jsx(b1,{className:"h-3 w-3"}),a.jsx("div",{className:"h-1 w-3 bg-current mt-1"})]}),a.jsx("div",{className:"h-6 w-px bg-gray-300 dark:bg-gray-600 mx-1"}),a.jsxs(H,{type:"button",size:"sm",variant:"ghost",onClick:b,title:"Delete table","data-testid":"button-delete-table",children:[a.jsx(cG,{className:"h-4 w-4"}),a.jsx(b1,{className:"h-3 w-3 ml-1"})]})]})]})}),a.jsx("div",{className:"max-w-none",children:a.jsx(tie,{editor:c,placeholder:n})})]})}const Yae=Ye.object({title:Ye.string().min(5,"Title must be at least 5 characters"),slug:Ye.string().min(3,"Slug must be at least 3 characters").regex(/^[a-z0-9-]+$/,"Slug can only contain lowercase letters, numbers, and hyphens"),excerpt:Ye.string().min(50,"Excerpt must be at least 50 characters"),content:Ye.string().min(100,"Content must be at least 100 characters"),categoryId:Ye.string().min(1,"Please select a category"),tags:Ye.string(),readTime:Ye.number().min(1).max(60),featured:Ye.boolean()});function Qae(){const[e,t]=v.useState("posts"),[n,r]=v.useState(!1),[s,i]=v.useState(!0),[o,l]=v.useState(null),[c,u]=v.useState(""),[,d]=go(),{toast:h}=Fr(),f=Qd();v.useEffect(()=>{const S=localStorage.getItem("adminToken");if(!S){i(!1),d("/admin/login");return}(async()=>{try{(await fetch("/api/admin/verify",{headers:{Authorization:`Bearer ${S}`}})).ok?r(!0):(localStorage.removeItem("adminToken"),d("/admin/login"))}catch{localStorage.removeItem("adminToken"),d("/admin/login")}finally{i(!1)}})()},[d]);const{data:p=[],isLoading:m}=tn({queryKey:["/api/posts"]}),{data:g=[],isLoading:x}=tn({queryKey:["/api/categories"]}),y=il({resolver:ol(Yae),defaultValues:{title:"",slug:"",excerpt:"",content:"",categoryId:"",tags:"",readTime:5,featured:!1}}),b=S=>
637{l(S),u(S.imageUrl||""),y.reset({title:S.title,slug:S.slug,excerpt:S.excerpt,content:S.content,categoryId:S.categoryId,tags:S.tags.join(", "),readTime:S.readTime,featured:S.featured}),t("create")},w=()=>{l(null),u(""),y.reset()},E=async S=>{try{await N.mutateAsync(S)}catch(R){console.error("Form submission error:",R)}},N=zs({mutationFn:async S=>{const R=localStorage.getItem("adminToken"),_={...S,imageUrl:c,tags:S.tags.split(",").map(U=>U.trim()).filter(U=>U.length>0),author:"Naman Singh",publishedAt:new Date().toISOString()},L=o?`/api/admin/posts/${o.id}`:"/api/admin/posts",B=await fetch(L,{method:o?"PUT":"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${R}`},body:JSON.stringify(_)});if(!B.ok){const U=await B.json();throw new Error(U.message||`Failed to ${o?"update":"create"} post`)}return B.json()},onSuccess:()=>{h({title:"Success!",description:`Blog post ${o?"updated":"created"} successfully.`}),y.reset(),l(null),u(""),f.invalidateQueries({queryKey:["/api/posts"]}),t("posts")},onError:S=>{h({title:"Error",description:S.message||"Failed to save blog post.",variant:"destructive"})}}),k=zs({mutationFn:async S=>{const R=localStorage.getItem("adminToken"),_=await fetch(`/api/admin/posts/${S}`,{method:"DELETE",headers:{Authorization:`Bearer ${R}`}});if(!_.ok){const L=await _.json();throw new Error(L.message||"Failed to delete post")}return _.json()},onSuccess:()=>{h({title:"Success!",description:"Blog post deleted successfully."}),f.invalidateQueries({queryKey:["/api/posts"]})},onError:S=>{h({title:"Error",description:S.message||"Failed to delete blog post.",variant:"destructive"})}}),C=(S,R)=>{confirm(`Are you sure you want to delete "${R}"? This action cannot be undone.`)&&k.mutate(S)},T=y.watch("title"),j=()=>{const S=T.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim();y.setValue("slug",S)};return s?a.jsx("div",{className:"min-h-screen bg-white dark:bg-gray-900 flex items-center justify-center",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-sf-blue mx-auto mb-4"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Verifying access..."})]})}):n?a.jsx("div",{className:"min-h-screen bg-white dark:bg-gray-900 py-8",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"mb-8 flex justify-between items-center",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2","data-testid":"text-admin-title",children:"Salesforce Sage Admin"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Manage your blog content and settings"})]}),a.jsxs("div",{className:"flex space-x-3",children:[a.jsxs(H,{variant:"outline",onClick:()=>d("/admin/tutorials"),"data-testid":"button-admin-tutorials",children:[a.jsx($k,{className:"w-4 h-4 mr-2"}),"Tutorials"]}),a.jsx(H,{variant:"outline",onClick:()=>d("/admin/settings"),"data-testid":"button-admin-settings",children:"Settings"}),a.jsx(H,{variant:"outline",onClick:()=>{localStorage.removeItem("adminToken"),d("/")},"data-testid":"button-logout",children:"Logout"})]})]}),a.jsxs("div",{className:"flex space-x-1 bg-gray-100 dark:bg-gray-800 p-1 rounded-lg mb-8",children:[a.jsxs("button",{onClick:()=>t("posts"),className:`flex-1 flex items-center justify-center px-4 py-2 rounded-md text-sm font-medium transition-colors ${e==="posts"?"bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow":"text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white"}`,"data-testid":"button-admin-posts",children:[a.jsx(op,{className:"w-4 h-4 mr-2"}),"Manage Posts"]}),a.jsxs("button",{onClick:()=>t("create"),className:`flex-1 flex items-center justify-center px-4 py-2 rounded-md text-sm font-medium transition-colors ${e==="create"?"bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow":"text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white"}`,"data-testid":"button-admin-create",children:[a.jsx(wf,{className:"w-4 h-4 mr-2"}),o?"Edit Post":"Create Post"]}),a.jsxs("button",{onClick:()=>t("categories"),className:`flex-1 flex items-center justify-center px-4 py-2 rounded-md text-sm font-medium transition-colors ${e==="categories"?"bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow":"text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white"}`,"data-testid":"button-admin-categories",children:[a.jsx(Zy,{className:"w-4 h-4 mr-2"}),"Categories"]})]}),e==="posts"&&a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center",children:[a.jsx(op,{className:"w-5 h-5 mr-2 text-sf-blue"}),"Blog Posts (",p.length,")"]})}),a.jsx(ne,{children:m?a.jsx("div",{className:"text-center py-8",children:"Loading posts..."}):a.jsx("div",{className:"space-y-4",children:p.map(S=>{var R;return a.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4 hover:border-sf-blue transition-colors",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:S.title}),S.featured&&a.jsx($n,{variant:"secondary",className:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",children:"Featured"})]}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300 text-sm mb-2",children:S.excerpt}),a.jsxs("div",{className:"flex items-center space-x-4 text-xs text-gray-500 dark:text-gray-400",children:[a.jsxs("span",{children:["ID: ",S.id]}),a.jsxs("span",{children:["Slug: ",S.slug]}),a.jsxs("span",{children:["Category: ",(R=g.find(_=>_.id===S.categoryId))==null?void 0:R.name]}),a.jsxs("span",{children:["Read Time: ",S.readTime,"min"]})]})]}),a.jsxs("div",{className:"flex space-x-2",children:[a.jsxs(H,{variant:"outline",size:"sm",onClick:()=>b(S),"data-testid":`button-edit-${S.id}`,children:[a.jsx(ny,{className:"w-4 h-4 mr-1"}),"Edit"]}),a.jsx(H,{variant:"outline",size:"sm",onClick:()=>window.open(`/post/${S.slug}`,"_blank"),"data-testid":`button-view-${S.id}`,children:a.jsx(q0,{className:"w-4 h-4"})}),a.jsxs(H,{variant:"destructive",size:"sm",onClick:()=>C(S.id,S.title),"data-testid":`button-delete-${S.id}`,children:[a.jsx(hc,{className:"w-4 h-4 mr-1"}),"Delete"]})]})]})},S.id)})})})]}),e==="create"&&a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx(wf,{className:"w-5 h-5 mr-2 text-sf-blue"}),o?`Edit Post: ${o.title}`:"Create New Blog Post"]}),o&&a.jsx(H,{variant:"outline",onClick:w,size:"sm","data-testid":"button-cancel-edit",children:"Cancel Edit"})]})}),a.jsx(ne,{children:a.jsx(al,{...y,children:a.jsxs("form",{onSubmit:y.handleSubmit(E),className:"space-y-6",children:[a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsx(ct,{control:y.control,name:"title",render:({field:S})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Title"}),a.jsx(at,{children:a.jsx(Ke,{placeholder:"Enter post title",...S})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:y.control,name:"slug",render:({field:S})=>a.jsxs(it,{children:[a.jsxs(ot,{className:"flex items-center justify-between",children:["Slug",a.jsx(H,{type:"button",variant:"ghost",size:"sm",onClick:j,className:"text-sf-blue hover:text-sf-dark-blue",children:"Generate"})]}),a.jsx(at,{children:a.jsx(Ke,{placeholder:"post-url-slug",...S})}),a.jsx(ft,{})]})})]}),a.jsx(ct,{control:y.control,name:"excerpt",render:({field:S})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Excerpt"}),a.jsx(at,{children:a.jsx(fs,{placeholder:"Brief description of the post...",className:"min-h-[80px]",...S})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:y.control,name:"content",render:({field:S})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Content"}),a.jsx(at,{children:a.jsx(NB,{content:S.value||"",onChange:S.onChange,placeholder:"Write your post content...",className:"min-h-[400px]"})}),a.jsx(ft,{})]})}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsx(ct,{control:y.control,name:"categoryId",render:({field:S})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Category"}),a.jsxs(pr,{onValueChange:S.onChange,value:S.value,children:[a.jsx(at,{children:a.jsx(er,{children:a.jsx(mr,{placeholder:"Select category"})})}),a.jsx(tr,{children:g.map(R=>a.jsx(qe,{value:R.id,children:R.name},R.id))})]}),a.jsx(ft,{})]})}),a.jsx(ct,{control:y.control,name:"readTime",render:({field:S})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Read Time (minutes)"}),a.jsx(at,{children:a.jsx(Ke,{type:"number",min:1,max:60,...S,onChange:R=>S.onChange(parseInt(R.target.value))})}),a.jsx(ft,{})]})})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsx(ct,{control:y.control,name:"tags",render:({field:S})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Tags (comma-separated)"}),a.jsx(at,{children:a.jsx(Ke,{placeholder:"salesforce, apex, soql",...S})}),a.jsx(ft,{})]})}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Featured Image URL (optional)"}),a.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Use the image button in the editor above to insert images directly into your content. For a featured image, add the URL here or leave empty to use the first image from your content."}),a.jsx("input",{type:"url",value:c,onChange:S=>u(S.target.value),placeholder:"https://example.com/featured-image.jpg",className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
637ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),a.jsx(ct,{control:y.control,name:"featured",render:({field:S})=>a.jsxs(it,{className:"flex flex-row items-center justify-between rounded-lg border p-4",children:[a.jsxs("div",{className:"space-y-0.5",children:[a.jsx(ot,{className:"text-base",children:"Featured Post"}),a.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-300",children:"This post will be highlighted on the homepage"})]}),a.jsx(at,{children:a.jsx(Nf,{checked:S.value,onCheckedChange:S.onChange})})]})}),a.jsx("div",{className:"flex space-x-4",children:a.jsxs(H,{type:"submit",className:"bg-sf-blue text-white hover:bg-sf-dark-blue",disabled:N.isPending,children:[a.jsx(iG,{className:"w-4 h-4 mr-2"}),N.isPending?"Saving...":o?"Update Post":"Create Post"]})})]})})})]}),e==="categories"&&a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center",children:[a.jsx(Zy,{className:"w-5 h-5 mr-2 text-sf-blue"}),"Categories (",g.length,")"]})}),a.jsx(ne,{children:x?a.jsx("div",{className:"text-center py-8",children:"Loading categories..."}):a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:g.map(S=>a.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[a.jsx("div",{className:"flex items-center justify-between mb-3",children:a.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-white",style:{backgroundColor:S.color},children:a.jsx("i",{className:`fas ${S.icon} text-sm`})})}),a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:S.name}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:S.description})]},S.id))})})]})]})}):null}const Jae=Ye.object({currentPassword:Ye.string().min(1,"Current password is required"),newPassword:Ye.string().min(6,"New password must be at least 6 characters"),confirmPassword:Ye.string().min(1,"Please confirm your new password")}).refine(e=>e.newPassword===e.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]});function Xae(){const[,e]=go(),[t,n]=v.useState(!1),[r,s]=v.useState(!1),[i,o]=v.useState(!0),{toast:l}=Fr();v.useEffect(()=>{const d=localStorage.getItem("adminToken");if(!d){o(!1),e("/admin/login");return}(async()=>{try{(await fetch("/api/admin/verify",{headers:{Authorization:`Bearer ${d}`}})).ok?s(!0):(localStorage.removeItem("adminToken"),e("/admin/login"))}catch{localStorage.removeItem("adminToken"),e("/admin/login")}finally{o(!1)}})()},[e]);const c=il({resolver:ol(Jae),defaultValues:{currentPassword:"",newPassword:"",confirmPassword:""}}),u=async d=>{n(!0);try{const h=localStorage.getItem("adminToken"),f=await fetch("/api/admin/change-password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${h}`},body:JSON.stringify({currentPassword:d.currentPassword,newPassword:d.newPassword})}),p=await f.json();f.ok?(l({title:"Success!",description:"Password changed successfully."}),c.reset()):l({title:"Error",description:p.message||"Failed to change password",variant:"destructive"})}catch{l({title:"Error",description:"Failed to change password. Please try again.",variant:"destructive"})}finally{n(!1)}};return i?a.jsx("div",{className:"min-h-screen bg-white dark:bg-gray-900 flex items-center justify-center",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-sf-blue mx-auto mb-4"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Verifying access..."})]})}):r?a.jsx("div",{className:"min-h-screen bg-white dark:bg-gray-900 py-8",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"mb-8",children:[a.jsxs(H,{variant:"ghost",onClick:()=>e("/admin"),className:"mb-4","data-testid":"button-back-to-admin",children:[a.jsx(Cd,{className:"w-4 h-4 mr-2"}),"Back to Admin Panel"]}),a.jsxs("div",{className:"flex items-center mb-2",children:[a.jsx(Zy,{className:"w-8 h-8 text-sf-blue mr-3"}),a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white","data-testid":"text-settings-title",children:"Admin Settings"})]}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Manage your admin account settings"})]}),a.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center",children:[a.jsx(Td,{className:"w-5 h-5 mr-2 text-sf-blue"}),"Change Password"]})}),a.jsx(ne,{children:a.jsx(al,{...c,children:a.jsxs("form",{onSubmit:c.handleSubmit(u),className:"space-y-6",children:[a.jsx(ct,{control:c.control,name:"currentPassword",render:({field:d})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Current Password"}),a.jsx(at,{children:a.jsx(Ke,{type:"password",placeholder:"Enter your current password","data-testid":"input-current-password",...d})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:c.control,name:"newPassword",render:({field:d})=>a.jsxs(it,{children:[a.jsx(ot,{children:"New Password"}),a.jsx(at,{children:a.jsx(Ke,{type:"password",placeholder:"Enter your new password","data-testid":"input-new-password",...d})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:c.control,name:"confirmPassword",render:({field:d})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Confirm New Password"}),a.jsx(at,{children:a.jsx(Ke,{type:"password",placeholder:"Confirm your new password","data-testid":"input-confirm-password",...d})}),a.jsx(ft,{})]})}),a.jsx(H,{type:"submit",className:"bg-sf-blue text-white hover:bg-sf-dark-blue",disabled:t,"data-testid":"button-change-password",children:t?"Changing Password...":"Change Password"})]})})})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:"System Information"})}),a.jsxs(ne,{className:"space-y-3",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:"Storage Type:"}),a.jsx("span",{className:"font-medium",children:"File-based (Markdown)"})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:"Authentication:"}),a.jsx("span",{className:"font-medium",children:"Session-based"})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:"Content Format:"}),a.jsx("span",{className:"font-medium",children:"Markdown with Frontmatter"})]})]})]})]})]})}):null}async function Zae(){const e=await fetch("/api/auth/user",{credentials:"include"});if(e.status===401)return null;if(!e.ok)throw new Error(`${e.status}: ${e.statusText}`);return e.json()}function kB(){const e=Qd(),{data:t,isLoading:n}=tn({queryKey:["/api/auth/user"],queryFn:Zae,retry:!1,staleTime:1e3*60*5}),r=zs({mutationFn:async()=>
637{if(!(await sp("POST","/api/auth/logout")).ok)throw new Error("Logout failed")},onSuccess:()=>{e.setQueryData(["/api/auth/user"],null),window.location.href="/"}});return{user:t,isLoading:n,isAuthenticated:!!t,logout:r.mutate,isLoggingOut:r.isPending}}const ele=Ye.object({email:Ye.string().email("Please enter a valid email address"),password:Ye.string().min(1,"Password is required")}),tle=Ye.object({email:Ye.string().email("Please enter a valid email address"),password:Ye.string().min(8,"Password must be at least 8 characters"),firstName:Ye.string().min(1,"First name is required"),lastName:Ye.string().min(1,"Last name is required")});function nle(){const[e,t]=v.useState(!0),[,n]=go(),{isAuthenticated:r,isLoading:s}=kB(),{toast:i}=Fr(),o=Qd();v.useEffect(()=>{document.title=e?"Sign In | Salesforce Sage":"Create Account | Salesforce Sage"},[e]),v.useEffect(()=>{r&&n("/org-health")},[r,n]);const l=il({resolver:ol(ele),defaultValues:{email:"",password:""}}),c=il({resolver:ol(tle),defaultValues:{email:"",password:"",firstName:"",lastName:""}}),u=zs({mutationFn:async h=>{const f=await sp("POST","/api/auth/login",h);if(!f.ok){const p=await f.json();throw new Error(p.error||"Login failed")}return f.json()},onSuccess:()=>{o.invalidateQueries({queryKey:["/api/auth/user"]}),i({title:"Welcome back!",description:"You have signed in successfully."}),n("/org-health")},onError:h=>{i({title:"Sign in failed",description:h.message,variant:"destructive"})}}),d=zs({mutationFn:async h=>{const f=await sp("POST","/api/auth/register",h);if(!f.ok){const p=await f.json();throw new Error(p.error||"Registration failed")}return f.json()},onSuccess:()=>{o.invalidateQueries({queryKey:["/api/auth/user"]}),i({title:"Account created!",description:"Welcome to Salesforce Sage."}),n("/org-health")},onError:h=>{i({title:"Registration failed",description:h.message,variant:"destructive"})}});return s?a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center",children:a.jsx(qu,{className:"w-8 h-8 animate-spin text-sf-blue"})}):a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center px-4 py-12",children:a.jsxs("div",{className:"w-full max-w-md",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsxs(Te,{href:"/",className:"inline-flex items-center text-gray-600 dark:text-gray-400 hover:text-sf-blue mb-4",children:[a.jsx(Cd,{className:"w-4 h-4 mr-2"}),"Back to home"]}),a.jsx("div",{className:"flex items-center justify-center mb-4",children:a.jsx(xr,{className:"w-12 h-12 text-sf-blue"})}),a.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:e?"Welcome Back":"Create Your Account"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-2",children:e?"Sign in to access Check Org Health and manage your Salesforce orgs":"Get started with comprehensive Salesforce org health scans"})]}),a.jsx(te,{children:a.jsxs(ne,{className:"pt-6",children:[e?v.createElement(al,{...l,key:"login-form"},a.jsxs("form",{onSubmit:l.handleSubmit(h=>u.mutate(h)),className:"space-y-4",children:[a.jsx(ct,{control:l.control,name:"email",render:({field:h})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Email"}),a.jsx(at,{children:a.jsx(Ke,{...h,type:"email",placeholder:"[email protected]","data-testid":"input-email",autoComplete:"email"})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:l.control,name:"password",render:({field:h})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Password"}),a.jsx(at,{children:a.jsx(Ke,{...h,type:"password",placeholder:"Enter your password","data-testid":"input-password",autoComplete:"current-password"})}),a.jsx(ft,{})]})}),a.jsx(H,{type:"submit",className:"w-full bg-sf-blue hover:bg-sf-dark-blue",disabled:u.isPending,"data-testid":"button-submit",children:u.isPending?a.jsxs(a.Fragment,{children:[a.jsx(qu,{className:"w-4 h-4 mr-2 animate-spin"}),"Signing in..."]}):"Sign In"})]})):v.createElement(al,{...c,key:"register-form"},a.jsxs("form",{onSubmit:c.handleSubmit(h=>d.mutate(h)),className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsx(ct,{control:c.control,name:"firstName",render:({field:h})=>a.jsxs(it,{children:[a.jsx(ot,{children:"First Name"}),a.jsx(at,{children:a.jsx(Ke,{...h,placeholder:"John","data-testid":"input-firstname",autoComplete:"given-name"})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:c.control,name:"lastName",render:({field:h})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Last Name"}),a.jsx(at,{children:a.jsx(Ke,{...h,placeholder:"Doe","data-testid":"input-lastname",autoComplete:"family-name"})}),a.jsx(ft,{})]})})]}),a.jsx(ct,{control:c.control,name:"email",render:({field:h})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Email"}),a.jsx(at,{children:a.jsx(Ke,{...h,type:"email",placeholder:"[email protected]","data-testid":"input-reg-email",autoComplete:"email"})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:c.control,name:"password",render:({field:h})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Password"}),a.jsx(at,{children:a.jsx(Ke,{...h,type:"password",placeholder:"Min. 8 characters","data-testid":"input-reg-password",autoComplete:"new-password"})}),a.jsx(ft,{})]})}),a.jsx(H,{type:"submit",className:"w-full bg-sf-blue hover:bg-sf-dark-blue",disabled:d.isPending,"data-testid":"button-register",children:d.isPending?a.jsxs(a.Fragment,{children:[a.jsx(qu,{className:"w-4 h-4 mr-2 animate-spin"}),"Creating account..."]}):"Create Account"})]})),a.jsx("div",{className:"mt-6 text-center",children:a.jsx("button",{type:"button",onClick:()=>t(!e),className:"text-sm text-sf-blue hover:underline","data-testid":"button-toggle-auth",children:e?"Don't have an account? Sign up":"Already have an account? Sign in"})})]})})]})})}const rle=Ye.object({username:Ye.string().min(1,"Username is required"),password:Ye.string().min(1,"Password is required")});function sle(){const[,e]=go(),[t,n]=v.useState(!1),{toast:r}=Fr(),s=il({resolver:ol(rle),defaultValues:{username:"",password:""}}),i=async o=>
637{n(!0);try{const l=await fetch("/api/admin/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)}),c=await l.json();l.ok?(localStorage.setItem("adminToken",c.token),r({title:"Success!",description:"Successfully logged in as admin."}),e("/admin")):r({title:"Error",description:c.message||"Invalid credentials",variant:"destructive"})}catch{r({title:"Error",description:"Login failed. Please try again.",variant:"destructive"})}finally{n(!1)}};return a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"max-w-md w-full space-y-8",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("h2",{className:"mt-6 text-3xl font-bold text-gray-900 dark:text-white","data-testid":"text-login-title",children:"Admin Login"}),a.jsx("p",{className:"mt-2 text-sm text-gray-600 dark:text-gray-300",children:"Sign in to manage Salesforce Sage content"})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center justify-center",children:[a.jsx(Td,{className:"w-5 h-5 mr-2 text-sf-blue"}),"Secure Access"]})}),a.jsx(ne,{children:a.jsx(al,{...s,children:a.jsxs("form",{onSubmit:s.handleSubmit(i),className:"space-y-6",children:[a.jsx(ct,{control:s.control,name:"username",render:({field:o})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Username"}),a.jsx(at,{children:a.jsxs("div",{className:"relative",children:[a.jsx(yG,{className:"absolute left-3 top-3 w-4 h-4 text-gray-400"}),a.jsx(Ke,{placeholder:"Enter admin username",className:"pl-10","data-testid":"input-username",...o})]})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:s.control,name:"password",render:({field:o})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Password"}),a.jsx(at,{children:a.jsxs("div",{className:"relative",children:[a.jsx(Td,{className:"absolute left-3 top-3 w-4 h-4 text-gray-400"}),a.jsx(Ke,{type:"password",placeholder:"Enter admin password",className:"pl-10","data-testid":"input-password",...o})]})}),a.jsx(ft,{})]})}),a.jsx(H,{type:"submit",className:"w-full bg-sf-blue text-white hover:bg-sf-dark-blue",disabled:t,"data-testid":"button-login",children:t?"Signing in...":"Sign In"})]})})})]})]})})}const ile=Xd("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Cl=v.forwardRef(({className:e,variant:t,...n},r)=>a.jsx("div",{ref:r,role:"alert",className:be(ile({variant:t}),e),...n}));Cl.displayName="Alert";const ole=v.forwardRef(({className:e,...t},n)=>a.jsx("h5",{ref:n,className:be("mb-1 font-medium leading-none tracking-tight",e),...t}));ole.displayName="AlertTitle";const Tl=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:be("text-sm [&_p]:leading-relaxed",e),...t}));Tl.displayName="AlertDescription";function ale(e){if(!e||e.length!==15)throw new Error("Input must be exactly 15 characters");const t="ABCDEFGHIJKLMNOPQRSTUVWXYZ012345";let n="";for(let r=0;r<3;r++){let s=0;for(let i=0;i<5;i++){const o=e.charAt(r*5+i);o>="A"&&o<="Z"&&(s+=1<<i)}n+=t.charAt(s)}return e+n}function lle(e){if(!e||e.length!==18)throw new Error("Input must be exactly 18 characters");return e.substring(0,15)}function cle(e){if(!e)return{isValid:!1,type:"invalid",error:"ID cannot be empty"};const t=e.trim();return/^[a-zA-Z0-9]+$/.test(t)?t.length===15?{isValid:!0,type:"15"}:t.length===18?{isValid:!0,type:"18"}:{isValid:!1,type:"invalid",error:`Invalid length: ${t.length} (must be 15 or 18)`}:{isValid:!1,type:"invalid",error:"ID contains invalid characters"}}function ule(){const[e,t]=v.useState(""),[n,r]=v.useState([]),[s,i]=v.useState(""),{toast:o}=Fr(),l=()=>{if(i(""),r([]),!e.trim()){i("Please enter at least one Salesforce ID");return}const h=e.split(",").map(p=>p.trim()).filter(p=>p.length>0);if(h.length===0){i("Please enter valid Salesforce IDs");return}const f=[];for(const p of h){const m=cle(p);if(!m.isValid){f.push({original:p,converted:"",type:"15to18",error:m.error||"Invalid Salesforce ID"});continue}try{if(m.type==="15"){const g=ale(p);f.push({original:p,converted:g,type:"15to18"})}else{const g=lle(p);f.push({original:p,converted:g,type:"18to15"})}}catch(g){f.push({original:p,converted:"",type:"15to18",error:g instanceof Error?g.message:"Conversion failed"})}}r(f)},c=()=>{t(""),r([]),i("")},u=async h=>{try{await navigator.clipboard.writeText(h),o({title:"Copied!",description:"ID copied to clipboard",duration:2e3})}catch{o({title:"Copy failed",description:"Could not copy to clipboard",variant:"destructive",duration:2e3})}},d=async()=>{const h=n.filter(p=>!p.error);if(h.length===0)return;const f=h.map(p=>p.converted).join(`
638`);await u(f)};return a.jsx("div",{className:"container mx-auto px-4 py-8 max-w-4xl",children:a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"text-center space-y-4",children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:"Salesforce ID Converter"}),a.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300 max-w-2xl mx-auto",children:"Convert Salesforce record IDs between 15-digit and 18-digit formats. Supports multiple IDs at once - just separate them with commas. The 18-digit format is case-insensitive and includes a checksum for validation."})]}),a.jsxs(te,{className:"w-full",children:[a.jsxs(he,{children:[a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(O7,{className:"h-5 w-5"}),"ID Converter"]}),a.jsx(Xt,{children:"Enter one or more Salesforce IDs (15 or 18 digits) separated by commas. Mix different formats as needed."})]}),a.jsxs(ne,{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(ls,{htmlFor:"salesforce-id",children:"Salesforce ID(s)"}),a.jsx("textarea",{id:"salesforce-id",placeholder:`Enter one or more Salesforce IDs (comma-separated):
639e.g., 003A000010khO8J, 001A000010khO8JIAU, 0036000001B2cDE`,value:e,onCh
639ange:h=>t(h.target.value),className:"w-full min-h-[80px] p-3 border border-gray-300 dark:border-gray-600 rounded-md font-mono text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 resize-y","data-testid":"input-salesforce-id"}),a.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Separate multiple IDs with commas. Mix 15-digit and 18-digit IDs as needed."})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(H,{onClick:l,disabled:!e.trim(),"data-testid":"button-convert",className:"bg-sf-blue hover:bg-sf-dark-blue text-white",children:"Convert"}),a.jsx(H,{variant:"outline",onClick:c,"data-testid":"button-clear",children:"Clear"})]}),s&&a.jsxs(Cl,{variant:"destructive",children:[a.jsx(Si,{className:"h-4 w-4"}),a.jsx(Tl,{children:s})]}),n.length>0&&a.jsxs("div",{className:"space-y-4 pt-4 border-t",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(sl,{className:"h-5 w-5 text-green-600"}),a.jsxs("span",{className:"font-semibold",children:["Conversion Results (",n.filter(h=>!h.error).length," successful, ",n.filter(h=>h.error).length," failed)"]})]}),n.filter(h=>!h.error).length>1&&a.jsxs(H,{variant:"outline",size:"sm",onClick:d,"data-testid":"button-copy-all",title:"Copy all successful results",children:[a.jsx(Ws,{className:"h-4 w-4 mr-1"}),"Copy All"]})]}),a.jsx("div",{className:"space-y-3 max-h-80 overflow-y-auto",children:n.map((h,f)=>a.jsx("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-3",children:h.error?a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Si,{className:"h-4 w-4 text-red-500"}),a.jsx("span",{className:"text-sm font-medium text-red-600 dark:text-red-400",children:"Error"})]}),a.jsxs("div",{className:"text-sm",children:[a.jsx("div",{className:"font-mono text-gray-600 dark:text-gray-400",children:h.original}),a.jsx("div",{className:"text-red-600 dark:text-red-400 mt-1",children:h.error})]})]}):a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(sl,{className:"h-4 w-4 text-green-500"}),a.jsx("span",{className:"text-sm font-medium text-green-600 dark:text-green-400",children:h.type==="15to18"?"15-digit → 18-digit":"18-digit → 15-digit"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Original:"}),a.jsx("div",{className:"font-mono text-sm bg-gray-50 dark:bg-gray-800 p-2 rounded border",children:h.original}),a.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Converted:"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("div",{className:"font-mono text-sm bg-green-50 dark:bg-green-950/20 p-2 rounded border flex-1",children:h.converted}),a.jsx(H,{variant:"outline",size:"icon",onClick:()=>u(h.converted),"data-testid":`button-copy-${f}`,title:"Copy this result",className:"shrink-0",children:a.jsx(Ws,{className:"h-4 w-4"})})]})]})]})},f))})]})]})]}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{className:"text-lg",children:"15-Digit IDs"})}),a.jsxs(ne,{className:"space-y-2 text-sm",children:[a.jsxs("p",{children:[a.jsx("strong",{children:"Length:"})," 15 characters"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Case-sensitive:"})," Yes"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Usage:"})," Salesforce UI, reports"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Example:"})," ",a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"003A000010khO8J"})]})]})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{className:"text-lg",children:"18-Digit IDs"})}),a.jsxs(ne,{className:"space-y-2 text-sm",children:[a.jsxs("p",{children:[a.jsx("strong",{children:"Length:"})," 18 characters"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Case-sensitive:"})," No"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Usage:"})," APIs, integrations"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Example:"})," ",a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"003A000010khO8JIAU"})]})]})]})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:"How the Conversion Works"})}),a.jsxs(ne,{className:"space-y-4 text-sm",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold mb-2",children:"15 to 18 Digit Conversion:"}),a.jsxs("ol",{className:"list-decimal list-inside space-y-1 text-gray-600 dark:text-gray-400",children:[a.jsx("li",{children:"The 15-digit ID is split into three 5-character chunks"}),a.jsx("li",{children:"For each chunk, a binary pattern is created where uppercase letters = 1, others = 0"}),a.jsx("li",{children:"Each binary number is converted to decimal and mapped to a character"}),a.jsx("li",{children:"The 3 checksum characters are appended to create the 18-digit ID"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold mb-2",children:"18 to 15 Digit Conversion:"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Simply remove the last 3 characters (the checksum) from the 18-digit ID."})]}),a.jsx("div",{className:"bg-blue-50 dark:bg-blue-950/20 p-4 rounded-lg",children:a.jsxs("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[a.jsx("strong",{children:"Tip:"})," Use 18-digit IDs in APIs and integrations for better reliability, as they're case-insensitive and include error-checking."]})})]})]})]})})}var aT="Tabs",[dle,hAe]=As(aT,[ov]),CB=ov(),[hle,lT]=dle(aT),TB=v.forwardRef((e,t)=>
639{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=sv(l),[h,f]=Xo({prop:r,onChange:s,defaultProp:i});return a.jsx(hle,{scope:n,baseId:io(),value:h,onValueChange:f,orientation:o,dir:d,activationMode:c,children:a.jsx(je.div,{dir:d,"data-orientation":o,...u,ref:t})})});TB.displayName=aT;var AB="TabsList",jB=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,i=lT(AB,n),o=CB(n);return a.jsx(T4,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:a.jsx(je.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});jB.displayName=AB;var OB="TabsTrigger",RB=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=e,o=lT(OB,n),l=CB(n),c=MB(o.baseId,r),u=LB(o.baseId,r),d=r===o.value;return a.jsx(A4,{asChild:!0,...l,focusable:!s,active:d,children:a.jsx(je.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:t,onMouseDown:ae(e.onMouseDown,h=>{!s&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:ae(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:ae(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!s&&h&&o.onValueChange(r)})})})});RB.displayName=OB;var _B="TabsContent",IB=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=e,l=lT(_B,n),c=MB(l.baseId,r),u=LB(l.baseId,r),d=r===l.value,h=v.useRef(d);return v.useEffect(()=>{const f=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(f)},[]),a.jsx(Zs,{present:s||d,children:({present:f})=>a.jsx(je.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:f&&i})})});IB.displayName=_B;function MB(e,t){return`${e}-trigger-${t}`}function LB(e,t){return`${e}-content-${t}`}var fle=TB,PB=jB,DB=RB,$B=IB;const Fd=fle,Bc=v.forwardRef(({className:e,...t},n)=>a.jsx(PB,{ref:n,className:be("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Bc.displayName=PB.displayName;const Zt=v.forwardRef(({className:e,...t},n)=>a.jsx(DB,{ref:n,className:be("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Zt.displayName=DB.displayName;const Dn=v.forwardRef(({className:e,...t},n)=>a.jsx($B,{ref:n,className:be("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Dn.displayName=$B.displayName;const ple=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Cg=["SUN","MON","TUE","WED","THU","FRI","SAT"];function mle(e){const t=["seconds","minutes","hours","dayOfMonth","month","dayOfWeek","year"],n=e.dayOfMonth,r=e.dayOfWeek,s=n&&n.type!=="every",i=r&&r.type!=="every";return t.map(o=>{const l=e[o];if(!l)return o==="dayOfMonth"||o==="dayOfWeek"&&s?"?":"*";switch(l.type){case"every":if(o==="dayOfMonth"){const f=e.dayOfWeek;return f&&f.type!=="every","?"}if(o==="dayOfWeek"){const f=e.dayOfMonth;return f&&f.type!=="every"?"?":"*"}return"*";case"interval":const c=l.startAt!==void 0?l.startAt:o==="month"||o==="dayOfWeek"?"1":"0",u=l.interval||"1";if(o==="dayOfWeek"){const f=e.dayOfMonth;return f&&f.type!=="every"?"?":`${c}/${u}`}if(o==="dayOfMonth"){const f=e.dayOfWeek;return f&&f.type!=="every"?"?":c!=="1"?`${c}/${u}`:`*/${u}`}return`${c}/${u}`;case"specific":if(l.specificValues&&l.specificValues.length>0)return o==="dayOfMonth"?l.specificValues.map(f=>/^0\d+$/.test(f)?parseInt(f).toString():f).join(","):o==="dayOfWeek"?l.specificValues.map(f=>/^0\d+$/.test(f)?parseInt(f).toString():f).join(","):l.specificValues.map(f=>/^0\d+$/.test(f)?parseInt(f).toString():f).join(",");if(o==="dayOfMonth"){const f=e.dayOfWeek;return f&&f.type!=="every"?"?":"*"}if(o==="dayOfWeek"){const f=e.dayOfMonth;return f&&f.type!=="every"?"?":"*"}return"*";case"range":const d=l.rangeStart!==void 0?l.rangeStart:o==="month"||o==="dayOfMonth"?"1":"0",h=l.rangeEnd!==void 0?l.rangeEnd:"1";return`${parseInt(d)}-${parseInt(h)}`;case"last":return"L";
639case"lastWeekday":return"LW";case"weekday":return`${l.value}W`;case"nth":return`${l.nthWeekday}#${l.nthOccurrence}`;case"lastNDays":return`L-${l.lastNDays}`;case"lastSpecificWeekday":return`${l.lastSpecificWeekday}L`;default:if(o==="dayOfMonth"){const f=e.dayOfWeek;return f&&f.type!=="every"?"?":l.type==="every"?"*":"?"}if(o==="dayOfWeek"){const f=e.dayOfMonth;return f&&f.type!=="every"?"?":l.type==="every"?"*":"?"}return l.value||"*"}}).join(" ")}function S_(e){const t=e.trim().split(/\s+/);if(t.length!==7)return"Invalid cron format (requires 7 fields for Quartz/Salesforce)";const[n,r,s,i,o,l,c]=t;let u="";if(n==="*")u+="Every second";else if(n==="0")u+="At second :00";else if(n.includes("/")){const[p,m]=n.split("/"),g=p==="*"?"00":p.padStart(2,"0");u+=`Every ${m} seconds starting at second ${g}`}else if(n.includes(",")){const p=n.split(",").map(m=>m.padStart(2,"0"));u+=`At seconds :${p.join(", :")}`}else if(n.includes("-")){const[p,m]=n.split("-");u+=`From second :${p.padStart(2,"0")} to :${m.padStart(2,"0")}`}else u+=`At second :${n.padStart(2,"0")}`;if(r==="*")u+=", every minute";else if(r==="0")u+=", at minute :00";else if(r.includes("/")){const[p,m]=r.split("/"),g=p==="*"?"00":p.padStart(2,"0");u+=`, every ${m} minutes starting at minute :${g}`}else if(r.includes(",")){const p=r.split(",").map(m=>m.padStart(2,"0"));u+=`, at minutes :${p.join(", :")}`}else if(r.includes("-")){const[p,m]=r.split("-");u+=`, from minute :${p.padStart(2,"0")} to :${m.padStart(2,"0")}`}else u+=`, at minute :${r.padStart(2,"0")}`;if(s==="*")u+=", every hour";else if(s.includes("/")){const[p,m]=s.split("/"),g=p==="*"?"00":p.padStart(2,"0");u+=`, every ${m} hours starting at ${g}:00`}else if(s.includes(",")){const p=s.split(",").map(m=>{const g=parseInt(m),x=g===0?12:g>12?g-12:g,y=g<12?"AM":"PM";return`${x}${y.toLowerCase()}`});u+=`, at ${p.join(", ")}`}else if(s.includes("-")){const[p,m]=s.split("-"),g=parseInt(p),x=parseInt(m),y=g===0?12:g>12?g-12:g,b=x===0?12:x>12?x-12:x,w=g<12?"AM":"PM",E=x<12?"AM":"PM";u+=`, from ${y}${w.toLowerCase()} to ${b}${E.toLowerCase()}`}else{const p=parseInt(s),m=p===0?12:p>12?p-12:p,g=p<12?"AM":"PM";u+=`, at ${m}${g.toLowerCase()}`}if(i==="*")u+=", every day";else if(i==="?")u+="";else if(i==="L")u+=", on the last day of the month";else if(i.includes("/")){const[p,m]=i.split("/"),g=p==="*"?"1":p;u+=`, every ${m} days starting on the ${g}${cu(parseInt(g))} day`}else if(i.includes(",")){const p=i.split(",").map(m=>`${m}${cu(parseInt(m))}`);u+=`, on the ${p.join(" and ")} day`}else if(i.includes("-")){const[p,m]=i.split("-");u+=`, from the ${p}${cu(parseInt(p))} to ${m}${cu(parseInt(m))} day`}else if(i.endsWith("W")){const p=i.slice(0,-1);u+=`, on the nearest weekday to the ${p}${cu(parseInt(p))}`}else u+=`, on the ${i}${cu(parseInt(i))} day`;const d=["January","February","March","April","May","June","July","August","September","October","November","December"];if(o==="*")u+=", every month";else if(o.includes("/")){const[p,m]=o.split("/"),x=d[parseInt(p==="*"?"1":p)-1];u+=`, every ${m} months starting in ${x}
639`}else if(o.includes(",")){const p=o.split(",").map(m=>d[parseInt(m)-1]);u+=`, in ${p.join(", ")}`}else if(o.includes("-")){const[p,m]=o.split("-"),g=d[parseInt(p)-1],x=d[parseInt(m)-1];u+=`, from ${g} to ${x}`}else{const p=d[parseInt(o)-1];u+=`, in ${p}`}const h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f={SUN:"Sunday",MON:"Monday",TUE:"Tuesday",WED:"Wednesday",THU:"Thursday",FRI:"Friday",SAT:"Saturday",0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"};if(l==="*")u+=", any day of the week";else if(l==="?")u+="";else if(l.includes("/")){const[p,m]=l.split("/"),g=p==="*"?"0":p,x=f[g]||h[parseInt(g)]||g;u+=`, every ${m} days starting on ${x}`}else if(l.includes(",")){const p=l.split(",").map(m=>f[m]||h[parseInt(m)]||m);u+=`, on ${p.join(", ")}`}else if(l.includes("-")){const[p,m]=l.split("-"),g=f[p]||h[parseInt(p)]||p,x=f[m]||h[parseInt(m)]||m;u+=`, from ${g} to ${x}`}else if(l.includes("#")){const[p,m]=l.split("#"),g=f[p]||h[parseInt(p)]||p,x=["","1st","2nd","3rd","4th","5th"][parseInt(m)];u+=`, on the ${x} ${g}`}else if(l.endsWith("L")){const p=l.slice(0,-1),m=f[p]||h[parseInt(p)]||p;u+=`, on the last ${m}`}else{const p=f[l]||h[parseInt(l)]||l;u+=`, on ${p}`}return u=u.replace(/^, /,"").replace(/, , /,", "),u.charAt(0).toUpperCase()+u.slice(1)}function cu(e){const t=e%10,n=e%100;return t===1&&n!==11?"st":t===2&&n!==12?"nd":t===3&&n!==13?"rd":"th"}function gle(){const[e,t]=v.useState({seconds:{type:"specific",specificValues:["0"]},minutes:{type:"specific",specificValues:["0"]},hours:{type:"specific",specificValues:["0"]},dayOfMonth:{type:"every"},month:{type:"every"},dayOfWeek:{type:"every"},year:{type:"every"}}),[n,r]=v.useState(""),[s,i]=v.useState(""),[o,l]=v.useState("");v.useState([]);const[c,u]=v.useState("generator"),{toast:d}=Fr();v.useEffect(()=>{const x=mle(e);i(x),l(S_(x))},[e]);const h=async x=>{try{await navigator.clipboard.writeText(x),d({title:"Copied!",description:"Cron expression copied to clipboard",duration:2e3})}catch{d({title:"Copy failed",description:"Could not copy to clipboard",variant:"destructive",duration:2e3})}},f=(x,y)=>{t(b=>({...b,[x]:y}))},p=({values:x,onSelect:y,selected:b=[]})=>a.jsx("div",{className:"grid grid-cols-10 gap-1 max-w-md",children:x.map(w=>{const E=w.toString();return a.jsx(H,{variant:b.includes(E)?"default":"outline",size:"sm",className:"h-8 w-8 text-xs p-0",onClick:()=>y(E),"data-testid":`number-${w}`,children:w},w)})}),m=(x,y,b,w=!1)=>{const E=e[x],N=x==="month",k=x==="year",C=N||k?k?2e3:1:0,T=k?100:N?b:b+1;return a.jsx(Dn,{value:x,className:"space-y-4",children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:`${x}-every`,name:x,checked:E.type==="every",onChange:()=>f(x,{type:"every"}),className:"w-4 h-4"}),a.jsxs("label",{htmlFor:`${x}-every`,className:"text-sm",children:["Every ",y.toLowerCase()]})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:`${x}-interval`,name:x,checked:E.type==="interval",onChange:()=>f(x,{type:"interval",interval:"1",startAt:C.toString()}),className:"w-4 h-4"}),a.jsx("label",{htmlFor:`${x}-interval`,className:"text-sm",children:"Every"}),a.jsx(Ke,{type:"number",min:"1",max:b,value:E.interval||"1",onChange:j=>f(x,{...E,type:"interval",interval:j.target.value}),className:"w-16 h-8 text-sm",disabled:E.type!=="interval"}),a.jsxs("span",{className:"text-sm",children:[y.toLowerCase(),"(s) starting at ",y.toLowerCase()]}),a.jsxs(pr,{value:E.startAt!==void 0?E.startAt:C.toString(),onValueChange:j=>
639f(x,{...E,startAt:j}),disabled:E.type!=="interval",children:[a.jsx(er,{className:"w-16 h-8 text-sm",children:a.jsx(mr,{})}),a.jsx(tr,{children:Array.from({length:T},(j,S)=>{const R=k?S+2e3:N?S+1:S;return a.jsx(qe,{value:R.toString(),children:R},R)})})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:`${x}-specific`,name:x,checked:E.type==="specific",onChange:()=>f(x,{type:"specific",specificValues:[]}),className:"w-4 h-4"}),a.jsxs("label",{htmlFor:`${x}-specific`,className:"text-sm",children:["Specific ",y.toLowerCase()," (choose one or many)"]})]}),E.type==="specific"&&a.jsx(p,{values:Array.from({length:T},(j,S)=>k?S+2e3:N?S+1:S),selected:E.specificValues||[],onSelect:j=>{const S=E.specificValues||[],R=S.includes(j)?S.filter(_=>_!==j):[...S,j];f(x,{...E,specificValues:R})}})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:`${x}-range`,name:x,checked:E.type==="range",onChange:()=>f(x,{type:"range",rangeStart:C.toString(),rangeEnd:b.toString()}),className:"w-4 h-4"}),a.jsxs("label",{htmlFor:`${x}-range`,className:"text-sm",children:["Every ",y.toLowerCase()," between ",y.toLowerCase()]}),a.jsxs(pr,{value:E.rangeStart!==void 0?E.rangeStart:C.toString(),onValueChange:j=>
639f(x,{...E,rangeStart:j}),disabled:E.type!=="range",children:[a.jsx(er,{className:"w-16 h-8 text-sm",children:a.jsx(mr,{})}),a.jsx(tr,{children:Array.from({length:T},(j,S)=>{const R=k?S+2e3:N?S+1:S;return a.jsx(qe,{value:R.toString(),children:R},R)})})]}),a.jsxs("span",{className:"text-sm",children:["and ",y.toLowerCase()]}),a.jsxs(pr,{value:E.rangeEnd!==void 0?E.rangeEnd:b.toString(),onValueChange:j=>f(x,{...E,rangeEnd:j}),disabled:E.type!=="range",children:[a.jsx(er,{className:"w-16 h-8 text-sm",children:a.jsx(mr,{})}),a.jsx(tr,{children:Array.from({length:T},(j,S)=>{const R=k?S+2e3:N?S+1:S;return a.jsx(qe,{value:R.toString(),children:R},R)})})]})]})]})})},g=()=>{var y,b,w,E,N,k,C,T,j,S,R,_,L,A,B,U;const x=e.dayOfMonth;return a.jsx(Dn,{value:"dayOfMonth",className:"space-y-4",children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-every",name:"dayOfMonth",checked:x.type==="every",onChange:()=>f("dayOfMonth",{type:"every"}),className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-every",className:"text-sm",children:"Every day"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-interval",name:"dayOfMonth",checked:x.type==="interval",onChange:()=>f("dayOfMonth",{type:"interval",interval:"1"}),className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-interval",className:"text-sm",children:"Every"}),a.jsx(Ke,{type:"number",min:"1",max:"31",value:x.interval||"1",onChange:V=>f("dayOfMonth",{...x,type:"interval",interval:V.target.value}),className:"w-16 h-8 text-sm",disabled:x.type!=="interval"}),a.jsx("span",{className:"text-sm",children:"day(s) starting on the"}),a.jsxs(pr,{value:x.startAt||"1",onValueChange:V=>f("dayOfMonth",{...x,startAt:V}),disabled:x.type!=="interval",children:[a.jsx(er,{className:"w-20 h-8 text-sm",children:a.jsx(mr,{})}),a.jsx(tr,{children:Array.from({length:31},(V,P)=>{const D=P+1,q=D===1?"st":D===2?"nd":D===3?"rd":"th";return a.jsxs(qe,{value:D.toString(),children:[D,q]},D)})})]}),a.jsx("span",{className:"text-sm",children:"of the month"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-weekday-interval",name:"dayOfMonth",checked:((y=e.dayOfWeek)==null?void 0:y.type)==="interval",onChange:()=>{f("dayOfWeek",{type:"interval",interval:"1",startAt:"1"}),f("dayOfMonth",{type:"every"})},className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-weekday-interval",className:"text-sm",children:"Every"}),a.jsx(Ke,{type:"number",min:"1",max:"7",value:((b=e.dayOfWeek)==null?void 0:b.interval)||"1",onChange:V=>f("dayOfWeek",{...e.dayOfWeek,type:"interval",interval:V.target.value}),className:"w-16 h-8 text-sm",disabled:((w=e.dayOfWeek)==null?void 0:w.type)!=="interval"}),a.jsx("span",{className:"text-sm",children:"day(s) starting on"}),a.jsxs(pr,{value:((E=e.dayOfWeek)==null?void 0:E.startAt)||"1",onValueChange:V=>f("dayOfWeek",{...e.dayOfWeek,type:"interval",startAt:V}),disabled:((N=e.dayOfWeek)==null?void 0:N.type)!=="interval",children:[a.jsx(er,{className:"w-24 h-8 text-sm",children:a.jsx(mr,{})}),a.jsxs(tr,{children:[a.jsx(qe,{value:"1",children:"Sunday"}),a.jsx(qe,{value:"2",children:"Monday"}),a.jsx(qe,{value:"3",children:"Tuesday"}),a.jsx(qe,{value:"4",children:"Wednesday"}),a.jsx(qe,{value:"5",children:"Thursday"}),a.jsx(qe,{value:"6",children:"Friday"}),a.jsx(qe,{value:"7",children:"Saturday"})]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-weekdays",name:"dayOfMonth",checked:((k=e.dayOfWeek)==null?void 0:k.type)==="specific",onChange:()=>{f("dayOfWeek",{type:"specific",specificValues:[]}),f("dayOfMonth",{type:"every"})},className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-weekdays",className:"text-sm",children:"Specific day of week (choose one or many)"})]}),((C=e.dayOfWeek)==null?void 0:C.type)==="specific"&&a.jsx("div",{className:"grid grid-cols-4 gap-2 max-w-md",children:ple.map((V,P)=>{var D;return a.jsx(H,{variant:(((D=e.dayOfWeek)==null?void 0:D.specificValues)||[]).includes(Cg[P])?"default":"outline",size:"sm",className:"text-xs",onClick:()=>{var F;const q=((F=e.dayOfWeek)==null?void 0:F.specificValues)||[],Q=q.includes(Cg[P])?q.filter(ge=>ge!==Cg[P]):[...q,Cg[P]];f("dayOfWeek",{type:"specific",specificValues:Q})},children:V},V)})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-specific",name:"dayOfMonth",checked:x.type==="specific"&&!((T=x.specificValues)!=null&&T.some(V=>["SUN","MON","TUE","WED","THU","FRI","SAT"].includes(V))),onChange:()=>f("dayOfMonth",{type:"specific",specificValues:[]}),className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-specific",className:"text-sm",children:"Specific day of month (choose one or many)"})]}),x.type==="specific"&&a.jsx("div",{className:"grid grid-cols-10 gap-1 max-w-md",children:Array.from({length:31},(V,P)=>{const D=(P+1).toString();return a.jsx(H,{variant:(x.specificValues||[]).includes(D)?"default":"outline",size:"sm",className:"h-8 w-8 text-xs p-0",onClick:()=>{const q=x.specificValues||[],Q=q.includes(D)?q.filter(F=>F!==D):[...q,D];f("dayOfMonth",{...x,specificValues:Q})},children:D},D)})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-last",name:"dayOfMonth",checked:x.type==="last",onCh
639ange:()=>f("dayOfMonth",{type:"last"}),className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-last",className:"text-sm",children:"On the last day of the month"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-lastweekday",name:"dayOfMonth",checked:x.type==="lastWeekday",onChange:()=>f("dayOfMonth",{type:"lastWeekday"}),className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-lastweekday",className:"text-sm",children:"On the last weekday of the month"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-weekday",name:"dayOfMonth",checked:x.type==="weekday",onChange:()=>f("dayOfMonth",{type:"weekday",value:"1"}),className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-weekday",className:"text-sm",children:"Nearest weekday (Monday to Friday) to the"}),a.jsxs(pr,{value:x.value||"1",onValueChange:V=>f("dayOfMonth",{...x,type:"weekday",value:V}),disabled:x.type!=="weekday",children:[a.jsx(er,{className:"w-20 h-8 text-sm",children:a.jsx(mr,{})}),a.jsx(tr,{children:Array.from({length:31},(V,P)=>{const D=P+1,q=D===1?"st":D===2?"nd":D===3?"rd":"th";return a.jsxs(qe,{value:D.toString(),children:[D,q]},D)})})]}),a.jsx("span",{className:"text-sm",children:"of the month"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-lastndays",name:"dayOfMonth",checked:x.type==="lastNDays",onChange:()=>f("dayOfMonth",{type:"lastNDays",lastNDays:"2"}),className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-lastndays",className:"text-sm",children:"On the last"}),a.jsxs(pr,{value:x.lastNDays||"2",onValueChange:V=>f("dayOfMonth",{...x,type:"lastNDays",lastNDays:V}),disabled:x.type!=="lastNDays",children:[a.jsx(er,{className:"w-20 h-8 text-sm",children:a.jsx(mr,{})}),a.jsx(tr,{children:Array.from({length:31},(V,P)=>{const D=P+1;return a.jsx(qe,{value:D.toString(),children:D},D)})})]}),a.jsx("span",{className:"text-sm",children:"day(s) before the end of the month"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-nth-weekday",name:"dayOfMonth",checked:((j=e.dayOfWeek)==null?void 0:j.type)==="nth",onChange:()=>f("dayOfWeek",{type:"nth",nthWeekday:"1",nthOccurrence:"1"}),className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-nth-weekday",className:"text-sm",children:"On the"}),a.jsxs(pr,{value:((S=e.dayOfWeek)==null?void 0:S.nthOccurrence)||"1",onValueChange:V=>{var P;return f("dayOfWeek",{...e.dayOfWeek,type:"nth",nthOccurrence:V,nthWeekday:((P=e.dayOfWeek)==null?void 0:P.nthWeekday)||"1"})},disabled:((R=e.dayOfWeek)==null?void 0:R.type)!=="nth",children:[a.jsx(er,{className:"w-16 h-8 text-sm",children:a.jsx(mr,{})}),a.jsxs(tr,{children:[a.jsx(qe,{value:"1",children:"1st"}),a.jsx(qe,{value:"2",children:"2nd"}),a.jsx(qe,{value:"3",children:"3rd"}),a.jsx(qe,{value:"4",children:"4th"}),a.jsx(qe,{value:"5",children:"5th"})]})]}),a.jsxs(pr,{value:((_=e.dayOfWeek)==null?void 0:_.nthWeekday)||"1",onValueChange:V=>{var P;return f("dayOfWeek",{...e.dayOfWeek,type:"nth",nthWeekday:V,nthOccurrence:((P=e.dayOfWeek)==null?void 0:P.nthOccurrence)||"1"})},disabled:((L=e.dayOfWeek)==null?void 0:L.type)!=="nth",children:[a.jsx(er,{className:"w-24 h-8 text-sm",children:a.jsx(mr,{})}),a.jsxs(tr,{children:[a.jsx(qe,{value:"1",children:"Sunday"}),a.jsx(qe,{value:"2",children:"Monday"}),a.jsx(qe,{value:"3",children:"Tuesday"}),a.jsx(qe,{value:"4",children:"Wednesday"}),a.jsx(qe,{value:"5",children:"Thursday"}),a.jsx(qe,{value:"6",children:"Friday"}),a.jsx(qe,{value:"7",children:"Saturday"})]})]}),a.jsx("span",{className:"text-sm",children:"of the month"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("input",{type:"radio",id:"day-last-specific-weekday",name:"dayOfMonth",checked:((A=e.dayOfWeek)==null?void 0:A.type)==="lastSpecificWeekday",onChange:()=>f("dayOfWeek",{type:"lastSpecificWeekday",lastSpecificWeekday:"1"}),className:"w-4 h-4"}),a.jsx("label",{htmlFor:"day-last-specific-weekday",className:"text-sm",children:"On the last"}),a.jsxs(pr,{value:((B=e.dayOfWeek)==null?void 0:B.lastSpecificWeekday)||"1",onValueChange:V=>f("dayOfWeek",{...e.dayOfWeek,type:"lastSpecificWeekday",lastSpecificWeekday:V}),disabled:((U=e.dayOfWeek)==null?void 0:U.type)!=="lastSpecificWeekday",children:[a.jsx(er,{className:"w-24 h-8 text-sm",children:a.jsx(mr,{})}),a.jsxs(tr,{children:[a.jsx(qe,{value:"1",children:"Sunday"}),a.jsx(qe,{value:"2",children:"Monday"}),a.jsx(qe,{value:"3",children:"Tuesday"}),a.jsx(qe,{value:"4",children:"Wednesday"}),a.jsx(qe,{value:"5",children:"Thursday"}),a.jsx(qe,{value:"6",children:"Friday"}),a.jsx(qe,{value:"7",children:"Saturday"})]})]}),a.jsx("span",{className:"text-sm",children:"of the month"})]})]})]})})};return a.jsx("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"text-center space-y-4",children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:"Cron Expression Generator"}),a.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:"Generate Salesforce cron expressions with an easy to use online interface. Convert a cron expression into readable text and visualize the next execution dates."})]}),a.jsxs("div",{className:"flex justify-center space-x-2",children:[a.jsxs(H,{variant:c==="converter"?"default":"outline",onClick:()=>u("converter"),"data-testid":"button-converter-mode",children:[a.jsx(nG,{className:"h-4 w-4 mr-2"}),"Convert & Describe Expression"]}),a.jsxs(H,{variant:c==="generator"?"default":"outline",onClick:()=>u("generator"),"data-testid":"button-generator-mode",children:[a.jsx(Dk,{className:"h-4 w-4 mr-2"}),"Cron Expression Generator"]})]}),c==="converter"?a.jsx(a.Fragment,{children:a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"Convert cron expression to readable text format"}),a.jsx(Xt,{children:"Enter a cron expression to see its description and next execution dates"})]}),a.jsxs(ne,{className:"space-y-4",children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Ke,{placeholder:"e.g., 0 0 9 ? * MON-FRI",value:n,onChange:x=>{r(x.target.value),l(S_(x.target.value))},className:"font-mono","data-testid":"input-custom-cron"}),a.jsx(H,{onClick:()=>
639h(n),disabled:!n.trim(),"data-testid":"button-copy-custom",children:a.jsx(Ws,{className:"h-4 w-4"})})]}),n&&a.jsxs(Cl,{children:[a.jsx(tO,{className:"h-4 w-4"}),a.jsxs(Tl,{className:"text-sm",children:[a.jsx("strong",{children:"Description:"})," ",o]})]})]})]})}):a.jsxs(a.Fragment,{children:[a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"Cron Expression Generator - Salesforce"}),a.jsx(Xt,{children:"Use this online interface to generate cron expressions based on the Quartz engine"})]}),a.jsx(ne,{children:a.jsxs(Fd,{defaultValue:"seconds",className:"w-full",children:[a.jsxs(Bc,{className:"grid w-full grid-cols-6",children:[a.jsx(Zt,{value:"seconds",className:"text-xs",children:"Seconds"}),a.jsx(Zt,{value:"minutes",className:"text-xs",children:"Minutes"}),a.jsx(Zt,{value:"hours",className:"text-xs",children:"Hours"}),a.jsx(Zt,{value:"dayOfMonth",className:"text-xs",children:"Day"}),a.jsx(Zt,{value:"month",className:"text-xs",children:"Month"}),a.jsx(Zt,{value:"year",className:"text-xs",children:"Year"})]}),m("seconds","Second",59),m("minutes","Minute",59),m("hours","Hour",23),g(),m("month","Month",12),m("year","Year",2099)]})})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(sl,{className:"h-5 w-5 text-green-600"}),"Generated Cron Expression"]}),a.jsxs(H,{variant:"outline",size:"sm",onClick:()=>h(s),"data-testid":"button-copy-generated",children:[a.jsx(Ws,{className:"h-4 w-4 mr-1"}),"Copy"]})]})}),a.jsxs(ne,{className:"space-y-4",children:[a.jsx("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-lg",children:a.jsx("code",{className:"text-lg font-mono text-gray-900 dark:text-gray-100 break-all",children:s})}),a.jsxs("div",{className:"grid grid-cols-7 gap-2 text-center text-xs",children:[a.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-2 rounded",children:[a.jsx("div",{className:"font-semibold",children:"Seconds"}),a.jsx("div",{className:"font-mono",children:s.split(" ")[0]})]}),a.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-2 rounded",children:[a.jsx("div",{className:"font-semibold",children:"Minutes"}),a.jsx("div",{className:"font-mono",children:s.split(" ")[1]})]}),a.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-2 rounded",children:[a.jsx("div",{className:"font-semibold",children:"Hours"}),a.jsx("div",{className:"font-mono",children:s.split(" ")[2]})]}),a.jsxs("div",{className:"bg-purple-50 dark:bg-purple-900/20 p-2 rounded",children:[a.jsx("div",{className:"font-semibold",children:"Day Of Month"}),a.jsx("div",{className:"font-mono",children:s.split(" ")[3]})]}),a.jsxs("div",{className:"bg-pink-50 dark:bg-pink-900/20 p-2 rounded",children:[a.jsx("div",{className:"font-semibold",children:"Month"}),a.jsx("div",{className:"font-mono",children:s.split(" ")[4]})]}),a.jsxs("div",{className:"bg-orange-50 dark:bg-orange-900/20 p-2 rounded",children:[a.jsx("div",{className:"font-semibold",children:"Day Of Week"}),a.jsx("div",{className:"font-mono",children:s.split(" ")[5]})]}),a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-2 rounded",children:[a.jsx("div",{className:"font-semibold",children:"Year"}),a.jsx("div",{className:"font-mono",children:s.split(" ")[6]})]})]}),o&&a.jsxs(Cl,{children:[a.jsx(tO,{className:"h-4 w-4"}),a.jsxs(Tl,{className:"text-sm",children:[a.jsx("strong",{children:"Schedule:"})," ",o]})]})]})]})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:"Cron Expression Examples"})}),a.jsx(ne,{children:a.jsxs("div",{className:"grid gap-2 text-sm",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4 font-semibold border-b pb-2",children:[a.jsx("div",{children:"Expression"}),a.jsx("div",{children:"Description"})]}),[["0 0 0 * * ? *","Run Every Day at Midnight - Executes daily at 12:00 AM (start of day)"],["0 0 6 * * ? *","Run Every Day at 6 AM - Executes daily at 6:00 AM (e.g., data syncs before business hours)"],["0 0 * * * ? *","Run Every Hour - Runs at the start of every hour (useful for batch updates)"],["0 0/15 * * * ? *","Run Every 15 Minutes - Runs at 0, 15, 30, 45 minutes of every hour"],["0 0 9 ? * 2 *","Run Every Monday at 9 AM - Executes weekly on Monday at 9:00 AM (good for weekly reports)"],["0 0 18 ? * 6 *","Run Every Friday at 6 PM - Executes weekly on Frid
639ay at 6:00 PM (after business hours)"],["0 0 0 1 * ? *","Run on the 1st of Every Month at Midnight - Executes monthly on the 1st at 12:00 AM (month-end/beginning jobs)"],["0 59 23 L * ? *","Run on the Last Day of the Month at 11:59 PM - Executes at 11:59 PM on the last day of the month (for monthly billing/cleanup)"],["0 0 3 1 1,4,7,10 ? *","Run Every Quarter on the 1st Day at 3 AM - Executes at 3:00 AM on Jan 1, Apr 1, Jul 1, Oct 1 (quarterly jobs)"],["0 0 6 1 1 ? *","Run Once a Year on Jan 1st at 6 AM - Executes annually on January 1st at 6:00 AM (year-end reports, fiscal rollovers)"]].map(([x,y],b)=>a.jsxs("div",{className:"grid grid-cols-2 gap-4 py-1 border-b border-gray-100 dark:border-gray-700",children:[a.jsx("code",{className:"text-xs font-mono text-blue-600 dark:text-blue-400",children:x}),a.jsx("span",{className:"text-xs",children:y})]},b))]})})]})]})})}const yle=`{
640  "id": "001xx000003DGbAAA0",
641  "name": "Sample Account",
642  "type": "Customer",
643  "industry": "Technology",
644  "annualRevenue": 1000000.50,
645  "numberOfEmployees": 250,
646  "billingAddress": {
647    "street": "123 Main St",
648    "city": "San Francisco",
649    "state": "CA",
650    "postalCode": "94105",
651    "country": "USA"
652  },
653  "isActive": true,
654  "contacts": [
655    {
656      "firstName": "John",
657      "lastName": "Doe",
658      "email": "[email protected]",
659      "phone": "+1-555-0100"
660    },
661    {
662      "firstName": "Jane",
663      "lastName": "Smith",
664      "email": "[email protected]",
665      "phone": "+1-555-0101"
666    }
667  ],
668  "opportunities": [],
669  "tags": ["premium", "enterprise", "west-coast"]
670}`;function FB(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function xle(e){let t=e.replace(/[^a-zA-Z0-9_]/g,"_");t=t.replace(/^[0-9]+/,"");const n=t.split("_").filter(r=>r.length>0);if(n.length===0)return"field";if(n.length===1){const r=n[0];return r[0]===r[0].toLowerCase()?r:r.charAt(0).toLowerCase()+r.slice(1)}return n[0].toLowerCase()+n.slice(1).map(FB).join("")}function E_(e){let t=e.replace(/[^a-zA-Z0-9_]/g,"_");t=t.replace(/^[0-9]+/,"");const n=t.split("_").filter(r=>r.length>0);return n.length===0?"CustomClass":n.map(FB).join("")}function BB(e,t){if(e===null)return{type:"String",isCustomClass:!1};if(Array.isArray(e)){if(e.length===0)return{type:"List<Object>",isCustomClass:!1};const n=e[0];if(typeof n=="object"&&n!==null){const r=E_(t);return{type:`List<${r}>`,isCustomClass:!0,customClassName:r}}else return{type:`List<${BB(n,t).type}>`,isCustomClass:!1}}if(typeof e=="object"){const n=E_(t);return{type:n,isCustomClass:!0,customClassName:n}}return typeof e=="string"?{type:"String",isCustomClass:!1}:typeof e=="number"?Number.isInteger(e)?{type:"Integer",isCustomClass:!1}:{type:"Decimal",isCustomClass:!1}:typeof e=="boolean"?{type:"Boolean",isCustomClass:!1}:{type:"Object",isCustomClass:!1}}function DE(e,t,n=""){const r=[],s=new Map,i=[],o=new Set,l=new Set;for(const[c,u]of Object.entries(e)){let d=xle(c);if(o.has(d)){let p=1;for(;o.has(`${d}${p}`);)p++;d=`${d}${p}`}o.add(d);const h=BB(u,c);let f=h.customClassName;if(h.isCustomClass&&f){if(l.has(f)){let p=1;for(;l.has(`${f}${p}`);)p++;f=`${f}${p}`}if(l.add(f),Array.isArray(u)&&u.length>0){const p=u[0];if(typeof p=="object"&&p!==null&&!Array.isArray(p)){const m=DE(p,f,n+"    ");s.set(f,m)}}else if(typeof u=="object"&&u!==null&&!Array.isArray(u)){const p=DE(u,f,n+"    ");s.set(f,p)}h.type.startsWith("List<")?i.push(`${n}    public List<${f}> ${d};`):i.push(`${n}    public ${f} ${d};`)}else i.push(`${n}    public ${h.type} ${d};`)}return r.push(`${n}public class ${t} {`),r.push(...i),s.size>0&&(r.push(""),s.forEach(c=>{r.push(c)})),r.push(`${n}}`),r.join(`
671`)}function vle(e,t){try{if(!t||!/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return{success:!1,error:"Invalid class name. Class name must start with a letter and contain only letters, numbers, and underscores."};const n=JSON.parse(e);return typeof n!="object"||n===null?{success:!1,error:"JSON must be an object"}:{success:!0,code:DE(n,t)}}catch(n){return n instanceof SyntaxError?{success:!1,error:`Invalid JSON: ${n.message}`}:{success:!1,error:n instanceof Error?n.message:"An unknown error occurred"}}}function ble(){const[e,t]=v.useState(""),[n,r]=v.useState("SampleClass"),[s,i]=v.useState("//Apex Generated Code will go here"),[o,l]=v.useState(""),[c,u]=v.useState(!1),{toast:d}=Fr(),h=()=>
671{if(l(""),u(!1),!e.trim()){l("Please enter JSON data");return}const g=vle(e,n);g.success&&g.code?(i(g.code),u(!0),d({title:"Success!",description:"JSON converted to Apex class",duration:2e3})):(l(g.error||"Conversion failed"),i("//Apex Generated Code will go here"))},f=()=>{t(""),r("SampleClass"),i("//Apex Generated Code will go here"),l(""),u(!1)},p=()=>{t(yle),l(""),u(!1)},m=async g=>{try{await navigator.clipboard.writeText(g),d({title:"Copied!",description:"Apex code copied to clipboard",duration:2e3})}catch{d({title:"Copy failed",description:"Could not copy to clipboard",variant:"destructive",duration:2e3})}};return a.jsx("div",{className:"container mx-auto px-4 py-8 max-w-6xl",children:a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"text-center space-y-4",children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:"JSON to Apex Converter"}),a.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:"Convert JSON strings into Apex classes automatically. This tool reduces the manual steps involved when mapping JSON payloads from API responses or webhooks into Salesforce Apex code."})]}),a.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[a.jsxs(te,{className:"w-full",children:[a.jsxs(he,{children:[a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(P7,{className:"h-5 w-5"}),"JSON Input"]}),a.jsx(Xt,{children:"Paste your JSON string below to generate an Apex class"})]}),a.jsxs(ne,{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(ls,{htmlFor:"class-name",children:"Apex Class Name"}),a.jsx(Ke,{id:"class-name",placeholder:"SampleClass",value:n,onChange:g=>r(g.target.value),className:"font-mono","data-testid":"input-class-name"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(ls,{htmlFor:"json-input",children:"JSON String"}),a.jsx(H,{variant:"outline",size:"sm",onClick:p,"data-testid":"button-demo-json",children:"Demo JSON Payload"})]}),a.jsx("textarea",{id:"json-input",placeholder:'{"name": "Sample Account", "industry": "Technology"}',value:e,onChange:g=>t(g.target.value),className:"w-full min-h-[400px] p-3 border border-gray-300 dark:border-gray-600 rounded-md font-mono text-sm bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 resize-y","data-testid":"input-json"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(H,{onClick:h,disabled:!e.trim(),"data-testid":"button-convert",className:"bg-sf-blue hover:bg-sf-dark-blue text-white",children:"Convert JSON To Apex"}),a.jsx(H,{variant:"outline",onClick:f,"data-testid":"button-reset",children:"Reset JSON"})]}),o&&a.jsxs(Cl,{variant:"destructive",children:[a.jsx(Si,{className:"h-4 w-4"}),a.jsx(Tl,{"data-testid":"text-error",children:o})]}),c&&a.jsxs(Cl,{className:"bg-green-50 dark:bg-green-950/20 border-green-200 dark:border-green-800",children:[a.jsx(sl,{className:"h-4 w-4 text-green-600 dark:text-green-400"}),a.jsx(Tl,{className:"text-green-800 dark:text-green-200",children:"Apex class generated successfully!"})]})]})]}),a.jsxs(te,{className:"w-full",children:[a.jsxs(he,{children:[a.jsxs(fe,{className:"flex items-center gap-2 justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(D7,{className:"h-5 w-5"}),"Generated Apex Code"]}),c&&a.jsxs(H,{variant:"outline",size:"sm",onClick:()=>m(s),"data-testid":"button-copy-apex",children:[a.jsx(Ws,{className:"h-4 w-4 mr-1"}),"Copy"]})]}),a.jsx(Xt,{children:"Your Apex class will appear here"})]}),a.jsx(ne,{children:a.jsx("div",{className:"relative",children:a.jsx("pre",{className:"w-full min-h-[400px] p-4 bg-gray-900 dark:bg-gray-950 rounded-md overflow-auto","data-testid":"output-apex-code",children:a.jsx("code",{className:"text-sm text-gray-100 font-mono","data-testid":"text-apex-code",children:s})})})})]})]}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{className:"text-lg",children:"How It Works"})}),a.jsx(ne,{className:"space-y-3 text-sm",children:a.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-gray-600 dark:text-gray-400",children:[a.jsx("li",{children:"Paste your JSON string in the input area"}),a.jsx("li",{children:"Optionally customize the Apex class name"}),a.jsx("li",{children:'Click "Convert JSON To Apex" to generate the code'}),a.jsx("li",{children:"The tool automatically creates nested classes for objects and arrays"}),a.jsx("li",{children:"Copy the generated Apex code to use in your Salesforce org"})]})})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{className:"text-lg",children:"Use Cases"})}),a.jsx(ne,{className:"space-y-2 text-sm",children:a.jsxs("ul",{className:"list-disc list-inside space-y-2 text-gray-600 dark:text-gray-400",children:[a.jsx("li",{children:"Parsing REST API responses in Salesforce"}),a.jsx("li",{children:"Processing webhook payloads"}),a.jsx("li",{children:"Deserializing JSON data from external systems"}),a.jsx("li",{children:"Creating data transfer objects (DTOs)"}
671),a.jsx("li",{children:"Quickly scaffolding Apex wrapper classes"})]})})]})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:"Best Practices & Tips"})}),a.jsxs(ne,{className:"space-y-4 text-sm",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold mb-2",children:"Type Mapping:"}),a.jsxs("ul",{className:"list-disc list-inside space-y-1 text-gray-600 dark:text-gray-400 ml-4",children:[a.jsxs("li",{children:[a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"string"})," → ",a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"String"})]}),a.jsxs("li",{children:[a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"integer"})," → ",a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"Integer"})]}),a.jsxs("li",{children:[a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"decimal"})," → ",a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"Decimal"})]}),a.jsxs("li",{children:[a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"boolean"})," → ",a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"Boolean"})]}),a.jsxs("li",{children:[a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"object"})," → Nested class"]}),a.jsxs("li",{children:[a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"array"})," → ",a.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:"List<Type>"})]})]})]}),a.jsx("div",{className:"bg-blue-50 dark:bg-blue-950/20 p-4 rounded-lg",children:a.jsxs("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[a.jsx("strong",{children:"Tip:"})," After generating the Apex class, you can use",a.jsx("code",{className:"bg-blue-100 dark:bg-blue-900 px-1 mx-1 rounded",children:"JSON.deserialize(jsonString, ClassName.class)"}),"to parse your JSON data in Apex."]})}),a.jsx("div",{className:"bg-amber-50 dark:bg-amber-950/20 p-4 rounded-lg",children:a.jsxs("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[a.jsx("strong",{children:"Note:"})," The tool infers types from sample data. Arrays with objects will use the first element's structure. Empty arrays default to List<Object> - you may need to adjust the type manually."]})})]})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:"Example Usage in Apex"})}),a.jsx(ne,{children:a.jsx("pre",{className:"bg-gray-900 dark:bg-gray-950 p-4 rounded-md overflow-auto",children:a.jsx("code",{className:"text-sm text-gray-100 font-mono",children:`// After converting JSON to Apex class
672String jsonString = '{"name": "Sample Account", "industry": "Technology"}';
673
674// Deserialize JSON
675SampleClass obj = (SampleClass) JSON.deserialize(
676    jsonString, 
677    SampleClass.class
678);
679
680// Access properties
681System.debug('Account Name: ' + obj.name);
682System.debug('Industry: ' + obj.industry);`})})})]})]})})}function wle(){const{toast:e}=Fr(),[t,n]=v.useState("GET"),[r,s]=v.useState(""),[i,o]=v.useState([{id:"1",key:"",value:""}]),[l,c]=v.useState(""),[u,d]=v.useState(null),[h,f]=v.useState(!1),[p,m]=v.useState(""),g=()=>{o([...i,{id:Date.now().toString(),key:"",value:""}])},x=k=>{o(i.filter(C=>C.id!==k))},y=(k,C,T)=>{o(i.map(j=>j.id===k?{...j,[C]:T}:j))},b=async()=>{if(!r.trim()){m("Please enter a URL");return}f(!0),m(""),d(null);try{let k=r.trim();!k.startsWith("http://")&&!k.startsWith("https://")&&(k="https://"+k);const C={};i.forEach(R=>{R.key.trim()&&R.value.trim()&&(C[R.key.trim()]=R.value.trim())});const T={url:k,method:t,headers:C};t!=="GET"&&t!=="HEAD"&&l.trim()&&(T.body=l);const j=await fetch("/api/proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(T)}),S=await j.json();if(!j.ok)throw new Error(S.error||"Request failed");d({status:S.status,statusText:S.statusText,headers:S.headers,data:S.data,responseTime:S.responseTime}),e({title:"Success",description:`Request completed in ${S.responseTime}ms`})}catch(k){m(k.message||"Failed to send request"),e({title:"Error",description:k.message||"Failed to send request",variant:"destructive"})}finally{f(!1)}},w=()=>
682{if(u!=null&&u.data){const k=typeof u.data=="string"?u.data:JSON.stringify(u.data,null,2);navigator.clipboard.writeText(k),e({title:"Copied!",description:"Response copied to clipboard"})}},E=()=>{s(""),n("GET"),o([{id:"1",key:"",value:""}]),c(""),d(null),m("")},N=()=>{s("https://jsonplaceholder.typicode.com/todos/1"),n("GET"),o([{id:"1",key:"Accept",value:"application/json"}]),c(""),e({title:"Sample Loaded",description:"Try clicking 'Send Request' to test the API"})};return a.jsx("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 to-indigo-50 dark:from-gray-900 dark:to-gray-800 py-12 px-4",children:a.jsxs("div",{className:"max-w-6xl mx-auto",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-4",children:"API Response Viewer"}),a.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300 max-w-2xl mx-auto",children:"Test API endpoints and view responses with headers. Similar to Postman, right in your browser."})]}),a.jsxs("div",{className:"grid gap-6",children:[a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"Request"}),a.jsx(Xt,{children:"Configure your API request"})]}),a.jsxs(ne,{className:"space-y-4",children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(pr,{value:t,onValueChange:n,children:[a.jsx(er,{className:"w-32","data-testid":"select-method",children:a.jsx(mr,{})}),a.jsxs(tr,{children:[a.jsx(qe,{value:"GET",children:"GET"}),a.jsx(qe,{value:"POST",children:"POST"}),a.jsx(qe,{value:"PUT",children:"PUT"}),a.jsx(qe,{value:"PATCH",children:"PATCH"}),a.jsx(qe,{value:"DELETE",children:"DELETE"})]})]}),a.jsx(Ke,{placeholder:"Enter URL (e.g., https://api.example.com/data)",value:r,onChange:k=>s(k.target.value),className:"flex-1","data-testid":"input-url"}),a.jsx(H,{onClick:b,disabled:h||!r.trim(),"data-testid":"button-send",children:h?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"animate-spin mr-2",children:"⏳"}),"Sending..."]}):a.jsxs(a.Fragment,{children:[a.jsx(oG,{className:"w-4 h-4 mr-2"}),"Send"]})})]}),a.jsxs(Fd,{defaultValue:"headers",className:"w-full",children:[a.jsxs(Bc,{children:[a.jsx(Zt,{value:"headers","data-testid":"tab-headers",children:"Headers"}),a.jsx(Zt,{value:"body","data-testid":"tab-body",children:"Body"})]}),a.jsxs(Dn,{value:"headers",className:"space-y-2 mt-4",children:[a.jsxs("div",{className:"flex justify-between items-center mb-2",children:[a.jsx(ls,{children:"Request Headers"}),a.jsxs(H,{size:"sm",variant:"outline",onClick:g,"data-testid":"button-add-header",children:[a.jsx(Hh,{className:"w-4 h-4 mr-1"}),"Add Header"]})]}),i.map(k=>a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Ke,{placeholder:"Header name (e.g., Authorization)",value:k.key,onChange:C=>y(k.id,"key",C.target.value),className:"flex-1","data-testid":`input-header-key-${k.id}`}),a.jsx(Ke,{placeholder:"Header value (e.g., Bearer token123)",value:k.value,onChange:C=>y(k.id,"value",C.target.value),className:"flex-1","data-testid":`input-header-value-${k.id}`}),a.jsx(H,{size:"sm",variant:"ghost",onClick:()=>x(k.id),disabled:i.length===1,"data-testid":`button-remove-header-${k.id}`,children:a.jsx(hc,{className:"w-4 h-4 text-red-500"})})]},k.id))]}),a.jsx(Dn,{value:"body",className:"mt-4",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx(ls,{children:"Request Body (JSON, XML, or raw text)"}),a.jsx(fs,{placeholder:'{"key": "value"}',value:l,onChange:k=>c(k.target.value),rows:8,className:"font-mono text-sm","data-testid":"textarea-body"}),a.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Body is only sent for POST, PUT, PATCH, and DELETE requests"})]})})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(H,{variant:"outline",onClick:N,"data-testid":"button-sample",children:"Load Sample Request"}),a.jsx(H,{variant:"outline",onClick:E,"data-testid":"button-reset",children:"Reset"})]})]})]}),p&&a.jsx(te,{className:"border-red-300 bg-red-50 dark:bg-red-900/20",children:a.jsx(ne,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center gap-2 text-red-700 dark:text-red-400",children:[a.jsx(Si,{className:"w-5 h-5"}),a.jsx("span",{className:"font-medium","data-testid":"text-error",children:p})]})})}),u&&a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsxs("div",{children:[a.jsxs(fe,{className:"flex items-center gap-2",children:["Response",a.jsxs("span",{className:`px-2 py-1 text-sm rounded ${u.status>=200&&u.status<300?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":u.status>=400?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400":"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400"}`,"data-testid":"text-status",children:[u.status," ",u.statusText]})]}),a.jsxs(Xt,{children:["Response time: ",u.responseTime,"ms"]})]}),a.jsxs(H,{size:"sm",variant:"outline",onClick:w,"data-testid":"button-copy",children:[a.jsx(Ws,{className:"w-4 h-4 mr-2"}),"Copy Response"]})]})}),a.jsx(ne,{children:a.jsxs(Fd,{defaultValue:"body",children:[a.jsxs(Bc,{children:[a.jsx(Zt,{value:"body","data-testid":"tab-response-body",children:"Body"}),a.jsx(Zt,{value:"headers","data-testid":"tab-response-headers",children:"Headers"})]}),a.jsx(Dn,{value:"body",className:"mt-4",children:a.jsx("div",{className:"bg-gray-900 text-white p-4 rounded-lg overflow-auto max-h-96",children:a.jsx("pre",{className:"text-sm","data-testid":"text-response-body",children:typeof u.data=="str
682ing"?u.data:JSON.stringify(u.data,null,2)})})}),a.jsx(Dn,{value:"headers",className:"mt-4",children:a.jsx("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-lg space-y-2",children:Object.entries(u.headers).map(([k,C])=>a.jsxs("div",{className:"flex gap-2 text-sm","data-testid":`header-${k}`,children:[a.jsxs("span",{className:"font-semibold text-gray-700 dark:text-gray-300 min-w-[200px]",children:[k,":"]}),a.jsx("span",{className:"text-gray-600 dark:text-gray-400 break-all",children:C})]},k))})})]})})]}),a.jsxs(te,{className:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800",children:[a.jsx(he,{children:a.jsx(fe,{className:"text-blue-900 dark:text-blue-300",children:"How to Use"})}),a.jsxs(ne,{className:"space-y-2 text-sm text-blue-800 dark:text-blue-300",children:[a.jsxs("p",{children:["1. ",a.jsx("strong",{children:"Select HTTP Method:"})," Choose GET, POST, PUT, PATCH, or DELETE"]}),a.jsxs("p",{children:["2. ",a.jsx("strong",{children:"Enter URL:"})," Type the API endpoint you want to test"]}),a.jsxs("p",{children:["3. ",a.jsx("strong",{children:"Add Headers:"})," Include any required headers like Authorization or Content-Type"]}),a.jsxs("p",{children:["4. ",a.jsx("strong",{children:"Add Body:"})," For POST/PUT/PATCH requests, add your request body in JSON or other formats"]}),a.jsxs("p",{children:["5. ",a.jsx("strong",{children:"Send Request:"})," Click Send and view the response with status code, headers, and body"]}),a.jsxs("p",{className:"mt-4 text-xs",children:[a.jsx("strong",{children:"✓ CORS Bypass:"})," This tool uses a backend proxy to bypass CORS restrictions, so it works with any API endpoint - just like Postman!"]})]})]})]})]})})}const Dp={black:"#000",white:"#fff"},uu={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},du={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},hu={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},fu={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},pu={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Oh={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Sle={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Al(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const lo="$$material";function $E(){return $E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$E.apply(null,arguments)}var Ele=!1;function Nle(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function kle(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Cle=function(){function e(n){var r=this;this._insertTag=function(s){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,i),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!Ele:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(kle(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var i=Nle(s);try{i.insertRule(r,i.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++}
vendor: 11,860 bytes, lines 682-689
682,t.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},e}(),hr="-ms-",a0="-moz-",yt="-webkit-",UB="comm",cT="rule",uT="decl",Tle="@import",zB="@keyframes",Ale="@layer",jle=Math.abs,Iv=String.fromCharCode,Ole=Object.assign;function Rle(e,t){return nr(e,0)^45?(((t<<2^nr(e,0))<<2^nr(e,1))<<2^nr(e,2))<<2^nr(e,3):0}function VB(e){return e.trim()}function _le(e,t){return(e=t.exec(e))?e[0]:e}function xt(e,t,n){return e.replace(t,n)}function FE(e,t){return e.indexOf(t)}function nr(e,t){return e.charCodeAt(t)|0}function $p(e,t,n){return e.slice(t,n)}function qi(e){return e.length}function dT(e){return e.length}function Tg(e,t){return t.push(e),e}function Ile(e,t){return e.map(t).join("")}var Mv=1,Bd=1,WB=0,es=0,Cn=0,oh="";function Lv(e,t,n,r,s,i,o){return{value:e,root:t,parent:n,type:r,props:s,children:i,line:Mv,column:Bd,length:o,return:""}}function Rh(e,t){return Ole(Lv("",null,null,"",null,null,0),e,{length:-e.length},t)}function Mle(){return Cn}function Lle(){return Cn=es>0?nr(oh,--es):0,Bd--,Cn===10&&(Bd=1,Mv--),Cn}function vs(){return Cn=es<WB?nr(oh,es++):0,Bd++,Cn===10&&(Bd=1,Mv++),Cn}function co(){return nr(oh,es)}function py(){return es}function mm(e,t){return $p(oh,e,t)}function Fp(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function HB(e){return Mv=Bd=1,WB=qi(oh=e),es=0,[]}function GB(e){return oh="",e}function my(e){return VB(mm(es-1,BE(e===91?e+2:e===40?e+1:e)))}function Ple(e){for(;(Cn=co())&&Cn<33;)vs();return Fp(e)>2||Fp(Cn)>3?"":" "}function Dle(e,t){for(;--t&&vs()&&!(Cn<48||Cn>102||Cn>57&&Cn<65||Cn>70&&Cn<97););return mm(e,py()+(t<6&&co()==32&&vs()==32))}function BE(e){for(;vs();)switch(Cn){case e:return es;case 34:case 39:e!==34&&e!==39&&BE(Cn);break;case 40:e===41&&BE(e);break;case 92:vs();break}return es}function $le(e,t){for(;vs()&&e+Cn!==57;)if(e+Cn===84&&co()===47)break;return"/*"+mm(t,es-1)+"*"+Iv(e===47?e:vs())}function Fle(e){for(;!Fp(co());)vs();return mm(e,es)}function Ble(e){return GB(gy("",null,null,null,[""],e=HB(e),0,[0],e))}function gy(e,t,n,r,s,i,o,l,c){for(var u=0,d=0,h=o,f=0,p=0,m=0,g=1,x=1,y=1,b=0,w="",E=s,N=i,k=r,C=w;x;)switch(m=b,b=vs()){case 40:if(m!=108&&nr(C,h-1)==58){FE(C+=xt(my(b),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:C+=my(b);break;case 9:case 10:case 13:case 32:C+=Ple(m);break;case 92:C+=Dle(py()-1,7);continue;case 47:switch(co()){case 42:case 47:Tg(Ule($le(vs(),py()),t,n),c);break;default:C+="/"}break;case 123*g:l[u++]=qi(C)*y;case 125*g:case 59:case 0:switch(b){case 0:case 125:x=0;case 59+d:y==-1&&(C=xt(C,/\f/g,"")),p>0&&qi(C)-h&&Tg(p>32?k_(C+";",r,n,h-1):k_(xt(C," ","")+";",r,n,h-2),c);break;case 59:C+=";";default:if(Tg(k=N_(C,t,n,u,d,s,l,w,E=[],N=[],h),i),b===123)if(d===0)gy(C,t,k,k,E,i,h,l,N);else switch(f===99&&nr(C,3)===110?100:f){case 100:case 108:case 109:case 115:gy(e,k,k,r&&Tg(N_(e,k,k,0,0,s,l,w,s,E=[],h),N),s,N,h,l,r?E:N);break;default:gy(C,k,k,k,[""],N,0,l,N)}}u=d=p=0,g=y=1,w=C="",h=o;break;case 58:h=1+qi(C),p=m;default:if(g<1){if(b==123)--g;else if(b==125&&g++==0&&Lle()==125)continue}switch(C+=Iv(b),b*g){case 38:y=d>0?1:(C+="\f",-1);break;case 44:l[u++]=(qi(C)-1)*y,y=1;break;case 64:co()===45&&(C+=my(vs())),f=co(),d=h=qi(w=C+=Fle(py())),b++;break;case 45:m===45&&qi(C)==2&&(g=0)}}return i}function N_(e,t,n,r,s,i,o,l,c,u,d){for(var h=s-1,f=s===0?i:[""],p=dT(f),m=0,g=0,x=0;m<r;++m)for(var y=0,b=$p(e,h+1,h=jle(g=o[m])),w=e;y<p;++y)(w=VB(g>0?f[y]+" "+b:xt(b,/&\f/g,f[y])))&&(c[x++]=w);return Lv(e,t,n,s===0?cT:l,c,u,d)}function Ule(e,t,n){return Lv(e,t,n,UB,Iv(Mle()),$p(e,2,-2),0)}function k_(e,t,n,r){return Lv(e,t,n,uT,$p(e,0,r),$p(e,r+1,-1),r)}function nd(e,t){for(var n="",r=dT(e),s=0;s<r;s++)n+=t(e[s],s,e,t)||"";return n}function zle(e,t,n,r){switch(e.type){case Ale:if(e.children.length)break;case Tle:case uT:return e.return=e.return||e.value;case UB:return"";case zB:return e.return=e.value+"{"+nd(e.children,r)+"}";case cT:e.value=e.props.join(",")}return qi(n=nd(e.children,r))?e.return=e.value+"{"+n+"}":""}function Vle(e){var t=dT(e);return function(n,r,s,i){for(var o="",l=0;l<t;l++)o+=e[l](n,r,s,i)||"";return o}}function Wle(e){return function(t){t.root||(t=t.return)&&e(t)}}function KB(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Hle=function(t,n,r){for(var s=0,i=0;s=i,i=co(),s===38&&i===12&&(n[r]=1),!Fp(i);)vs();return mm(t,es)},Gle=function(t,n){var r=-1,s=44;do switch(Fp(s)){case 0:s===38&&co()===12&&(n[r]=1),t[r]+=Hle(es-1,n,r);break;case 2:t[r]+=my(s);break;case 4:if(s===44){t[++r]=co()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Iv(s)}while(s=vs());return t},Kle=function(t,n){return GB(Gle(HB(t),n))},C_=new WeakMap,qle=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,s=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!C_.get(r))&&!s){C_.set(t,!0);for(var i=[],o=Kle(n,i),l=r.props,c=0,u=0;c<o.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=i[c]?o[c].replace(/&\f/g,l[d]):l[d]+" "+o[c]}}},Yle=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function qB(e,t){switch(Rle(e,t)){case 5103:return yt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return yt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return yt+e+a0+e+hr+e+e;case 6828:case 4268:return yt+e+hr+e+e;case 6165:return yt+e+hr+"flex-"+e+e;case 5187:return yt+e+xt(e,/(\w+).+(:[^]+)/,yt+"box-$1$2"+hr+"flex-$1$2")+e;case 5443:return yt+e+hr+"flex-item-"+xt(e,/flex-|-self/,"")+e;case 4675:return yt+e+hr+"flex-line-pack"+xt(e,/align-content|flex-|-self/,"")+e;case 5548:return yt+e+hr+xt(e,"shrink","negative")+e;case 5292:return yt+e+hr+xt(e,"basis","preferred-size")+e;case 6060:return yt+"box-"+xt(e,"-grow","")+yt+e+hr+xt(e,"grow","positive")+e;case 4554:return yt+xt(e,/([^-])(transform)/g,"$1"+yt+"$2")+e;case 6187:return xt(xt(xt(e,/(zoom-|grab)/,yt+"$1"),/(image-set)/,yt+"$1"),e,"")+e;case 5495:case 3959:return xt(e,/(image-set\([^]*)/,yt+"$1$`$1");case 4968:return xt(xt(e,/(.+:)(flex-)?(.*)/,yt+"box-pack:$3"+hr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+yt+e+e;case 4095:case 3583:case 4068:case 2532:return xt(e,/(.+)-inline(.+)/,yt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(qi(e)-1-t>6)switch(nr(e,t+1)){case 109:if(nr(e,t+4)!==45)break;case 102:return xt(e,/(.+:)(.+)-([^]+)/,"$1"+yt+"$2-$3$1"+a0+(nr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~FE(e,"stretch")?qB(xt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(nr(e,t+1)!==115)break;case 6444:switch(nr(e,qi(e)-3-(~FE(e,"!important")&&10))){case 107:return xt(e,":",":"+yt)+e;case 101:return xt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+yt+(nr(e,14)===45?"inline-":"")+"box$3$1"+yt+"$2$3$1"+hr+"$2box$3")+e}break;case 5936:switch(nr(e,t+11)){case 114:return yt+e+hr+xt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return yt+e+hr+xt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return yt+e+hr+xt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return yt+e+hr+e+e}return e}var Qle=function(t,n,r,s){if(t.length>-1&&!t.return)switch(t.type){case uT:t.return=qB(t.value,t.length);break;case zB:return nd([Rh(t,{value:xt(t.value,"@","@"+yt)})],s);case cT:if(t.length)return Ile(t.props,function(i){switch(_le(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return nd([Rh(t,{props:[xt(i,/:(read-\w+)/,":"+a0+"$1")]})],s);case"::placeholder":return nd([Rh(t,{props:[xt(i,/:(plac\w+)/,":"+yt+"input-$1")]}),Rh(t,{props:[xt(i,/:(plac\w+)/,":"+a0+"$1")]}),Rh(t,{props:[xt(i,/:(plac\w+)/,hr+"input-$1")]})],s)}return""})}},Jle=[Qle],Xle=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var x=g.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var s=t.stylisPlugins||Jle,i={},o,l=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var x=g.getAttribute("data-emotion").split(" "),y=1;y<x.length;y++)i[x[y]]=!0;l.push(g)});var c,u=[qle,Yle];{var d,h=[zle,Wle(function(g){d.insert(g)})],f=Vle(u.concat(s,h)),p=function(x){return nd(Ble(x),f)};c=function(x,y,b,w){d=b,p(x?x+"{"+y.styles+"}":y.styles),w&&(m.inserted[y.name]=!0)}}var m={key:n,sheet:new Cle({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return m.sheet.hydrate(l),m},YB={exports:{}},kt={};/** @license React v16.13.1
683 * react-is.production.min.js
684 *
685 * Copyright (c) Facebook, Inc. and its affiliates.
686 *
687 * This source code is licensed under the MIT license found in the
688 * LICENSE file in the root directory of this source tree.
689 */var qn=typeof Symbol=="function"&&Symbol.for,hT=qn?Symbol.for("react.element"):60103,fT=qn?Symbol.for("react.portal"):60106,Pv=qn?Symbol.for("react.fragment"):60107,Dv=qn?Symbol.for("react.strict_mode"):60108,$v=qn?Symbol.for("react.profiler"):60114,Fv=qn?Symbol.for("react.provider"):60109,Bv=qn?Symbol.for("react.context"):60110,pT=qn?Symbol.for("react.async_mode"):60111,Uv=qn?Symbol.for("react.concurrent_mode"):60111,zv=qn?Symbol.for("react.forward_ref"):60112,Vv=qn?Symbol.for("react.suspense"):60113,Zle=qn?Symbol.for("react.suspense_list"):60120,Wv=qn?Symbol.for("react.memo"):60115,Hv=qn?Symbol.for("react.lazy"):60116,ece=qn?Symbol.for("react.block"):60121,tce=qn?Symbol.for("react.fundamental"):60117,nce=qn?Symbol.for("react.responder"):60118,rce=qn?Symbol.for("react.scope"):60119;function js(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case hT:switch(e=e.type,e){case pT:case Uv:case Pv:case $v:case Dv:case Vv:return e;default:switch(e=e&&e.$$typeof,e){case Bv:case zv:case Hv:case Wv:case Fv:return e;default:return t}}case fT:return t}}}function QB(e){return js(e)===Uv}kt.AsyncMode=pT;kt.ConcurrentMode=Uv;kt.ContextConsumer=Bv;kt.ContextProvider=Fv;kt.Element=hT;kt.ForwardRef=zv;kt.Fragment=Pv;kt.Lazy=Hv;kt.Memo=Wv;kt.Portal=fT;kt.Profiler=$v;kt.StrictMode=Dv;kt.Suspense=Vv;kt.isAsyncMode=function(e){return QB(e)||js(e)===pT};kt.isConcurrentMode=QB;kt.isContextConsumer=function(e){return js(e)===Bv};kt.isContextProvider=function(e){return js(e)===Fv};kt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===hT};kt.isForwardRef=function(e){return js(e)===zv};kt.isFragment=function(e){return js(e)===Pv};kt.isLazy=function(e){return js(e)===Hv};kt.isMemo=function(e){return js(e)===Wv};kt.isPortal=function(e){return js(e)===fT};kt.isProfiler=function(e){return js(e)===$v};kt.isStrictMode=function(e){return js(e)===Dv};kt.isSuspense=function(e){return js(e)===Vv};kt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pv||e===Uv||e===$v||e===Dv||e===Vv||e===Zle||typeof e=="object"&&e!==null&&(e.$$typeof===Hv||e.$$typeof===Wv||e.$$typeof===Fv||e.$$typeof===Bv||e.$$typeof===zv||e.$$typeof===tce||e.$$typeof===nce||e.$$typeof===rce||e.$$typeof===ece)};kt.typeOf=js;YB.exports=kt;var sce=YB.exports,JB=sce,ice={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},oce={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},XB={};XB[JB.ForwardRef]=ice;XB[JB.Memo]=oce;var ace=!0;
vendor: 15,787 bytes, lines 689-703
689function ZB(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(r+=s+" ")}),r}var mT=function(t,n,r){var s=t.key+"-"+n.name;(r===!1||ace===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},gT=function(t,n,r){mT(t,n,r);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+s:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function lce(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var cce={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uce=!1,dce=/[A-Z]|^ms/g,hce=/_EMO_([^_]+?)_([^]*?)_EMO_/g,eU=function(t){return t.charCodeAt(1)===45},T_=function(t){return t!=null&&typeof t!="boolean"},aw=KB(function(e){return eU(e)?e:e.replace(dce,"-$&").toLowerCase()}),A_=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(hce,function(r,s,i){return Yi={name:s,styles:i,next:Yi},s})}return cce[t]!==1&&!eU(t)&&typeof n=="number"&&n!==0?n+"px":n},fce="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Bp(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return Yi={name:s.name,styles:s.styles,next:Yi},s.name;var i=n;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)Yi={name:o.name,styles:o.styles,next:Yi},o=o.next;var l=i.styles+";";return l}return pce(e,t,n)}case"function":{if(e!==void 0){var c=Yi,u=n(e);return Yi=c,Bp(e,t,u)}break}}var d=n;if(t==null)return d;var h=t[d];return h!==void 0?h:d}function pce(e,t,n){var r="";if(Array.isArray(n))for(var s=0;s<n.length;s++)r+=Bp(e,t,n[s])+";";else for(var i in n){var o=n[i];if(typeof o!="object"){var l=o;t!=null&&t[l]!==void 0?r+=i+"{"+t[l]+"}":T_(l)&&(r+=aw(i)+":"+A_(i,l)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&uce)throw new Error(fce);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)T_(o[c])&&(r+=aw(i)+":"+A_(i,o[c])+";");else{var u=Bp(e,t,o);switch(i){case"animation":case"animationName":{r+=aw(i)+":"+u+";";break}default:r+=i+"{"+u+"}"}}}}return r}var j_=/label:\s*([^\s;{]+)\s*(;|$)/g,Yi;function Gv(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,s="";Yi=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,s+=Bp(n,t,i);else{var o=i;s+=o[0]}for(var l=1;l<e.length;l++)if(s+=Bp(n,t,e[l]),r){var c=i;s+=c[l]}j_.lastIndex=0;for(var u="",d;(d=j_.exec(s))!==null;)u+="-"+d[1];var h=lce(s)+u;return{name:h,styles:s,next:Yi}}var mce=function(t){return t()},tU=Ff.useInsertionEffect?Ff.useInsertionEffect:!1,nU=tU||mce,O_=tU||v.useLayoutEffect,gce=!1,rU=v.createContext(typeof HTMLElement<"u"?Xle({key:"css"}):null);rU.Provider;var yT=function(t){return v.forwardRef(function(n,r){var s=v.useContext(rU);return t(n,s,r)})},gm=v.createContext({}),xT={}.hasOwnProperty,UE="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yce=function(t,n){var r={};for(var s in n)xT.call(n,s)&&(r[s]=n[s]);return r[UE]=t,r},xce=function(t){var n=t.cache,r=t.serialized,s=t.isStringTag;return mT(n,r,s),nU(function(){return gT(n,r,s)}),null},vce=yT(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var s=e[UE],i=[r],o="";typeof e.className=="string"?o=ZB(t.registered,i,e.className):e.className!=null&&(o=e.className+" ");var l=Gv(i,void 0,v.useContext(gm));o+=t.key+"-"+l.name;var c={};for(var u in e)xT.call(e,u)&&u!=="css"&&u!==UE&&!gce&&(c[u]=e[u]);return c.className=o,n&&(c.ref=n),v.createElement(v.Fragment,null,v.createElement(xce,{cache:t,serialized:l,isStringTag:typeof s=="string"}),v.createElement(s,c))}),bce=vce,R_=function(t,n){var r=arguments;if(n==null||!xT.call(n,"css"))return v.createElement.apply(void 0,r);var s=r.length,i=new Array(s);i[0]=bce,i[1]=yce(t,n);for(var o=2;o<s;o++)i[o]=r[o];return v.createElement.apply(null,i)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(R_||(R_={}));var wce=yT(function(e,t){var n=e.styles,r=Gv([n],void 0,v.useContext(gm)),s=v.useRef();return O_(function(){var i=t.key+"-global",o=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+i+" "+r.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",i),o.hydrate([c])),s.current=[o,l],function(){o.flush()}},[t]),O_(function(){var i=s.current,o=i[0],l=i[1];if(l){i[1]=!1;return}if(r.next!==void 0&&gT(t,r.next,!0),o.tags.length){var c=o.tags[o.tags.length-1].nextElementSibling;o.before=c,o.flush()}t.insert("",r,o,!1)},[t,r.name]),null}),Sce=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ece=KB(function(e){return Sce.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Nce=!1,kce=Ece,Cce=function(t){return t!=="theme"},__=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?kce:Cce},I_=function(t,n,r){var s;if(n){var i=n.shouldForwardProp;s=t.__emotion_forwardProp&&i?function(o){return t.__emotion_forwardProp(o)&&i(o)}:i}return typeof s!="function"&&r&&(s=t.__emotion_forwardProp),s},Tce=function(t){var n=t.cache,r=t.serialized,s=t.isStringTag;return mT(n,r,s),nU(function(){return gT(n,r,s)}),null},Ace=function e(t,n){var r=t.__emotion_real===t,s=r&&t.__emotion_base||t,i,o;n!==void 0&&(i=n.label,o=n.target);var l=I_(t,n,r),c=l||__(s),u=!c("as");return function(){var d=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&h.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)h.push.apply(h,d);else{var f=d[0];h.push(f[0]);for(var p=d.length,m=1;m<p;m++)h.push(d[m],f[m])}var g=yT(function(x,y,b){var w=u&&x.as||s,E="",N=[],k=x;if(x.theme==null){k={};for(var C in x)k[C]=x[C];k.theme=v.useContext(gm)}typeof x.className=="string"?E=ZB(y.registered,N,x.className):x.className!=null&&(E=x.className+" ");var T=Gv(h.concat(N),y.registered,k);E+=y.key+"-"+T.name,o!==void 0&&(E+=" "+o);var j=u&&l===void 0?__(w):c,S={};for(var R in x)u&&R==="as"||j(R)&&(S[R]=x[R]);return S.className=E,b&&(S.ref=b),v.createElement(v.Fragment,null,v.createElement(Tce,{cache:y,serialized:T,isStringTag:typeof w=="string"}),v.createElement(w,S))});return g.displayName=i!==void 0?i:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=h,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return o===void 0&&Nce?"NO_COMPONENT_SELECTOR":"."+o}}),g.withComponent=function(x,y){var b=e(x,$E({},n,y,{shouldForwardProp:I_(g,y,!0)}));return b.apply(void 0,h)},g}},jce=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],zE=Ace.bind(null);jce.forEach(function(e){zE[e]=zE(e)});function Oce(e){return e==null||Object.keys(e).length===0}function sU(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?s=>t(Oce(s)?n:s):t;return a.jsx(wce,{styles:r})}/**
690 * @mui/styled-engine v6.5.0
691 *
692 * @license MIT
693 * This source code is licensed under the MIT license found in the
694 * LICENSE file in the root directory of this source tree.
695 */function iU(e,t){return zE(e,t)}function Rce(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const M_=[];function fl(e){return M_[0]=e,Gv(M_)}var oU={exports:{}},_t={};/**
696 * @license React
697 * react-is.production.js
698 *
699 * Copyright (c) Meta Platforms, Inc. and affiliates.
700 *
701 * This source code is licensed under the MIT license found in the
702 * LICENSE file in the root directory of this source tree.
703 */var vT=Symbol.for("react.transitional.element"),bT=Symbol.for("react.portal"),Kv=Symbol.for("react.fragment"),qv=Symbol.for("react.strict_mode"),Yv=Symbol.for("react.profiler"),Qv=Symbol.for("react.consumer"),Jv=Symbol.for("react.context"),Xv=Symbol.for("react.forward_ref"),Zv=Symbol.for("react.suspense"),eb=Symbol.for("react.suspense_list"),tb=Symbol.for("react.memo"),nb=Symbol.for("react.lazy"),_ce=Symbol.for("react.view_transition"),Ice=Symbol.for("react.client.reference");function ei(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case vT:switch(e=e.type,e){case Kv:case Yv:case qv:case Zv:case eb:case _ce:return e;default:switch(e=e&&e.$$typeof,e){case Jv:case Xv:case nb:case tb:return e;case Qv:return e;default:return t}}case bT:return t}}}_t.ContextConsumer=Qv;_t.ContextProvider=Jv;_t.Element=vT;_t.ForwardRef=Xv;_t.Fragment=Kv;_t.Lazy=nb;_t.Memo=tb;_t.Portal=bT;_t.Profiler=Yv;_t.StrictMode=qv;_t.Suspense=Zv;_t.SuspenseList=eb;_t.isContextConsumer=function(e){return ei(e)===Qv};_t.isContextProvider=function(e){return ei(e)===Jv};_t.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===vT};_t.isForwardRef=function(e){return ei(e)===Xv};_t.isFragment=function(e){return ei(e)===Kv};_t.isLazy=function(e){return ei(e)===nb};_t.isMemo=function(e){return ei(e)===tb};_t.isPortal=function(e){return ei(e)===bT};_t.isProfiler=function(e){return ei(e)===Yv};_t.isStrictMode=function(e){return ei(e)===qv};_t.isSuspense=function(e){return ei(e)===Zv};_t.isSuspenseList=function(e){return ei(e)===eb};_t.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Kv||e===Yv||e===qv||e===Zv||e===eb||typeof e=="object"&&e!==null&&(e.$$typeof===nb||e.$$typeof===tb||e.$$typeof===Jv||e.$$typeof===Qv||e.$$typeof===Xv||e.$$typeof===Ice||e.getModuleId!==void 0)};_t.typeOf=ei;oU.exports=_t;var aU=oU.exports;function Zi(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);
703return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function lU(e){if(v.isValidElement(e)||aU.isValidElementType(e)||!Zi(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=lU(e[n])}),t}function bs(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Zi(e)&&Zi(t)&&Object.keys(t).forEach(s=>{v.isValidElement(t[s])||aU.isValidElementType(t[s])?r[s]=t[s]:Zi(t[s])&&Object.prototype.hasOwnProperty.call(e,s)&&Zi(e[s])?r[s]=bs(e[s],t[s],n):n.clone?r[s]=Zi(t[s])?lU(t[s]):t[s]:r[s]=t[s]}),r}const Mce=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Lce(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...s}=e,i=Mce(t),o=Object.keys(i);function l(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function c(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function u(f,p){const m=o.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(m!==-1&&typeof t[o[m]]=="number"?t[o[m]]:p)-r/100}${n})`}function d(f){return o.indexOf(f)+1<o.length?u(f,o[o.indexOf(f)+1]):l(f)}function h(f){const p=o.indexOf(f);return p===0?l(o[1]):p===o.length-1?c(o[p]):u(f,o[o.indexOf(f)+1]).replace("@media","@media not all and")}return{keys:o,values:i,up:l,down:c,between:u,only:d,not:h,unit:n,...s}}function L_(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,s)=>{var o,l;const i=/min-width:\s*([0-9.]+)/;return+(((o=r.match(i))==null?void 0:o[1])||0)-+(((l=s.match(i))==null?void 0:l[1])||0)});return n.length?n.reduce((r,s)=>{const i=t[s];return delete r[s],r[s]=i,r},{...t}):t}function Pce(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Dce(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,s]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(s).up(i)}function $ce(e){const t=(i,o)=>i.replace("@media",o?`@container ${o}`:"@container");function n(i,o){i.up=(...l)=>t(e.breakpoints.up(...l),o),i.down=(...l)=>t(e.breakpoints.down(...l),o),i.between=(...l)=>t(e.breakpoints.between(...l),o),i.only=(...l)=>t(e.breakpoints.only(...l),o),i.not=(...l)=>{const c=t(e.breakpoints.not(...l),o);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},s=i=>(n(r,i),r);return n(s),{...e,containerQueries:s}}const Fce={borderRadius:4};function Lf(e,t){return t?bs(e,t,{clone:!1}):e}const rb={xs:0,sm:600,md:900,lg:1200,xl:1536},P_={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${rb[e]}px)`},Bce={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:rb[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function na(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||P_;return t.reduce((o,l,c)=>(o[i.up(i.keys[c])]=n(t[c]),o),{})}if(typeof t=="object"){const i=r.breakpoints||P_;return Object.keys(t).reduce((o,l)=>{if(Pce(i.keys,l)){const c=Dce(r.containerQueries?r:Bce,l);c&&(o[c]=n(t[l],l))}else if(Object.keys(i.values||rb).includes(l)){const c=i.up(l);o[c]=n(t[l],l)}else{const c=l;o[c]=t[c]}return o},{})}return n(t)}function Uce(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,s)=>{const i=e.up(s);return r[i]={},r},{}))||{}}function D_(e,t){return e.reduce((n,r)=>{const s=n[r];return(!s||Object.keys(s).length===0)&&delete n[r],n},t)}function ra(e){if(typeof e!="string")throw new Error(Al(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sb(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((s,i)=>s&&s[i]?s[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,s)=>r&&r[s]!=null?r[s]:null,e)}function l0(e,t,n,r=n){let s;return typeof e=="function"?s=e(n):Array.isArray(e)?s=e[n]||r:s=sb(e,n)||r,t&&(s=t(s,r,e)),s}function Sn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:s}=e,i=o=>
703{if(o[t]==null)return null;const l=o[t],c=o.theme,u=sb(c,r)||{};return na(o,l,h=>{let f=l0(u,s,h);return h===f&&typeof h=="string"&&(f=l0(u,s,`${t}${h==="default"?"":ra(h)}`,h)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function zce(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Vce={m:"margin",p:"padding"},Wce={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},$_={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Hce=zce(e=>{if(e.length>2)if($_[e])e=$_[e];else return[e];const[t,n]=e.split(""),r=Vce[t],s=Wce[n]||"";return Array.isArray(s)?s.map(i=>r+i):[r+s]}),wT=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],ST=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...wT,...ST];function ym(e,t,n,r){const s=sb(e,t,!0)??n;return typeof s=="number"||typeof s=="string"?i=>typeof i=="string"?i:typeof s=="string"?`calc(${i} * ${s})`:s*i:Array.isArray(s)?i=>{if(typeof i=="string")return i;const o=Math.abs(i),l=s[o];return i>=0?l:typeof l=="number"?-l:`-${l}`}:typeof s=="function"?s:()=>{}}function ET(e){return ym(e,"spacing",8)}function xm(e,t){return typeof t=="string"||t==null?t:e(t)}function Gce(e,t){return n=>e.reduce((r,s)=>(r[s]=xm(t,n),r),{})}function Kce(e,t,n,r){if(!t.includes(n))return null;const s=Hce(n),i=Gce(s,r),o=e[n];return na(e,o,i)}function cU(e,t){const n=ET(e.theme);return Object.keys(e).map(r=>Kce(e,t,r,n)).reduce(Lf,{})}function an(e){return cU(e,wT)}an.propTypes={};an.filterProps=wT;function ln(e){return cU(e,ST)}ln.propTypes={};ln.filterProps=ST;function uU(e=8,t=ET({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const o=t(i);return typeof o=="number"?`${o}px`:o}).join(" ");return n.mui=!0,n}function ib(...e){const t=e.reduce((r,s)=>(s.filterProps.forEach(i=>{r[i]=s}),r),{}),n=r=>Object.keys(r).reduce((s,i)=>t[i]?Lf(s,t[i](r)):s,{});return n.propTypes={},n.filterProps=e.reduce((r,s)=>r.concat(s.filterProps),[]),n}function Fs(e){return typeof e!="number"?e:`${e}px solid`}function ti(e,t){return Sn({prop:e,themeKey:"borders",transform:t})}const qce=ti("border",Fs),Yce=ti("borderTop",Fs),Qce=ti("borderRight",Fs),Jce=ti("borderBottom",Fs),Xce=ti("borderLeft",Fs),Zce=ti("borderColor"),eue=ti("borderTopColor"),tue=ti("borderRightColor"),nue=ti("borderBottomColor"),rue=ti("borderLeftColor"),sue=ti("outline",Fs),iue=ti("outlineColor"),ob=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=ym(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:xm(t,r)});return na(e,e.borderRadius,n)}return null};ob.propTypes={};ob.filterProps=["borderRadius"];ib(qce,Yce,Qce,Jce,Xce,Zce,eue,tue,nue,rue,ob,sue,iue);const ab=e=>{if(e.gap!==void 0&&e.gap!==null){const t=ym(e.theme,"spacing",8),n=r=>({gap:xm(t,r)});return na(e,e.gap,n)}return null};ab.propTypes={};ab.filterProps=["gap"];const lb=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=ym(e.theme,"spacing",8),n=r=>({columnGap:xm(t,r)});return na(e,e.columnGap,n)}return null};lb.propTypes={};lb.filterProps=["columnGap"];const cb=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=ym(e.theme,"spacing",8),n=r=>({rowGap:xm(t,r)});return na(e,e.rowGap,n)}return null};cb.propTypes={};cb.filterProps=["rowGap"];const oue=Sn({prop:"gridColumn"}),aue=Sn({prop:"gridRow"}),lue=Sn({prop:"gridAutoFlow"}),cue=Sn({prop:"gridAutoColumns"}),uue=Sn({prop:"gridAutoRows"}),due=Sn({prop:"gridTemplateColumns"}),hue=Sn({prop:"gridTemplateRows"}),fue=Sn({prop:"gridTemplateAreas"}),pue=Sn({prop:"gridArea"});ib(ab,lb,cb,oue,aue,lue,cue,uue,due,hue,fue,pue);function rd(e,t){return t==="grey"?t:e}const mue=Sn({prop:"color",themeKey:"palette",transform:rd}),gue=Sn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:rd}),yue=Sn({prop:"backgroundColor",themeKey:"palette",transform:rd});ib(mue,gue,yue);function ds(e){return e<=1&&e!==0?`${e*100}%`:e}const xue=Sn({prop:"width",transform:ds}),NT=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var s,i,o,l,c;const r=((o=(i=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:i.values)==null?void 0:o[n])||rb[n];return r?((c=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:ds(n)}};return na(e,e.maxWidth,t)}return null};NT.filterProps=["maxWidth"];const vue=Sn({prop:"minWidth",transform:ds}),bue=Sn({prop:"height",transform:ds}),wue=Sn({prop:"maxHeight",transform:ds}),Sue=Sn({prop:"minHeight",transform:ds});Sn({prop:"size",cssProperty:"width",transform:ds});Sn({prop:"size",cssProperty:"height",transform:ds});const Eue=Sn({prop:"boxSizing"});ib(xue,NT,vue,bue,wue,Sue,Eue);const vm={border:{themeKey:"borders",transform:Fs},borderTop:{themeKey:"borders",transform:Fs},borderRight:{themeKey:"borders",transform:Fs},borderBottom:{themeKey:"borders",transform:Fs},borderLeft:{themeKey:"borders",transform:Fs},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Fs},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ob},color:{themeKey:"palette",transform:rd},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:rd},backgroundColor:{themeKey:"palette",transform:rd},p:{style:ln},pt:{style:ln},pr:{style:ln},pb:{style:ln},pl:{style:ln},px:{style:ln},py:{style:ln},padding:{style:ln},paddingTop:{style:ln},paddingRight:{style:ln}
703,paddingBottom:{style:ln},paddingLeft:{style:ln},paddingX:{style:ln},paddingY:{style:ln},paddingInline:{style:ln},paddingInlineStart:{style:ln},paddingInlineEnd:{style:ln},paddingBlock:{style:ln},paddingBlockStart:{style:ln},paddingBlockEnd:{style:ln},m:{style:an},mt:{style:an},mr:{style:an},mb:{style:an},ml:{style:an},mx:{style:an},my:{style:an},margin:{style:an},marginTop:{style:an},marginRight:{style:an},marginBottom:{style:an},marginLeft:{style:an},marginX:{style:an},marginY:{style:an},marginInline:{style:an},marginInlineStart:{style:an},marginInlineEnd:{style:an},marginBlock:{style:an},marginBlockStart:{style:an},marginBlockEnd:{style:an},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ab},rowGap:{style:cb},columnGap:{style:lb},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ds},maxWidth:{style:NT},minWidth:{transform:ds},height:{transform:ds},maxHeight:{transform:ds},minHeight:{transform:ds},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Nue(...e){const t=e.reduce((r,s)=>r.concat(Object.keys(s)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function kue(e,t){return typeof e=="function"?e(t):e}function Cue(){function e(n,r,s,i){const o={[n]:r,theme:s},l=i[n];if(!l)return{[n]:r};const{cssProperty:c=n,themeKey:u,transform:d,style:h}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const f=sb(s,u)||{};return h?h(o):na(o,r,m=>{let g=l0(f,d,m);return m===g&&typeof m=="string"&&(g=l0(f,d,`${n}${m==="default"?"":ra(m)}`,m)),c===!1?g:{[c]:g}})}function t(n){const{sx:r,theme:s={},nested:i}=n||{};if(!r)return null;const o=s.unstable_sxConfig??vm;function l(c){let u=c;if(typeof c=="function")u=c(s);else if(typeof c!="object")return c;if(!u)return null;const d=Uce(s.breakpoints),h=Object.keys(d);let f=d;return Object.keys(u).forEach(p=>{const m=kue(u[p],s);if(m!=null)if(typeof m=="object")if(o[p])f=Lf(f,e(p,m,s,o));else{const g=na({theme:s},m,x=>({[p]:x}));Nue(g,m)?f[p]=t({sx:m,theme:s,nested:!0}):f=Lf(f,g)}else f=Lf(f,e(p,m,s,o))}),!i&&s.modularCssLayers?{"@layer sx":L_(s,D_(h,f))}:L_(s,D_(h,f))}return Array.isArray(r)?r.map(l):l(r)}return t}const jl=Cue();jl.filterProps=["sx"];function Tue(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let s=n.getColorSchemeSelector(e);return s==="&"?t:((s.includes("data-")||s.includes("."))&&(s=`*:where(${s.replace(/\s*&$/,"")}) &`),{[s]:t})}return n.palette.mode===e?t:{}}function kT(e={},...t){const{breakpoints:n={},palette:r={},spacing:s,shape:i={},...o}=e,l=Lce(n),c=uU(s);let u=bs({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...Fce,...i}},o);return u=$ce(u),u.applyStyles=Tue,u=t.reduce((d,h)=>bs(d,h),u),u.unstable_sxConfig={...vm,...o==null?void 0:o.unstable_sxConfig},u.unstable_sx=function(h){return jl({sx:h,theme:this})},u}function Aue(e){return Object.keys(e).length===0}function CT(e=null){const t=v.useContext(gm);return!t||Aue(t)?e:t}const jue=kT();function TT(e=jue){return CT(e)}function lw(e){const t=fl(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function dU({styles:e,themeId:t,defaultTheme:n={}}){const r=TT(n),s=t&&r[t]||r;let i=typeof e=="function"?e(s):e;return s.modularCssLayers&&(Array.isArray(i)?i=i.map(o=>lw(typeof o=="function"?o(s):o)):i=lw(i)),a.jsx(sU,{styles:i})}const Oue=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??vm;return Object.keys(e).forEach(s=>
703{n[s]?t.systemProps[s]=e[s]:t.otherProps[s]=e[s]}),t};function Rue(e){const{sx:t,...n}=e,{systemProps:r,otherProps:s}=Oue(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...o)=>{const l=t(...o);return Zi(l)?{...r,...l}:r}:i={...r,...t},{...s,sx:i}}const F_=e=>e,_ue=()=>{let e=F_;return{configure(t){e=t},generate(t){return e(t)},reset(){e=F_}}},hU=_ue();function Iue(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:s}=e,i=iU("div",{shouldForwardProp:l=>l!=="theme"&&l!=="sx"&&l!=="as"})(jl);return v.forwardRef(function(c,u){const d=TT(n),{className:h,component:f="div",...p}=Rue(c);return a.jsx(i,{as:f,ref:u,className:Tc(h,s?s(r):r),theme:t&&d[t]||d,...p})})}const Mue={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ub(e,t,n="Mui"){const r=Mue[t];return r?`${n}-${r}`:`${hU.generate(e)}-${t}`}function db(e,t,n="Mui"){const r={};return t.forEach(s=>{r[s]=ub(e,s,n)}),r}function fU(e){const{variants:t,...n}=e,r={variants:t,style:fl(n),isProcessed:!0};return r.style===n||t&&t.forEach(s=>{typeof s.style!="function"&&(s.style=fl(s.style))}),r}const Lue=kT();function cw(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function tc(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Pue(e){return e?(t,n)=>n[e]:null}function Due(e,t,n){e.theme=Bue(e.theme)?n:e.theme[t]||e.theme}function yy(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(s=>yy(e,s,n));
703if(Array.isArray(r==null?void 0:r.variants)){let s;if(r.isProcessed)s=n?tc(r.style,n):r.style;else{const{variants:i,...o}=r;s=n?tc(fl(o),n):o}return pU(e,r.variants,[s],n)}return r!=null&&r.isProcessed?n?tc(fl(r.style),n):r.style:n?tc(fl(r),n):r}function pU(e,t,n=[],r=void 0){var i;let s;e:for(let o=0;o<t.length;o+=1){const l=t[o];if(typeof l.props=="function"){if(s??(s={...e,...e.ownerState,ownerState:e.ownerState}),!l.props(s))continue}else for(const c in l.props)if(e[c]!==l.props[c]&&((i=e.ownerState)==null?void 0:i[c])!==l.props[c])continue e;typeof l.style=="function"?(s??(s={...e,...e.ownerState,ownerState:e.ownerState}),n.push(r?tc(fl(l.style(s)),r):l.style(s))):n.push(r?tc(fl(l.style),r):l.style)}return n}function $ue(e={}){const{themeId:t,defaultTheme:n=Lue,rootShouldForwardProp:r=cw,slotShouldForwardProp:s=cw}=e;function i(l){Due(l,t,n)}return(l,c={})=>{Rce(l,k=>k.filter(C=>C!==jl));const{name:u,slot:d,skipVariantsResolver:h,skipSx:f,overridesResolver:p=Pue(zue(d)),...m}=c,g=u&&u.startsWith("Mui")||d?"components":"custom",x=h!==void 0?h:d&&d!=="Root"&&d!=="root"||!1,y=f||!1;let b=cw;d==="Root"||d==="root"?b=r:d?b=s:Uue(l)&&(b=void 0);const w=iU(l,{shouldForwardProp:b,label:Fue(),...m}),E=k=>{if(k.__emotion_real===k)return k;if(typeof k=="function")return function(T){return yy(T,k,T.theme.modularCssLayers?g:void 0)};if(Zi(k)){const C=fU(k);return function(j){return C.variants?yy(j,C,j.theme.modularCssLayers?g:void 0):j.theme.modularCssLayers?tc(C.style,g):C.style}}return k},N=(...k)=>{const C=[],T=k.map(E),j=[];if(C.push(i),u&&p&&j.push(function(L){var V,P;const B=(P=(V=L.theme.components)==null?void 0:V[u])==null?void 0:P.styleOverrides;if(!B)return null;const U={};for(const D in B)U[D]=yy(L,B[D],L.theme.modularCssLayers?"theme":void 0);return p(L,U)}),u&&!x&&j.push(function(L){var U,V;const A=L.theme,B=(V=(U=A==null?void 0:A.components)==null?void 0:U[u])==null?void 0:V.variants;return B?pU(L,B,[],L.theme.modularCssLayers?"theme":void 0):null}),y||j.push(jl),Array.isArray(T[0])){const _=T.shift(),L=new Array(C.length).fill(""),A=new Array(j.length).fill("");let B;B=[...L,..._,...A],B.raw=[...L,..._.raw,...A],C.unshift(B)}const S=[...C,...T,...j],R=w(...S);return l.muiName&&(R.muiName=l.muiName),R};return w.withConfig&&(N.withConfig=w.withConfig),N}}function Fue(e,t){return void 0}function Bue(e){for(const t in e)return!1;return!0}function Uue(e){return typeof e=="string"&&e.charCodeAt(0)>96}function zue(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function VE(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const s=r;if(s==="components"||s==="slots")n[s]={...e[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const i=e[s],o=t[s];if(!o)n[s]=i||{};else if(!i)n[s]=o;else{n[s]={...o};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const c=l;n[s][c]=VE(i[c],o[c])}}}else n[s]===void 0&&(n[s]=e[s])}return n}const Uc=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Vue(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function AT(e,t=0,n=1){return Vue(e,t,n)}function Wue(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,s)=>s<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Ol(e){if(e.type)return e;if(e.charAt(0)==="#")return Ol(Wue(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Al(9,e));let r=e.substring(t+1,e.length-1),s;if(n==="color"){if(r=r.split(" "),s=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(s))throw new Error(Al(10,s))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:s}}const Hue=e=>{const t=Ol(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},tf=(e,t)=>{try{return Hue(e)}catch{return e}};function hb(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((s,i)=>i<3?parseInt(s,10):s):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n}
703 ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function mU(e){e=Ol(e);const{values:t}=e,n=t[0],r=t[1]/100,s=t[2]/100,i=r*Math.min(s,1-s),o=(u,d=(u+n/30)%12)=>s-i*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(l+="a",c.push(t[3])),hb({type:l,values:c})}function WE(e){e=Ol(e);let t=e.type==="hsl"||e.type==="hsla"?Ol(mU(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Gue(e,t){const n=WE(e),r=WE(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function HE(e,t){return e=Ol(e),t=AT(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,hb(e)}function Ag(e,t,n){try{return HE(e,t)}catch{return e}}function jT(e,t){if(e=Ol(e),t=AT(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return hb(e)}function jt(e,t,n){try{return jT(e,t)}catch{return e}}function OT(e,t){if(e=Ol(e),t=AT(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return hb(e)}function Ot(e,t,n){try{return OT(e,t)}catch{return e}}function Kue(e,t=.15){return WE(e)>.5?jT(e,t):OT(e,t)}function jg(e,t,n){try{return Kue(e,t)}catch{return e}}function que(e,t=166){let n;function r(...s){const i=()=>{e.apply(this,s)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function Yue(e){return e&&e.ownerDocument||document}function B_(e){return Yue(e).defaultView||window}let U_=0;function Que(e){const[t,n]=v.useState(e),r=e||t;return v.useEffect(()=>{t==null&&(U_+=1,n(`mui-${U_}`))},[t]),r}const Jue={...Ff},z_=Jue.useId;function Xue(e){return z_!==void 0?z_():Que(e)}function Zue(e){const t=v.useRef(e);return Uc(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function gU(...e){const t=v.useRef(void 0),n=v.useCallback(r=>{const s=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const o=i,l=o(r);return typeof l=="function"?l:()=>{o(null)}}return i.current=r,()=>{i.current=null}});return()=>{s.forEach(i=>i==null?void 0:i())}},e);return v.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function RT(e,t,n=void 0){const r={};for(const s in e){const i=e[s];let o="",l=!0;for(let c=0;c<i.length;c+=1){const u=i[c];u&&(o+=(l===!0?"":" ")+t(u),l=!1,n&&n[u]&&(o+=" "+n[u]))}r[s]=o}return r}const yU=v.createContext(null);function _T(){return v.useContext(yU)}const ede=typeof Symbol=="function"&&Symbol.for,tde=ede?Symbol.for("mui.nested"):"__THEME_NESTED__";function nde(e,t){return typeof t=="function"?t(e):{...e,...t}}function rde(e){const{children:t,theme:n}=e,r=_T(),s=v.useMemo(()=>{const i=r===null?{...n}:nde(r,n);return i!=null&&(i[tde]=r!==null),i},[n,r]);return a.jsx(yU.Provider,{value:s,children:t})}const sde=v.createContext();function ide({value:e,...t}){return a.jsx(sde.Provider,{value:e??!0,...t})}const xU=v.createContext(void 0);function ode({value:e,children:t}){return a.jsx(xU.Provider,{value:e,children:t})}function ade(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const s=t.components[n];return s.defaultProps?VE(s.defaultProps,r):!s.styleOverrides&&!s.variants?VE(s,r):r}function lde({props:e,name:t}){const n=v.useContext(xU);return ade({props:e,name:t,theme:{components:n}})}function cde(e){const t=CT(),n=Xue()||"",{modularCssLayers:r}=e;let s="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!r||t!==null?s="":typeof r=="string"?s=r.replace(/mui(?!\.)/g,s):s=`@layer ${s};`,Uc(()=>{var l,c;const i=document.querySelector("head");if(!i)return;const o=i.firstChild;if(s){if(o&&((l=o.hasAttribute)!=null&&l.call(o,"data-mui-layer-order"))&&o.getAttribute("data-mui-layer-order")===n)return;const u=document.createElement("style");u.setAttribute("data-mui-layer-order",n),u.textContent=s,i.prepend(u)}else(c=i.querySelector(`style[data-mui-layer-order="${n}"]`))==null||c.remove()},[s,n]),s?a.jsx(dU,{styles:s}):null}const V_={};function W_(e,t,n,r=!1){return v.useMemo(()=>{const s=e&&t[e]||t;if(typeof n=="function"){const i=n(s),o=e?{...t,[e]:i}:i;return r?()=>o:o}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function vU(e){const{children:t,theme:n,themeId:r}=e,s=CT(V_),i=_T()||V_,o=W_(r,s,n),l=W_(r,i,n,!0),c=(r?o[r]:o).direction==="rtl",u=cde(o);return a.jsx(rde,{theme:l,children:a.jsx(gm.Provider,{value:o,children:a.jsx(ide,{value:c,children:a.jsxs(ode,{value:r?o[r].components:o.components,children:[u,t]}
703)})})})}const H_={theme:void 0};function ude(e){let t,n;return function(s){let i=t;return(i===void 0||s.theme!==n)&&(H_.theme=s.theme,i=fU(e(H_)),t=i,n=s.theme),i}}const IT="mode",MT="color-scheme",dde="data-color-scheme";function hde(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:s=IT,colorSchemeStorageKey:i=MT,attribute:o=dde,colorSchemeNode:l="document.documentElement",nonce:c}=e||{};let u="",d=o;if(o==="class"&&(d=".%s"),o==="data"&&(d="[data-%s]"),d.startsWith(".")){const f=d.substring(1);u+=`${l}.classList.remove('${f}'.replace('%s', light), '${f}'.replace('%s', dark));
704      ${l}.classList.add('${f}'.replace('%s', colorScheme));`}const h=d.match(/\[([^\]]+)\]/);if(h){const[f,p]=h[1].split("=");p||(u+=`${l}.removeAttribute('${f}'.replace('%s', light));
705      ${l}.removeAttribute('${f}'.replace('%s', dark));`),u+=`
706      ${l}.setAttribute('${f}'.replace('%s', colorScheme), ${p?`${p}.replace('%s', colorScheme)`:'""'});`}else u+=`${l}.setAttribute('${d}', colorScheme);`;return a.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(function() {
707try {
708  let colorScheme = '';
709  const mode = localStorage.getItem('${s}') || '${t}';
710  const dark = localStorage.getItem('${i}-dark') || '${r}';
711  const light = localStorage.getItem('${i}-light') || '${n}';
712  if (mode === 'system') {
713    // handle system mode
714    const mql = window.matchMedia('(prefers-color-scheme: dark)');
715    if (mql.matches) {
716      colorScheme = dark
717    } else {
718      colorScheme = light
719    }
720  }
721  if (mode === 'light') {
722    colorScheme = light;
723  }
724  if (mode === 'dark') {
725    colorScheme = dark;
726  }
727  if (colorScheme) {
728    ${u}
729  }
730} catch(e){}})();`}},"mui-color-scheme-init")}function fde(){}const pde=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(n){if(typeof window>"u")return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return fde;const r=s=>{const i=s.newValue;s.key===e&&n(i)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function uw(){}function G_(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function bU(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function mde(e){return bU(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function gde(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:s=[],modeStorageKey:i=IT,colorSchemeStorageKey:o=MT,storageWindow:l=typeof window>"u"?void 0:window,storageManager:c=pde,noSsr:u=!1}=e,d=s.join(","),h=s.length>1,f=v.useMemo(()=>c==null?void 0:c({key:i,storageWindow:l}),[c,i,l]),p=v.useMemo(()=>c==null?void 0:c({key:`${o}-light`,storageWindow:l}),[c,o,l]),m=v.useMemo(()=>c==null?void 0:c({key:`${o}-dark`,storageWindow:l}),[c,o,l]),[g,x]=v.useState(()=>{const T=(f==null?void 0:f.get(t))||t,j=(p==null?void 0:p.get(n))||n,S=(m==null?void 0:m.get(r))||r;return{mode:T,systemMode:G_(T),lightColorScheme:j,darkColorScheme:S}}),[y,b]=v.useState(u||!h);v.useEffect(()=>{b(!0)},[]);const w=mde(g),E=v.useCallback(T=>{x(j=>{if(T===j.mode)return j;const S=T??t;return f==null||f.set(S),{...j,mode:S,systemMode:G_(S)}})},[f,t]),N=v.useCallback(T=>{T?typeof T=="string"?T&&!d.includes(T)?console.error(`\`${T}\` does not exist in \`theme.colorSchemes\`.`):x(j=>{const S={...j};return bU(j,R=>{R==="light"&&(p==null||p.set(T),S.lightColorScheme=T),R==="dark"&&(m==null||m.set(T),S.darkColorScheme=T)}),S}):x(j=>{const S={...j},R=T.light===null?n:T.light,_=T.dark===null?r:T.dark;return R&&(d.includes(R)?(S.lightColorScheme=R,p==null||p.set(R)):console.error(`\`${R}\` does not exist in \`theme.colorSchemes\`.`)),_&&(d.includes(_)?(S.darkColorScheme=_,m==null||m.set(_)):console.error(`\`${_}\` does not exist in \`theme.colorSchemes\`.`)),S}):x(j=>(p==null||p.set(n),m==null||m.set(r),{...j,lightColorScheme:n,darkColorScheme:r}))},[d,p,m,n,r]),k=v.useCallback(T=>{g.mode==="system"&&x(j=>
730{const S=T!=null&&T.matches?"dark":"light";return j.systemMode===S?j:{...j,systemMode:S}})},[g.mode]),C=v.useRef(k);return C.current=k,v.useEffect(()=>{if(typeof window.matchMedia!="function"||!h)return;const T=(...S)=>C.current(...S),j=window.matchMedia("(prefers-color-scheme: dark)");return j.addListener(T),T(j),()=>{j.removeListener(T)}},[h]),v.useEffect(()=>{if(h){const T=(f==null?void 0:f.subscribe(R=>{(!R||["light","dark","system"].includes(R))&&E(R||t)}))||uw,j=(p==null?void 0:p.subscribe(R=>{(!R||d.match(R))&&N({light:R})}))||uw,S=(m==null?void 0:m.subscribe(R=>{(!R||d.match(R))&&N({dark:R})}))||uw;return()=>{T(),j(),S()}}},[N,E,d,t,l,h,f,p,m]),{...g,mode:y?g.mode:void 0,systemMode:y?g.systemMode:void 0,colorScheme:y?w:void 0,setMode:E,setColorScheme:N}}const yde="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function xde(e){const{themeId:t,theme:n={},modeStorageKey:r=IT,colorSchemeStorageKey:s=MT,disableTransitionOnChange:i=!1,defaultColorScheme:o,resolveTheme:l}=e,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},u=v.createContext(void 0),d=()=>v.useContext(u)||c,h={},f={};function p(y){var W,de,se,ee;const{children:b,theme:w,modeStorageKey:E=r,colorSchemeStorageKey:N=s,disableTransitionOnChange:k=i,storageManager:C,storageWindow:T=typeof window>"u"?void 0:window,documentNode:j=typeof document>"u"?void 0:document,colorSchemeNode:S=typeof document>"u"?void 0:document.documentElement,disableNestedContext:R=!1,disableStyleSheetGeneration:_=!1,defaultMode:L="system",noSsr:A}=y,B=v.useRef(!1),U=_T(),V=v.useContext(u),P=!!V&&!R,D=v.useMemo(()=>w||(typeof n=="function"?n():n),[w]),q=D[t],Q=q||D,{colorSchemes:F=h,components:ge=f,cssVarPrefix:Ve}=Q,He=Object.keys(F).filter(ie=>!!F[ie]).join(","),Fe=v.useMemo(()=>He.split(","),[He]),le=typeof o=="string"?o:o.light,Se=typeof o=="string"?o:o.dark,Ce=F[le]&&F[Se]?L:((de=(W=F[Q.defaultColorScheme])==null?void 0:W.palette)==null?void 0:de.mode)||((se=Q.palette)==null?void 0:se.mode),{mode:Be,setMode:Me,systemMode:Oe,lightColorScheme:St,darkColorScheme:Qe,colorScheme:$t,setColorScheme:En}=gde({supportedColorSchemes:Fe,defaultLightColorScheme:le,defaultDarkColorScheme:Se,modeStorageKey:E,colorSchemeStorageKey:N,defaultMode:Ce,storageManager:C,storageWindow:T,noSsr:A});let Nn=Be,At=$t;P&&(Nn=V.mode,At=V.colorScheme);const Yn=v.useMemo(()=>{var Je;const ie=At||Q.defaultColorScheme,Re=((Je=Q.generateThemeVars)==null?void 0:Je.call(Q))||Q.vars,st={...Q,components:ge,colorSchemes:F,cssVarPrefix:Ve,vars:Re};if(typeof st.generateSpacing=="function"&&(st.spacing=st.generateSpacing()),ie){const lr=F[ie];lr&&typeof lr=="object"&&Object.keys(lr).forEach(cr=>{lr[cr]&&typeof lr[cr]=="object"?st[cr]={...st[cr],...lr[cr]}:st[cr]=lr[cr]})}return l?l(st):st},[Q,At,ge,F,Ve]),zr=Q.colorSchemeSelector;Uc(()=>{if(At&&S&&zr&&zr!=="media"){const ie=zr;let Re=zr;if(ie==="class"&&(Re=".%s"),ie==="data"&&(Re="[data-%s]"),ie!=null&&ie.startsWith("data-")&&!ie.includes("%s")&&(Re=`[${ie}="%s"]`),Re.startsWith("."))S.classList.remove(...Fe.map(st=>Re.substring(1).replace("%s",st))),S.classList.add(Re.substring(1).replace("%s",At));else{const st=Re.replace("%s",At).match(/\[([^\]]+)\]/);if(st){const[Je,lr]=st[1].split("=");lr||Fe.forEach(cr=>{S.removeAttribute(Je.replace(At,cr))}),S.setAttribute(Je,lr?lr.replace(/"|'/g,""):"")}else S.setAttribute(Re,At)}}},[At,zr,S,Fe]),v.useEffect(()=>{let ie;if(k&&B.current&&j){const Re=j.createElement("style");Re.appendChild(j.createTextNode(yde)),j.head.appendChild(Re),window.getComputedStyle(j.body),ie=setTimeout(()=>{j.head.removeChild(Re)},1)}return()=>{clearTimeout(ie)}},[At,k,j]),v.useEffect(()=>(B.current=!0,()=>{B.current=!1}),[]);const Ee=v.useMemo(()=>({allColorSchemes:Fe,colorScheme:At,darkColorScheme:Qe,lightColorScheme:St,mode:Nn,setColorScheme:En,setMode:Me,systemMode:Oe}),[Fe,At,Qe,St,Nn,En,Me,Oe,Yn.colorSchemeSelector]);let I=!0;(_||Q.cssVariables===!1||P&&(U==null?void 0:U.cssVarPrefix)===Ve)&&(I=!1);const z=a.jsxs(v.Fragment,{children:[a.jsx(vU,{themeId:q?t:void 0,theme:Yn,children:b}),I&&a.jsx(sU,{styles:((ee=Yn.generateStyleSheets)==null?void 0:ee.call(Yn))||[]})]});return P?z:a.jsx(u.Provider,{value:Ee,children:z})}
730const m=typeof o=="string"?o:o.light,g=typeof o=="string"?o:o.dark;return{CssVarsProvider:p,useColorScheme:d,getInitColorSchemeScript:y=>hde({colorSchemeStorageKey:s,defaultLightColorScheme:m,defaultDarkColorScheme:g,modeStorageKey:r,...y})}}function vde(e=""){function t(...r){if(!r.length)return"";const s=r[0];return typeof s=="string"&&!s.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${s}${t(...r.slice(1))})`:`, ${s}`}return(r,...s)=>`var(--${e?`${e}-`:""}${r}${t(...s)})`}const K_=(e,t,n,r=[])=>{let s=e;t.forEach((i,o)=>{o===t.length-1?Array.isArray(s)?s[Number(i)]=n:s&&typeof s=="object"&&(s[i]=n):s&&typeof s=="object"&&(s[i]||(s[i]=r.includes(i)?[]:{}),s=s[i])})},bde=(e,t,n)=>{function r(s,i=[],o=[]){Object.entries(s).forEach(([l,c])=>{(!n||n&&!n([...i,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...i,l],Array.isArray(c)?[...o,l]:o):t([...i,l],c,o))})}r(e)},wde=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function dw(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},s={},i={},o={};return bde(e,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(l,c))){const d=`--${n?`${n}-`:""}${l.join("-")}`,h=wde(l,c);Object.assign(s,{[d]:h}),K_(i,l,`var(${d})`,u),K_(o,l,`var(${d}, ${h})`,u)}},l=>l[0]==="vars"),{css:s,vars:i,varsWithDefaults:o}}function Sde(e,t={}){const{getSelector:n=x,disableCssColorScheme:r,colorSchemeSelector:s}=t,{colorSchemes:i={},components:o,defaultColorScheme:l="light",...c}=e,{vars:u,css:d,varsWithDefaults:h}=dw(c,t);let f=h;const p={},{[l]:m,...g}=i;if(Object.entries(g||{}).forEach(([w,E])=>{const{vars:N,css:k,varsWithDefaults:C}=dw(E,t);f=bs(f,C),p[w]={css:k,vars:N}}),m){const{css:w,vars:E,varsWithDefaults:N}=dw(m,t);f=bs(f,N),p[l]={css:w,vars:E}}function x(w,E){var k,C;let N=s;if(s==="class"&&(N=".%s"),s==="data"&&(N="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(N=`[${s}
730="%s"]`),w){if(N==="media")return e.defaultColorScheme===w?":root":{[`@media (prefers-color-scheme: ${((C=(k=i[w])==null?void 0:k.palette)==null?void 0:C.mode)||w})`]:{":root":E}};if(N)return e.defaultColorScheme===w?`:root, ${N.replace("%s",String(w))}`:N.replace("%s",String(w))}return":root"}return{vars:f,generateThemeVars:()=>{let w={...u};return Object.entries(p).forEach(([,{vars:E}])=>{w=bs(w,E)}),w},generateStyleSheets:()=>{var T,j;const w=[],E=e.defaultColorScheme||"light";function N(S,R){Object.keys(R).length&&w.push(typeof S=="string"?{[S]:{...R}}:S)}N(n(void 0,{...d}),d);const{[E]:k,...C}=p;if(k){const{css:S}=k,R=(j=(T=i[E])==null?void 0:T.palette)==null?void 0:j.mode,_=!r&&R?{colorScheme:R,...S}:{...S};N(n(E,{..._}),_)}return Object.entries(C).forEach(([S,{css:R}])=>{var A,B;const _=(B=(A=i[S])==null?void 0:A.palette)==null?void 0:B.mode,L=!r&&_?{colorScheme:_,...R}:{...R};N(n(S,{...L}),L)}),w}}}function Ede(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}function wU(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Dp.white,default:Dp.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Nde=wU();function SU(){return{text:{primary:Dp.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Dp.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const q_=SU();function Y_(e,t,n,r){const s=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=OT(e.main,s):t==="dark"&&(e.dark=jT(e.main,i)))}function kde(e="light"){return e==="dark"?{main:hu[200],light:hu[50],dark:hu[400]}:{main:hu[700],light:hu[400],dark:hu[800]}}function Cde(e="light"){return e==="dark"?{main:du[200],light:du[50],dark:du[400]}:{main:du[500],light:du[300],dark:du[700]}}function Tde(e="light"){return e==="dark"?{main:uu[500],light:uu[300],dark:uu[700]}:{main:uu[700],light:uu[400],dark:uu[800]}}function Ade(e="light"){return e==="dark"?{main:fu[400],light:fu[300],dark:fu[700]}:{main:fu[700],light:fu[500],dark:fu[900]}}function jde(e="light"){return e==="dark"?{main:pu[400],light:pu[300],dark:pu[700]}:{main:pu[800],light:pu[500],dark:pu[900]}}function Ode(e="light"){return e==="dark"?{main:Oh[400],light:Oh[300],dark:Oh[700]}:{main:"#ed6c02",light:Oh[500],dark:Oh[900]}}function LT(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...s}=e,i=e.primary||kde(t),o=e.secondary||Cde(t),l=e.error||Tde(t),c=e.info||Ade(t),u=e.success||jde(t),d=e.warning||Ode(t);function h(g){return Gue(g,q_.text.primary)>=n?q_.text.primary:Nde.text.primary}const f=({color:g,name:x,mainShade:y=500,lightShade:b=300,darkShade:w=700})=>{if(g={...g},!g.main&&g[y]&&(g.main=g[y]),!g.hasOwnProperty("main"))throw new Error(Al(11,x?` (${x})`:"",y));if(typeof g.main!="string")throw new Error(Al(12,x?` (${x})`:"",JSON.stringify(g.main)));return Y_(g,"light",b,r),Y_(g,"dark",w,r),g.contrastText||(g.contrastText=h(g.main)),g};let p;return t==="light"?p=wU():t==="dark"&&(p=SU()),bs({common:{...Dp},mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:l,name:"error"}),warning:f({color:d,name:"warning"}),info:f({color:c,name:"info"}),success:f({color:u,name:"success"}),grey:Sle,contrastThreshold:n,getContrastText:h,augmentColor:f,tonalOffset:r,...p},s)}function Rde(e){const t={};return Object.entries(e).forEach(r=>{const[s,i]=r;typeof i=="object"&&(t[s]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function _de(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Ide(e){return Math.round(e*1e5)/1e5}const Q_={textTransform:"uppercase"},J_='"Roboto", "Helvetica", "Arial", sans-serif';function EU(e,t){const{fontFamily:n=J_,fontSize:r=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:o=500,fontWeightBold:l
730=700,htmlFontSize:c=16,allVariants:u,pxToRem:d,...h}=typeof t=="function"?t(e):t,f=r/14,p=d||(x=>`${x/c*f}rem`),m=(x,y,b,w,E)=>({fontFamily:n,fontWeight:x,fontSize:p(y),lineHeight:b,...n===J_?{letterSpacing:`${Ide(w/y)}em`}:{},...E,...u}),g={h1:m(s,96,1.167,-1.5),h2:m(s,60,1.2,-.5),h3:m(i,48,1.167,0),h4:m(i,34,1.235,.25),h5:m(i,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(i,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(i,16,1.5,.15),body2:m(i,14,1.43,.15),button:m(o,14,1.75,.4,Q_),caption:m(i,12,1.66,.4),overline:m(i,12,2.66,1,Q_),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return bs({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:o,fontWeightBold:l,...g},h,{clone:!1})}const Mde=.2,Lde=.14,Pde=.12;function Gt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Mde})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Lde})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Pde})`].join(",")}const Dde=["none",Gt(0,2,1,-1,0,1,1,0,0,1,3,0),Gt(0,3,1,-2,0,2,2,0,0,1,5,0),Gt(0,3,3,-2,0,3,4,0,0,1,8,0),Gt(0,2,4,-1,0,4,5,0,0,1,10,0),Gt(0,3,5,-1,0,5,8,0,0,1,14,0),Gt(0,3,5,-1,0,6,10,0,0,1,18,0),Gt(0,4,5,-2,0,7,10,1,0,2,16,1),Gt(0,5,5,-3,0,8,10,1,0,3,14,2),Gt(0,5,6,-3,0,9,12,1,0,3,16,2),Gt(0,6,6,-3,0,10,14,1,0,4,18,3),Gt(0,6,7,-4,0,11,15,1,0,4,20,3),Gt(0,7,8,-4,0,12,17,2,0,5,22,4),Gt(0,7,8,-4,0,13,19,2,0,5,24,4),Gt(0,7,9,-4,0,14,21,2,0,5,26,4),Gt(0,8,9,-5,0,15,22,2,0,6,28,5),Gt(0,8,10,-5,0,16,24,2,0,6,30,5),Gt(0,8,11,-5,0,17,26,2,0,6,32,5),Gt(0,9,11,-5,0,18,28,2,0,7,34,6),Gt(0,9,12,-6,0,19,29,2,0,7,36,6),Gt(0,10,13,-6,0,20,31,3,0,8,38,7),Gt(0,10,13,-6,0,21,33,3,0,8,40,7),Gt(0,10,14,-6,0,22,35,3,0,8,42,7),Gt(0,11,14,-7,0,23,36,3,0,9,44,8),Gt(0,11,15,-7,0,24,38,3,0,9,46,8)],$de={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Fde={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function X_(e){return`${Math.round(e)}ms`}function Bde(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Ude(e){const t={...$de,...e.easing},n={...Fde,...e.duration};return{getAutoHeightDuration:Bde,create:(s=["all"],i={})=>{const{duration:o=n.standard,easing:l=t.easeInOut,delay:c=0,...u}=i;return(Array.isArray(s)?s:[s]).map(d=>`${d} ${typeof o=="string"?o:X_(o)} ${l} ${typeof c=="string"?c:X_(c)}`).join(",")},...e,easing:t,duration:n}}const zde={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Vde(e){return Zi(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function NU(e={}){const t={...e};function n(r){const s=Object.entries(r);for(let i=0;i<s.length;i++){const[o,l]=s[i];!Vde(l)||o.startsWith("unstable_")?delete r[o]:Zi(l)&&(r[o]={...l},n(r[o]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
731
732const theme = ${JSON.stringify(t,null,2)};
733
734theme.breakpoints = createBreakpoints(theme.breakpoints || {});
735theme.transitions = createTransitions(theme.transitions || {});
736
737export default theme;`}function GE(e={},...t){const{breakpoints:n,mixins:r={},spacing:s,palette:i={},transitions:o={},typography:l={},shape:c,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(Al(20));const d=LT(i),h=kT(e);let f=bs(h,{mixins:_de(h.breakpoints,r),palette:d,shadows:Dde.slice(),typography:EU(d,l),transitions:Ude(o),zIndex:{...zde}});return f=bs(f,u),f=t.reduce((p,m)=>bs(p,m),f),f.unstable_sxConfig={...vm,...u==null?void 0:u.unstable_sxConfig},f.unstable_sx=function(m){return jl({sx:m,theme:this})},f.toRuntimeSource=NU,f}function KE(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Wde=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=KE(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function kU(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function CU(e){return e==="dark"?Wde:[]}function Hde(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...s}=e,i=LT(t);return{palette:i,opacity:{...kU(i.mode),...n},overlays:r||CU(i.mode),...s}}function Gde(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Kde=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],qde=e=>(t,n)=>{const r=e.rootSelector||":root",s=e.colorSchemeSelector;let i=s;if(s==="class"&&(i=".%s"),s==="data"&&(i="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(i=`[${s}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};
737return Kde(e.cssVarPrefix).forEach(l=>{o[l]=n[l],delete n[l]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function Yde(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function G(e,t,n){!e[t]&&n&&(e[t]=n)}function nf(e){return typeof e!="string"||!e.startsWith("hsl")?e:mU(e)}function Oo(e,t){`${t}Channel`in e||(e[`${t}Channel`]=tf(nf(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
738To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Qde(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Di=e=>{try{return e()}catch{}},Jde=(e="mui")=>vde(e);function hw(e,t,n,r){if(!t)return;t=t===!0?{}:t;const s=r==="dark"?"dark":"light";if(!n){e[r]=Hde({...t,palette:{mode:s,...t==null?void 0:t.palette}});return}const{palette:i,...o}=GE({...n,palette:{mode:s,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...kU(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||CU(s)},o}function Xde(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:s=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:o=Gde,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,d=Object.keys(n)[0],h=r||(n.light&&d!=="light"?"light":d),f=Jde(i),{[h]:p,light:m,dark:g,...x}=n,y={...x};let b=p;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(b=!0),!b)throw new Error(Al(21,h));const w=hw(y,b,u,h);m&&!y.light&&hw(y,m,void 0,"light"),g&&!y.dark&&hw(y,g,void 0,"dark");let E={defaultColorScheme:h,...w,cssVarPrefix:i,colorSchemeSelector:l,rootSelector:c,getCssVar:f,colorSchemes:y,font:{...Rde(w.typography),...w.font},spacing:Qde(u.spacing)};Object.keys(E.colorSchemes).forEach(j=>{const S=E.colorSchemes[j].palette,R=_=>{const L=_.split("-"),A=L[1],B=L[2];return f(_,S[A][B])};if(S.mode==="light"&&(G(S.common,"background","#fff"),G(S.common,"onBackground","#000")),S.mode==="dark"&&(G(S.common,"background","#000"),G(S.common,"onBackground","#fff")),Yde(S,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),S.mode==="light"){G(S.Alert,"errorColor",jt(S.error.light,.6)),G(S.Alert,"infoColor",jt(S.info.light,.6)),G(S.Alert,"successColor",jt(S.success.light,.6)),G(S.Alert,"warningColor",jt(S.warning.light,.6)),G(S.Alert,"errorFilledBg",R("palette-error-main")),G(S.Alert,"infoFilledBg",R("palette-info-main")),G(S.Alert,"successFilledBg",R("palette-success-main")),G(S.Alert,"warningFilledBg",R("palette-warning-main")),G(S.Alert,"errorFilledColor",Di(()=>S.getContrastText(S.error.main))),G(S.Alert,"infoFilledColor",Di(()=>S.getContrastText(S.info.main))),G(S.Alert,"successFilledColor",Di(()=>S.getContrastText(S.success.main))),G(S.Alert,"warningFilledColor",Di(()=>S.getContrastText(S.warning.main))),G(S.Alert,"errorStandardBg",Ot(S.error.light,.9)),G(S.Alert,"infoStandardBg",Ot(S.info.light,.9)),G(S.Alert,"successStandardBg",Ot(S.success.light,.9)),G(S.Alert,"warningStandardBg",Ot(S.warning.light,.9)),G(S.Alert,"errorIconColor",R("palette-error-main")),G(S.Alert,"infoIconColor",R("palette-info-main")),G(S.Alert,"successIconColor",R("palette-success-main")),G(S.Alert,"warningIconColor",R("palette-warning-main")),G(S.AppBar,"defaultBg",R("palette-grey-100")),G(S.Avatar,"defaultBg",R("palette-grey-400")),G(S.Button,"inheritContainedBg",R("palette-grey-300")),G(S.Button,"inheritContainedHoverBg",R("palette-grey-A100")),G(S.Chip,"defaultBorder",R("palette-grey-400")),G(S.Chip,"defaultAvatarColor",R("palette-grey-700")),G(S.Chip,"defaultIconColor",R("palette-grey-700")),G(S.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),G(S.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),G(S.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),G(S.LinearProgress,"primaryBg",Ot(S.primary.main,.62)),G(S.LinearProgress,"secondaryBg",Ot(S.secondary.main,.62)),G(S.LinearProgress,"errorBg",Ot(S.error.main,.62)),G(S.LinearProgress,"infoBg",Ot(S.info.main,.62)),G(S.LinearProgress,"successBg",Ot(S.success.main,.62)),G(S.LinearProgress,"warningBg",Ot(S.warning.main,.62)),G(S.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),G(S.Slider,"primaryTrack",Ot(S.primary.main,.62)),G(S.Slider,"secondaryTrack",Ot(S.secondary.main,.62)),G(S.Slider,"errorTrack",Ot(S.error.main,.62)),G(S.Slider,"infoTrack",Ot(S.info.main,.62)),G(S.Slider,"successTrack",Ot(S.success.main,.62)),G(S.Slider,"warningTrack",Ot(S.warning.main,.62));const _=jg(S.background.default,.8);G(S.SnackbarContent,"bg",_),G(S.SnackbarContent,"color",Di(()=>S.getContrastText(_))),G(S.SpeedDialAction,"fabHoverBg",jg(S.background.paper,.15)),G(S.StepConnector,"border",R("palette-grey-400")),G(S.StepContent,"border",R("palette-grey-400")),G(S.Switch,"defaultColor",R("palette-common-white")),G(S.Switch,"defaultDisabledColor",R("palette-grey-100")),G(S.Switch,"primaryDisabledColor",Ot(S.primary.main,.62)),G(S.Switch,"secondary
738DisabledColor",Ot(S.secondary.main,.62)),G(S.Switch,"errorDisabledColor",Ot(S.error.main,.62)),G(S.Switch,"infoDisabledColor",Ot(S.info.main,.62)),G(S.Switch,"successDisabledColor",Ot(S.success.main,.62)),G(S.Switch,"warningDisabledColor",Ot(S.warning.main,.62)),G(S.TableCell,"border",Ot(Ag(S.divider,1),.88)),G(S.Tooltip,"bg",Ag(S.grey[700],.92))}if(S.mode==="dark"){G(S.Alert,"errorColor",Ot(S.error.light,.6)),G(S.Alert,"infoColor",Ot(S.info.light,.6)),G(S.Alert,"successColor",Ot(S.success.light,.6)),G(S.Alert,"warningColor",Ot(S.warning.light,.6)),G(S.Alert,"errorFilledBg",R("palette-error-dark")),G(S.Alert,"infoFilledBg",R("palette-info-dark")),G(S.Alert,"successFilledBg",R("palette-success-dark")),G(S.Alert,"warningFilledBg",R("palette-warning-dark")),G(S.Alert,"errorFilledColor",Di(()=>S.getContrastText(S.error.dark))),G(S.Alert,"infoFilledColor",Di(()=>S.getContrastText(S.info.dark))),G(S.Alert,"successFilledColor",Di(()=>S.getContrastText(S.success.dark))),G(S.Alert,"warningFilledColor",Di(()=>S.getContrastText(S.warning.dark))),G(S.Alert,"errorStandardBg",jt(S.error.light,.9)),G(S.Alert,"infoStandardBg",jt(S.info.light,.9)),G(S.Alert,"successStandardBg",jt(S.success.light,.9)),G(S.Alert,"warningStandardBg",jt(S.warning.light,.9)),G(S.Alert,"errorIconColor",R("palette-error-main")),G(S.Alert,"infoIconColor",R("palette-info-main")),G(S.Alert,"successIconColor",R("palette-success-main")),G(S.Alert,"warningIconColor",R("palette-warning-main")),G(S.AppBar,"defaultBg",R("palette-grey-900")),G(S.AppBar,"darkBg",R("palette-background-paper")),G(S.AppBar,"darkColor",R("palette-text-primary")),G(S.Avatar,"defaultBg",R("palette-grey-600")),G(S.Button,"inheritContainedBg",R("palette-grey-800")),G(S.Button,"inheritContainedHoverBg",R("palette-grey-700")),G(S.Chip,"defaultBorder",R("palette-grey-700")),G(S.Chip,"defaultAvatarColor",R("palette-grey-300")),G(S.Chip,"defaultIconColor",R("palette-grey-300")),G(S.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),G(S.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),G(S.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),G(S.LinearProgress,"primaryBg",jt(S.primary.main,.5)),G(S.LinearProgress,"secondaryBg",jt(S.secondary.main,.5)),G(S.LinearProgress,"errorBg",jt(S.error.main,.5)),G(S.LinearProgress,"infoBg",jt(S.info.main,.5)),G(S.LinearProgress,"successBg",jt(S.success.main,.5)),G(S.LinearProgress,"warningBg",jt(S.warning.main,.5)),G(S.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),G(S.Slider,"primaryTrack",jt(S.primary.main,.5)),G(S.Slider,"secondaryTrack",jt(S.secondary.main,.5)),G(S.Slider,"errorTrack",jt(S.error.main,.5)),G(S.Slider,"infoTrack",jt(S.info.main,.5)),G(S.Slider,"successTrack",jt(S.success.main,.5)),G(S.Slider,"warningTrack",jt(S.warning.main,.5));const _=jg(S.background.default,.98);G(S.SnackbarContent,"bg",_),G(S.SnackbarContent,"color",Di(()=>S.getContrastText(_))),G(S.SpeedDialAction,"fabHoverBg",jg(S.background.paper,.15)),G(S.StepConnector,"border",R("palette-grey-600")),G(S.StepContent,"border",R("palette-grey-600")),G(S.Switch,"defaultColor",R("palette-grey-300")),G(S.Switch,"defaultDisabledColor",R("palette-grey-600")),G(S.Switch,"primaryDisabledColor",jt(S.primary.main,.55)),G(S.Switch,"secondaryDisabledColor",jt(S.secondary.main,.55)),G(S.Switch,"errorDisabledColor",jt(S.error.main,.55)),G(S.Switch,"infoDisabledColor",jt(S.info.main,.55)),G(S.Switch,"successDisabledColor",jt(S.success.main,.55)),G(S.Switch,"warningDisabledColor",jt(S.warning.main,.55)),G(S.TableCell,"border",jt(Ag(S.divider,1),.68)),G(S.Tooltip,"bg",Ag(S.grey[700],.92))}Oo(S.background,"default"),Oo(S.background,"paper"),Oo(S.common,"background"),Oo(S.common,"onBackground"),Oo(S,"divider"),Object.keys(S).forEach(_=>{const L=S[_];_!=="tonalOffset"&&L&&typeof L=="object"&&(L.main&&G(S[_],"mainChannel",tf(nf(L.main))),L.light&&G(S[_],"lightChannel",tf(nf(L.light))),L.dark&&G(S[_],"darkChannel",tf(nf(L.dark))),L.contrastText&&G(S[_],"contrastTextChannel",tf(nf(L.contrastText))),_==="text"&&(Oo(S[_],"primary"),Oo(S[_],"secondary")),_==="action"&&(L.active&&Oo(S[_],"active"),L.selected&&Oo(S[_],"selected")))})}),E=t.reduce((j,S)=>bs(j,S),E);const N={prefix:i,disableCssColorScheme:s,shouldSkipGeneratingVar:o,getSelector:qde(E)}
738,{vars:k,generateThemeVars:C,generateStyleSheets:T}=Sde(E,N);return E.vars=k,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([j,S])=>{E[j]=S}),E.generateThemeVars=C,E.generateStyleSheets=T,E.generateSpacing=function(){return uU(u.spacing,ET(this))},E.getColorSchemeSelector=Ede(l),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=o,E.unstable_sxConfig={...vm,...u==null?void 0:u.unstable_sxConfig},E.unstable_sx=function(S){return jl({sx:S,theme:this})},E.toRuntimeSource=NU,E}function Z_(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:LT({...n===!0?{}:n.palette,mode:t})})}function fb(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:s=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...o}=e,l=i||"light",c=s==null?void 0:s[l],u={...s,...n?{[l]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return GE(e,...t);let d=n;"palette"in e||u[l]&&(u[l]!==!0?d=u[l].palette:l==="dark"&&(d={mode:"dark"}));const h=GE({...e,palette:d},...t);return h.defaultColorScheme=l,h.colorSchemes=u,h.palette.mode==="light"&&(h.colorSchemes.light={...u.light!==!0&&u.light,palette:h.palette},Z_(h,"dark",u.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:h.palette},Z_(h,"light",u.light)),h}return!n&&!("light"in u)&&l==="light"&&(u.light=!0),Xde({...o,colorSchemes:u,defaultColorScheme:l,...typeof r!="boolean"&&r},...t)}const PT=fb();function Zde(){const e=TT(PT);return e[lo]||e}function ehe(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const the=e=>ehe(e)&&e!=="classes",pb=$ue({themeId:lo,defaultTheme:PT,rootShouldForwardProp:the});function nhe({theme:e,...t}){const n=lo in e?e[lo]:void 0;return a.jsx(vU,{...t,themeId:n?lo:void 0,theme:n||e})}const Og={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:rhe,useColorScheme:fAe,getInitColorSchemeScript:pAe}=xde({themeId:lo,theme:()=>fb({cssVariables:!0}),colorSchemeStorageKey:Og.colorSchemeStorageKey,modeStorageKey:Og.modeStorageKey,defaultColorScheme:{light:Og.defaultLightColorScheme,dark:Og.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:EU(e.palette,e.typography)};return t.unstable_sx=function(r){return jl({sx:r,theme:this})},t}}),she=rhe;function ihe({theme:e,...t}){const n=v.useMemo(()=>{if(typeof e=="function")return e;const r=lo in e?e[lo]:e;return"colorSchemes"in r?null:"vars"in r?e:{...e,vars:null}},[e]);return n?a.jsx(nhe,{theme:n,...t}):a.jsx(she,{theme:e,...t})}function ohe(e){return a.jsx(dU,{...e,defaultTheme:PT,themeId:lo})}function ahe(e){return function(n){return a.jsx(ohe,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}const mb=ude;function DT(e){return lde(e)}function lhe(e){return ub("MuiSvgIcon",e)}db("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const che=e=>{const{color:t,fontSize:n,classes:r}=e,s={root:["root",t!=="inherit"&&`color${ra(t)}`,`fontSize${ra(n)}`]};return RT(s,lhe,r)},uhe=pb("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ra(n.color)}`],t[`fontSize${ra(n.fontSize)}`]]}})(mb(({theme:e})=>{var t,n,r,s,i,o,l,c,u,d,h,f,p,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(t=e.transitions)==null?void 0:t.create)==null?void 0:s.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:g=>!g.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:o.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:d.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,g])=>g&&g.main).map(([g])=>{var x,y;return{props:{color:g},style:{color:(y=(x=(e.vars??e).palette)==null?void 0:x[g])==null?void 0:y.main}}}),{props:{color:"action"},style:{color:(f=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(m=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:m.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),TU=v.forwardRef(function(t,n){const r=DT({props:t,name:"MuiSvgIcon"}),{children:s,className:i,color:o="inherit",component:l="svg",fontSize:c="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:h,viewBox:f="0 0 24 24",...p}=r,m=v.isValidElement(s)&&s.type==="svg",g={...r,color:o,component:l,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:d,viewB
738ox:f,hasSvgAsChild:m},x={};d||(x.viewBox=f);const y=che(g);return a.jsxs(uhe,{as:l,className:Tc(y.root,i),focusable:"false",color:u,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n,...x,...p,...m&&s.props,ownerState:g,children:[m?s.props.children:s,h?a.jsx("title",{children:h}):null]})});TU.muiName="SvgIcon";function dhe(e){return ub("MuiPaper",e)}db("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const hhe=e=>{const{square:t,elevation:n,variant:r,classes:s}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return RT(i,dhe,s)},fhe=pb("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(mb(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),phe=v.forwardRef(function(t,n){var p;const r=DT({props:t,name:"MuiPaper"}),s=Zde(),{className:i,component:o="div",elevation:l=1,square:c=!1,variant:u="elevation",...d}=r,h={...r,component:o,elevation:l,square:c,variant:u},f=hhe(h);return a.jsx(fhe,{as:o,ownerState:h,className:Tc(f.root,i),ref:n,...d,style:{...u==="elevation"&&{"--Paper-shadow":(s.vars||s).shadows[l],...s.vars&&{"--Paper-overlay":(p=s.vars.overlays)==null?void 0:p[l]},...!s.vars&&s.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${HE("#fff",KE(l))}, ${HE("#fff",KE(l))})`}},...d.style}})});function Rg(e){return parseInt(e,10)||0}const mhe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function ghe(e){for(const t in e)return!1;return!0}function e2(e){return ghe(e)||e.outerHeightStyle===0&&!e.overflowing}const yhe=v.forwardRef(function(t,n){const{onChange:r,maxRows:s,minRows:i=1,style:o,value:l,...c}=t,{current:u}=v.useRef(l!=null),d=v.useRef(null),h=gU(n,d),f=v.useRef(null),p=v.useRef(null),m=v.useCallback(()=>{const w=d.current,E=p.current;if(!w||!E)return;const k=B_(w).getComputedStyle(w);if(k.width==="0px")return{outerHeightStyle:0,overflowing:!1};E.style.width=k.width,E.value=w.value||t.placeholder||"x",E.value.slice(-1)===`
739`&&(E.value+=" ");const C=k.boxSizing,T=Rg(k.paddingBottom)+Rg(k.paddingTop),j=Rg(k.borderBottomWidth)+Rg(k.borderTopWidth),S=E.scrollHeight;E.value="x";const R=E.scrollHeight;let _=S;i&&(_=Math.max(Number(i)*R,_)),s&&(_=Math.min(Number(s)*R,_)),_=Math.max(_,R);const L=_+(C==="border-box"?T+j:0),A=Math.abs(_-S)<=1;return{outerHeightStyle:L,overflowing:A}},[s,i,t.placeholder]),g=Zue(()=>{const w=d.current,E=m();if(!w||!E||e2(E))return!1;const N=E.outerHeightStyle;return f.current!=null&&f.current!==N}),x=v.useCallback(()=>{const w=d.current,E=m();if(!w||!E||e2(E))return;const N=E.outerHeightStyle;f.current!==N&&(f.current=N,w.style.height=`${N}px`),w.style.overflow=E.overflowing?"hidden":""},[m]),y=v.useRef(-1);Uc(()=>{const w=que(x),E=d==null?void 0:d.current;if(!E)return;const N=B_(E);N.addEventListener("resize",w);let k;return typeof ResizeObserver<"u"&&(k=new ResizeObserver(()=>{g()&&(k.unobserve(E),cancelAnimationFrame(y.current),x(),y.current=requestAnimationFrame(()=>{k.observe(E)}))}),k.observe(E)),()=>{w.clear(),cancelAnimationFrame(y.current),N.removeEventListener("resize",w),k&&k.disconnect()}},[m,x,g]),Uc(()=>{x()});const b=w=>{u||x(),r&&r(w)};return a.jsxs(v.Fragment,{children:[a.jsx("textarea",{value:l,onChange:b,ref:h,rows:i,style:o,...c}
739),a.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...mhe.shadow,...o,paddingTop:0,paddingBottom:0}})]})});function t2(e){return typeof e=="string"}function xhe({props:e,states:t,muiFormControl:n}){return t.reduce((r,s)=>(r[s]=e[s],n&&typeof e[s]>"u"&&(r[s]=n[s]),r),{})}const AU=v.createContext(void 0);function vhe(){return v.useContext(AU)}function n2(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function bhe(e,t=!1){return e&&(n2(e.value)&&e.value!==""||t&&n2(e.defaultValue)&&e.defaultValue!=="")}function whe(e){return ub("MuiInputBase",e)}const qE=db("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var r2;const She=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ra(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Ehe=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Nhe=e=>{const{classes:t,color:n,disabled:r,error:s,endAdornment:i,focused:o,formControl:l,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:h,size:f,startAdornment:p,type:m}=e,g={root:["root",`color${ra(n)}`,r&&"disabled",s&&"error",c&&"fullWidth",o&&"focused",l&&"formControl",f&&f!=="medium"&&`size${ra(f)}`,d&&"multiline",p&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",d&&"inputMultiline",f==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",h&&"readOnly"]};return RT(g,whe,t)},khe=pb("div",{name:"MuiInputBase",slot:"Root",overridesResolver:She})(mb(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${qE.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),Che=pb("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Ehe})(mb(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},s=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${qE.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":s,"&:focus::-moz-placeholder":s,"&:focus::-ms-input-placeholder":s},[`&.${qE.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),s2=ahe({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),The=v.forwardRef(function(t,n){const r=DT({props:t,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:i,autoFocus:o,className:l,color:c,components:u={},componentsProps:d={},defaultValue:h,disabled:f,disableInjectingGlobalStyles:p,endAdornment:m,error:g,fullWidth:x=!1,id:y,inputComponent:b="input",inputProps:w={},inputRef:E,margin:N,maxRows:k,minRows:C,multiline:T=!1,name:j,onBlur:S,onChange:R,onClick:_,onFocus:L,onKeyDown:A,onKeyUp:B,placeholder:U,readOnly:V,renderSuffix:P,rows:D,size:q,slotProps:Q={},slots:F={},startAdornment:ge,type:Ve="text",value:He,...Fe}=r,le=w.value!=null?w.value:He,{current:Se}=v.useRef(le!=null),Ce=v.useRef(),Be=v.useCallback(Je=>{},[]),Me=gU(Ce,E,w.ref,Be),[Oe,St]=v.useState(!1),Qe=vhe(),$t=xhe({props:r,muiFormControl:Qe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});$t.focused=Qe?Qe.focused:Oe,v.useEffect(()=>{!Qe&&f&&Oe&&(St(!1),S&&S())},[Qe,f,Oe,S]);const En=Qe&&Qe.onFilled,Nn=Qe&&Qe.onEmpty,At=v.useCallback(Je=>{bhe(Je)?En&&En():Nn&&Nn()},[En,Nn]);Uc(()=>{Se&&At({value:le})},[le,At,Se]);const Yn=Je=>{L&&L(Je),w.onFocus&&w.onFocus(Je),Qe&&Qe.onFocus?Qe.onFocus(Je):St(!0)},zr=Je=>{S&&S(Je),w.onBlur&&w.onBlur(Je),Qe&&Qe.onBlur?Qe.onBlur(Je):St(!1)},Ee=(Je,...lr)=>{if(!Se){const cr=Je.target||Ce.current;if(cr==null)throw new Error(Al(1));At({value:cr.value})}w.onChange&&w.onChange(Je,...lr),R&&R(Je,...lr)};v.useEffect(()=>{At(Ce.current)},[]);const I=Je=>{Ce.current&&Je.currentTarget===Je.target&&Ce.current.focus(),_&&_(Je)};let z=b,W=w;T&&z==="input"&&(D?W={type:void 0,minRows:D,maxRows:D,...W}:W={type:void 0,maxRows:k,minRows:C,...W},z=yhe);const de=Je=>{At(Je.animationName==="mui-auto-fill-cancel"?Ce.current:{value:"x"})};v.useEffect(()=>{Qe&&Qe.setAdornedStart(!!ge)},[Qe,ge]);const se={...r,color:$t.color||"primary",disabled:$t.disabled,endAdornment:m,error:$t.error,focused:$t.focused,formControl:Qe,fullWidth:x,hiddenLabel:$t.hiddenLabel,multiline:T,size:$t.size,startAdornment:ge,type:Ve},ee=Nhe(se),ie=F.root||u.Root||khe,Re=Q.root||d.root||{},st=F.input||u.Input||Che;return W={...W,...Q.input??d.input},a.jsxs(v.Fragment,{children:[!p&&typeof s2=="function"&&(r2||(r2=a.jsx(s2,{}))),a.jsxs(ie,{...Re,ref:n,onClick:I,...Fe,...!t2(ie)&&{ownerState:{...se,...Re.ownerState}},className:Tc(ee.root,Re.className,l,V&&"MuiInputBase-readOnly"),children:[ge,a.jsx(AU.Provider,{value:null,children:a.jsx(st,{"aria-invalid":$t.error,"aria-describedby":s,autoComplete:i,autoFocus:o,defaultValue:h,disabled:$t.disabled,id:y,onAnimationStart:de,name:j,placeholder:U,readOnly:V,required:$t.required,rows:D,value:le,onKeyDown:A,onKeyUp:B,type:Ve,...W,...!t2(st)&&{as:z,ownerState:{...se,...W.ownerState}},ref:Me,className:Tc(ee.input,W.className,V&&"MuiInputBase-readOnly"),onBlur:zr,onChange:Ee,onFocus:Yn})}),m,P?P({...$t,startAdornment:ge}):null]})]})}),Ahe=db("MuiBox",["root"]),jhe=fb(),vn=Iue({themeId:lo,defaultTheme:jhe,defaultClassName:Ahe.root,generateClassName:hU.generate});function $T(e){const{children:t,defer:n=!1,fallback:r=null}=e,[s,i]=v.useState(!1);return Uc(()=>{n||i(!0)},[n]),v.useEffect(()=>{n&&i(!0)},[n]),s?t:r}const Ohe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},i2=e=>{let t;const n=new Set,r=(d,h)=>{const f=typeof d=="function"?d(t):d;if(!Object.is(f,t)){const p=t;t=h??(typeof f!="object"||f===null)?f:Object.assign({}
739,t,f),n.forEach(m=>m(t,p))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(Ohe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,s,c);return c},jU=e=>e?i2(e):i2,OU={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:Rhe}=Le,{useSyncExternalStoreWithSelector:_he}=Yse;let o2=!1;const Ihe=e=>e;function FT(e,t=Ihe,n){(OU?"production":void 0)!=="production"&&n&&!o2&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),o2=!0);const r=_he(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Rhe(r),r}const a2=e=>{(OU?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?jU(e):e,n=(r,s)=>FT(t,r,s);return Object.assign(n,t),n},Mhe=e=>e?a2(e):a2;var Lhe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(s){e.addRange(s)}),t&&t.focus()}},Phe=Lhe,l2={"text/plain":"Text","text/html":"Url",default:"Text"},Dhe="Copy to clipboard: #{key}, Enter";function $he(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Fhe(e,t){var n,r,s,i,o,l,c=!1;t||(t={}),n=t.debug||!1;try{s=Phe(),i=document.createRange(),o=document.getSelection(),l=document.createElement("span"),l.textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(d){if(d.stopPropagation(),t.format)if(d.preventDefault(),typeof d.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=l2[t.format]||l2.default;window.clipboardData.setData(h,e)}else d.clipboardData.clearData(),d.clipboardData.setData(t.format,e);t.onCopy&&(d.preventDefault(),t.onCopy(d.clipboardData))}),document.body.appendChild(l),i.selectNodeContents(l),o.addRange(i);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");c=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(h){n&&console.error("unable to copy using clipboardData: ",h),n&&console.error("falling back to prompt"),r=$he("message"in t?t.message:Dhe),window.prompt(r,e)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),l&&document.body.removeChild(l),s()}return c}var Bhe=Fhe;const Uhe=Jp(Bhe);function RU(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=RU(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function zhe(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=RU(e))&&(r&&(r+=" "),r+=t);return r}const c0={scheme:"Light Theme",author:"mac gainor (https://github.com/mac-s-g)",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#ffd500",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},YE={scheme:"Dark Theme",author:"Chris Kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},_U=()=>null;_U.when=()=>!1;const Vhe=e=>Mhe()((t,n)=>{var r,s,i,o,l,c,u,d,h,f,p,m,g,x,y,b,w,E,N,k,C,T,j;return{rootName:(r=e.rootName)!==null&&r!==void 0?r:"root",indentWidth:(s=e.indentWidth)!==null&&s!==void 0?s:3,keyRenderer:(i=e.ke
739yRenderer)!==null&&i!==void 0?i:_U,enableAdd:(o=e.enableAdd)!==null&&o!==void 0?o:!1,enableDelete:(l=e.enableDelete)!==null&&l!==void 0?l:!1,enableClipboard:(c=e.enableClipboard)!==null&&c!==void 0?c:!0,editable:(u=e.editable)!==null&&u!==void 0?u:!1,onChange:(d=e.onChange)!==null&&d!==void 0?d:()=>{},onCopy:(h=e.onCopy)!==null&&h!==void 0?h:void 0,onSelect:(f=e.onSelect)!==null&&f!==void 0?f:void 0,onAdd:(p=e.onAdd)!==null&&p!==void 0?p:void 0,onDelete:(m=e.onDelete)!==null&&m!==void 0?m:void 0,defaultInspectDepth:(g=e.defaultInspectDepth)!==null&&g!==void 0?g:5,defaultInspectControl:(x=e.defaultInspectControl)!==null&&x!==void 0?x:void 0,maxDisplayLength:(y=e.maxDisplayLength)!==null&&y!==void 0?y:30,groupArraysAfterLength:(b=e.groupArraysAfterLength)!==null&&b!==void 0?b:100,collapseStringsAfterLength:e.collapseStringsAfterLength===!1?Number.MAX_VALUE:(w=e.collapseStringsAfterLength)!==null&&w!==void 0?w:50,objectSortKeys:(E=e.objectSortKeys)!==null&&E!==void 0?E:!1,quotesOnKeys:(N=e.quotesOnKeys)!==null&&N!==void 0?N:!0,displayDataTypes:(k=e.displayDataTypes)!==null&&k!==void 0?k:!0,displaySize:(C=e.displaySize)!==null&&C!==void 0?C:!0,displayComma:(T=e.displayComma)!==null&&T!==void 0?T:!1,highlightUpdates:(j=e.highlightUpdates)!==null&&j!==void 0?j:!1,inspectCache:{},hoverPath:null,colorspace:c0,value:e.value,prevValue:void 0,getInspectCache:(S,R)=>{const _=R!==void 0?S.join(".")+"[".concat(R,"]nt"):S.join(".");return n().inspectCache[_]},setInspectCache:(S,R,_)=>{const L=_!==void 0?S.join(".")+"[".concat(_,"]nt"):S.join(".");t(A=>({inspectCache:{...A.inspectCache,[L]:typeof R=="function"?R(A.inspectCache[L]):R}}))},setHover:(S,R)=>{t({hoverPath:S?{path:S,nestedIndex:R}:null})}}}),bm=v.createContext(void 0);bm.Provider;const Ge=(e,t)=>{const n=v.useContext(bm);return FT(n,e,t)},gb=()=>Ge(e=>e.colorspace.base07),Whe=Object.prototype.constructor.toString();function Hhe(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Whe}const Ghe=(e,t,n)=>{if(e===null||n===null||typeof e!="object"||typeof n!="object")return!1;if(Object.is(e,n)&&t.length!==0)return"";const r=[],s=[...t];let i=e;for(;i!==n||s.length!==0;){if(typeof i!="object"||i===null)return!1;if(Object.is(i,n))return r.reduce((l,c,u)=>typeof c=="number"?l+"[".concat(c,"]"):l+"".concat(u===0?"":".").concat(c),"");const o=s.shift();r.push(o),i=i[o]}return!1};function wm(e){return e===null?0:Array.isArray(e)?e.length:e instanceof Map||e instanceof Set?e.size:e instanceof Date?1:typeof e=="object"?Object.keys(e).length:typeof e=="string"?e.length:1}function c2(e,t){const n=[];let r=0;for(;r<e.length;)n.push(e.slice(r,r+t)),r+=t;return n}function Khe(e,t){const n=[];function r(s,i){if(typeof i=="bigint")return i.toString();if(i instanceof Map){if("toJSON"in i&&typeof i.toJSON=="function")return i.toJSON();if(i.size===0)return{};if(n.includes(i))return"[Circular]";n.push(i);const o=Array.from(i.entries());return o.every(l=>{let[c]=l;return typeof c=="string"||typeof c=="number"})?Object.fromEntries(o):{}}if(i instanceof Set)return"toJSON"in i&&typeof i.toJSON=="function"?i.toJSON():n.includes(i)?"[Circular]":(n.push(i),Array.from(i.values()));if(typeof i=="object"&&i!==null&&Object.keys(i).length){const o=n.length;if(o){for(let l=o-1;l>=0&&n[l][s]!==i;--l)n.pop();if(n.includes(i))return"[Circular]"}n.push(i)}return i}return JSON.stringify(e,r,t)}async function QE(e){if("clipboard"in navigator)try{await navigator.clipboard.writeText(e)}catch{}Uhe(e)}function qhe(){let{timeout:e=2e3}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const[t,n]=v.useState(!1),r=v.useRef(null),s=v.useCallback(c=>{const u=r.current;u&&window.clearTimeout(u),r.current=window.setTimeout(()=>n(!1),e),n(c)},[e]),i=Ge(c=>c.onCopy),o=v.useCallback(async(c,u)=>{if(typeof i=="function")try{await i(c,u,QE),s(!0)}catch(d){console.error("error when copy ".concat(c.length===0?"src":"src[".concat(c.join(".")),"]"),d)}else try{const d=Khe(typeof u=="function"?u.toString():u,"  ");await QE(d),s(!0)}catch(d){console.error("error when copy ".concat(c.length===0?"src":"src[".concat(c.join(".")),"]"),d)}},[s,i]),l=v.useCallback(()=>{n(!1),r.current&&clearTimeout(r.current)},[]);return{copy:o,reset:l,copied:t}}function BT(e,t){const n=Ge(r=>r.value);return v.useMemo(()=>Ghe(n,e,t),[e,t,n])}function Yhe(e,t,n){const r=e.length,s=BT(e,t),i=Ge(f=>f.getInspectCache),o=Ge(f=>f.setInspectCache),l=Ge(f=>f.defaultInspectDepth),c=Ge(f=>f.defaultInspectControl);v.useEffect(()=>{if(i(e,n)!==void 0)return;if(n!==void 0){o(e,!1,n);return}const p=s?!1:typeof c=="function"?c(e,t):r<l;o(e,p)},[l,c,r,i,s,n,e,t,o]);const[u,d]=v.useState(()=>{const f=i(e,n);return f!==void 0?f:n!==void 0||s?!1:typeof c=="function"?c(e,t):r<l}),h=v.useCallback(f=>{d(p=>{const m=typeof f=="boolean"?f:f(p);return o(e,m,n),m})},[n,e,o]);return[u,h]}const no=e=>
739a.jsx(vn,{component:"div",...e,sx:{display:"inline-block",...e.sx}}),IU=e=>{let{dataType:t,enable:n=!0}=e;return n?a.jsx(no,{className:"data-type-label",sx:{mx:.5,fontSize:"0.7rem",opacity:.8,userSelect:"none"},children:t}):null};function ca(e){let{is:t,serialize:n,deserialize:r,type:s,colorKey:i,displayTypeLabel:o=!0,Renderer:l}=e;const c=v.memo(l),u=h=>{const f=Ge(g=>g.displayDataTypes),p=Ge(g=>g.colorspace[i]),m=Ge(g=>g.onSelect);return a.jsxs(no,{onClick:()=>m==null?void 0:m(h.path,h.value),sx:{color:p},children:[o&&f&&a.jsx(IU,{dataType:s}),a.jsx(no,{className:"".concat(s,"-value"),children:a.jsx(c,{path:h.path,inspect:h.inspect,setInspect:h.setInspect,value:h.value,prevValue:h.prevValue})})]})};if(u.displayName="easy-".concat(s,"-type"),!n||!r)return{is:t,Component:u};const d=h=>{let{value:f,setValue:p,abortEditing:m,commitEditing:g}=h;const x=Ge(w=>w.colorspace[i]),y=v.useCallback(w=>{w.key==="Enter"&&(w.preventDefault(),g(f)),w.key==="Escape"&&(w.preventDefault(),m())},[m,g,f]),b=v.useCallback(w=>{p(w.target.value)},[p]);return a.jsx(The,{autoFocus:!0,value:f,onChange:b,onKeyDown:y,size:"small",multiline:!0,sx:{color:x,padding:.5,borderStyle:"solid",borderColor:"black",borderWidth:1,fontSize:"0.8rem",fontFamily:"monospace",display:"inline-flex"}})};return d.displayName="easy-".concat(s,"-type-editor"),{is:t,serialize:n,deserialize:r,Component:u,Editor:d}}const Qhe=ca({is:e=>typeof e=="boolean",type:"bool",colorKey:"base0E",serialize:e=>e.toString(),deserialize:e=>{if(e==="true")return!0;if(e==="false")return!1;throw new Error("Invalid boolean value")},Renderer:e=>{let{value:t}=e;return a.jsx(a.Fragment,{children:t?"true":"false"})}}),Jhe={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"},Xhe=ca({is:e=>e instanceof Date,type:"date",colorKey:"base0D",Renderer:e=>{let{value:t}=e;return a.jsx(a.Fragment,{children:t.toLocaleTimeString("en-us",Jhe)})}}),Zhe=e=>{const t=e.toString();let n=!0;const r=t.indexOf(")"),s=t.indexOf("=>");return s!==-1&&s>r&&(n=!1),n?t.substring(t.indexOf("{",r)+1,t.lastIndexOf("}")):t.substring(t.indexOf("=>")+2)},efe=e=>{const t=e.toString();return t.indexOf("function")!==-1?t.substring(8,t.indexOf("{")).trim():t.substring(0,t.indexOf("=>")+2).trim()},tfe="{",nfe="}",rfe=e=>a.jsxs($T,{children:[a.jsx(IU,{dataType:"function"}),a.jsxs(vn,{component:"span",className:"data-function-start",sx:{letterSpacing:.5},children:[efe(e.value)," ",tfe]})]}),sfe=()=>a.jsx($T,{children:a.jsx(vn,{component:"span",className:"data-function-end",children:nfe})}),ife=e=>{const t=Ge(n=>n.colorspace.base05);return a.jsx($T,{children:a.jsx(vn,{className:"data-function",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?2:0,color:t},children:e.inspect?Zhe(e.value):a.jsx(vn,{component:"span",className:"data-function-body",onClick:()=>e.setInspect(!0),sx:{"&:hover":{cursor:"pointer"},padding:.5},children:"…"})})})},ofe={is:e=>typeof e=="function",Component:ife,PreComponent:rfe,PostComponent:sfe},afe=ca({is:e=>e===null,type:"null",colorKey:"base08",displayTypeLabel:!1,Renderer:()=>{const e=Ge(t=>t.colorspace.base02);return a.jsx(vn,{sx:{fontSize:"0.8rem",backgroundColor:e,fontWeight:"bold",borderRadius:"3px",padding:"0.5px 2px"},children:"NULL"})}}),MU=e=>e%1===0,lfe=ca({is:e=>typeof e=="number"&&isNaN(e),type:"NaN",colorKey:"base08",displayTypeLabel:!1,serialize:()=>"NaN",deserialize:e=>parseFloat(e),Renderer:()=>{const e=Ge(t=>t.colorspace.base02);return a.jsx(vn,{sx:{backgroundColor:e,fontSize:"0.8rem",fontWeight:"bold",borderRadius:"3px",padding:"0.5px 2px"},children:"NaN"})}}),cfe=ca({is:e=>typeof e=="number"&&!MU(e)&&!isNaN(e),type:"float",colorKey:"base0B",serialize:e=>e.toString(),deserialize:e=>parseFloat(e),Renderer:e=>{let{value:t}=e;return a.jsx(a.Fragment,{children:t})}}),ufe=ca({is:e=>typeof e=="number"&&MU(e),type:"int",colorKey:"base0F",serialize:e=>e.toString(),deserialize:e=>parseFloat(e),Renderer:e=>{let{value:t}=e;return a.jsx(a.Fragment,{children:t})}}),dfe=ca({is:e=>typeof e=="bigint",type:"bigint",colorKey:"base0F",serialize:e=>e.toString(),deserialize:e=>BigInt(e.replace(/\D/g,"")),Renderer:e=>{let{value:t}=e;return a.jsx(a.Fragment,{children:"".concat(t,"n")})}}),ua=e=>{let{d:t,...n}=e;return a.jsx(TU,{...n,children:a.jsx("path",{d:t})})},hfe="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4z",ffe="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",pfe="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",mfe="M 12 2 C 10.615 1.998 9.214625 2.2867656 7.890625 2.8847656 L 8.9003906 4.6328125 C 9.9043906 4.2098125 10.957 3.998 12 4 C 15.080783 4 17.738521 5.7633175 19.074219 8.3222656 L 17.125 9 L 21.25 11 L 22.875 7 L 20.998047 7.6523438 C 19.377701 4.3110398 15.95585 2 12 2 z M 6.5097656 4.4882812 L 2.2324219 5.0820312 L 3.734375 6.3808594 C 1.6515335 9.4550558 1.3615962 13.574578 3.3398438 17 C 4.0308437 18.201 4.9801562 19.268234 6.1601562 20.115234 L 7.1699219 18.367188 C 6.3019219 17.710187 5.5922656 16.904 5.0722656 16 C 3.5320014 13.332354 3.729203 10.148679 5.2773438 7.7128906 L 6.8398438 9.0625 L 6.5097656 4.4882812 z M 19.929688 13 C 19.794687 14.08 19.450734 15.098 18.927734 16 C 17.386985 18.668487 14.531361 20.090637 11.646484 19.966797 L 12.035156 17.9375 L 8.2402344 20.511719 L 10.892578 23.917969 L 11.265625 21.966797 C 14.968963 22.233766 18.681899 20.426323 20.660156 17 C 21.355156 15.801 21.805219 14.445 21.949219 13 L 19.929688 13 z",gfe="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",yfe="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",xfe="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z",vfe="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z",bfe="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z",wfe=e=>a.jsx(ua,{d:hfe,...e}),u2=e=>a.jsx(ua,{d:ffe,...e}),Sfe=e=>a.jsx(ua,{d:pfe,...e}),Efe=e=>a.jsx(ua,{d:mfe,...e}),Nfe=e=>a.jsx(ua,{d:gfe,...e}),kfe=e=>a.jsx(ua,{d:yfe,...e}),Cfe=e=>a.jsx(ua,{d:xfe,...e}),Tfe=e=>a.jsx(ua,{d:vfe,...e}),Afe=e=>a.jsx(ua,{d:bfe,...e}),jfe="{",Ofe="[",Rfe="}",_fe="]";function LU(e){const t=wm(e);let n="";(e instanceof Map||e instanceof Set)&&(n=e[Symbol.toStringTag]),Ob
739ject.prototype.hasOwnProperty.call(e,Symbol.toStringTag)&&(n=e[Symbol.toStringTag]);const r=t===1?"Item":"Items";return"".concat(t," ").concat(r).concat(n?" (".concat(n,")"):"")}const Ife=e=>{const t=Ge(u=>u.colorspace.base04),n=gb(),r=v.useMemo(()=>Array.isArray(e.value)||e.value instanceof Set,[e.value]),s=v.useMemo(()=>wm(e.value)===0,[e.value]),i=v.useMemo(()=>LU(e.value),[e.value]),o=Ge(u=>u.displaySize),l=v.useMemo(()=>typeof o=="function"?o(e.path,e.value):o,[o,e.path,e.value]),c=BT(e.path,e.value);return a.jsxs(vn,{component:"span",className:"data-object-start",sx:{letterSpacing:.5},children:[r?Ofe:jfe,l&&e.inspect&&!s&&a.jsx(vn,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:i}),c&&!e.inspect&&a.jsxs(a.Fragment,{children:[a.jsx(Efe,{sx:{fontSize:12,color:n,mx:.5}}),a.jsx(no,{sx:{cursor:"pointer",userSelect:"none"},children:c})]})]})},Mfe=e=>{const t=Ge(c=>c.colorspace.base04),n=gb(),r=v.useMemo(()=>Array.isArray(e.value)||e.value instanceof Set,[e.value]),s=v.useMemo(()=>wm(e.value)===0,[e.value]),i=v.useMemo(()=>LU(e.value),[e.value]),o=Ge(c=>c.displaySize),l=v.useMemo(()=>typeof o=="function"?o(e.path,e.value):o,[o,e.path,e.value]);return a.jsxs(vn,{component:"span",className:"data-object-end",sx:{lineHeight:1.5,color:n,letterSpacing:.5,opacity:.8},children:[r?_fe:Rfe,l&&(s||!e.inspect)?a.jsx(vn,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:i}):null]})};function Lfe(e){return typeof(e==null?void 0:e[Symbol.iterator])=="function"}const Pfe=e=>{const t=gb(),n=Ge(p=>p.colorspace.base02),r=Ge(p=>p.groupArraysAfterLength),s=BT(e.path,e.value),[i,o]=v.useState(Ge(p=>p.maxDisplayLength)),l=Ge(p=>p.objectSortKeys),c=v.useMemo(()=>{if(!e.inspect)return null;const p=e.value;if(Lfe(p)&&!Array.isArray(p)){const w=[];if(p instanceof Map){const E=p.size-1;let N=0;p.forEach((k,C)=>{const T=C.toString(),j=[...e.path,T];w.push(a.jsx(Eu,{path:j,value:k,prevValue:e.prevValue instanceof Map?e.prevValue.get(C):void 0,editable:!1,last:N===E},T)),N++})}else{const E=p[Symbol.iterator]();let N=E.next(),k=0;for(;;){const C=E.next();var g;if(w.push(a.jsx(Eu,{path:[...e.path,"iterator:".concat(k)],value:N.value,nestedIndex:k,editable:!1,last:(g=C.done)!==null&&g!==void 0?g:!1},k)),C.done)break;k++,N=C}}return w}if(Array.isArray(p)){const w=p.length-1;if(p.length<=r){const C=p.slice(0,i).map((T,j)=>{const S=e.nestedIndex?e.nestedIndex*r+j:j,R=[...e.path,S];return a.jsx(Eu,{path:R,value:T,prevValue:Array.isArray(e.prevValue)?e.prevValue[S]:void 0,last:j===w},S)});if(p.length>i){const T=p.length-i;C.push(a.jsxs(no,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:()=>o(j=>j*2),children:["hidden ",T," items…"]},"last"))}return C}const E=c2(p,r),N=Array.isArray(e.prevValue)?c2(e.prevValue,r):void 0,k=E.length-1;return E.map((C,T)=>a.jsx(Eu,{path:e.path,value:C,nestedIndex:T,prevValue:N==null?void 0:N[T],last:T===k},T))}let x=Object.entries(p);l&&(x=l===!0?x.sort((w,E)=>{let[N]=w,[k]=E;return N.localeCompare(k)}):x.sort((w,E)=>{let[N]=w,[k]=E;return l(N,k)}));const y=x.length-1,b=x.slice(0,i).map((w,E)=>{let[N,k]=w;var C;const T=[...e.path,N];return a.jsx(Eu,{path:T,value:k,prevValue:(C=e.prevValue)===null||C===void 0?void 0:C[N],last:E===y},N)});if(x.length>i){const w=x.length-i;b.push(a.jsxs(no,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:()=>o(E=>E*2),children:["hidden ",w," items…"]},"last"))}return b},[e.inspect,e.value,e.prevValue,e.path,e.nestedIndex,r,i,t,l]),u=e.inspect?.6:0,d=Ge(p=>p.indentWidth),h=e.inspect?d-u:d;return v.useMemo(()=>wm(e.value)===0,[e.value])?null:a.jsx(vn,{className:"data-object",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?h-.6:0,marginLeft:u,color:t,borderLeft:e.inspect?"1px solid ".concat(n):"none"},children:e.inspect?c:!s&&a.jsx(vn,{component:"span",className:"data-object-body",onClick:()=>e.setInspect(!0),sx:{"&:hover":{cursor:"pointer"},padding:.5,userSelect:"none"},children:"…"})})},Dfe={is:e=>typeof e=="object",Component:Pfe,PreComponent:Ife,PostComponent:Mfe},$fe=ca({is:e=>typeof e=="string",type:"string",colorKey:"base09",serialize:e=>e,deserialize:e=>e,Renderer:e=>{const[t,n]=v.useState(!1),r=Ge(o=>o.collapseStringsAfterLength),s=t?e.value:e.value.slice(0,r),i=e.value.length>r;return a.jsxs(vn,{component:"span",sx:{overflowWrap:"anywhere",curs
739or:i?"pointer":"inherit"},onClick:()=>{var o;((o=window.getSelection())===null||o===void 0?void 0:o.type)!=="Range"&&i&&n(l=>!l)},children:['"',s,i&&!t&&a.jsx(vn,{component:"span",sx:{padding:.5},children:"…"}),'"']})}}),Ffe=ca({is:e=>e===void 0,type:"undefined",colorKey:"base05",displayTypeLabel:!1,Renderer:()=>{const e=Ge(t=>t.colorspace.base02);return a.jsx(vn,{sx:{fontSize:"0.7rem",backgroundColor:e,borderRadius:"3px",padding:"0.5px 2px"},children:"undefined"})}});function $i(e){function t(n,r){var s,i;return Object.is(n.value,r.value)&&n.inspect&&r.inspect&&((s=n.path)===null||s===void 0?void 0:s.join("."))===((i=r.path)===null||i===void 0?void 0:i.join("."))}return e.Component=v.memo(e.Component,t),e.Editor&&(e.Editor=v.memo(e.Editor,function(r,s){return Object.is(r.value,s.value)})),e.PreComponent&&(e.PreComponent=v.memo(e.PreComponent,t)),e.PostComponent&&(e.PostComponent=v.memo(e.PostComponent,t)),e}const rf=[$i(Qhe),$i(Xhe),$i(afe),$i(Ffe),$i($fe),$i(ofe),$i(lfe),$i(ufe),$i(cfe),$i(dfe)],Bfe=()=>jU()(e=>({registry:rf,registerTypes:t=>{e(n=>({registry:typeof t=="function"?t(n.registry):t}))}})),UT=v.createContext(void 0);UT.Provider;const PU=(e,t)=>{const n=v.useContext(UT);return FT(n,e,t)};function Ufe(e,t,n){let r;for(const s of n)s.is(e,t)&&(r=s);if(r===void 0){if(typeof e=="object")return Dfe;throw new Error("No type matched for value: ".concat(e))}return r}function zfe(e,t){const n=PU(r=>r.registry);return v.useMemo(()=>Ufe(e,t,n),[e,t,n])}const mu=e=>a.jsx(vn,{component:"span",...e,sx:{cursor:"pointer",paddingLeft:"0.7rem",...e.sx}}),Eu=e=>{const{value:t,prevValue:n,path:r,nestedIndex:s,last:i}=e,{Component:o,PreComponent:l,PostComponent:c,Editor:u,serialize:d,deserialize:h}=zfe(t,r);var f;const p=(f=e.editable)!==null&&f!==void 0?f:void 0,m=Ge(Ee=>Ee.editable),g=v.useMemo(()=>m===!1||p===!1?!1:typeof m=="function"?!!m(r,t):m,[r,p,m,t]),[x,y]=v.useState(""),b=r.length,w=r[b-1],E=Ge(Ee=>Ee.hoverPath),N=v.useMemo(()=>E&&r.every((Ee,I)=>Ee===E.path[I]&&s===E.nestedIndex),[E,r,s]),k=Ge(Ee=>Ee.setHover),C=Ge(Ee=>Ee.value),[T,j]=Yhe(r,t,s),[S,R]=v.useState(!1),_=Ge(Ee=>Ee.onChange),L=gb(),A=Ge(Ee=>Ee.colorspace.base0C),B=Ge(Ee=>Ee.colorspace.base0A),U=Ge(Ee=>Ee.displayComma),V=Ge(Ee=>Ee.quotesOnKeys),P=Ge(Ee=>Ee.rootName),D=C===t,q=Number.isInteger(Number(w)),Q=Ge(Ee=>Ee.enableAdd),F=Ge(Ee=>Ee.onAdd),ge=v.useMemo(()=>!F||s!==void 0||Q===!1||p===!1?!1:typeof Q=="function"?!!Q(r,t):!!(Array.isArray(t)||Hhe(t)),[F,s,r,Q,p,t]),Ve=Ge(Ee=>Ee.enableDelete),He=Ge(Ee=>Ee.onDelete),Fe=v.useMemo(()=>!He||s!==void 0||D||Ve===!1||p===!1?!1:typeof Ve=="function"?!!Ve(r,t):Ve,[He,s,D,r,Ve,p,t]),le=Ge(Ee=>Ee.enableClipboard),{copy:Se,copied:Ce}=qhe(),Be=Ge(Ee=>Ee.highlightUpdates),Me=v.useMemo(()=>!Be||n===void 0?!1:typeof t!=typeof n?!0:typeof t=="number"?isNaN(t)&&isNaN(n)?!1:t!==n:Array.isArray(t)!==Array.isArray(n)?!0:typeof t=="object"||typeof t=="function"?!1:t!==n,[Be,n,t]),Oe=v.useRef();v.useEffect(()=>{Oe.current&&Me&&"animate"in Oe.current&&Oe.current.animate([{backgroundColor:B},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[B,Me,n,t]);const St=v.useCallback(Ee=>{Ee.preventDefault(),d&&y(d(t)),R(!0)},[d,t]),Qe=v.useCallback(()=>{R(!1),y("")},[R,y]),$t=v.useCallback(Ee=>{if(R(!1),!!h)try{_(r,t,h(Ee))}catch{}},[R,h,_,r,t]),En=v.useMemo(()=>S?a.jsxs(a.Fragment,{children:[a.jsx(mu,{children:a.jsx(Nfe,{sx:{fontSize:".8rem"},onClick:Qe})}),a.jsx(mu,{children:a.jsx(u2,{sx:{fontSize:".8rem"},onClick:()=>$t(x)})})]}):a.jsxs(a.Fragment,{children:[le&&a.jsx(mu,{onClick:Ee=>{Ee.preventDefault();try{Se(r,t,QE)}catch(I){console.error(I)}},children:Ce?a.jsx(u2,{sx:{fontSize:".8rem"}}):a.jsx(kfe,{sx:{fontSize:".8rem"}})}),u&&g&&d&&h&&a.jsx(mu,{onClick:St,children:a.jsx(Cfe,{sx:{fontSize:".8rem"}})}),ge&&a.jsx(mu,{onClick:Ee=>{Ee.preventDefault(),F==null||F(r)},children:a.jsx(wfe,{sx:{fontSize:".8rem"}})}),Fe&&a.jsx(mu,{onClick:Ee=>{Ee.preventDefault(),He==null||He(r,t)},children:a.jsx(Afe,{sx:{fontSize:".9rem"}})})]}),[u,d,h,Ce,Se,g,S,le,ge,Fe,x,r,t,F,He,St,Qe,$t]),Nn=v.useMemo(()=>wm(t)===0,[t]),At=!Nn&&!!(l&&c),Yn=Ge(Ee=>Ee.keyRenderer),zr=v.useMemo(()=>({path:r,inspect:T,setInspect:j,value:t,prevValue:n,nestedIndex:s}),[T,r,j,t,n,s]);return a.jsxs(vn,{className:"data-key-pair","data-testid":"data-key-pair"+r.join("."),sx:{userSelect:"text"},onMouseEnter:v.useCallback(()=>k(r,s),[k,r,s]),children:[a.jsxs(no,{component:"span",className:"data-key",sx:{lineHeight:1.5,color:L,letterSpacing:.5,opacity:.8},onClick:v.useCallback(Ee=>{Ee.isDefaultPrevented()||Nn||j(I=>!I)},[Nn,j]),children:[At?T?a.jsx(Tfe,{className:"data-key-toggle-expanded",sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):a.jsx(Sfe,{className:"data-key-toggle-collapsed",sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):null,a.jsx(vn,{ref:Oe,className:"data-key-key",component:"span",children:D&&b===0?P!==!1?V?a.jsxs(a.Fragment,{children:['"',P,'"']}):a.jsx(a.Fragment,{children:P}):null:Yn.when(zr)?a.jsx(Yn,{...zr}):s===void 0&&(q?a.jsx(vn,{component:"span",style:{color:A,userSelect:q?"none":"auto"},children:w}):V?a.jsxs(a.Fragment,{children:['"',w,'"']}):a.jsx(a.Fragment,{children:w}))}),D?P!==!1&&a.jsx(no,{className:"data-key-colon",sx:{mr:.5},children:":"}):s===void 0&&a.jsx(no,{className:"data-key-colon",sx:{mr:.5,".data-key-key:empty + &":{display:"none"},userSelect:q?"none":"auto"},children:":"}),l&&a.jsx(l,{...zr}),N&&At&&T&&En]}),S&&g?u&&a.jsx(u,{path:r,value:x,setValue:y,abortEditing:Qe,commitEditing:$t}):o?a.jsx(o,{...zr}):a.jsx(vn,{component:"span",className:"data-value-fallback",children:"fallback: ".concat(t)}),c&&a.jsx(c,{...zr}),!i&&U&&a.jsx(no,{children:","}),N&&At&&!T&&En,N&&!At&&En,!N&&S&&En]})},d2="(prefers-color-scheme: dark)";function Vfe(){const[e,t]=v.useState(!1);return v.useEffect(()=>{const n=s=>t(s.matches);t(window.matchMedia(d2).matches);const r=window.matchMedia(d2);
739return r.addEventListener("change",n),()=>r.removeEventListener("change",n)},[]),e}function On(e,t){const{setState:n}=v.useContext(bm);v.useEffect(()=>{t!==void 0&&n({[e]:t})},[e,t,n])}const Wfe=e=>{const{setState:t}=v.useContext(bm);v.useEffect(()=>{t(d=>({prevValue:d.value,value:e.value}))},[e.value,t]),On("rootName",e.rootName),On("indentWidth",e.indentWidth),On("keyRenderer",e.keyRenderer),On("enableAdd",e.enableAdd),On("enableDelete",e.enableDelete),On("enableClipboard",e.enableClipboard),On("editable",e.editable),On("onChange",e.onChange),On("onCopy",e.onCopy),On("onSelect",e.onSelect),On("onAdd",e.onAdd),On("onDelete",e.onDelete),On("maxDisplayLength",e.maxDisplayLength),On("groupArraysAfterLength",e.groupArraysAfterLength),On("quotesOnKeys",e.quotesOnKeys),On("displayDataTypes",e.displayDataTypes),On("displaySize",e.displaySize),On("displayComma",e.displayComma),On("highlightUpdates",e.highlightUpdates),v.useEffect(()=>{e.theme==="light"?t({colorspace:c0}):e.theme==="dark"?t({colorspace:YE}):typeof e.theme=="object"&&t({colorspace:e.theme})},[t,e.theme]);const n=v.useMemo(()=>typeof e.theme=="object"?"json-viewer-theme-custom":e.theme==="dark"?"json-viewer-theme-dark":"json-viewer-theme-light",[e.theme]),r=v.useRef(!0),s=PU(d=>d.registerTypes);if(r.current){const d=e.valueTypes?[...rf,...e.valueTypes]:[...rf];s(d),r.current=!1}v.useEffect(()=>{const d=e.valueTypes?[...rf,...e.valueTypes]:[...rf];s(d)},[e.valueTypes,s]);const i=Ge(d=>d.value),o=Ge(d=>d.prevValue),l=v.useMemo(()=>[],[]),c=Ge(d=>d.setHover),u=v.useCallback(()=>c(null),[c]);return a.jsx(phe,{elevation:0,className:zhe(n,e.className),style:e.style,sx:{fontFamily:"monospace",userSelect:"none",contentVisibility:"auto",...e.sx},onMouseLeave:u,children:a.jsx(Eu,{value:i,prevValue:o,path:l,last:!0})})},Hfe=function(t){const n=Vfe(),r=v.useMemo(()=>{var c;return t.theme==="auto"?n?"dark":"light":(c=t.theme)!==null&&c!==void 0?c:"light"},[n,t.theme]),s=v.useMemo(()=>{const c=typeof r=="object"?r.base00:r==="dark"?YE.base00:c0.base00,u=typeof r=="object"?r.base07:r==="dark"?YE.base07:c0.base07;return fb({components:{MuiPaper:{styleOverrides:{root:{backgroundColor:c,color:u}}}},palette:{mode:r==="dark"?"dark":"light",background:{default:c}}})},[r]),i={...t,theme:r},o=v.useMemo(()=>Vhe(t),[]),l=v.useMemo(()=>Bfe(),[]);return a.jsx(ihe,{theme:s,children:a.jsx(UT.Provider,{value:l,children:a.jsx(bm.Provider,{value:o,children:a.jsx(Wfe,{...i})})})})};var DU={exports:{}};(function(e){var t=function(){var n=!0,r=!1,s={},i=function(){var c,u,d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
740`,r:"\r",t:"	"},h,f=function(N){throw{name:"SyntaxError",message:N,at:c,text:h}},p=function(N){return N&&N!==u&&f("Expected '"+N+"' instead of '"+u+"'"),u=h.charAt(c),c+=1,u},m=function(){var N,k="";for(u==="-"&&(k="-",p("-"));u>="0"&&u<="9";)k+=u,p();if(u===".")for(k+=".";p()&&u>="0"&&u<="9";)k+=u;if(u==="e"||u==="E")for(k+=u,p(),(u==="-"||u==="+")&&(k+=u,p());u>="0"&&u<="9";)k+=u,p();if(N=+k,!isFinite(N))f("Bad number");else return N},g=function(){var N,k,C="",T;if(u==='"')for(;p();){if(u==='"')return p(),C;if(u==="\\")if(p(),u==="u"){for(T=0,k=0;k<4&&(N=parseInt(p(),16),!!isFinite(N));k+=1)T=T*16+N;C+=String.fromCharCode(T)}else if(typeof d[u]=="string")C+=d[u];else break;else C+=u}f("Bad string")},x=function(){for(;u&&u<=" ";)p()},y=function(){switch(u){case"t":return p("t"),p("r"),p("u"),p("e"),!0;case"f":return p("f"),p("a"),p("l"),p("s"),p("e"),!1;case"n":return p("n"),p("u"),p("l"),p("l"),null}f("Unexpected '"+u+"'")},b,w=function(){var N=[];if(u==="["){if(p("["),x(),u==="]")return p("]"),N;for(;u;){if(N.push(b()),x(),u==="]")return p("]"),N;p(","),x()}}f("Bad array")},E=function(){var N,k={};if(u==="{"){if(p("{"),x(),u==="}")return p("}"),k;for(;u;){if(N=g(),x(),p(":"),Object.hasOwnProperty.call(k,N)&&f("Duplicate key '"+N+"'"),k[N]=b(),x(),u==="}")return p("}"),k;p(","),x()}}f("Bad object")};return b=function(){switch(x(),u){case"{":return E();case"[":return w();case'"':return g();case"-":return m();default:return u>="0"&&u<="9"?m():y()}},function(N,k){var C;return h=N,c=0,u=" ",C=b(),x(),u&&f("Syntax error"),typeof k=="function"?function T(j,S){var R,_,L=j[S];if(L&&typeof L=="object")for(R in L)Object.prototype.hasOwnProperty.call(L,R)&&(_=T(L,R),_!==void 0?L[R]=_:
740delete L[R]);return k.call(j,S,L)}({"":C},""):C}}(),o=function(){var c={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(h,f,p,m,g,x,y){var b=x.length-1;switch(g){case 1:this.$=h.replace(/\\(\\|")/g,"$1").replace(/\\n/g,`
741`).replace(/\\r/g,"\r").replace(/\\t/g,"	").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(h);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=x[b-1];case 13:this.$={};break;case 14:this.$=x[b-1];break;case 15:this.$=[x[b-2],x[b]];break;case 16:this.$={},this.$[x[b][0]]=x[b][1];break;case 17:this.$=x[b-2],x[b-2][x[b][0]]=x[b][1];break;case 18:this.$=[];break;case 19:this.$=x[b-1];break;case 20:this.$=[x[b]];break;case 21:this.$=x[b-2],x[b-2].push(x[b]);break}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(h,f){throw new Error(h)},parse:function(h){var f=this,p=[0],m=[null],g=[],x=this.table,y="",b=0,w=0,E=0,N=2,k=1;this.lexer.setInput(h),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var C=this.lexer.yylloc;g.push(C),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function T(Q){p.length=p.length-2*Q,m.length=m.length-Q,g.length=g.length-Q}function j(){var Q;return Q=f.lexer.lex()||1,typeof Q!="number"&&(Q=f.symbols_[Q]||Q),Q}for(var S,R,_,L,A,B={},U,V,P,D;;){if(_=p[p.length-1],this.defaultActions[_]?L=this.defaultActions[_]:(S==null&&(S=j()),L=x[_]&&x[_][S]),typeof L>"u"||!L.length||!L[0]){if(!E){D=[];for(U in x[_])this.terminals_[U]&&U>2&&D.push("'"+this.terminals_[U]+"'");var q="";this.lexer.showPosition?q="Parse error on line "+(b+1)+`:
742`+this.lexer.showPosition()+`
743Expecting `+D.join(", ")+", got '"+this.terminals_[S]+"'":q="Parse error on line "+(b+1)+": Unexpected "+(S==1?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(q,{text:this.lexer.match,token:this.terminals_[S]||S,line:this.lexer.yylineno,loc:C,expected:D})}if(E==3){if(S==k)throw new Error(q||"Parsing halted.");w=this.lexer.yyleng,y=this.lexer.yytext,b=this.lexer.yylineno,C=this.lexer.yylloc,S=j()}for(;!(N.toString()in x[_]);){if(_==0)throw new Error(q||"Parsing halted.");T(1),_=p[p.length-1]}R=S,S=N,_=p[p.length-1],L=x[_]&&x[_][N],E=3}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+S);switch(L[0]){case 1:p.push(S),m.push(this.lexer.yytext),g.push(this.lexer.yylloc),p.push(L[1]),S=null,R?(S=R,R=null):(w=this.lexer.yyleng,y=this.lexer.yytext,b=this.lexer.yylineno,C=this.lexer.yylloc,E>0&&E--);break;case 2:if(V=this.productions_[L[1]][1],B.$=m[m.length-V],B._$={first_line:g[g.length-(V||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(V||1)].first_column,last_column:g[g.length-1].last_column},A=this.performAction.call(B,y,w,b,this.yy,L[1],m,g),typeof A<"u")return A;V&&(p=p.slice(0,-1*V*2),m=m.slice(0,-1*V),g=g.slice(0,-1*V)),p.push(this.productions_[L[1]][0]),m.push(B.$),g.push(B._$),P=x[p[p.length-2]][p[p.length-1]],p.push(P);break;case 3:return!0}}return!0}},u=function(){var d={EOF:1,parseError:function(f,p){if(this.yy.parseError)this.yy.parseError(f,p);else throw new Error(f)},setInput:function(h){return this._input=h,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this}
743,input:function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.match+=h,this.matched+=h;var f=h.match(/\n/);return f&&this.yylineno++,this._input=this._input.slice(1),h},unput:function(h){return this._input=h+this._input,this},more:function(){return this._more=!0,this},less:function(h){this._input=this.match.slice(h)+this._input},pastInput:function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var h=this.pastInput(),f=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
744`+f+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,f,p,m,g;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),y=0;y<x.length&&(p=this._input.match(this.rules[x[y]]),!(p&&(!f||p[0].length>f[0].length)&&(f=p,m=y,!this.options.flex)));y++);if(f)return g=f[0].match(/\n.*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-1:this.yylloc.last_column+f[0].length},this.yytext+=f[0],this.match+=f[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(f[0].length),this.matched+=f[0],h=this.performAction.call(this,this.yy,this,x[m],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h||void 0;if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
745`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var f=this.next();return typeof f<"u"?f:this.lex()},begin:function(f){this.conditionStack.push(f)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(f){this.begin(f)}};return d.options={},d.performAction=function(f,p,m,g){switch(m){case 0:break;case 1:return 6;case 2:return p.yytext=p.yytext.substr(1,p.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},d.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],d.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},d}();return c.lexer=u,c}(),l=o.parse;return o.parse=function(c){var u=l.call(o,c),d=typeof i>"u"?n("./doug-json-parse"):i;try{d(c)}catch(m){if(/Duplicate key|Bad string|Unexpected/.test(m.message)){var h=c.substring(0,m.at).split(`
746`),f=h.length,p=h[f-1].length-1;throw this.parseError(m.message,{line:f,col:p,message:m.message.replace(/./,function(g){return g.toLowerCase()})}),SyntaxError(m.message+" on line "+f)}}return u},typeof s<"u"&&(s.parser=o,s.parse=function(){return o.parse.apply(o,arguments)},s.main=function(u){if(!u[1])throw new Error("Usage: "+u[0]+" FILE");if(typeof process<"u")var d=n("fs").readFileSync(n("path").join(process.cwd(),u[1]),"utf8");else var h=n("file").path(n("file").cwd()),d=h.join(u[1]).read({charset:"utf-8"});return s.parser.parse(d)},n.main===r&&s.main(typeof process<"u"?process.argv.slice(1):n("system").args)),s}();e.exports&&(e.exports=t)})(DU);var Gfe=DU.exports;function Kfe(){const[e,t]=v.useState(""),[n,r]=v.useState(null),[s,i]=v.useState(""),[o,l]=v.useState(""),[c,u]=v.useState(null),[d,h]=v.useState("input"),[f,p]=v.useState(!1),[m,g]=v.useState(""),{toast:x}=Fr(),y=()=>{if(!e.trim())return u("Please enter JSON to validate"),x({title:"Empty Input",description:"Please enter JSON to validate",variant:"destructive"}),!1;try{const _=Gfe.parse(e);return r(_),i(JSON.stringify(_,null,2)),l(JSON.stringify(_)),u(null),x({title:"Valid JSON",description:"Your JSON is valid and has been parsed successfully"}),!0}catch(_){const L=_.message||"Invalid JSON";return u(L),r(null),i(""),l(""),x({title:"Invalid JSON",description:L,variant:"destructive"}),!1}},b=()=>{y()&&h("formatted")},w=()=>{y()&&h("minified")},E=()=>{y()&&h("tree")},N=async(_,L)=>{try{await navigator.clipboard.writeText(_),p(!0),x({title:"Copied!",description:`${L} copied to clipboard`}),setTimeout(()=>p(!1),2e3)}catch{x({title:"Copy Failed",description:"Unable to copy to clipboard",variant:"destructive"})}},k=()=>{t(""),r(null),i(""),l(""),u(null),h("input"),g(""),x({title:"Cleared",description:"All data has been cleared"})},C=(_,L)=>L.trim()?_.split(new RegExp(`(${L.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi")).map((B,U)=>B.toLowerCase()===L.toLowerCase()?`🔍${B}🔍`:B).join(""):_,T=(_,L)=>{if(!L.trim())return 0;const A=new RegExp(L.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");return(_.match(A)||[]).length},j=(_,L)=>{if(!L.trim())return _;const A=L.toLowerCase(),B=V=>V==null?!1:String(V).toLowerCase().includes(A),U=(V,P)=>{const D=P&&B(P);if(typeof V!="object"||V===null)return D||B(V)?V:null;if(Array.isArray(V)){const F=V.map((ge,Ve)=>U(ge,String(Ve))).filter(ge=>ge!==null);return D||F.length>0?F:null}const q={};let Q=D;for(const[F,ge]of Object.entries(V)){const Ve=U(ge,F);Ve!==null&&(q[F]=Ve,Q=!0)}return Q?q:null};return U(_)||{}},S=(_,L)=>{if(!L.trim()||!_)return 0;const A=L.toLowerCase();let B=0;const U=(V,P)=>{P&&String(P).toLowerCase().includes(A)&&B++,V!=null&&(typeof V!="object"?String(V).toLowerCase().includes(A)&&B++:Array.isArray(V)?V.forEac
746h((D,q)=>U(D,String(q))):Object.entries(V).forEach(([D,q])=>U(q,D)))};return U(_),B},R=()=>{t(JSON.stringify({name:"Salesforce Account",type:"Customer",employees:5e3,active:!0,contacts:[{firstName:"John",lastName:"Doe",email:"[email protected]",phone:"+1-555-0123"},{firstName:"Jane",lastName:"Smith",email:"[email protected]",phone:"+1-555-0124"}],address:{street:"123 Market St",city:"San Francisco",state:"CA",zipCode:"94105",country:"USA"},metadata:{createdDate:"2025-01-15",lastModified:"2025-10-29",source:"Salesforce API"}},null,2)),x({title:"Sample Loaded",description:"Sample JSON has been loaded"})};return a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 py-8",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("div",{className:"flex items-center justify-center mb-4",children:a.jsx(eO,{className:"h-12 w-12 text-sf-blue"})}),a.jsx("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-4",children:"JSON Formatter & Validator"}),a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:"Validate, format, minify, and visualize JSON data with our powerful online tool"})]}),a.jsxs("div",{className:"mb-6 flex flex-wrap gap-3 justify-center",children:[a.jsxs(H,{onClick:y,className:"bg-sf-blue hover:bg-blue-600","data-testid":"button-validate",children:[a.jsx(Va,{className:"mr-2 h-4 w-4"}),"Validate"]}),a.jsxs(H,{onClick:b,variant:"outline","data-testid":"button-format",children:[a.jsx(eO,{className:"mr-2 h-4 w-4"}),"Format"]}),a.jsx(H,{onClick:w,variant:"outline","data-testid":"button-minify",children:"Minify"}),a.jsx(H,{onClick:E,variant:"outline","data-testid":"button-tree",children:"Tree View"}),a.jsx(H,{onClick:R,variant:"outline","data-testid":"button-sample",children:"Load Sample"}),a.jsxs(H,{onClick:k,variant:"outline","data-testid":"button-clear",children:[a.jsx(hc,{className:"mr-2 h-4 w-4"}),"Clear"]})]}),c&&a.jsx(te,{className:"mb-6 border-red-500 bg-red-50 dark:bg-red-900/20",children:a.jsx(ne,{className:"pt-6",children:a.jsxs("div",{className:"flex items-start",children:[a.jsx(Si,{className:"h-5 w-5 text-red-500 mr-3 mt-0.5"}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-red-700 dark:text-red-400 mb-1",children:"Validation Error"}),a.jsx("p",{className:"text-sm text-red-600 dark:text-red-300 whitespace-pre-wrap font-mono",children:c})]})]})})}),a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"JSON Editor & Viewer"}),a.jsx(Xt,{children:"Paste your JSON below to validate, format, minify, or view in tree structure"})]}),a.jsx(ne,{children:a.jsxs(Fd,{value:d,onValueChange:h,children:[a.jsxs(Bc,{className:"grid grid-cols-4 mb-4",children:[a.jsx(Zt,{value:"input","data-testid":"tab-input",children:"Input"}),a.jsx(Zt,{value:"formatted","data-testid":"tab-formatted",children:"Formatted"}),a.jsx(Zt,{value:"minified","data-testid":"tab-minified",children:"Minified"}),a.jsx(Zt,{value:"tree","data-testid":"tab-tree",children:"Tree View"})]}),a.jsxs(Dn,{value:"input",className:"space-y-4",children:[a.jsx("div",{children:a.jsx(fs,{value:e,onChange:_=>t(_.target.value),placeholder:'Paste your JSON here, e.g., {"name": "John", "age": 30}',className:"font-mono text-sm min-h-[400px]","data-testid":"textarea-json-input"})}),a.jsx("div",{className:"flex justify-end",children:a.jsxs(H,{onClick:()=>N(e,"Input"),variant:"outline",size:"sm",disabled:!e,"data-testid":"button-copy-input",children:[f?a.jsx(Va,{className:"mr-2 h-4 w-4"}):a.jsx(Ws,{className:"mr-2 h-4 w-4"}),"Copy"]})})]}),a.jsx(Dn,{value:"formatted",className:"space-y-4",children:s?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"relative mb-3",children:[a.jsx(eo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),a.jsx(Ke,{value:m,onChange:_=>g(_.target.value),placeholder:"Search in formatted JSON...",className:"pl-10","data-testid":"input-search-formatted"}),m&&a.jsxs("div",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-xs text-gray-500",children:[T(s,m)," matches"]})]}),a.jsx(fs,{value:m?C(s,m):s,readOnly:!0,className:"font-mono text-sm min-h-[400px] bg-gray-50 dark:bg-gray-800","data-testid":"textarea-formatted"}),a.jsx("div",{className:"flex justify-end",children:a.jsxs(H,{onClick:()=>N(s,"Formatted JSON"),variant:"outline",size:"sm","data-testid":"button-copy-formatted",children:[f?a.jsx(Va,{className:"mr-2 h-4 w-4"}):a.jsx(Ws,{className:"mr-2 h-4 w-4"}),"Copy Formatted"]})})]}):a.jsx("div",{className:"text-center py-12 text-gray-500",children:'Click "Format" to see the formatted JSON'})}),a.jsx(Dn,{value:"minified",className:"space-y-4",children:o?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"relative mb-3",children:[a.jsx(eo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),a.jsx(Ke,{value:m,onChange:_=>g(_.target.value),placeholder:"Search in minified JSON...",className:"pl-10","data-testid":"input-search-minified"}),m&&a.jsxs("div",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-xs text-gray-500",children:[T(o,m)," matches"]})]}),a.jsx(fs,{value:m?C(o,m):o,readOnly:!0,className:"font-mono text-sm min-h-[400px] bg-gray-50 dark:bg-gray-800","data-testid":"textarea-m
746inified"}),a.jsx("div",{className:"flex justify-end",children:a.jsxs(H,{onClick:()=>N(o,"Minified JSON"),variant:"outline",size:"sm","data-testid":"button-copy-minified",children:[f?a.jsx(Va,{className:"mr-2 h-4 w-4"}):a.jsx(Ws,{className:"mr-2 h-4 w-4"}),"Copy Minified"]})})]}):a.jsx("div",{className:"text-center py-12 text-gray-500",children:'Click "Minify" to see the minified JSON'})}),a.jsx(Dn,{value:"tree",className:"space-y-4",children:n?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"relative mb-3",children:[a.jsx(eo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),a.jsx(Ke,{value:m,onChange:_=>g(_.target.value),placeholder:"Search in tree view (searches collapsed nodes too)...",className:"pl-10","data-testid":"input-search-tree"}),m&&a.jsxs("div",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-xs text-gray-500",children:[S(n,m)," matches"]})]}),m&&S(n,m)===0?a.jsx("div",{className:"border rounded-lg p-4 bg-white dark:bg-gray-800 min-h-[400px] flex items-center justify-center",children:a.jsxs("div",{className:"text-center text-gray-500",children:[a.jsx(eo,{className:"h-12 w-12 mx-auto mb-3 opacity-30"}),a.jsxs("p",{children:['No matches found for "',m,'"']})]})}):a.jsx("div",{className:"border rounded-lg p-4 bg-white dark:bg-gray-800 min-h-[400px] overflow-auto","data-testid":"tree-view",children:a.jsx(Hfe,{value:m?j(n,m):n,theme:"auto",defaultInspectDepth:m?10:3,displayDataTypes:!1,enableClipboard:!0,rootName:"root"})})]}):a.jsx("div",{className:"text-center py-12 text-gray-500",children:'Click "Tree View" to see the JSON tree structure'})})]})})]}),a.jsxs("div",{className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-6",children:[a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{className:"text-lg",children:"Validate JSON"})}),a.jsx(ne,{children:a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Instantly validate your JSON with detailed error messages including line and column numbers."})})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{className:"text-lg",children:"Format & Minify"})}),a.jsx(ne,{children:a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Beautify your JSON with proper indentation or minify it to save space and bandwidth."})})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{className:"text-lg",children:"Tree Visualization"})}),a.jsx(ne,{children:a.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Explore complex JSON structures with an interactive, expandable tree view."})})]})]})]})})}var zT="Checkbox",[qfe,mAe]=As(zT),[Yfe,Qfe]=qfe(zT),$U=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:u,form:d,...h}=e,[f,p]=v.useState(null),m=gt(t,E=>p(E)),g=v.useRef(!1),x=f?d||!!f.closest("form"):!0,[y=!1,b]=Xo({prop:s,defaultProp:i,onChange:u}),w=v.useRef(y);return v.useEffect(()=>{const E=f==null?void 0:f.form;if(E){const N=()=>b(w.current);return E.addEventListener("reset",N),()=>E.removeEventListener("reset",N)}},[f,b]),a.jsxs(Yfe,{scope:n,state:y,disabled:l,children:[a.jsx(je.button,{type:"button",role:"checkbox","aria-checked":pl(y)?"mixed":y,"aria-required":o,"data-state":UU(y),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:m,onKeyDown:ae(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:ae(e.onClick,E=>{b(N=>pl(N)?!0:!N),x&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})}),x&&a.jsx(Jfe,{control:f,bubbles:!g.current,name:r,value:c,checked:y,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"},defaultChecked:pl(i)?!1:i})]})});$U.displayName=zT;var FU="CheckboxIndicator",BU=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,i=Qfe(FU,n);return a.jsx(Zs,{present:r||pl(i.state)||i.state===!0,children:a.jsx(je.span,{"data-state":UU(i.state),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});BU.displayName=FU;var Jfe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:s,...i}=e,o=v.useRef(null),l=gC(n),c=Yk(t);v.useEffect(()=>{const d=o.current,h=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(h,"checked").set;if(l!==n&&p){const m=new Event("click",{bubbles:r});d.indeterminate=pl(n),p.call(d,pl(n)?!1:n),d.dispatchEvent(m)}},[l,n,r]);const u=v.useRef(pl(n)?!1:n);return a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s??u.current,...i,tabIndex:-1,ref:o,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function pl(e){return e==="indeterminate"}function UU(e){return pl(e)?"indeterminate":e?"checked":"unchecked"}var zU=$U,Xfe=BU;const VU=v.forwardRef(({className:e,...t},n)=>a.jsx(zU,{ref:n,className:be("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:a.jsx(Xfe,{className:be("flex items-center justify-center text-current"),children:a.jsx(Va,{className:"h-4 w-4"})})}));VU.displayName=zU.displayName;const _g=[{name:"Email",pattern:"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",description:"Validates standard email addresses",flags:"gm",testCases:[{text:"[email protected]",shouldMatch:!0},{text:"[email protected]",shouldMatch:!0},{text:"invalid@",shouldMatch:!1},{text:"@example.com",shouldMatch:!1}]},{name:"US Phone",pattern:"^\\+?1?\\s*\\(?\\d{3}\\)?[-\\s.]?\\d{3}[-\\s.]?\\d{4}$",description:"Validates US phone numbers in various formats",flags:"gm",testCases:[{text:"(555) 123-4567",shouldMatch:!0},{text:"555-123-4567",shouldMatch:!0},{text:"+1 555 123 4567",shouldMatch:!0},{text:"123-456",shouldMatch:!1}]},{name:"International Phone",pattern:"^\\+?[1-9]\\d{1,14}$",description:"Validates international phone numbers (E.164 format)",flags:"gm",testCases:[{text:"+14155552671",shouldMatch:!0},{text:"+442071838750",shouldMatch:!0},{text:"+91123456789",shouldMatch:!0},{text:"123",shouldMatch:!1}]},{name:"URL",pattern:"^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)$",description:"Validates HTTP/HTTPS URLs",flags:"gm",testCases:[{text:"https://www.example.com",shouldMatch:!0},{text:"http://example.com/path?query=1",shouldMatch:!0},{text:"ftp://example.com",shouldMatch:!1},{text:"not a url",shouldMatch:!1}]},{name:"SSN",pattern:"^\\d{3}-\\d{2}-\\d{4}$",description:"Validates US Social Security Numbers (XXX-XX-XXXX)",flags:"gm",testCases:[{text:"123-45-6789",shouldMatch:!0},{text:"000-00-0000",shouldMatch:!0},{text:"12-345-6789",shouldMatch:!1},{text:"123456789",shouldMatch:!1}]},{name:"ZIP Code",pattern:"^\\d{5}(-\\d{4})?$",description:"Validates US ZIP codes (5 digits or ZIP+4)",flags:"gm",testCases:[{text:"12345",shouldMatch:!0},{text:"12345-6789",shouldMatch:!0},{text:"1234",shouldMatch:!1},{text:"12345-678",shouldMatch:!1}]},{name:"Credit Card",pattern:"^\\d{4}[\\s-]?\\d{4}[\\s-]?\\d{4}[\\s-]?\\d{4}$",description:"Validates credit card numbers (16 digits with optional separators)",flags:"gm",testCases:[{text:"1234 5678 9012 3456",shouldMatch:!0},{text:"1234-5678-9012-3456",shouldMatch:!0},{text:"1234567890123456",shouldMatch:!0},{text:"1234 5678 9012",shouldMatch:!1}]},{name:"IPv4 Address",pattern:"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$",description:"Validates IPv4 addresses",flags:"gm",testCases:[{text:"192.168.1.1",shouldMatch:!0},{text:"255.255.255.255",shouldMatch:!0},{text:"0.0.0.0",shouldMatch:!0},{text:"256.1.1.1",shouldMatch:!1}]},{name:"Date (MM/DD/YYYY)",pattern:"^(0[1-9]|1[0-2])\\/(0[1-9]|[12][0-9]|3[01])\\/\\d{4}$",description:"Validates dates in MM/DD/YYYY format",flags:"gm",testCases:[{text:"12/31/2025",shouldMatch:!0},{text:"01/01/2000",shouldMatch:!0},{text:"13/01/2025",shouldMatch:!1},{text:"12-31-2025",shouldMatch:!1}]},{name:"Hex Color",pattern:"^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$",description:"Validates hexadecimal color codes",flags:"gm",testCases:[{text:"#FF5733",shouldMatch:!0},{text:"FF5733",shouldMatch:!0},{text:"#F73",shouldMatch:!0},{text:"#GG5733",shouldMatch:!1}]}];function Zfe(){var w,E;const[e,t]=v.useState(""),[n,r]=v.useState(""),[s,i]=v.useState(""),[o,l]=v.useState({g:!0,i:!1,m:!1,s:!1,u:!1,y:!1}),[c,u]=v.useState(!1),{toast:d}=Fr(),h=v.useMemo(()=>Object.entries(o).filter(([N,k])=>k).map(([N])=>N).join(""),[o]),f=v.useMemo(()=>{try{return new RegExp(e,h)}catch{return null}},[e,h]),p=v.useMemo(()=>
746{if(!f||!n)return[];const N=[];if(o.g){let k;for(;(k=f.exec(n))!==null;)N.push({text:k[0],index:k.index,groups:k.slice(1)})}else{const k=f.exec(n);k&&N.push({text:k[0],index:k.index,groups:k.slice(1)})}return N},[f,n,o.g]),m=v.useMemo(()=>{if(!n||p.length===0)return n;let N=n,k=0;return p.forEach(C=>{const T=C.index+k,j=T+C.text.length,S=`🔍${C.text}🔍`;N=N.substring(0,T)+S+N.substring(j),k+=S.length-C.text.length}),N},[n,p]),g=v.useMemo(()=>{if(!f||!n)return null;try{return n.replace(f,s)}catch{return null}},[f,n,s]),x=N=>{const k=_g.find(C=>C.name===N);if(k){if(t(k.pattern),r(k.testCases.map(C=>C.text).join(`
747`)),k.flags){const C={g:!1,i:!1,m:!1,s:!1,u:!1,y:!1};k.flags.split("").forEach(T=>{T in C&&(C[T]=!0)}),l(C)}else l({g:!0,i:!1,m:!1,s:!1,u:!1,y:!1});d({title:"Preset Loaded",description:`${k.name} pattern loaded`})}},y=async(N,k)=>{try{await navigator.clipboard.writeText(N),u(!0),d({title:"Copied!",description:`${k} copied to clipboard`}),setTimeout(()=>u(!1),2e3)}catch{d({title:"Copy Failed",description:"Unable to copy to clipboard",variant:"destructive"})}},b=()=>{if(!e)return null;const N=[];return e.includes("^")&&N.push("^ = Start of string"),e.includes("$")&&N.push("$ = End of string"),e.includes("\\d")&&N.push("\\d = Any digit (0-9)"),e.includes("\\w")&&N.push("\\w = Any word character (a-z, A-Z, 0-9, _)"),e.includes("\\s")&&N.push("\\s = Any whitespace"),e.includes("+")&&N.push("+ = One or more"),e.includes("*")&&N.push("* = Zero or more"),e.includes("?")&&N.push("? = Zero or one (optional)"),e.includes("{")&&N.push("{n,m} = Between n and m occurrences"),e.includes("[")&&N.push("[...] = Character class (any of these characters)"),e.includes("(")&&N.push("(...) = Capturing group"),e.includes("|")&&N.push("| = OR operator"),e.includes(".")&&N.push(". = Any character"),N.length>0?N:null};return a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 py-8",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("div",{className:"flex items-center justify-center mb-4",children:a.jsx(Ku,{className:"h-12 w-12 text-sf-blue"})}),a.jsx("h1",{className:"text-4xl font-bold text-gray-900 dark:text-white mb-4",children:"Salesforce Regex Builder"}),a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:"Build, test, and validate regular expressions for phone numbers, emails, and custom patterns"})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"Regex Pattern"}),a.jsx(Xt,{children:"Enter your regular expression pattern"})]}),a.jsxs(ne,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(ls,{htmlFor:"pattern",children:"Pattern"}),a.jsx(Ke,{id:"pattern",value:e,onChange:N=>t(N.target.value),placeholder:"Enter regex pattern (e.g., ^\\d{3}-\\d{2}-\\d{4}$)",className:"font-mono","data-testid":"input-pattern"}),!f&&e&&a.jsxs("div",{className:"flex items-center gap-2 mt-2 text-red-500 text-sm",children:[a.jsx(Si,{className:"h-4 w-4"}),a.jsx("span",{children:"Invalid regex pattern"})]})]}),a.jsxs("div",{children:[a.jsx(ls,{children:"Flags"}),a.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-6 gap-3 mt-2",children:Object.entries(o).map(([N,k])=>a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(VU,{id:`flag-${N}`,checked:k,onCheckedChange:C=>l(T=>({...T,[N]:C})),"data-testid":`checkbox-flag-${N}`}),a.jsx("label",{htmlFor:`flag-${N}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:N})]},N))}),a.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"g=global, i=case-insensitive, m=multiline, s=dotAll, u=unicode, y=sticky"})]}),a.jsxs("div",{children:[a.jsx(ls,{children:"Full Regular Expression"}),a.jsxs("div",{className:"flex gap-2 mt-1",children:[a.jsx(Ke,{value:`/${e}/${h}`,readOnly:!0,className:"font-mono bg-gray-50 dark:bg-gray-800","data-testid":"display-full-regex"}),a.jsx(H,{onClick:()=>y(`/${e}/${h}`,"Pattern"),variant:"outline",size:"icon","data-testid":"button-copy-pattern",children:c?a.jsx(Va,{className:"h-4 w-4"}):a.jsx(Ws,{className:"h-4 w-4"})})]})]})]})]}),a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"Test String"}),a.jsx(Xt,{children:"Enter text to test against your pattern"})]}),a.jsxs(ne,{className:"space-y-4",children:[a.jsx("div",{children:a.jsx(fs,{value:n,onChange:N=>r(N.target.value),placeholder:"Enter text to test...",className:"min-h-[120px] font-mono text-sm","data-testid":"textarea-test"})}),f&&n&&a.jsxs("div",{children:[a.jsxs(ls,{children:["Matches (",p.length,")"]}),p.length>0?a.jsxs("div",{className:"space-y-2 mt-2",children:[a.jsx(fs,{value:m,readOnly:!0,className:"min-h-[120px] font-mono text-sm bg-gray-50 dark:bg-gray-800","data-testid":"textarea-highlighted"}),a.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[a.jsx("p",{className:"font-medium mb-2",children:"Match Details:"}),a.jsx("div",{className:"space-y-1 max-h-[200px] overflow-y-auto",children:p.map((N,k)=>a.jsxs("div",{className:"bg-gray-100 dark:bg-gray-800 p-2 rounded",children:[a.jsxs("p",{className:"font-mono",children:["Match ",k+1,': "',N.text,'" (index: ',N.index,")"]}),N.groups.length>0&&a.jsxs("p",{className:"text-xs mt-1",children:["Groups: ",N.groups.map((C,T)=>`$${T+1}="${C}
747"`).join(", ")]})]},k))})]})]}):a.jsx("p",{className:"text-sm text-gray-500 mt-2",children:"No matches found"})]})]})]}),a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"Replace"}),a.jsx(Xt,{children:"Test string replacement with your pattern"})]}),a.jsxs(ne,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(ls,{htmlFor:"replace",children:"Replacement String"}),a.jsx(Ke,{id:"replace",value:s,onChange:N=>i(N.target.value),placeholder:"Enter replacement (e.g., $1-REDACTED or 'new text')",className:"font-mono","data-testid":"input-replace"}),a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Use $1, $2, etc. to reference capturing groups"})]}),g!==null&&a.jsxs("div",{children:[a.jsx(ls,{children:"Result"}),a.jsx(fs,{value:g,readOnly:!0,className:"min-h-[100px] font-mono text-sm bg-gray-50 dark:bg-gray-800","data-testid":"textarea-replaced"})]})]})]})]}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"Common Patterns"}),a.jsx(Xt,{children:"Load pre-built regex patterns"})]}),a.jsxs(ne,{children:[a.jsxs(pr,{onValueChange:x,children:[a.jsx(er,{"data-testid":"select-preset",children:a.jsx(mr,{placeholder:"Select a pattern..."})}),a.jsx(tr,{children:_g.map(N=>a.jsx(qe,{value:N.name,children:N.name},N.name))})]}),e&&a.jsx("div",{className:"mt-4 space-y-2",children:_g.find(N=>N.pattern===e)&&a.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400 bg-blue-50 dark:bg-blue-900/20 p-3 rounded",children:a.jsx("p",{className:"font-medium text-blue-700 dark:text-blue-300",children:(w=_g.find(N=>N.pattern===e))==null?void 0:w.description})})})]})]}),e&&b()&&a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(K7,{className:"h-5 w-5 text-yellow-500"}),"Pattern Explanation"]})}),a.jsx(ne,{children:a.jsx("ul",{className:"space-y-1 text-sm",children:(E=b())==null?void 0:E.map((N,k)=>a.jsx("li",{className:"font-mono text-gray-700 dark:text-gray-300",children:N},k))})})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:"Quick Reference"})}),a.jsx(ne,{children:a.jsxs("div",{className:"text-sm space-y-2",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a.jsxs("div",{className:"font-mono text-xs",children:[a.jsx("p",{className:"font-bold mb-1",children:"Characters"}),a.jsx("p",{children:"\\d = digit"}),a.jsx("p",{children:"\\w = word char"}),a.jsx("p",{children:"\\s = whitespace"}),a.jsx("p",{children:". = any char"})]}),a.jsxs("div",{className:"font-mono text-xs",children:[a.jsx("p",{className:"font-bold mb-1",children:"Quantifiers"}),a.jsx("p",{children:"+ = one or more"}),a.jsx("p",{children:"* = zero or more"}),a.jsx("p",{children:"? = optional"}),a.jsxs("p",{children:["{n,m}"," = n to m"]})]})]}),a.jsxs("div",{className:"font-mono text-xs",children:[a.jsx("p",{className:"font-bold mb-1",children:"Anchors & Groups"}),a.jsx("p",{children:"^ = start, $ = end"}),a.jsx("p",{children:"(...) = capture group"}),a.jsx("p",{children:"[...] = character class"}),a.jsx("p",{children:"| = OR operator"})]})]})})]})]})]})]})})}var WU={},HU={},Sm={};Object.defineProperty(Sm,"__esModule",{value:!0});Sm.EnumType=void 0;var epe=function(){function e(t){this.value=t}return e}();Sm.EnumType=epe;var Em={};Object.defineProperty(Em,"__esModule",{value:!0});Em.VariableType=void 0;var tpe=function(){function e(t){this.value=t}return e.prototype.toJSON=function(){return"$".concat(this.value)},e}();Em.VariableType=tpe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.jsonToGraphQLQuery=e.configFields=void 0;var t=Sm,n=Em;e.configFields=["__args","__alias","__aliasFor","__variables","__directives","__on","__all_on","__typeName","__name"];function r(f){if(f instanceof t.EnumType)return f.value;if(f instanceof n.VariableType)return"$".concat(f.value);if(typeof f!="object"||f===null)return JSON.stringify(f);if(Array.isArray(f))return"[".concat(f.map(function(m){return r(m)}).join(", "),"]");var p=Object.keys(f).map(function(m){return"".concat(m,": ").concat(r(f[m]))}).join(", ");return"{".concat(p,"}")}function s(f){var p=[];for(var m in f)p.push("".concat(m,": ").concat(r(f[m])));return p.join(", ")}function i(f){var p=[];for(var m in f)p.push("$".concat(m,": ").concat(f[m]));return p.join(", ")}function o(f){var p=Object.keys(f)[0],m=f[p];if(typeof m=="boolean"||typeof m=="object"&&Object.keys(m).length===0)return p;if(typeof m=="object"){var g=[];for(var x in m){var y=r(m[x]).replace(/"/g,"");g.push("".concat(x,": ").concat(y))}return"".concat(p,"(").concat(g.join(", "),")")}else throw new Error("Unsupported type for directive: ".concat(typeof m,`. Types allowed: object, boolean.
748`)+"Offending object: ".concat(JSON.stringify(f)))}function l(f){return Array(f*4+1).join(" ")}function c(f,p){return e.configFields.indexOf(f)==-1&&p.indexOf(f)==-1}function u(f,p,m,g){Object.keys(f).filter(function(x){return c(x,g.ignoreFields)}
748).forEach(function(x){var y=f[x];if(typeof y=="object"){if(Array.isArray(y)&&(y=y.find(function(L){return L&&typeof L=="object"}),!y)){m.push(["".concat(x),p]);return}if(y&&Object.keys(y).filter(function(L){return y[L]!==!1||g.includeFalsyKeys}).length===0)return;var b=Object.keys(y).filter(function(L){return c(L,g.ignoreFields)}).length,w=b>0,E=typeof y.__args=="object"&&Object.keys(y.__args).length>0,N=typeof y.__directives=="object",k=y.__all_on instanceof Array,C=typeof y.__on=="object",T="".concat(x);if(typeof y.__name=="string"&&(T="".concat(T," ").concat(y.__name)),typeof y.__aliasFor=="string"&&(T="".concat(T,": ").concat(y.__aliasFor)),typeof y.__variables=="object"&&Object.keys(y.__variables).length>0)T="".concat(T," (").concat(i(y.__variables),")");else if(E||N){var j="",S="";N&&(S=Object.entries(y.__directives).map(function(L){var A;return"@".concat(o((A={},A[L[0]]=L[1],A)))}).join(" ")),E&&(j="(".concat(s(y.__args),")"));var R=N&&E?" ":"";T="".concat(T," ").concat(j).concat(R).concat(S)}if(m.push([T+(w||C||k?" {":""),p]),u(y,p+1,m,g),k&&y.__all_on.forEach(function(L){m.push(["...".concat(L),p+1])}),C){var _=y.__on instanceof Array?y.__on:[y.__on];_.forEach(function(L){var A=L.__typeName;m.push(["... on ".concat(A," {"),p+1]),u(L,p+2,m,g),m.push(["}",p+1])})}(w||C||k)&&m.push(["}",p])}else(g.includeFalsyKeys===!0||y)&&m.push(["".concat(x),p])})}function d(f,p){if(p===void 0&&(p={}),!f||typeof f!="object")throw new Error("query object not specified");if(Object.keys(f).length==0)throw new Error("query object has no data");p.ignoreFields instanceof Array||(p.ignoreFields=[]);var m=[];u(f,0,m,p),m=h(m);var g="";return m.forEach(function(x){var y=x[0],b=x[1];p.pretty?(g&&(g+=`
749`),g+=l(b)+y):(g&&(g+=" "),g+=y)}),g}e.jsonToGraphQLQuery=d;function h(f){for(var p={indent:-1,text:null,isEmpty:!0,contents:[]},m=[p],g=0,x=f;g<x.length;g++){var y=x[g],b=y[0],w=y[1];if(b=b.trim(),b.endsWith("{")){var E={indent:w,text:b,isEmpty:!0,contents:[]};m[m.length-1].contents.push(E),m.push(E)}else if(b==="}"){var N=m.pop();N.isEmpty?m[m.length-1].contents.pop():m[m.length-1].isEmpty=!1}else m[m.length-1].contents.push(b),m[m.length-1].isEmpty=!1}var k=[];function C(T){for(var j=0,S=T.contents;j<S.length;j++){var R=S[j];typeof R=="object"?(k.push([R.text,R.indent]),C(R),k.push(["}",R.indent])):k.push([R,T.indent+1])}}return C(p),k}})(HU);(function(e){var t=Dm&&Dm.__createBinding||(Object.create?function(i,o,l,c){c===void 0&&(c=l);var u=Object.getOwnPropertyDescriptor(o,l);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[l]}}),Object.defineProperty(i,c,u)}:function(i,o,l,c){c===void 0&&(c=l),i[c]=o[l]}),n=Dm&&Dm.__exportStar||function(i,o){for(var l in i)l!=="default"&&!Object.prototype.hasOwnProperty.call(o,l)&&t(o,i,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.VariableType=e.EnumType=void 0,n(HU,e);var r=Sm;Object.defineProperty(e,"EnumType",{enumerable:!0,get:function(){return r.EnumType}});var s=Em;Object.defineProperty(e,"VariableType",{enumerable:!0,get:function(){return s.VariableType}})})(WU);function _h(e){return e=Array.isArray(e)?e[0]:e,e.image&&!0}function npe(e,t){return t}function rpe(e){return typeof e=="string"}function spe(e){return!!e&&!!e.operator&&!!e.right}var ipe=typeof global=="object"&&global&&global.Object===Object&&global,GU=ipe,ope=typeof self=="object"&&self&&self.Object===Object&&self,ape=GU||ope||Function("return this")(),vo=ape,lpe=vo.Symbol,Js=lpe,KU=Object.prototype,cpe=KU.hasOwnProperty,upe=KU.toString,Ih=Js?Js.toStringTag:void 0;function dpe(e){var t=cpe.call(e,Ih),n=e[Ih];try{e[Ih]=void 0;var r=!0}catch{}var s=upe.call(e);return r&&(t?e[Ih]=n:delete e[Ih]),s}var hpe=dpe,fpe=Object.prototype,ppe=fpe.toString;function mpe(e){return ppe.call(e)}var gpe=mpe,ype="[object Null]",xpe="[object Undefined]",h2=Js?Js.toStringTag:void 0;function vpe(e){return e==null?e===void 0?xpe:ype:h2&&h2 in Object(e)?hpe(e):gpe(e)}var Bl=vpe;function bpe(e){return e!=null&&typeof e=="object"}var Ti=bpe,wpe="[object Symbol]";function Spe(e){return typeof e=="symbol"||Ti(e)&&Bl(e)==wpe}var yb=Spe;function Epe(e,t){for(var n=-1,r=e==null?0:e.length,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}var Nm=Epe,Npe=Array.isArray,mt=Npe,kpe=1/0,f2=Js?Js.prototype:void 0,p2=f2?f2.toString:void 0;function qU(e){if(typeof e=="string")return e;if(mt(e))return Nm(e,qU)+"";if(yb(e))return p2?p2.call(e):"";var t=e+"";return t=="0"&&1/e==-kpe?"-0":t}var Cpe=qU,Tpe=/\s/;function Ape(e){for(var t=e.length;t--&&Tpe.test(e.charAt(t)););return t}var jpe=Ape,Ope=/^\s+/;function Rpe(e){return e&&e.slice(0,jpe(e)+1).replace(Ope,"")}var _pe=Rpe;function Ipe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Xs=Ipe,m2=NaN,Mpe=/^[-+]0x[0-9a-f]+$/i,Lpe=/^0b[01]+$/i,Ppe=/^0o[0-7]+$/i,Dpe=parseInt;function $pe(e){if(typeof e=="number")return e;if(yb(e))return m2;if(Xs(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xs(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=_pe(e);var n=Lpe.test(e);return n||Ppe.test(e)?Dpe(e.slice(2),n?2:8):Mpe.test(e)?m2:+e}
vendor: 5,395 bytes, line 749
749var Fpe=$pe,g2=1/0,Bpe=17976931348623157e292;function Upe(e){if(!e)return e===0?e:0;if(e=Fpe(e),e===g2||e===-g2){var t=e<0?-1:1;return t*Bpe}return e===e?e:0}var zpe=Upe;function Vpe(e){var t=zpe(e),n=t%1;return t===t?n?t-n:t:0}var km=Vpe;function Wpe(e){return e}var Ud=Wpe,Hpe="[object AsyncFunction]",Gpe="[object Function]",Kpe="[object GeneratorFunction]",qpe="[object Proxy]";function Ype(e){if(!Xs(e))return!1;var t=Bl(e);return t==Gpe||t==Kpe||t==Hpe||t==qpe}var da=Ype,Qpe=vo["__core-js_shared__"],fw=Qpe,y2=function(){var e=/[^.]+$/.exec(fw&&fw.keys&&fw.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Jpe(e){return!!y2&&y2 in e}var Xpe=Jpe,Zpe=Function.prototype,eme=Zpe.toString;function tme(e){if(e!=null){try{return eme.call(e)}catch{}try{return e+""}catch{}}return""}var Zc=tme,nme=/[\\^$.*+?()[\]{}|]/g,rme=/^\[object .+?Constructor\]$/,sme=Function.prototype,ime=Object.prototype,ome=sme.toString,ame=ime.hasOwnProperty,lme=RegExp("^"+ome.call(ame).replace(nme,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cme(e){if(!Xs(e)||Xpe(e))return!1;var t=da(e)?lme:rme;return t.test(Zc(e))}var ume=cme;function dme(e,t){return e==null?void 0:e[t]}var hme=dme;function fme(e,t){var n=hme(e,t);return ume(n)?n:void 0}var eu=fme,pme=eu(vo,"WeakMap"),JE=pme,x2=Object.create,mme=function(){function e(){}return function(t){if(!Xs(t))return{};if(x2)return x2(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),gme=mme;function yme(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var xme=yme;function vme(){}var _n=vme;function bme(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var wme=bme,Sme=800,Eme=16,Nme=Date.now;function kme(e){var t=0,n=0;return function(){var r=Nme(),s=Eme-(r-n);if(n=r,s>0){if(++t>=Sme)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Cme=kme;function Tme(e){return function(){return e}}var Ame=Tme,jme=function(){try{var e=eu(Object,"defineProperty");return e({},"",{}),e}catch{}}(),u0=jme,Ome=u0?function(e,t){return u0(e,"toString",{configurable:!0,enumerable:!1,value:Ame(t),writable:!0})}:Ud,Rme=Ome,_me=Cme(Rme),Ime=_me;function Mme(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var YU=Mme;function Lme(e,t,n,r){for(var s=e.length,i=n+(r?1:-1);r?i--:++i<s;)if(t(e[i],i,e))return i;return-1}var QU=Lme;function Pme(e){return e!==e}var Dme=Pme;function $me(e,t,n){for(var r=n-1,s=e.length;++r<s;)if(e[r]===t)return r;return-1}var Fme=$me;function Bme(e,t,n){return t===t?Fme(e,t,n):QU(e,Dme,n)}var VT=Bme;function Ume(e,t){var n=e==null?0:e.length;return!!n&&VT(e,t,0)>-1}var JU=Ume,zme=9007199254740991,Vme=/^(?:0|[1-9]\d*)$/;function Wme(e,t){var n=typeof e;return t=t??zme,!!t&&(n=="number"||n!="symbol"&&Vme.test(e))&&e>-1&&e%1==0&&e<t}var xb=Wme;function Hme(e,t,n){t=="__proto__"&&u0?u0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var WT=Hme;function Gme(e,t){return e===t||e!==e&&t!==t}var Cm=Gme,Kme=Object.prototype,qme=Kme.hasOwnProperty;function Yme(e,t,n){var r=e[t];(!(qme.call(e,t)&&Cm(r,n))||n===void 0&&!(t in e))&&WT(e,t,n)}var vb=Yme;function Qme(e,t,n,r){var s=!n;n||(n={});for(var i=-1,o=t.length;++i<o;){var l=t[i],c=r?r(n[l],e[l],l,n,e):void 0;c===void 0&&(c=e[l]),s?WT(n,l,c):vb(n,l,c)}return n}var Tm=Qme,v2=Math.max;function Jme(e,t,n){return t=v2(t===void 0?e.length-1:t,0),function(){for(var r=arguments,s=-1,i=v2(r.length-t,0),o=Array(i);++s<i;)o[s]=r[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=r[s];return l[t]=n(o),xme(e,this,l)}}var Xme=Jme;function Zme(e,t){return Ime(Xme(e,t,Ud),e+"")}var HT=Zme,ege=9007199254740991;function tge(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ege}var GT=tge;function nge(e){return e!=null&&GT(e.length)&&!da(e)}var bo=nge;function rge(e,t,n){if(!Xs(n))return!1;var r=typeof t;return(r=="number"?bo(n)&&xb(t,n.length):r=="string"&&t in n)?Cm(n[t],e):!1}var bb=rge;function sge(e){return HT(function(t,n){var r=-1,s=n.length,i=s>1?n[s-1]:void 0,o=s>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(s--,i):void 0,o&&bb(n[0],n[1],o)&&(i=s<3?void 0:i,s=1),t=Object(t);++r<s;){var l=n[r];l&&e(t,l,r,i)}return t})}var ige=sge,oge=Object.prototype;function age(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||oge;return e===n}var Am=age;function lge(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var cge=lge,uge="[object Arguments]";function dge(e){return Ti(e)&&Bl(e)==uge}var b2=dge,XU=Object.prototype,hge=XU.hasOwnProperty,fge=XU.propertyIsEnumerable,pge=b2(function(){return arguments}())?b2:function(e){return Ti(e)&&hge.call(e,"callee")&&!fge.call(e,"callee")},wb=pge;function mge(){return!1}var gge=mge,ZU=typeof ps=="object"&&ps&&!ps.nodeType&&ps,w2=ZU&&typeof ms=="object"&&ms&&!ms.nodeType&&ms,yge=w2&&w2.exports===ZU,S2=yge?vo.Buffer:void 0,xge=S2?S2.isBuffer:void 0,vge=xge||gge,Up=vge,bge="[object Arguments]",wge="[object Array]",Sge="[object Boolean]",Ege="[object Date]",Nge="[object Error]",kge="[object Function]",Cge="[object Map]",Tge="[object Number]",Age="[object Object]",jge="[object RegExp]",Oge="[object Set]",Rge="[object String]",_ge="[object WeakMap]",Ige="[object ArrayBuffer]",Mge="[object DataView]",Lge="[object Float32Array]",Pge="[object Float64Array
749]",Dge="[object Int8Array]",$ge="[object Int16Array]",Fge="[object Int32Array]",Bge="[object Uint8Array]",Uge="[object Uint8ClampedArray]",zge="[object Uint16Array]",Vge="[object Uint32Array]",Ut={};Ut[Lge]=Ut[Pge]=Ut[Dge]=Ut[$ge]=Ut[Fge]=Ut[Bge]=Ut[Uge]=Ut[zge]=Ut[Vge]=!0;Ut[bge]=Ut[wge]=Ut[Ige]=Ut[Sge]=Ut[Mge]=Ut[Ege]=Ut[Nge]=Ut[kge]=Ut[Cge]=Ut[Tge]=Ut[Age]=Ut[jge]=Ut[Oge]=Ut[Rge]=Ut[_ge]=!1;function Wge(e){return Ti(e)&&GT(e.length)&&!!Ut[Bl(e)]}var Hge=Wge;function Gge(e){return function(t){return e(t)}}var jm=Gge,e6=typeof ps=="object"&&ps&&!ps.nodeType&&ps,Pf=e6&&typeof ms=="object"&&ms&&!ms.nodeType&&ms,Kge=Pf&&Pf.exports===e6,pw=Kge&&GU.process,qge=function(){try{var e=Pf&&Pf.require&&Pf.require("util").types;return e||pw&&pw.binding&&pw.binding("util")}catch{}}(),Rl=qge,E2=Rl&&Rl.isTypedArray,Yge=E2?jm(E2):Hge,KT=Yge,Qge=Object.prototype,Jge=Qge.hasOwnProperty;function Xge(e,t){var n=mt(e),r=!n&&wb(e),s=!n&&!r&&Up(e),i=!n&&!r&&!s&&KT(e),o=n||r||s||i,l=o?cge(e.length,String):[],c=l.length;for(var u in e)(t||Jge.call(e,u))&&!(o&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||xb(u,c)))&&l.push(u);return l}var t6=Xge;function Zge(e,t){return function(n){return e(t(n))}}var n6=Zge,eye=n6(Object.keys,Object),tye=eye,nye=Object.prototype,rye=nye.hasOwnProperty;function sye(e){if(!Am(e))return tye(e);var t=[];for(var n in Object(e))rye.call(e,n)&&n!="constructor"&&t.push(n);return t}var r6=sye;function iye(e){return bo(e)?t6(e):r6(e)}var Ss=iye,oye=Object.prototype,aye=oye.hasOwnProperty,lye=ige(function(e,t){if(Am(t)||bo(t)){Tm(t,Ss(t),e);return}for(var n in t)aye.call(t,n)&&vb(e,n,t[n])}),Es=lye;function cye(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var uye=cye,dye=Object.prototype,hye=dye.hasOwnProperty;function fye(e){if(!Xs(e))return uye(e);var t=Am(e),n=[];for(var r in e)r=="constructor"&&(t||!hye.call(e,r))||n.push(r);return n}var pye=fye;function mye(e){return bo(e)?t6(e,!0):pye(e)}var Sb=mye,gye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yye=/^\w*$/;function xye(e,t){if(mt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||yb(e)?!0:yye.test(e)||!gye.test(e)||t!=null&&e in Object(t)}var qT=xye,vye=eu(Object,"create"),zp=vye;function bye(){this.__data__=zp?zp(null):{},this.size=0}var wye=bye;function Sye(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Eye=Sye,Nye="__lodash_hash_undefined__",kye=Object.prototype,Cye=kye.hasOwnProperty;function Tye(e){var t=this.__data__;if(zp){var n=t[e];return n===Nye?void 0:n}return Cye.call(t,e)?t[e]:void 0}var Aye=Tye,jye=Object.prototype,Oye=jye.hasOwnProperty;function Rye(e){var t=this.__data__;return zp?t[e]!==void 0:Oye.call(t,e)}var _ye=Rye,Iye="__lodash_hash_undefined__";function Mye(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=zp&&t===void 0?Iye:t,this}var Lye=Mye;function ah(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ah.prototype.clear=wye;ah.prototype.delete=Eye;ah.prototype.get=Aye;ah.prototype.has=_ye;ah.prototype.set=Lye;var N2=ah;function Pye(){this.__data__=[],this.size=0}var Dye=Pye;function $ye(e,t){for(var n=e.length;n--;)if(Cm(e[n][0],t))return n;return-1}var Eb=$ye,Fye=Array.prototype,Bye=Fye.splice;function Uye(e){var t=this.__data__,n=Eb(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Bye.call(t,n,1),--this.size,!0}var zye=Uye;function Vye(e){var t=this.__data__,n=Eb(t,e);return n<0?void 0:t[n][1]}var Wye=Vye;function Hye(e){return Eb(this.__data__,e)>-1}var Gye=Hye;function Kye(e,t){var n=this.__data__,r=Eb(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var qye=Kye;function lh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lh.prototype.clear=Dye;lh.prototype.delete=zye;lh.prototype.get=Wye;lh.prototype.has=Gye;lh.prototype.set=qye;var Nb=lh,Yye=eu(vo,"Map"),Vp=Yye;function Qye(){this.size=0,this.__data__={hash:new N2,map:new(Vp||Nb),string:new N2}}var Jye=Qye;function Xye(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Zye=Xye;function exe(e,t){var n=e.__data__;return Zye(t)?n[typeof t=="string"?"string":"hash"]:n.map}var kb=exe;function txe(e){var t=kb(this,e).delete(e);return this.size-=t?1:0,t}var nxe=txe;function rxe(e){return kb(this,e).get(e)}var sxe=rxe;function ixe(e){return kb(this,e).has(e)}var oxe=ixe;function axe(e,t){var n=kb(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var lxe=axe;function ch(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ch.prototype.clear=Jye;ch.prototype.delete=nxe;ch.prototype.get=sxe;ch.prototype.has=oxe;ch.prototype.set=lxe;var Cb=ch,cxe="Expected a function";function YT(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(cxe);var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],i=n.cache;if(i.has(s))return i.get(s);var o=e.apply(this,r);return n.cache=i.set(s,o)||i,o};return n.cache=new(YT.Cache||Cb),n}YT.Cache=Cb;var uxe=YT,dxe=500;function hxe(e){var t=uxe(e,function(r){return n.size===dxe&&n.clear(),r}),n=t.cache;return t}var fxe=hxe,pxe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mxe=/\\(\\)?/g,gxe=fxe(function(e){var t=[];
749return e.charCodeAt(0)===46&&t.push(""),e.replace(pxe,function(n,r,s,i){t.push(s?i.replace(mxe,"$1"):r||n)}),t}),yxe=gxe;function xxe(e){return e==null?"":Cpe(e)}var vxe=xxe;function bxe(e,t){return mt(e)?e:qT(e,t)?[e]:yxe(vxe(e))}var Tb=bxe,wxe=1/0;function Sxe(e){if(typeof e=="string"||yb(e))return e;var t=e+"";return t=="0"&&1/e==-wxe?"-0":t}var Om=Sxe;function Exe(e,t){t=Tb(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Om(t[n++])];return n&&n==r?e:void 0}var QT=Exe;function Nxe(e,t,n){var r=e==null?void 0:QT(e,t);return r===void 0?n:r}var kxe=Nxe;function Cxe(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}var JT=Cxe,k2=Js?Js.isConcatSpreadable:void 0;function Txe(e){return mt(e)||wb(e)||!!(k2&&e&&e[k2])}var Axe=Txe;function s6(e,t,n,r,s){var i=-1,o=e.length;for(n||(n=Axe),s||(s=[]);++i<o;){var l=e[i];t>0&&n(l)?t>1?s6(l,t-1,n,r,s):JT(s,l):r||(s[s.length]=l)}return s}var XT=s6;function jxe(e){var t=e==null?0:e.length;return t?XT(e,1):[]}var vi=jxe,Oxe=n6(Object.getPrototypeOf,Object),i6=Oxe;function Rxe(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(s);++r<s;)i[r]=e[r+t];return i}var o6=Rxe;function _xe(e,t,n,r){var s=-1,i=e==null?0:e.length;for(r&&i&&(n=e[++s]);++s<i;)n=t(n,e[s],s,e);return n}var Ixe=_xe;function Mxe(){this.__data__=new Nb,this.size=0}var Lxe=Mxe;function Pxe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Dxe=Pxe;function $xe(e){return this.__data__.get(e)}var Fxe=$xe;function Bxe(e){return this.__data__.has(e)}var Uxe=Bxe,zxe=200;function Vxe(e,t){var n=this.__data__;if(n instanceof Nb){var r=n.__data__;if(!Vp||r.length<zxe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Cb(r)}return n.set(e,t),this.size=n.size,this}var Wxe=Vxe;function uh(e){var t=this.__data__=new Nb(e);this.size=t.size}uh.prototype.clear=Lxe;uh.prototype.delete=Dxe;uh.prototype.get=Fxe;uh.prototype.has=Uxe;uh.prototype.set=Wxe;var Df=uh;function Hxe(e,t){return e&&Tm(t,Ss(t),e)}var Gxe=Hxe;function Kxe(e,t){return e&&Tm(t,Sb(t),e)}var qxe=Kxe,a6=typeof ps=="object"&&ps&&!ps.nodeType&&ps,C2=a6&&typeof ms=="object"&&ms&&!ms.nodeType&&ms,Yxe=C2&&C2.exports===a6,T2=Yxe?vo.Buffer:void 0,A2=T2?T2.allocUnsafe:void 0;function Qxe(e,t){if(t)return e.slice();var n=e.length,r=A2?A2(n):new e.constructor(n);return e.copy(r),r}var Jxe=Qxe;function Xxe(e,t){for(var n=-1,r=e==null?0:e.length,s=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[s++]=o)}return i}var ZT=Xxe;function Zxe(){return[]}var l6=Zxe,e0e=Object.prototype,t0e=e0e.propertyIsEnumerable,j2=Object.getOwnPropertySymbols,n0e=j2?function(e){return e==null?[]:(e=Object(e),ZT(j2(e),function(t){return t0e.call(e,t)}))}:l6,eA=n0e;function r0e(e,t){return Tm(e,eA(e),t)}var s0e=r0e,i0e=Object.getOwnPropertySymbols,o0e=i0e?function(e){for(var t=[];e;)JT(t,eA(e)),e=i6(e);return t}:l6,c6=o0e;function a0e(e,t){return Tm(e,c6(e),t)}var l0e=a0e;function c0e(e,t,n){var r=t(e);return mt(e)?r:JT(r,n(e))}var u6=c0e;function u0e(e){return u6(e,Ss,eA)}var XE=u0e;function d0e(e){return u6(e,Sb,c6)}var d6=d0e,h0e=eu(vo,"DataView"),ZE=h0e,f0e=eu(vo,"Promise"),eN=f0e,p0e=eu(vo,"Set"),sd=p0e,O2="[object Map]",m0e="[object Object]",R2="[object Promise]",_2="[object Set]",I2="[object WeakMap]",M2="[object DataView]",g0e=Zc(ZE),y0e=Zc(Vp),x0e=Zc(eN),v0e=Zc(sd),b0e=Zc(JE),Wl=Bl;(ZE&&Wl(new ZE(new ArrayBuffer(1)))!=M2||Vp&&Wl(new Vp)!=O2||eN&&Wl(eN.resolve())!=R2||sd&&Wl(new sd)!=_2||JE&&Wl(new JE)!=I2)&&(Wl=function(e){var t=Bl(e),n=t==m0e?e.constructor:void 0,r=n?Zc(n):"";if(r)switch(r){case g0e:return M2;case y0e:return O2;case x0e:return R2;case v0e:return _2;case b0e:return I2}return t});var zd=Wl,w0e=Object.prototype,S0e=w0e.hasOwnProperty;function E0e(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&S0e.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var N0e=E0e,k0e=vo.Uint8Array,d0=k0e;function C0e(e){var t=new e.constructor(e.byteLength);return new d0(t).set(new d0(e)),t}var tA=C0e;function T0e(e,t){var n=t?tA(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var A0e=T0e,j0e=/\w*$/;function O0e(e){var t=new e.constructor(e.source,j0e.exec(e));return t.lastIndex=e.lastIndex,t}
vendor: 6,067 bytes, line 749
749var R0e=O0e,L2=Js?Js.prototype:void 0,P2=L2?L2.valueOf:void 0;function _0e(e){return P2?Object(P2.call(e)):{}}var I0e=_0e;function M0e(e,t){var n=t?tA(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var L0e=M0e,P0e="[object Boolean]",D0e="[object Date]",$0e="[object Map]",F0e="[object Number]",B0e="[object RegExp]",U0e="[object Set]",z0e="[object String]",V0e="[object Symbol]",W0e="[object ArrayBuffer]",H0e="[object DataView]",G0e="[object Float32Array]",K0e="[object Float64Array]",q0e="[object Int8Array]",Y0e="[object Int16Array]",Q0e="[object Int32Array]",J0e="[object Uint8Array]",X0e="[object Uint8ClampedArray]",Z0e="[object Uint16Array]",eve="[object Uint32Array]";function tve(e,t,n){var r=e.constructor;switch(t){case W0e:return tA(e);case P0e:case D0e:return new r(+e);case H0e:return A0e(e,n);case G0e:case K0e:case q0e:case Y0e:case Q0e:case J0e:case X0e:case Z0e:case eve:return L0e(e,n);case $0e:return new r;case F0e:case z0e:return new r(e);case B0e:return R0e(e);case U0e:return new r;case V0e:return I0e(e)}}var nve=tve;function rve(e){return typeof e.constructor=="function"&&!Am(e)?gme(i6(e)):{}}var sve=rve,ive="[object Map]";function ove(e){return Ti(e)&&zd(e)==ive}var ave=ove,D2=Rl&&Rl.isMap,lve=D2?jm(D2):ave,cve=lve,uve="[object Set]";function dve(e){return Ti(e)&&zd(e)==uve}var hve=dve,$2=Rl&&Rl.isSet,fve=$2?jm($2):hve,pve=fve,mve=1,gve=2,yve=4,h6="[object Arguments]",xve="[object Array]",vve="[object Boolean]",bve="[object Date]",wve="[object Error]",f6="[object Function]",Sve="[object GeneratorFunction]",Eve="[object Map]",Nve="[object Number]",p6="[object Object]",kve="[object RegExp]",Cve="[object Set]",Tve="[object String]",Ave="[object Symbol]",jve="[object WeakMap]",Ove="[object ArrayBuffer]",Rve="[object DataView]",_ve="[object Float32Array]",Ive="[object Float64Array]",Mve="[object Int8Array]",Lve="[object Int16Array]",Pve="[object Int32Array]",Dve="[object Uint8Array]",$ve="[object Uint8ClampedArray]",Fve="[object Uint16Array]",Bve="[object Uint32Array]",It={};It[h6]=It[xve]=It[Ove]=It[Rve]=It[vve]=It[bve]=It[_ve]=It[Ive]=It[Mve]=It[Lve]=It[Pve]=It[Eve]=It[Nve]=It[p6]=It[kve]=It[Cve]=It[Tve]=It[Ave]=It[Dve]=It[$ve]=It[Fve]=It[Bve]=!0;It[wve]=It[f6]=It[jve]=!1;function xy(e,t,n,r,s,i){var o,l=t&mve,c=t&gve,u=t&yve;if(n&&(o=s?n(e,r,s,i):n(e)),o!==void 0)return o;if(!Xs(e))return e;var d=mt(e);if(d){if(o=N0e(e),!l)return wme(e,o)}else{var h=zd(e),f=h==f6||h==Sve;if(Up(e))return Jxe(e,l);if(h==p6||h==h6||f&&!s){if(o=c||f?{}:sve(e),!l)return c?l0e(e,qxe(o,e)):s0e(e,Gxe(o,e))}else{if(!It[h])return s?e:{};o=nve(e,h,l)}}i||(i=new Df);var p=i.get(e);if(p)return p;i.set(e,o),pve(e)?e.forEach(function(x){o.add(xy(x,t,n,x,e,i))}):cve(e)&&e.forEach(function(x,y){o.set(y,xy(x,t,n,y,e,i))});var m=u?c?d6:XE:c?Sb:Ss,g=d?void 0:m(e);return YU(g||e,function(x,y){g&&(y=x,x=e[y]),vb(o,y,xy(x,t,n,y,e,i))}),o}var Uve=xy,zve=4;function Vve(e){return Uve(e,zve)}var ar=Vve;function Wve(e){for(var t=-1,n=e==null?0:e.length,r=0,s=[];++t<n;){var i=e[t];i&&(s[r++]=i)}return s}var Rm=Wve,Hve="__lodash_hash_undefined__";function Gve(e){return this.__data__.set(e,Hve),this}var Kve=Gve;function qve(e){return this.__data__.has(e)}var Yve=qve;function h0(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Cb;++t<n;)this.add(e[t])}h0.prototype.add=h0.prototype.push=Kve;h0.prototype.has=Yve;var nA=h0;function Qve(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var m6=Qve;function Jve(e,t){return e.has(t)}var rA=Jve,Xve=1,Zve=2;function ebe(e,t,n,r,s,i){var o=n&Xve,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var h=-1,f=!0,p=n&Zve?new nA:void 0;for(i.set(e,t),i.set(t,e);++h<l;){var m=e[h],g=t[h];if(r)var x=o?r(g,m,h,t,e,i):r(m,g,h,e,t,i);if(x!==void 0){if(x)continue;f=!1;break}if(p){if(!m6(t,function(y,b){if(!rA(p,b)&&(m===y||s(m,y,n,r,i)))return p.push(b)})){f=!1;break}}else if(!(m===g||s(m,g,n,r,i))){f=!1;break}}return i.delete(e),i.delete(t),f}var g6=ebe;function tbe(e){var t=-1,n=Array(e.size);return e.forEach(function(r,s){n[++t]=[s,r]}),n}var nbe=tbe;function rbe(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var sA=rbe,sbe=1,ibe=2,obe="[object Boolean]",abe="[object Date]",lbe="[object Error]",cbe="[object Map]",ube="[object Number]",dbe="[object RegExp]",hbe="[object Set]",fbe="[object String]",pbe="[object Symbol]",mbe="[object ArrayBuffer]",gbe="[object DataView]",F2=Js?Js.prototype:void 0,mw=F2?F2.valueOf:void 0;function ybe(e,t,n,r,s,i,o){switch(n){case gbe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case mbe:return!(e.byteLength!=t.byteLength||!i(new d0(e),new d0(t)));case obe:case abe:case ube:return Cm(+e,+t);case lbe:return e.name==t.name&&e.message==t.message;case dbe:case fbe:return e==t+"";case cbe:var l=nbe;case hbe:var c=r&sbe;if(l||(l=sA),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;r|=ibe,o.set(e,t);var d=g6(l(e),l(t),r,s,i,o);return o.delete(e),d;case pbe:if(mw)return mw.call(e)==mw.call(t)}return!1}var xbe=ybe,vbe=1,bbe=Object.prototype,wbe=bbe.hasOwnProperty;function Sbe(e,t,n,r,s,i){var o=n&vbe,l=XE(e),c=l.length,u=XE(t),d=u.length;if(c!=d&&!o)return!1;for(var h=c;h--;){var f=l[h];if(!(o?f in t:wbe.call(t,f)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var x=o;++h<c;){f=l[h];var y=e[f],b=t[f];if(r)var w=o?r(b,y,f,t,e,i):r(y,b,f,e,t,i);if(!(w===void 0?y===b||s(y,b,n,r,i):w)){g=!1;break}x||(x=f=="constructor")}if(g&&!x){var E=e.constructor,N=t.constructor;E!=N&&"constructor"in e&&"constructor"in t&&!(typeof E=="function"&&E instanceof E&&typeof N=="function"&&N instanceof N)&&(g=!1)}return i.delete(e),i.delete(t),g}var Ebe=Sbe,Nbe=1,B2="[object Arguments]",U2="[object Array]",Ig="[object Object]",kbe=Object.prototype,z2=kbe.hasOwnProperty;function Cbe(e,t,n,r,s,i){var o=mt(e),l=mt(t),c=o?U2:zd(e),u=l?U2:zd(t);c=c==B2?Ig:c,u=u==B2?Ig:u;var d=c==Ig,h=u==Ig,f=c==u;if(f&&Up(e)){if(!Up(t))return!1;o=!0,d=!1}
749if(f&&!d)return i||(i=new Df),o||KT(e)?g6(e,t,n,r,s,i):xbe(e,t,c,n,r,s,i);if(!(n&Nbe)){var p=d&&z2.call(e,"__wrapped__"),m=h&&z2.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,x=m?t.value():t;return i||(i=new Df),s(g,x,n,r,i)}}return f?(i||(i=new Df),Ebe(e,t,n,r,s,i)):!1}var Tbe=Cbe;function y6(e,t,n,r,s){return e===t?!0:e==null||t==null||!Ti(e)&&!Ti(t)?e!==e&&t!==t:Tbe(e,t,n,r,y6,s)}var x6=y6,Abe=1,jbe=2;function Obe(e,t,n,r){var s=n.length,i=s,o=!r;if(e==null)return!i;for(e=Object(e);s--;){var l=n[s];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<i;){l=n[s];var c=l[0],u=e[c],d=l[1];if(o&&l[2]){if(u===void 0&&!(c in e))return!1}else{var h=new Df;if(r)var f=r(u,d,c,e,t,h);if(!(f===void 0?x6(d,u,Abe|jbe,r,h):f))return!1}}return!0}var Rbe=Obe;function _be(e){return e===e&&!Xs(e)}var v6=_be;function Ibe(e){for(var t=Ss(e),n=t.length;n--;){var r=t[n],s=e[r];t[n]=[r,s,v6(s)]}return t}var Mbe=Ibe;function Lbe(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var b6=Lbe;function Pbe(e){var t=Mbe(e);return t.length==1&&t[0][2]?b6(t[0][0],t[0][1]):function(n){return n===e||Rbe(n,e,t)}}var Dbe=Pbe;function $be(e,t){return e!=null&&t in Object(e)}var Fbe=$be;function Bbe(e,t,n){t=Tb(t,e);for(var r=-1,s=t.length,i=!1;++r<s;){var o=Om(t[r]);if(!(i=e!=null&&n(e,o)))break;e=e[o]}return i||++r!=s?i:(s=e==null?0:e.length,!!s&&GT(s)&&xb(o,s)&&(mt(e)||wb(e)))}var w6=Bbe;function Ube(e,t){return e!=null&&w6(e,t,Fbe)}var zbe=Ube,Vbe=1,Wbe=2;function Hbe(e,t){return qT(e)&&v6(t)?b6(Om(e),t):function(n){var r=kxe(n,e);return r===void 0&&r===t?zbe(n,e):x6(t,r,Vbe|Wbe)}}var Gbe=Hbe;function Kbe(e){return function(t){return t==null?void 0:t[e]}}var qbe=Kbe;function Ybe(e){return function(t){return QT(t,e)}}var Qbe=Ybe;function Jbe(e){return qT(e)?qbe(Om(e)):Qbe(e)}var Xbe=Jbe;function Zbe(e){return typeof e=="function"?e:e==null?Ud:typeof e=="object"?mt(e)?Gbe(e[0],e[1]):Dbe(e):Xbe(e)}var wo=Zbe;function e1e(e,t,n,r){for(var s=-1,i=e==null?0:e.length;++s<i;){var o=e[s];t(r,o,n(o),e)}return r}var t1e=e1e;function n1e(e){return function(t,n,r){for(var s=-1,i=Object(t),o=r(t),l=o.length;l--;){var c=o[e?l:++s];if(n(i[c],c,i)===!1)break}return t}}var r1e=n1e,s1e=r1e(),i1e=s1e;function o1e(e,t){return e&&i1e(e,t,Ss)}var a1e=o1e;function l1e(e,t){return function(n,r){if(n==null)return n;if(!bo(n))return e(n,r);for(var s=n.length,i=t?s:-1,o=Object(n);(t?i--:++i<s)&&r(o[i],i,o)!==!1;);return n}}var c1e=l1e,u1e=c1e(a1e),tu=u1e;function d1e(e,t,n,r){return tu(e,function(s,i,o){t(r,s,n(s),o)}),r}var h1e=d1e;function f1e(e,t){return function(n,r){var s=mt(n)?t1e:h1e,i=t?t():{};return s(n,e,wo(r),i)}}var p1e=f1e,S6=Object.prototype,m1e=S6.hasOwnProperty,g1e=HT(function(e,t){e=Object(e);var n=-1,r=t.length,s=r>2?t[2]:void 0;for(s&&bb(t[0],t[1],s)&&(r=1);++n<r;)for(var i=t[n],o=Sb(i),l=-1,c=o.length;++l<c;){var u=o[l],d=e[u];(d===void 0||Cm(d,S6[u])&&!m1e.call(e,u))&&(e[u]=i[u])}return e}),iA=g1e;function y1e(e){return Ti(e)&&bo(e)}var V2=y1e;function x1e(e,t,n){for(var r=-1,s=e==null?0:e.length;++r<s;)if(n(t,e[r]))return!0;return!1}var E6=x1e,v1e=200;function b1e(e,t,n,r){var s=-1,i=JU,o=!0,l=e.length,c=[],u=t.length;if(!l)return c;n&&(t=Nm(t,jm(n))),r?(i=E6,o=!1):t.length>=v1e&&(i=rA,o=!1,t=new nA(t));e:for(;++s<l;){var d=e[s],h=n==null?d:n(d);if(d=r||d!==0?d:0,o&&h===h){for(var f=u;f--;)if(t[f]===h)continue e;c.push(d)}else i(t,h,r)||c.push(d)}return c}var w1e=b1e,S1e=HT(function(e,t){return V2(e)?w1e(e,XT(t,1,V2,!0)):[]}),Ab=S1e;function E1e(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Vd=E1e;function N1e(e,t,n){var r=e==null?0:e.length;return r?(t=n||t===void 0?1:km(t),o6(e,t<0?0:t,r)):[]}var Jn=N1e;function k1e(e,t,n){var r=e==null?0:e.length;return r?(t=n||t===void 0?1:km(t),t=r-t,o6(e,0,t<0?0:t)):[]}var Wp=k1e;function C1e(e){return typeof e=="function"?e:Ud}var T1e=C1e;function A1e(e,t){var n=mt(e)?YU:tu;return n(e,T1e(t))}var De=A1e;function j1e(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var O1e=j1e;function R1e(e,t){var n=!0;return tu(e,function(r,s,i){return n=!!t(r,s,i),n}),n}var _1e=R1e;function I1e(e,t,n){var r=mt(e)?O1e:_1e;return n&&bb(e,t,n)&&(t=void 0),r(e,wo(t))}var bi=I1e;function M1e(e,t){var n=[];return tu(e,function(r,s,i){t(r,s,i)&&n.push(r)}),n}var N6=M1e;function L1e(e,t){var n=mt(e)?ZT:N6;
749return n(e,wo(t))}var ni=L1e;function P1e(e){return function(t,n,r){var s=Object(t);if(!bo(t)){var i=wo(n);t=Ss(t),n=function(l){return i(s[l],l,s)}}var o=e(t,n,r);return o>-1?s[i?t[o]:o]:void 0}}var D1e=P1e,$1e=Math.max;function F1e(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var s=n==null?0:km(n);return s<0&&(s=$1e(r+s,0)),QU(e,wo(t),s)}var B1e=F1e,U1e=D1e(B1e),Wd=U1e;function z1e(e){return e&&e.length?e[0]:void 0}var Ai=z1e;function V1e(e,t){var n=-1,r=bo(e)?Array(e.length):[];return tu(e,function(s,i,o){r[++n]=t(s,i,o)}),r}var W1e=V1e;function H1e(e,t){var n=mt(e)?Nm:W1e;return n(e,wo(t))}var ve=H1e;function G1e(e,t){return XT(ve(e,t),1)}var qs=G1e,K1e=Object.prototype,q1e=K1e.hasOwnProperty,Y1e=p1e(function(e,t,n){q1e.call(e,n)?e[n].push(t):WT(e,n,[t])}),Q1e=Y1e,J1e=Object.prototype,X1e=J1e.hasOwnProperty;function Z1e(e,t){return e!=null&&X1e.call(e,t)}var ewe=Z1e;function twe(e,t){return e!=null&&w6(e,t,ewe)}var Ie=twe,nwe="[object String]";function rwe(e){return typeof e=="string"||!mt(e)&&Ti(e)&&Bl(e)==nwe}var ts=rwe;function swe(e,t){return Nm(t,function(n){return e[n]})}var iwe=swe;function owe(e){return e==null?[]:iwe(e,Ss(e))}var Mn=owe,awe=Math.max;function lwe(e,t,n,r){e=bo(e)?e:Mn(e),n=n&&!r?km(n):0;var s=e.length;return n<0&&(n=awe(s+n,0)),ts(e)?n<=s&&e.indexOf(t,n)>-1:!!s&&VT(e,t,n)>-1}var Ur=lwe,cwe=Math.max;function uwe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var s=n==null?0:km(n);return s<0&&(s=cwe(r+s,0)),VT(e,t,s)}var W2=uwe,dwe="[object Map]",hwe="[object Set]",fwe=Object.prototype,pwe=fwe.hasOwnProperty;function mwe(e){if(e==null)return!0;if(bo(e)&&(mt(e)||typeof e=="string"||typeof e.splice=="function"||Up(e)||KT(e)||wb(e)))return!e.length;var t=zd(e);if(t==dwe||t==hwe)return!e.size;if(Am(e))return!r6(e).length;for(var n in e)if(pwe.call(e,n))return!1;return!0}var Pt=mwe,gwe="[object RegExp]";function ywe(e){return Ti(e)&&Bl(e)==gwe}var xwe=ywe,H2=Rl&&Rl.isRegExp,vwe=H2?jm(H2):xwe,sa=vwe;function bwe(e){return e===void 0}var ia=bwe,wwe="Expected a function";function Swe(e){if(typeof e!="function")throw new TypeError(wwe);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var Ewe=Swe;function Nwe(e,t,n,r){if(!Xs(e))return e;t=Tb(t,e);for(var s=-1,i=t.length,o=i-1,l=e;l!=null&&++s<i;){var c=Om(t[s]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(s!=o){var d=l[c];u=r?r(d,c,l):void 0,u===void 0&&(u=Xs(d)?d:xb(t[s+1])?[]:{})}vb(l,c,u),l=l[c]}return e}var kwe=Nwe;function Cwe(e,t,n){for(var r=-1,s=t.length,i={};++r<s;){var o=t[r],l=QT(e,o);n(l,o)&&kwe(i,Tb(o,e),l)}return i}var Twe=Cwe;function Awe(e,t){if(e==null)return{};var n=Nm(d6(e),function(r){return[r]});return t=wo(t),Twe(e,n,function(r,s){return t(r,s[0])})}var Ri=Awe;function jwe(e,t,n,r,s){return s(e,function(i,o,l){n=r?(r=!1,i):t(n,i,o,l)}),n}var Owe=jwe;function Rwe(e,t,n){var r=mt(e)?Ixe:Owe,s=arguments.length<3;return r(e,wo(t),n,s,tu)}var Ns=Rwe;function _we(e,t){var n=mt(e)?ZT:N6;return n(e,Ewe(wo(t)))}var jb=_we;function Iwe(e,t){var n;return tu(e,function(r,s,i){return n=t(r,s,i),!n}),!!n}var Mwe=Iwe;function Lwe(e,t,n){var r=mt(e)?m6:Mwe;return n&&bb(e,t,n)&&(t=void 0),r(e,wo(t))}var k6=Lwe,Pwe=1/0,Dwe=sd&&1/sA(new sd([,-0]))[1]==Pwe?function(e){return new sd(e)}:_n,$we=Dwe,Fwe=200;function Bwe(e,t,n){var r=-1,s=JU,i=e.length,o=!0,l=[],c=l;if(n)o=!1,s=E6;else if(i>=Fwe){var u=t?null:$we(e);if(u)return sA(u);o=!1,s=rA,c=new nA}else c=t?[]:l;e:for(;++r<i;
vendor: 10,905 bytes, lines 749-751
749){var d=e[r],h=t?t(d):d;if(d=n||d!==0?d:0,o&&h===h){for(var f=c.length;f--;)if(c[f]===h)continue e;t&&c.push(h),l.push(d)}else s(c,h,n)||(c!==l&&c.push(h),l.push(d))}return l}var Uwe=Bwe;function zwe(e){return e&&e.length?Uwe(e):[]}var oA=zwe;function tN(e){console&&console.error&&console.error(`Error: ${e}`)}function C6(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function T6(e){let t=new Date().getTime(),n=e();return{time:new Date().getTime()-t,value:n}}function A6(e){function t(){}t.prototype=e;let n=new t;function r(){return typeof n.bar}return r(),r(),e}function Vwe(e){return Wwe(e)?e.LABEL:e.name}function Wwe(e){return ts(e.LABEL)&&e.LABEL!==""}var So=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),De(this.definition,t=>{t.accept(e)})}},ks=class extends So{constructor(e){super([]),this.idx=1,Es(this,Ri(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},dh=class extends So{constructor(e){super(e.definition),this.orgText="",Es(this,Ri(e,t=>t!==void 0))}},ns=class extends So{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Es(this,Ri(e,t=>t!==void 0))}},Zr=class extends So{constructor(e){super(e.definition),this.idx=1,Es(this,Ri(e,t=>t!==void 0))}},Eo=class extends So{constructor(e){super(e.definition),this.idx=1,Es(this,Ri(e,t=>t!==void 0))}},No=class extends So{constructor(e){super(e.definition),this.idx=1,Es(this,Ri(e,t=>t!==void 0))}},Fn=class extends So{constructor(e){super(e.definition),this.idx=1,Es(this,Ri(e,t=>t!==void 0))}},_i=class extends So{constructor(e){super(e.definition),this.idx=1,Es(this,Ri(e,t=>t!==void 0))}},Ii=class extends So{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Es(this,Ri(e,t=>t!==void 0))}},nn=class{constructor(e){this.idx=1,Es(this,Ri(e,t=>t!==void 0))}accept(e){e.visit(this)}};function Hwe(e){return ve(e,vy)}function vy(e){function t(n){return ve(n,vy)}if(e instanceof ks){let n={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return ts(e.label)&&(n.label=e.label),n}else{if(e instanceof ns)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Zr)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Eo)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof No)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:vy(new nn({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof _i)return{type:"RepetitionWithSeparator",idx:e.idx,separator:vy(new nn({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Fn)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Ii)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof nn){let n={type:"Terminal",name:e.terminalType.name,label:Vwe(e.terminalType),idx:e.idx};ts(e.label)&&(n.terminalLabel=e.label);let r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(n.pattern=sa(r)?r.source:r),n}else{if(e instanceof dh)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}var hh=class{visit(e){let t=e;switch(t.constructor){case ks:return this.visitNonTerminal(t);case ns:return this.visitAlternative(t);case Zr:return this.visitOption(t);case Eo:return this.visitRepetitionMandatory(t);case No:return this.visitRepetitionMandatoryWithSeparator(t);case _i:return this.visitRepetitionWithSeparator(t);case Fn:return this.visitRepetition(t);case Ii:return this.visitAlternation(t);case nn:return this.visitTerminal(t);case dh:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function Gwe(e){return e instanceof ns||e instanceof Zr||e instanceof Fn||e instanceof Eo||e instanceof No||e instanceof _i||e instanceof nn||e instanceof dh}function f0(e,t=[]){return e instanceof Zr||e instanceof Fn||e instanceof _i?!0:e instanceof Ii?k6(e.definition,n=>f0(n,t)):e instanceof ks&&Ur(t,e)?!1:e instanceof So?(e instanceof ks&&t.push(e),bi(e.definition,n=>f0(n,t))):!1}function Kwe(e){return e instanceof Ii}function Qi(e){if(e instanceof ks)return"SUBRULE";if(e instanceof Zr)return"OPTION";if(e instanceof Ii)return"OR";if(e instanceof Eo)return"AT_LEAST_ONE";if(e instanceof No)return"AT_LEAST_ONE_SEP";if(e instanceof _i)return"MANY_SEP";if(e instanceof Fn)return"MANY";if(e instanceof nn)return"CONSUME";throw Error("non exhaustive match")}var Ob=class{walk(e,t=[]){De(e.definition,(n,r)=>{let s=Jn(e.definition,r+1);if(n instanceof ks)this.walkProdRef(n,s,t);else if(n instanceof nn)this.walkTerminal(n,s,t);else if(n instanceof ns)this.walkFlat(n,s,t);else if(n instanceof Zr)this.walkOption(n,s,t);else if(n instanceof Eo)this.walkAtLeastOne(n,s,t);else if(n instanceof No)this.walkAtLeastOneSep(n,s,t);else if(n instanceof _i)this.walkManySep(n,s,t);else if(n instanceof Fn)this.walkMany(n,s,t);else if(n instanceof Ii)this.walkOr(n,s,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){let r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){let r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){let r=[new Zr({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=G2(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new Zr({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=G2(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);De(e.definition,s=>{let i=new ns({definition:[s]});this.walk(i,r)})}};function G2(e,t,n){return[new Zr({definition:[new nn({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function _m(e){if(e instanceof ks)return _m(e.referencedRule);if(e instanceof nn)return Qwe(e);if(Gwe(e))return qwe(e);if(Kwe(e))return Ywe(e);throw Error("non exhaustive match")}function qwe(e){let t=[],n=e.definition,r=0,s=n.length>r,i,o=!0;for(;s&&o;)i=n[r],o=f0(i),t=t.concat(_m(i)),r=r+1,s=n.length>r;return oA(t)}function Ywe(e){let t=ve(e.definition,n=>_m(n));return oA(vi(t))}function Qwe(e){return[e.terminalType]}var j6="_~IN~_",Jwe=class extends Ob{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){let r=Zwe(e.referencedRule,e.idx)+this.topProd.name,s=t.concat(n),i=new ns({definition:s}),o=_m(i);this.follows[r]=o}};function Xwe(e){let t={};return De(e,n=>{let r=new Jwe(n).startWalking();Es(t,r)}),t}function Zwe(e,t){return e.name+t+j6}function Ue(e){return e.charCodeAt(0)}function gw(e,t){Array.isArray(e)?e.forEach(function(n){t.push(n)}):t.push(e)}function Mh(e,t){if(e[t]===!0)throw"duplicate flag "+t;e[t],e[t]=!0}function gu(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function Mg(){throw Error("Internal Error - Should never get here!")}function K2(e){return e.type==="Character"}var p0=[];for(let e=Ue("0");e<=Ue("9");e++)p0.push(e);var m0=[Ue("_")].concat(p0);for(let e=Ue("a");e<=Ue("z");e++)m0.push(e);for(let e=Ue("A");e<=Ue("Z");e++)m0.push(e);var q2=[Ue(" "),Ue("\f"),Ue(`
750`),Ue("\r"),Ue("	"),Ue("\v"),Ue("	"),Ue(" "),Ue(" "),Ue(" "),Ue(" "),Ue(" "),Ue(" "),Ue(" "),Ue(" "),Ue(" "),Ue(" "),Ue(" "),Ue(" "),Ue(" "),Ue("\u2028"),Ue("\u2029"),Ue(" "),Ue(" "),Ue(" "),Ue("\uFEFF")],eSe=/[0-9a-fA-F]/,Lg=/[0-9]/,tSe=/[1-9]/,nSe=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let t=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Mh(n,"global");break;case"i":Mh(n,"ignoreCase");break;case"m":Mh(n,"multiLine");break;case"u":Mh(n,"unicode");break;case"y":Mh(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break}gu(t);let n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return Mg()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":let r=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:r,atMost:r};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),t={atLeast:r,atMost:s}):t={atLeast:r,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;gu(t);break}if(!(e===!0&&t===void 0)&&gu(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),gu(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Mg()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Ue(`
751`),Ue("\r"),Ue("\u2028"),Ue("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();
vendor: 5,190 bytes, lines 751-757
751case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=p0;break;case"D":e=p0,t=!0;break;case"s":e=q2;break;case"S":e=q2,t=!0;break;case"w":e=m0;break;case"W":e=m0,t=!0;break}return gu(e)?{type:"Set",value:e,complement:t}:Mg()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Ue("\f");break;case"n":e=Ue(`
752`);break;case"r":e=Ue("\r");break;case"t":e=Ue("	");break;case"v":e=Ue("\v");break}return gu(e)?{type:"Character",value:e}:Mg()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Ue("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:Ue(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
753`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:Ue(e)}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),t=!0);this.isClassAtom();){let n=this.classAtom();if(n.type,K2(n)&&this.isRangeDash()){this.consumeChar("-");let r=this.classAtom();if(r.type,K2(r)){if(r.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:r.value})}else gw(n.value,e),e.push(Ue("-")),gw(r.value,e)}else gw(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
754`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Ue("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}let t=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:e,value:t};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(tSe.test(e)===!1)throw Error("Expecting a positive integer");for(;Lg.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Lg.test(e)===!1)throw Error("Expecting an integer");for(;Lg.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
755`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Ue(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return Lg.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
756`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
757`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let n=0;n<e;n++){let r=this.popChar();if(eSe.test(r)===!1)throw Error("Expecting a HexDecimal digits");t+=r}return{type:"Character",value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}
vendor: 4,245 bytes, lines 757-766
757,aA=class{visitChildren(e){for(let t in e){let n=e[t];e.hasOwnProperty(t)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(r=>{this.visit(r)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},by={},rSe=new nSe;function Rb(e){let t=e.toString();if(by.hasOwnProperty(t))return by[t];{let n=rSe.pattern(t);return by[t]=n,n}}function sSe(){by={}}var O6="Complement Sets are not supported for first char optimization",g0=`Unable to use "first char" lexer optimizations:
758`;function iSe(e,t=!1){try{let n=Rb(e);return nN(n.value,{},n.flags.ignoreCase)}catch(n){if(n.message===O6)t&&C6(`${g0}	Unable to optimize: < ${e.toString()} >
759	Complement Sets cannot be automatically optimized.
760	This will disable the lexer's first char optimizations.
761	See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";t&&(r=`
762	This will disable the lexer's first char optimizations.
763	See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),tN(`${g0}
764	Failed parsing: < ${e.toString()} >
765	Using the @chevrotain/regexp-to-ast library
766	Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function nN(e,t,n){switch(e.type){case"Disjunction":for(let s=0;s<e.value.length;s++)nN(e.value[s],t,n);break;case"Alternative":let r=e.value;for(let s=0;s<r.length;s++){let i=r[s];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let o=i;switch(o.type){case"Character":Pg(o.value,t,n);break;case"Set":if(o.complement===!0)throw Error(O6);De(o.value,c=>{if(typeof c=="number")Pg(c,t,n);else{let u=c;if(n===!0)for(let d=u.from;d<=u.to;d++)Pg(d,t,n);else{for(let d=u.from;d<=u.to&&d<of;d++)Pg(d,t,n);if(u.to>=of){let d=u.from>=of?u.from:of,h=u.to,f=_l(d),p=_l(h);for(let m=f;m<=p;m++)t[m]=m}}}});break;case"Group":nN(o.value,t,n);break;default:throw Error("Non Exhaustive Match")}let l=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&rN(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return Mn(t)}function Pg(e,t,n){let r=_l(e);t[r]=r,n===!0&&oSe(e,t)}function oSe(e,t){let n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){let s=_l(r.charCodeAt(0));t[s]=s}else{let s=n.toLowerCase();if(s!==n){let i=_l(s.charCodeAt(0));t[i]=i}}}function Y2(e,t){return Wd(e.value,n=>{if(typeof n=="number")return Ur(t,n);{let r=n;return Wd(t,s=>r.from<=s&&s<=r.to)!==void 0}})}function rN(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?mt(e.value)?bi(e.value,rN):rN(e.value):!1}var aSe=class extends aA{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){Ur(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Y2(e,this.targetCharCodes)===void 0&&(this.found=!0):Y2(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function lA(e,t){if(t instanceof RegExp){let n=Rb(t),r=new aSe(e);return r.visit(n),r.found}else return Wd(t,n=>
vendor: 11,965 bytes, lines 766-792
766Ur(e,n.charCodeAt(0)))!==void 0}var zc="PATTERN",sf="defaultMode",Dg="modes",R6=typeof new RegExp("(?:)").sticky=="boolean";function lSe(e,t){t=iA(t,{useSticky:R6,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
767`],tracer:(b,w)=>w()});let n=t.tracer;n("initCharCodeToOptimizedIndexMap",()=>{RSe()});let r;n("Reject Lexer.NA",()=>{r=jb(e,b=>b[zc]===ht.NA)});let s=!1,i;n("Transform Patterns",()=>{s=!1,i=ve(r,b=>{let w=b[zc];if(sa(w)){let E=w.source;return E.length===1&&E!=="^"&&E!=="$"&&E!=="."&&!w.ignoreCase?E:E.length===2&&E[0]==="\\"&&!Ur(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],E[1])?E[1]:t.useSticky?J2(w):Q2(w)}else{if(da(w))return s=!0,{exec:w};if(typeof w=="object")return s=!0,w;if(typeof w=="string"){if(w.length===1)return w;{let E=w.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),N=new RegExp(E);return t.useSticky?J2(N):Q2(N)}}else throw Error("non exhaustive match")}})});let o,l,c,u,d;n("misc mapping",()=>{o=ve(r,b=>b.tokenTypeIdx),l=ve(r,b=>{let w=b.GROUP;if(w!==ht.SKIPPED){if(ts(w))return w;if(ia(w))return!1;throw Error("non exhaustive match")}}),c=ve(r,b=>{let w=b.LONGER_ALT;if(w)return mt(w)?ve(w,E=>W2(r,E)):[W2(r,w)]}),u=ve(r,b=>b.PUSH_MODE),d=ve(r,b=>Ie(b,"POP_MODE"))});let h;n("Line Terminator Handling",()=>{let b=M6(t.lineTerminatorCharacters);h=ve(r,w=>!1),t.positionTracking!=="onlyOffset"&&(h=ve(r,w=>Ie(w,"LINE_BREAKS")?!!w.LINE_BREAKS:I6(w,b)===!1&&lA(b,w.PATTERN)))});let f,p,m,g;n("Misc Mapping #2",()=>{f=ve(r,_6),p=ve(i,ASe),m=Ns(r,(b,w)=>{let E=w.GROUP;return ts(E)&&E!==ht.SKIPPED&&(b[E]=[]),b},{}),g=ve(i,(b,w)=>({pattern:i[w],longerAlt:c[w],canLineTerminator:h[w],isCustom:f[w],short:p[w],group:l[w],push:u[w],pop:d[w],tokenTypeIdx:o[w],tokenType:r[w]}))});let x=!0,y=[];return t.safeMode||n("First Char Optimization",()=>{y=Ns(r,(b,w,E)=>{if(typeof w.PATTERN=="string"){let N=w.PATTERN.charCodeAt(0),k=_l(N);yw(b,k,g[E])}else if(mt(w.START_CHARS_HINT)){let N;De(w.START_CHARS_HINT,k=>{let C=typeof k=="string"?k.charCodeAt(0):k,T=_l(C);N!==T&&(N=T,yw(b,T,g[E]))})}else if(sa(w.PATTERN))if(w.PATTERN.unicode)x=!1,t.ensureOptimizations&&tN(`${g0}	Unable to analyze < ${w.PATTERN.toString()} > pattern.
768	The regexp unicode flag is not currently supported by the regexp-to-ast library.
769	This will disable the lexer's first char optimizations.
770	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let N=iSe(w.PATTERN,t.ensureOptimizations);Pt(N)&&(x=!1),De(N,k=>{yw(b,k,g[E])})}else t.ensureOptimizations&&tN(`${g0}	TokenType: <${w.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
771	This will disable the lexer's first char optimizations.
772	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),x=!1;return b},[])}),{emptyGroups:m,patternIdxToConfig:g,charCodeToPatternIdxToConfig:y,hasCustom:s,canBeOptimized:x}}function cSe(e,t){let n=[],r=dSe(e);n=n.concat(r.errors);let s=hSe(r.valid),i=s.valid;return n=n.concat(s.errors),n=n.concat(uSe(i)),n=n.concat(bSe(i)),n=n.concat(wSe(i,t)),n=n.concat(SSe(i)),n}function uSe(e){let t=[],n=ni(e,r=>sa(r[zc]));return t=t.concat(pSe(n)),t=t.concat(ySe(n)),t=t.concat(xSe(n)),t=t.concat(vSe(n)),t=t.concat(mSe(n)),t}function dSe(e){let t=ni(e,s=>!Ie(s,zc)),n=ve(t,s=>({message:"Token Type: ->"+s.name+"<- missing static 'PATTERN' property",type:pn.MISSING_PATTERN,tokenTypes:[s]})),r=Ab(e,t);return{errors:n,valid:r}}function hSe(e){let t=ni(e,s=>{let i=s[zc];return!sa(i)&&!da(i)&&!Ie(i,"exec")&&!ts(i)}),n=ve(t,s=>({message:"Token Type: ->"+s.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:pn.INVALID_PATTERN,tokenTypes:[s]})),r=Ab(e,t);return{errors:n,valid:r}}var fSe=/[^\\][$]/;function pSe(e){class t extends aA{constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}let n=ni(e,r=>{let s=r.PATTERN;try{let i=Rb(s),o=new t;return o.visit(i),o.found}catch{return fSe.test(s.source)}});return ve(n,r=>({message:`Unexpected RegExp Anchor Error:
773	Token Type: ->`+r.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
774	See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS	for details.`,type:pn.EOI_ANCHOR_FOUND,tokenTypes:[r]}))}function mSe(e){let t=ni(e,n=>n.PATTERN.test(""));return ve(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:pn.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}var gSe=/[^\\[][\^]|^\^/;function ySe(e){class t extends aA{constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}let n=ni(e,r=>{let s=r.PATTERN;try{let i=Rb(s),o=new t;return o.visit(i),o.found}catch{return gSe.test(s.source)}});return ve(n,r=>({message:`Unexpected RegExp Anchor Error:
775	Token Type: ->`+r.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
776	See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS	for details.`,type:pn.SOI_ANCHOR_FOUND,tokenTypes:[r]}))}function xSe(e){let t=ni(e,n=>{let r=n[zc];return r instanceof RegExp&&(r.multiline||r.global)});return ve(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:pn.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function vSe(e){let t=[],n=ve(e,s=>Ns(e,(i,o)=>(s.PATTERN.source===o.PATTERN.source&&!Ur(t,o)&&o.PATTERN!==ht.NA&&(t.push(o),i.push(o)),i),[]));n=Rm(n);let r=ni(n,s=>s.length>1);return ve(r,s=>{let i=ve(s,o=>o.name);return{message:`The same RegExp pattern ->${Ai(s).PATTERN}<-has been used in all of the following Token Types: ${i.join(", ")} <-`,type:pn.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function bSe(e){let t=ni(e,n=>{if(!Ie(n,"GROUP"))return!1;let r=n.GROUP;return r!==ht.SKIPPED&&r!==ht.NA&&!ts(r)});return ve(t,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:pn.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function wSe(e,t){let n=ni(e,r=>r.PUSH_MODE!==void 0&&!Ur(t,r.PUSH_MODE));return ve(n,r=>({message:`Token Type: ->${r.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${r.PUSH_MODE}<-which does not exist`,type:pn.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[r]}))}function SSe(e){let t=[],n=Ns(e,(r,s,i)=>{let o=s.PATTERN;return o===ht.NA||(ts(o)?r.push({str:o,idx:i,tokenType:s}):sa(o)&&NSe(o)&&r.push({str:o.source,idx:i,tokenType:s})),r},[]);return De(e,(r,s)=>{De(n,({str:i,idx:o,tokenType:l})=>{if(s<o&&ESe(i,r.PATTERN)){let c=`Token: ->${l.name}<- can never be matched.
777Because it appears AFTER the Token Type ->${r.name}<-in the lexer's definition.
778See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:c,type:pn.UNREACHABLE_PATTERN,tokenTypes:[r,l]})}})}),t}function ESe(e,t){if(sa(t)){let n=t.exec(e);return n!==null&&n.index===0}else{if(da(t))return t(e,0,[],{});if(Ie(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function NSe(e){return Wd([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>e.source.indexOf(t)!==-1)===void 0}function Q2(e){let t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function J2(e){let t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function kSe(e,t,n){let r=[];return Ie(e,sf)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+sf+`> property in its definition
779`,type:pn.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Ie(e,Dg)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Dg+`> property in its definition
780`,type:pn.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Ie(e,Dg)&&Ie(e,sf)&&!Ie(e.modes,e.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${sf}: <${e.defaultMode}>which does not exist
781`,type:pn.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Ie(e,Dg)&&De(e.modes,(s,i)=>{De(s,(o,l)=>{if(ia(o))r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${l}>
782`,type:pn.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Ie(o,"LONGER_ALT")){let c=mt(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];De(c,u=>{!ia(u)&&!Ur(s,u)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${o.name}> outside of mode <${i}>
783`,type:pn.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),r}function CSe(e,t,n){let r=[],s=!1,i=Rm(vi(Mn(e.modes))),o=jb(i,c=>c[zc]===ht.NA),l=M6(n);return t&&De(o,c=>{let u=I6(c,l);if(u!==!1){let d={message:OSe(c,u),type:u.issue,tokenType:c};r.push(d)}else Ie(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(s=!0):lA(l,c.PATTERN)&&(s=!0)}),t&&!s&&r.push({message:`Warning: No LINE_BREAKS Found.
784	This Lexer has been defined to track line and column information,
785	But none of the Token Types can be identified as matching a line terminator.
786	See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS 
787	for details.`,type:pn.NO_LINE_BREAKS_FLAGS}),r}function TSe(e){let t={},n=Ss(e);return De(n,r=>{let s=e[r];if(mt(s))t[r]=[];else throw Error("non exhaustive match")}),t}function _6(e){let t=e.PATTERN;if(sa(t))return!1;if(da(t)||Ie(t,"exec"))return!0;if(ts(t))return!1;throw Error("non exhaustive match")}function ASe(e){return ts(e)&&e.length===1?e.charCodeAt(0):!1}var jSe={test:function(e){let t=e.length;for(let n=this.lastIndex;n<t;n++){let r=e.charCodeAt(n);if(r===10)return this.lastIndex=n+1,!0;if(r===13)return e.charCodeAt(n+1)===10?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function I6(e,t){if(Ie(e,"LINE_BREAKS"))return!1;if(sa(e.PATTERN)){try{lA(t,e.PATTERN)}catch(n){return{issue:pn.IDENTIFY_TERMINATOR,errMsg:n.message}}return!1}else{if(ts(e.PATTERN))return!1;if(_6(e))return{issue:pn.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function OSe(e,t){if(t.issue===pn.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
788	The problem is in the <${e.name}> Token Type
789	 Root cause: ${t.errMsg}.
790	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===pn.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
791	The problem is in the <${e.name}> Token Type
792	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function M6(e){return ve(e,t=>ts(t)?t.charCodeAt(0):t)}function yw(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}var of=256,wy=[];function _l(e){return e<of?e:wy[e]}function RSe(){if(Pt(wy)){wy=new Array(65536);for(let e=0;e<65536;e++)wy[e]=e>255?255+~~(e/255):e}}function Im(e,t){let n=e.tokenTypeIdx;return n===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[n]===!0}function y0(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var X2=1,L6={};function Mm(e){let t=_Se(e);ISe(t),LSe(t),MSe(t),De(t,n=>{n.isParent=n.categoryMatches.length>0})}function _Se(e){let t=ar(e),n=e,r=!0;for(;r;){n=Rm(vi(ve(n,i=>i.CATEGORIES)));let s=Ab(n,t);t=t.concat(s),Pt(s)?r=!1:n=s}return t}function ISe(e){De(e,t=>{D6(t)||(L6[X2]=t,t.tokenTypeIdx=X2++),Z2(t)&&!mt(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Z2(t)||(t.CATEGORIES=[]),PSe(t)||(t.categoryMatches=[]),DSe(t)||(t.categoryMatchesMap={})})}function MSe(e){De(e,t=>{t.categoryMatches=[],De(t.categoryMatchesMap,(n,r)=>{t.categoryMatches.push(L6[r].tokenTypeIdx)})})}function LSe(e){De(e,t=>{P6([],t)})}function P6(e,t){De(e,n=>{t.categoryMatchesMap[n.tokenTypeIdx]=!0}),De(t.CATEGORIES,n=>{let r=e.concat(t);Ur(r,n)||P6(r,n)})}function D6(e){return Ie(e,"tokenTypeIdx")}function Z2(e){return Ie(e,"CATEGORIES")}function PSe(e){return Ie(e,"categoryMatches")}function DSe(e){return Ie(e,"categoryMatchesMap")}function $Se(e){return Ie(e,"tokenTypeIdx")}var FSe={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}
792<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,s){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`}},pn;(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(pn||(pn={}));var af={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
793`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:FSe,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(af);var ht=class{constructor(e,t=af){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(r,s)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let i=new Array(this.traceInitIndent+1).join("	");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${i}--> <${r}>`);let{time:o,value:l}=T6(s),c=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&c(`${i}<-- <${r}> time: ${o}ms`),this.traceInitIndent--,l}else return s()},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
794a boolean 2nd argument is no longer supported`);this.config=Es({},af,t);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===af.lineTerminatorsPattern)this.config.lineTerminatorsPattern=jSe;else if(this.config.lineTerminatorCharacters===af.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
795	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),mt(e)?r={modes:{defaultMode:ar(e)},defaultMode:sf}:(s=!1,r=ar(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(kSe(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(CSe(r,this.trackStartLines,this.config.lineTerminatorCharacters))}
vendor: 13,860 bytes, lines 795-832
795)),r.modes=r.modes?r.modes:{},De(r.modes,(o,l)=>{r.modes[l]=jb(o,c=>ia(c))});let i=Ss(r.modes);if(De(r.modes,(o,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(cSe(o,i))}),Pt(this.lexerDefinitionErrors)){Mm(o);let c;this.TRACE_INIT("analyzeTokenTypes",()=>{c=lSe(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=c.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=c.charCodeToPatternIdxToConfig,this.emptyGroups=Es({},this.emptyGroups,c.emptyGroups),this.hasCustom=c.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=c.canBeOptimized}})}),this.defaultMode=r.defaultMode,!Pt(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let o=ve(this.lexerDefinitionErrors,l=>l.message).join(`-----------------------
796`);throw new Error(`Errors detected in definition of Lexer:
797`+o)}De(this.lexerDefinitionWarning,o=>{C6(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(R6?(this.chopInput=Ud,this.match=this.matchWithTest):(this.updateLastIndex=_n,this.match=this.matchWithExec),s&&(this.handleModes=_n),this.trackStartLines===!1&&(this.computeNewColumn=Ud),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=_n),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let o=Ns(this.canModeBeOptimized,(l,c,u)=>(c===!1&&l.push(u),l),[]);if(t.ensureOptimizations&&!Pt(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized.
798	 Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
799	 Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{sSe()}),this.TRACE_INIT("toFastProperties",()=>{A6(this)})})}tokenize(e,t=this.defaultMode){if(!Pt(this.lexerDefinitionErrors)){let n=ve(this.lexerDefinitionErrors,r=>r.message).join(`-----------------------
800`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
801`+n)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,s,i,o,l,c,u,d,h,f,p,m,g,x,y=e,b=y.length,w=0,E=0,N=this.hasCustom?0:Math.floor(e.length/10),k=new Array(N),C=[],T=this.trackStartLines?1:void 0,j=this.trackStartLines?1:void 0,S=TSe(this.emptyGroups),R=this.trackStartLines,_=this.config.lineTerminatorsPattern,L=0,A=[],B=[],U=[],V=[];Object.freeze(V);let P;function D(){return A}function q(He){let Fe=_l(He),le=B[Fe];return le===void 0?V:le}let Q=He=>{if(U.length===1&&He.tokenType.PUSH_MODE===void 0){let Fe=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(He);C.push({offset:He.startOffset,line:He.startLine,column:He.startColumn,length:He.image.length,message:Fe})}else{U.pop();let Fe=Vd(U);A=this.patternIdxToConfig[Fe],B=this.charCodeToPatternIdxToConfig[Fe],L=A.length;let le=this.canModeBeOptimized[Fe]&&this.config.safeMode===!1;B&&le?P=q:P=D}};function F(He){U.push(He),B=this.charCodeToPatternIdxToConfig[He],A=this.patternIdxToConfig[He],L=A.length,L=A.length;let Fe=this.canModeBeOptimized[He]&&this.config.safeMode===!1;B&&Fe?P=q:P=D}F.call(this,t);let ge,Ve=this.config.recoveryEnabled;for(;w<b;){l=null;let He=y.charCodeAt(w),Fe=P(He),le=Fe.length;for(n=0;n<le;n++){ge=Fe[n];let Se=ge.pattern;c=null;let Ce=ge.short;if(Ce!==!1?He===Ce&&(l=Se):ge.isCustom===!0?(x=Se.exec(y,w,k,S),x!==null?(l=x[0],x.payload!==void 0&&(c=x.payload)):l=null):(this.updateLastIndex(Se,w),l=this.match(Se,e,w)),l!==null){if(o=ge.longerAlt,o!==void 0){let Be=o.length;for(s=0;s<Be;s++){let Me=A[o[s]],Oe=Me.pattern;if(u=null,Me.isCustom===!0?(x=Oe.exec(y,w,k,S),x!==null?(i=x[0],x.payload!==void 0&&(u=x.payload)):i=null):(this.updateLastIndex(Oe,w),i=this.match(Oe,e,w)),i&&i.length>l.length){l=i,c=u,ge=Me;break}}}break}}if(l!==null){if(d=l.length,h=ge.group,h!==void 0&&(f=ge.tokenTypeIdx,p=this.createTokenInstance(l,w,f,ge.tokenType,T,j,d),this.handlePayload(p,c),h===!1?E=this.addToken(k,E,p):S[h].push(p)),e=this.chopInput(e,d),w=w+d,j=this.computeNewColumn(j,d),R===!0&&ge.canLineTerminator===!0){let Se=0,Ce,Be;_.lastIndex=0;do Ce=_.test(l),Ce===!0&&(Be=_.lastIndex-1,Se++);while(Ce===!0);Se!==0&&(T=T+Se,j=d-Be,this.updateTokenEndLineColumnLocation(p,h,Be,Se,T,j,d))}this.handleModes(ge,Q,F,p)}else{let Se=w,Ce=T,Be=j,Me=Ve===!1;for(;Me===!1&&w<b;)for(e=this.chopInput(e,1),w++,r=0;r<L;r++){let Oe=A[r],St=Oe.pattern,Qe=Oe.short;if(Qe!==!1?y.charCodeAt(w)===Qe&&(Me=!0):Oe.isCustom===!0?Me=St.exec(y,w,k,S)!==null:(this.updateLastIndex(St,w),Me=St.exec(e)!==null),Me===!0)break}if(m=w-Se,j=this.computeNewColumn(j,m),g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(y,Se,m,Ce,Be),C.push({offset:Se,line:Ce,column:Be,length:m,message:g}),Ve===!1)break}}return this.hasCustom||(k.length=E),{tokens:k,groups:S,errors:C}}handleModes(e,t,n,r){if(e.pop===!0){let s=e.push;t(r),s!==void 0&&n.call(this,s)}else e.push!==void 0&&n.call(this,e.push)}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,n,r,s,i,o){let l,c;t!==void 0&&(l=n===o-1,c=l?-1:0,r===1&&l===!0||(e.endLine=s+c,e.endColumn=i-1+-c))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,s,i){return{image:e,startOffset:t,startLine:s,startColumn:i,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,s,i,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:s,endLine:s,startColumn:i,endColumn:i+o-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){return e.push(n),t}addTokenUsingMemberAccess(e,t,n){return e[t]=n,t++,t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){t!==null&&(e.payload=t)}matchWithTest(e,t,n){return e.test(t)===!0?t.substring(n,e.lastIndex):null}matchWithExec(e,t){let n=e.exec(t);return n!==null?n[0]:null}};ht.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";ht.NA=/NOT_APPLICABLE/;function $f(e){return $6(e)?e.LABEL:e.name}function $6(e){return ts(e.LABEL)&&e.LABEL!==""}var BSe="parent",eI="categories",tI="label",nI="group",rI="push_mode",sI="pop_mode",iI="longer_alt",oI="line_breaks",aI="start_chars_hint";function $(e){return USe(e)}function USe(e){let t=e.pattern,n={};if(n.name=e.name,ia(t)||(n.PATTERN=t),Ie(e,BSe))throw`The parent property is no longer supported.
802See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Ie(e,eI)&&(n.CATEGORIES=e[eI]),Mm([n]),Ie(e,tI)&&(n.LABEL=e[tI]),Ie(e,nI)&&(n.GROUP=e[nI]),Ie(e,sI)&&(n.POP_MODE=e[sI]),Ie(e,rI)&&(n.PUSH_MODE=e[rI]),Ie(e,iI)&&(n.LONGER_ALT=e[iI]),Ie(e,oI)&&(n.LINE_BREAKS=e[oI]),Ie(e,aI)&&(n.START_CHARS_HINT=e[aI]),n}var Vc=$({name:"EOF",pattern:ht.NA});Mm([Vc]);function cA(e,t,n,r,s,i,o,l){return{image:t,startOffset:n,endOffset:r,startLine:s,endLine:i,startColumn:o,endColumn:l,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function zSe(e,t){return Im(e,t)}var F6={buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:r}){return`Expecting ${$6(e)?`--> ${$f(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:s}){let i="Expecting: ",o=`
803but found: '`+Ai(t).image+"'";if(r)return i+r+o;{let l=Ns(e,(d,h)=>d.concat(h),[]),c=ve(l,d=>`[${ve(d,h=>$f(h)).join(", ")}]`),u=`one of these possible Token sequences:
804${ve(c,(d,h)=>`  ${h+1}. ${d}`).join(`
805`)}`;return i+u+o}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){let s="Expecting: ",i=`
806but found: '`+Ai(t).image+"'";if(n)return s+n+i;{let o=`expecting at least one iteration which starts with one of these possible Token sequences::
807  <${ve(e,l=>`[${ve(l,c=>$f(c)).join(",")}]`).join(" ,")}>`;return s+o+i}}};Object.freeze(F6);var VSe={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
808inside top level rule: ->`+e.name+"<-"}},nc={buildDuplicateFoundError(e,t){function n(d){return d instanceof nn?d.terminalType.name:d instanceof ks?d.nonTerminalName:""}let r=e.name,s=Ai(t),i=s.idx,o=Qi(s),l=n(s),c=i>0,u=`->${o}${c?i:""}<- ${l?`with argument: ->${l}<-`:""}
809                  appears more than once (${t.length} times) in the top level rule: ->${r}<-.                  
810                  For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES 
811                  `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,`
812`),u},buildNamespaceConflictError(e){return`Namespace conflict found in grammar.
813The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.
814To resolve this make sure each Terminal and Non-Terminal names are unique
815This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
816and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=ve(e.prefixPath,r=>$f(r)).join(", "),n=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix
817in <OR${n}> inside <${e.topLevelRule.name}> Rule,
818<${t}> may appears as a prefix path in all these alternatives.
819See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
820For Further details.`},buildAlternationAmbiguityError(e){let t=ve(e.prefixPath,s=>$f(s)).join(", "),n=e.alternation.idx===0?"":e.alternation.idx,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${n}> inside <${e.topLevelRule.name}> Rule,
821<${t}> may appears as a prefix path in all these alternatives.
822`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
823For Further details.`,r},buildEmptyRepetitionError(e){let t=Qi(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.
824This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
825Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:
826<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
827 has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,n=ve(e.leftRecursionPath,s=>s.name),r=`${t} --> ${n.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar.
828rule: <${t}> can be invoked from itself (directly or indirectly)
829without consuming any Tokens. The grammar path that causes this is: 
830 ${r}
831 To fix this refactor your grammar to remove the left recursion.
832see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof dh?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function WSe(e,t){let n=new HSe(e,t);return n.resolveRefs(),n.errors}var HSe=class extends hh{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){De(Mn(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:Pr.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},GSe=class extends Ob{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=ar(this.path.ruleStack).reverse(),this.occurrenceStack=ar(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){Pt(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}
vendor: 18,771 bytes, line 832
832,KSe=class extends GSe{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let r=t.concat(n),s=new ns({definition:r});this.possibleTokTypes=_m(s),this.found=!0}}},_b=class extends Ob{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},qSe=class extends _b{walkMany(e,t,n){if(e.idx===this.occurrence){let r=Ai(t.concat(n));this.result.isEndOfRule=r===void 0,r instanceof nn&&(this.result.token=r.terminalType,this.result.occurrence=r.idx)}else super.walkMany(e,t,n)}},lI=class extends _b{walkManySep(e,t,n){if(e.idx===this.occurrence){let r=Ai(t.concat(n));this.result.isEndOfRule=r===void 0,r instanceof nn&&(this.result.token=r.terminalType,this.result.occurrence=r.idx)}else super.walkManySep(e,t,n)}},YSe=class extends _b{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){let r=Ai(t.concat(n));this.result.isEndOfRule=r===void 0,r instanceof nn&&(this.result.token=r.terminalType,this.result.occurrence=r.idx)}else super.walkAtLeastOne(e,t,n)}},cI=class extends _b{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){let r=Ai(t.concat(n));this.result.isEndOfRule=r===void 0,r instanceof nn&&(this.result.token=r.terminalType,this.result.occurrence=r.idx)}else super.walkAtLeastOneSep(e,t,n)}};function sN(e,t,n=[]){n=ar(n);let r=[],s=0;function i(l){return l.concat(Jn(e,s+1))}function o(l){let c=sN(i(l),t,n);return r.concat(c)}for(;n.length<t&&s<e.length;){let l=e[s];if(l instanceof ns||l instanceof ks)return o(l.definition);if(l instanceof Zr)r=o(l.definition);else if(l instanceof Eo){let c=l.definition.concat([new Fn({definition:l.definition})]);return o(c)}else if(l instanceof No){let c=[new ns({definition:l.definition}),new Fn({definition:[new nn({terminalType:l.separator})].concat(l.definition)})];return o(c)}else if(l instanceof _i){let c=l.definition.concat([new Fn({definition:[new nn({terminalType:l.separator})].concat(l.definition)})]);r=o(c)}else if(l instanceof Fn){let c=l.definition.concat([new Fn({definition:l.definition})]);r=o(c)}else{if(l instanceof Ii)return De(l.definition,c=>{Pt(c.definition)===!1&&(r=o(c.definition))}),r;if(l instanceof nn)n.push(l.terminalType);else throw Error("non exhaustive match")}s++}return r.push({partialPath:n,suffixDef:Jn(e,s)}),r}function B6(e,t,n,r){let s="EXIT_NONE_TERMINAL",i=[s],o="EXIT_ALTERNATIVE",l=!1,c=t.length,u=c-r-1,d=[],h=[];for(h.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!Pt(h);){let f=h.pop();if(f===o){l&&Vd(h).idx<=u&&h.pop();continue}let p=f.def,m=f.idx,g=f.ruleStack,x=f.occurrenceStack;if(Pt(p))continue;let y=p[0];if(y===s){let b={idx:m,def:Jn(p),ruleStack:Wp(g),occurrenceStack:Wp(x)};h.push(b)}else if(y instanceof nn)if(m<c-1){let b=m+1,w=t[b];if(n(w,y.terminalType)){let E={idx:b,def:Jn(p),ruleStack:g,occurrenceStack:x};h.push(E)}}else if(m===c-1)d.push({nextTokenType:y.terminalType,nextTokenOccurrence:y.idx,ruleStack:g,occurrenceStack:x}),l=!0;else throw Error("non exhaustive match");else if(y instanceof ks){let b=ar(g);b.push(y.nonTerminalName);let w=ar(x);w.push(y.idx);let E={idx:m,def:y.definition.concat(i,Jn(p)),ruleStack:b,occurrenceStack:w};h.push(E)}else if(y instanceof Zr){let b={idx:m,def:Jn(p),ruleStack:g,occurrenceStack:x};h.push(b),h.push(o);let w={idx:m,def:y.definition.concat(Jn(p)),ruleStack:g,occurrenceStack:x};h.push(w)}else if(y instanceof Eo){let b=new Fn({definition:y.definition,idx:y.idx}),w=y.definition.concat([b],Jn(p)),E={idx:m,def:w,ruleStack:g,occurrenceStack:x};h.push(E)}else if(y instanceof No){let b=new nn({terminalType:y.separator}),w=new Fn({definition:[b].concat(y.definition),idx:y.idx}),E=y.definition.concat([w],Jn(p)),N={idx:m,def:E,ruleStack:g,occurrenceStack:x};h.push(N)}else if(y instanceof _i){let b={idx:m,def:Jn(p),ruleStack:g,occurrenceStack:x};h.push(b),h.push(o);let w=new nn({terminalType:y.separator}),E=new Fn({definition:[w].concat(y.definition),idx:y.idx}),N=y.definition.concat([E],Jn(p)),k={idx:m,def:N,ruleStack:g,occurrenceStack:x};h.push(k)}else if(y instanceof Fn){let b={idx:m,def:Jn(p),ruleStack:g,occurrenceStack:x};h.push(b),h.push(o);let w=new Fn({definition:y.definition,idx:y.idx}),E=y.definition.concat([w],Jn(p)),N={idx:m,def:E,ruleStack:g,occurrenceStack:x};h.push(N)}else if(y instanceof Ii)for(let b=y.definition.length-1;b>=0;b--){let w=y.definition[b],E={idx:m,def:w.definition.concat(Jn(p)),ruleStack:g,occurrenceStack:x};h.push(E),h.push(o)}else if(y instanceof ns)h.push({idx:m,def:y.definition.concat(Jn(p)),ruleStack:g,occurrenceStack:x});else if(y instanceof dh)h.push(QSe(y,m,g,x));else throw Error("non exhaustive match")}return d}function QSe(e,t,n,r){let s=ar(n);s.push(e.name);let i=ar(r);return i.push(1),{idx:t,def:e.definition,ruleStack:s,occurrenceStack:i}}var fn;(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(fn||(fn={}));function U6(e){if(e instanceof Zr||e==="Option")return fn.OPTION;if(e instanceof Fn||e==="Repetition")return fn.REPETITION;if(e instanceof Eo||e==="RepetitionMandatory")return fn.REPETITION_MANDATORY;if(e instanceof No||e==="RepetitionMandatoryWithSeparator")return fn.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof _i||e==="RepetitionWithSeparator")return fn.REPETITION_WITH_SEPARATOR;if(e instanceof Ii||e==="Alternation")return fn.ALTERNATION;throw Error("non exhaustive match")}function JSe(e,t,n,r,s,i){let o=uA(e,t,n),l=W6(o)?y0:Im;return i(o,r,l,s)}function XSe(e,t,n,r,s,i){let o=dA(e,t,s,n),l=W6(o)?y0:Im;return i(o[0],l,r)}function ZSe(e,t,n,r){let s=e.length,i=bi(e,o=>bi(o,l=>l.length===1));if(t)return function(o){let l=ve(o,c=>c.GATE);for(let c=0;c<s;c++){let u=e[c],d=u.length,h=l[c];if(!(h!==void 0&&h.call(this)===!1))e:for(let f=0;f<d;f++){let p=u[f],m=p.length;for(let g=0;g<m;g++){let x=this.LA(g+1);if(n(x,p[g])===!1)continue e}return c}}};if(i&&!r){let o=ve(e,c=>vi(c)),l=Ns(o,(c,u,d)=>(De(u,h=>{Ie(c,h.tokenTypeIdx)||(c[h.tokenTypeIdx]=d),De(h.categoryMatches,f=>{Ie(c,f)||(c[f]=d)})}),c),{});return function(){let c=this.LA(1);return l[c.tokenTypeIdx]}}else return function(){for(let o=0;o<s;o++){let l=e[o],c=l.length;e:for(let u=0;u<c;u++){let d=l[u],h=d.length;for(let f=0;f<h;f++){let p=this.LA(f+1);if(n(p,d[f])===!1)continue e}return o}}}}function eEe(e,t,n){let r=bi(e,i=>i.length===1),s=e.length;if(r&&!n){let i=vi(e);if(i.length===1&&Pt(i[0].categoryMatches)){let o=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{let o=Ns(i,(l,c,u)=>(l[c.tokenTypeIdx]=!0,De(c.categoryMatches,d=>{l[d]=!0}),l),[]);return function(){let l=this.LA(1);return o[l.tokenTypeIdx]===!0}}}else return function(){e:for(let i=0;i<s;i++){let o=e[i],l=o.length;for(let c=0;c<l;c++){let u=this.LA(c+1);if(t(u,o[c])===!1)continue e}return!0}return!1}}var tEe=class extends Ob{constructor(e,t,n){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=n.concat(r),!0):!1}walkOption(e,t,n){this.checkIsTarget(e,fn.OPTION,t,n)||super.walkOption(e,t,n)}walkAtLeastOne(e,t,n){this.checkIsTarget(e,fn.REPETITION_MANDATORY,t,n)||super.walkOption(e,t,n)}walkAtLeastOneSep(e,t,n){this.checkIsTarget(e,fn.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}walkMany(e,t,n){this.checkIsTarget(e,fn.REPETITION,t,n)||super.walkOption(e,t,n)}walkManySep(e,t,n){this.checkIsTarget(e,fn.REPETITION_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}},z6=class extends hh{constructor(e,t,n){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=n,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,fn.OPTION)}visitRepetition(e){this.checkIsTarget(e,fn.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,fn.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,fn.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,fn.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,fn.ALTERNATION)}};function uI(e){let t=new Array(e);for(let n=0;n<e;n++)t[n]=[];return t}function xw(e){let t=[""];for(let n=0;n<e.length;n++){let r=e[n],s=[];for(let i=0;i<t.length;i++){let o=t[i];s.push(o+"_"+r.tokenTypeIdx);for(let l=0;l<r.categoryMatches.length;l++){let c="_"+r.categoryMatches[l];s.push(o+c)}}t=s}return t}function nEe(e,t,n){for(let r=0;r<e.length;r++){if(r===n)continue;let s=e[r];for(let i=0;i<t.length;i++){let o=t[i];if(s[o]===!0)return!1}}return!0}function V6(e,t){let n=ve(e,o=>sN([o],1)),r=uI(n.length),s=ve(n,o=>{let l={};return De(o,c=>{let u=xw(c.partialPath);De(u,d=>{l[d]=!0})}),l}),i=n;for(let o=1;o<=t;o++){let l=i;i=uI(l.length);for(let c=0;c<l.length;c++){let u=l[c];for(let d=0;d<u.length;d++){let h=u[d].partialPath,f=u[d].suffixDef,p=xw(h);if(nEe(s,p,c)||Pt(f)||h.length===t){let m=r[c];if(iN(m,h)===!1){m.push(h);for(let g=0;g<p.length;g++){let x=p[g];s[c][x]=!0}}}else{let m=sN(f,o+1,h);i[c]=i[c].concat(m),De(m,g=>{let x=xw(g.partialPath);De(x,y=>{s[c][y]=!0})})}}}}return r}function uA(e,t,n,r){let s=new z6(e,fn.ALTERNATION,r);return t.accept(s),V6(s.result,n)}function dA(e,t,n,r){let s=new z6(e,n);t.accept(s);let i=s.result,o=new tEe(t,e,n).startWalking(),l=new ns({definition:i}),c=new ns({definition:o});return V6([l,c],r)}function iN(e,t){e:for(let n=0;n<e.length;n++){let r=e[n];if(r.length===t.length){for(let s=0;s<r.length;s++){let i=t[s],o=r[s];if(!(i===o||o.categoryMatchesMap[i.tokenTypeIdx]!==void 0))continue e}return!0}}return!1}function rEe(e,t){return e.length<t.length&&bi(e,(n,r)=>{let s=t[r];return n===s||s.categoryMatchesMap[n.tokenTypeIdx]})}function W6(e){return bi(e,t=>bi(t,n=>bi(n,r=>Pt(r.categoryMatches))))}function sEe(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return ve(t,n=>Object.assign({type:Pr.CUSTOM_LOOKAHEAD_VALIDATION},n))}function iEe(e,t,n,r){let s=qs(e,c=>oEe(c,n)),i=xEe(e,t,n),o=qs(e,c=>pEe(c,n)),l=qs(e,c=>cEe(c,e,r,n));return s.concat(i,o,l)}function oEe(e,t){let n=new lEe;e.accept(n);let r=n.allProductions,s=Q1e(r,aEe),i=Ri(s,o=>o.length>1);return ve(Mn(i),o=>{let l=Ai(o),c=t.buildDuplicateFoundError(e,o),u=Qi(l),d={message:c,type:Pr.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:u,occurrence:l.idx},h=H6(l);return h&&(d.parameter=h),d})}function aEe(e){return`${Qi(e)}_#_${e.idx}_#_${H6(e)}`}function H6(e){return e instanceof nn?e.terminalType.name:e instanceof ks?e.nonTerminalName:""}var lEe=class extends hh{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function cEe(e,t,n,r){let s=[];if(Ns(t,(i,o)=>o.name===e.name?i+1:i,0)>1){let i=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});s.push({message:i,type:Pr.DUPLICATE_RULE_NAME,ruleName:e.name})}return s}function uEe(e,t,n){let r=[],s;return Ur(t,e)||(s=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:s,type:Pr.INVALID_RULE_OVERRIDE,ruleName:e})),r}function G6(e,t,n,r=[]){let s=[],i=Sy(t.definition);if(Pt(i))return[];{let o=e.name;Ur(i,e)&&s.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Pr.LEFT_RECURSION,ruleName:o});let l=Ab(i,r.concat([e])),c=qs(l,u=>{let d=ar(r);return d.push(u),G6(e,u,n,d)});return s.concat(c)}}function Sy(e){let t=[];if(Pt(e))return t;let n=Ai(e);if(n instanceof ks)t.push(n.referencedRule);else if(n instanceof ns||n instanceof Zr||n instanceof Eo||n instanceof No||n instanceof _i||n instanceof Fn)t=t.concat(Sy(n.definition));else if(n instanceof Ii)t=vi(ve(n.definition,i=>Sy(i.definition)));else if(!(n instanceof nn))throw Error("non exhaustive match");let r=f0(n),s=e.length>1;if(r&&s){let i=Jn(e);return t.concat(Sy(i))}else return t}var hA=class extends hh{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function dEe(e,t){let n=new hA;e.accept(n);let r=n.alternations;return qs(r,s=>{let i=Wp(s.definition);return qs(i,(o,l)=>{let c=B6([o],[],Im,1);return Pt(c)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:s,emptyChoiceIdx:l}),type:Pr.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:s.idx,alternative:l+1}]:[]})})}function hEe(e,t,n){let r=new hA;e.accept(r);let s=r.alternations;return s=jb(s,i=>i.ignoreAmbiguities===!0),qs(s,i=>{let o=i.idx,l=i.maxLookahead||t,c=uA(o,e,l,i),u=gEe(c,i,e,n),d=yEe(c,i,e,n);return u.concat(d)})}var fEe=class extends hh{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function pEe(e,t){let n=new hA;e.accept(n);let r=n.alternations;return qs(r,s=>s.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:s}),type:Pr.TOO_MANY_ALTS,ruleName:e.name,occurrence:s.idx}]:[])}function mEe(e,t,n){let r=[];return De(e,s=>{let i=new fEe;s.accept(i);let o=i.allProductions;De(o,l=>{let c=U6(l),u=l.maxLookahead||t,d=l.idx,h=dA(d,s,c,u)[0];if(Pt(vi(h))){let f=n.buildEmptyRepetitionError({topLevelRule:s,repetition:l});r.push({message:f,type:Pr.NO_NON_EMPTY_LOOKAHEAD,ruleName:s.name})}})}),r}function gEe(e,t,n,r){let s=[],i=Ns(e,(o,l,c)=>(t.definition[c].ignoreAmbiguities===!0||De(l,u=>{let d=[c];De(e,(h,f)=>{c!==f&&iN(h,u)&&t.definition[f].ignoreAmbiguities!==!0&&d.push(f)}),d.length>1&&!iN(s,u)&&(s.push(u),o.push({alts:d,path:u}))}),o),[]);return ve(i,o=>{let l=ve(o.alts,c=>c+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:l,prefixPath:o.path}),type:Pr.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:o.alts}})}function yEe(e,t,n,r){let s=Ns(e,(i,o,l)=>{let c=ve(o,u=>({idx:l,path:u}));return i.concat(c)},[]);return Rm(qs(s,i=>{if(t.definition[i.idx].ignoreAmbiguities===!0)return[];let o=i.idx,l=i.path,c=ni(s,u=>t.definition[u.idx].ignoreAmbiguities!==!0&&u.idx<o&&rEe(u.path,l));return ve(c,u=>{let d=[u.idx+1,o+1],h=t.idx===0?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:d,prefixPath:u.path}),type:Pr.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:h,alternatives:d}})}))}function xEe(e,t,n){let r=[],s=ve(t,i=>i.name);return De(e,i=>{let o=i.name;if(Ur(s,o)){let l=n.buildNamespaceConflictError(i);r.push({message:l,type:Pr.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),r}function vEe(e){let t=iA(e,{errMsgProvider:VSe}),n={};return De(e.rules,r=>{n[r.name]=r}),WSe(n,t.errMsgProvider)}function bEe(e){return e=iA(e,{errMsgProvider:nc}),iEe(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var K6="MismatchedTokenException",q6="NoViableAltException",Y6="EarlyExitException",Q6="NotAllInputParsedException",J6=[K6,q6,Y6,Q6];Object.freeze(J6);function x0(e){return Ur(J6,e.name)}var Ib=class extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},X6=class extends Ib{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=K6}},wEe=class extends Ib{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=q6}},SEe=class extends Ib{constructor(e,t){super(e,t),this.name=Q6}},EEe=class extends Ib{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Y6}},vw={},Z6="InRuleRecoveryException",NEe=class extends Error{constructor(e){super(e),this.name=Z6}},kEe=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Ie(e,"recoveryEnabled")?e.recoveryEnabled:oa.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=CEe)}getTokenToInsert(e){let t=cA(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){let s=this.findReSyncTokenType(),i=this.exportLexerState(),o=[],l=!1,c=this.LA(1),u=this.LA(1),d=()=>{let h=this.LA(0),f=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:h,ruleName:this.getCurrRuleFullName()}),p=new X6(f,c,this.LA(0));p.resyncedTokens=Wp(o),this.SAVE_ERROR(p)};for(;!l;)if(this.tokenMatcher(u,r)){d();return}else if(n.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,s)?l=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,o));this.importLexerState(i)}shouldInRepetitionRecoveryBeTried(e,t,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new NEe("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||Pt(t))return!1;let n=this.LA(1);return Wd(t,r=>this.tokenMatcher(n,r))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return Ur(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),n=2;
vendor: 4,508 bytes, line 832
832for(;;){let r=Wd(e,s=>zSe(t,s));if(r!==void 0)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return vw;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return ve(e,(n,r)=>r===0?vw:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])})}flattenFollowSet(){let e=ve(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return vi(e)}getFollowSetFromFollowKey(e){if(e===vw)return[Vc];let t=e.ruleName+e.idxInCallingRule+j6+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Vc)||t.push(e),t}reSyncTo(e){let t=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return Wp(t)}attemptInRepetitionRecovery(e,t,n,r,s,i,o){}getCurrentGrammarPath(e,t){let n=this.getHumanReadableRuleStack(),r=ar(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:r,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return ve(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function CEe(e,t,n,r,s,i,o){let l=this.getKeyForAutomaticLookahead(r,s),c=this.firstAfterRepMap[l];if(c===void 0){let f=this.getCurrRuleFullName(),p=this.getGAstProductions()[f];c=new i(p,s).startWalking(),this.firstAfterRepMap[l]=c}let u=c.token,d=c.occurrence,h=c.isEndOfRule;this.RULE_STACK.length===1&&h&&u===void 0&&(u=Vc,d=1),!(u===void 0||d===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,d,o)&&this.tryInRepetitionRecovery(e,t,n,u)}function bw(e,t,n){return n|t|e}var TEe=class{constructor(e){var t;this.maxLookahead=(t=e==null?void 0:e.maxLookahead)!==null&&t!==void 0?t:oa.maxLookahead}validate(e){let t=this.validateNoLeftRecursion(e.rules);if(Pt(t)){let n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),s=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...s]}return t}validateNoLeftRecursion(e){return qs(e,t=>G6(t,t,nc))}validateEmptyOrAlternatives(e){return qs(e,t=>dEe(t,nc))}validateAmbiguousAlternationAlternatives(e,t){return qs(e,n=>hEe(n,t,nc))}validateSomeNonEmptyLookaheadPath(e,t){return mEe(e,t,nc)}buildLookaheadForAlternation(e){return JSe(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,ZSe)}buildLookaheadForOptional(e){return XSe(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,U6(e.prodType),eEe)}},AEe=class{initLooksAhead(e){this.dynamicTokensEnabled=Ie(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:oa.dynamicTokensEnabled,this.maxLookahead=Ie(e,"maxLookahead")?e.maxLookahead:oa.maxLookahead,this.lookaheadStrategy=Ie(e,"lookaheadStrategy")?e.lookaheadStrategy:new TEe({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){De(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{let{alternation:n,repetition:r,option:s,repetitionMandatory:i,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=OEe(t);De(n,c=>{let u=c.idx===0?"":c.idx;this.TRACE_INIT(`${Qi(c)}${u}`,()=>{let d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:c.idx,rule:t,maxLookahead:c.maxLookahead||this.maxLookahead,hasPredicates:c.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),h=bw(this.fullRuleNameToShort[t.name],256,c.idx);this.setLaFuncCache(h,d)})}),De(r,c=>{this.computeLookaheadFunc(t,c.idx,768,"Repetition",c.maxLookahead,Qi(c))}),De(s,c=>{this.computeLookaheadFunc(t,c.idx,512,"Option",c.maxLookahead,Qi(c))}),De(i,c=>{this.computeLookaheadFunc(t,c.idx,1024,"RepetitionMandatory",c.maxLookahead,Qi(c))}),De(o,c=>{this.computeLookaheadFunc(t,c.idx,1536,"RepetitionMandatoryWithSeparator",c.maxLookahead,Qi(c))}),De(l,c=>{this.computeLookaheadFunc(t,c.idx,1280,"RepetitionWithSeparator",c.maxLookahead,Qi(c))})})})}computeLookaheadFunc(e,t,n,r,s,i){this.TRACE_INIT(`${i}${t===0?"":t}`,()=>{let o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),l=bw(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,t){let n=this.getLastExplicitRuleShortName();return bw(n,e,t)}
vendor: 11,757 bytes, lines 832-836
832getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},jEe=class extends hh{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},$g=new jEe;function OEe(e){$g.reset(),e.accept($g);let t=$g.dslMethods;return $g.reset(),t}function dI(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function hI(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function REe(e,t,n){e.children[n]===void 0?e.children[n]=[t]:e.children[n].push(t)}function _Ee(e,t,n){e.children[t]===void 0?e.children[t]=[n]:e.children[t].push(n)}var IEe="name";function ez(e,t){Object.defineProperty(e,IEe,{enumerable:!1,configurable:!0,writable:!1,value:t})}function MEe(e,t){let n=Ss(e),r=n.length;for(let s=0;s<r;s++){let i=n[s],o=e[i],l=o.length;for(let c=0;c<l;c++){let u=o[c];u.tokenTypeIdx===void 0&&this[u.name](u.children,t)}}}function LEe(e,t){let n=function(){};ez(n,e+"BaseSemantics");let r={visit:function(s,i){if(mt(s)&&(s=s[0]),!ia(s))return this[s.name](s.children,i)},validateVisitor:function(){let s=DEe(this,t);if(!Pt(s)){let i=ve(s,o=>o.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
833	${i.join(`
834
835`).replace(/\n/g,`
836	`)}`)}}};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=t,n}function PEe(e,t,n){let r=function(){};ez(r,e+"BaseSemanticsWithDefaults");let s=Object.create(n.prototype);return De(t,i=>{s[i]=MEe}),r.prototype=s,r.prototype.constructor=r,r}var oN;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(oN||(oN={}));function DEe(e,t){return $Ee(e,t)}function $Ee(e,t){let n=ni(t,s=>da(e[s])===!1),r=ve(n,s=>({msg:`Missing visitor method: <${s}> on ${e.constructor.name} CST Visitor.`,type:oN.MISSING_METHOD,methodName:s}));return Rm(r)}var FEe=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Ie(e,"nodeLocationTracking")?e.nodeLocationTracking:oa.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=_n,this.cstFinallyStateUpdate=_n,this.cstPostTerminal=_n,this.cstPostNonTerminal=_n,this.cstPostRule=_n;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=hI,this.setNodeLocationFromNode=hI,this.cstPostRule=_n,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=_n,this.setNodeLocationFromNode=_n,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=dI,this.setNodeLocationFromNode=dI,this.cstPostRule=_n,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=_n,this.setNodeLocationFromNode=_n,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=_n,this.setNodeLocationFromNode=_n,this.cstPostRule=_n,this.setInitialNodeLocation=_n;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];REe(n,t,e),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];_Ee(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(ia(this.baseCstVisitorConstructor)){let e=LEe(this.className,Ss(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(ia(this.baseCstVisitorWithDefaultsConstructor)){let e=PEe(this.className,Ss(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},BEe=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):b0}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?b0:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},UEe=class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=w0){if(Ur(this.definedRulesNames,e)){let s={message:nc.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Pr.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=w0){let r=uEe(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);let s=this.defineRule(e,t,n);return this[e]=s,s}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,t),!0}catch(r){if(x0(r))return!1;throw r}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Hwe(Mn(this.gastProductionsCache))}},zEe=class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={}
vendor: 4,405 bytes, lines 836-843
836,this.ruleShortNameIdx=256,this.tokenMatcher=y0,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Ie(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
837	See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
838	For Further details.`);if(mt(e)){if(Pt(e))throw Error(`A Token Vocabulary cannot be empty.
839	Note that the first argument for the parser constructor
840	is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
841	See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
842	For Further details.`)}if(mt(e))this.tokensMap=Ns(e,(s,i)=>(s[i.name]=i,s),{});else if(Ie(e,"modes")&&bi(vi(Mn(e.modes)),$Se)){let s=vi(Mn(e.modes)),i=oA(s);this.tokensMap=Ns(i,(o,l)=>(o[l.name]=l,o),{})}else if(Xs(e))this.tokensMap=ar(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Vc;let n=Ie(e,"modes")?vi(Mn(e.modes)):Mn(e),r=bi(n,s=>Pt(s.categoryMatches));this.tokenMatcher=r?y0:Im,Mm(Mn(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
843Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let r=Ie(n,"resyncEnabled")?n.resyncEnabled:w0.resyncEnabled,s=Ie(n,"recoveryValueFunc")?n.recoveryValueFunc:w0.recoveryValueFunc,i=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[i]=e,this.fullRuleNameToShort[e]=i;let o;return this.outputCst===!0?o=function(...l){try{this.ruleInvocationStateUpdate(i,e,this.subruleIdx),t.apply(this,l);let c=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(c),c}catch(c){return this.invokeRuleCatch(c,r,s)}finally{this.ruleFinallyStateUpdate()}}:o=function(...l){try{return this.ruleInvocationStateUpdate(i,e,this.subruleIdx),t.apply(this,l)}catch(c){return this.invokeRuleCatch(c,r,s)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){let r=this.RULE_STACK.length===1,s=t&&!this.isBackTracking()&&this.recoveryEnabled;if(x0(e)){let i=e;if(s){let o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(i.resyncedTokens=this.reSyncTo(o),this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return n(e);else{if(this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,i.partialCstResult=l}throw i}}else{if(r)return this.moveToTerminatedState(),n(e);throw i}}else throw e}optionInternal(e,t){let n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),s;if(typeof e!="function"){s=e.DEF;let i=e.GATE;if(i!==void 0){let o=r;r=()=>i.call(this)&&o.call(this)}}else s=e;if(r.call(this)===!0)return s.call(this)}atLeastOneInternal(e,t){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),s;if(typeof t!="function"){s=t.DEF;let i=t.GATE;if(i!==void 0){let o=r;r=()=>i.call(this)&&o.call(this)}}else s=t;if(r.call(this)===!0){let i=this.doSingleRepetition(s);for(;r.call(this)===!0&&i===!0;)i=this.doSingleRepetition(s)}else throw this.raiseEarlyExitException(e,fn.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,1024,e,YSe)}atLeastOneSepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){let r=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let i=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,i,r,cI],i,1536,e,cI)}else throw this.raiseEarlyExitException(e,fn.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}
vendor: 5,480 bytes, lines 843-844
843manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),s;if(typeof t!="function"){s=t.DEF;let o=t.GATE;if(o!==void 0){let l=r;r=()=>o.call(this)&&l.call(this)}}else s=t;let i=!0;for(;r.call(this)===!0&&i===!0;)i=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,768,e,qSe,i)}manySepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){let r=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let i=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,i,r,lI],i,1280,e,lI)}}repetitionSepSecondInternal(e,t,n,r,s){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,s],n,1536,e,s)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let n=this.getKeyForAutomaticLookahead(256,t),r=mt(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,r);if(s!==void 0)return r[s].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new SEe(t,e))}}subruleInternal(e,t,n){let r;try{let s=n!==void 0?n.ARGS:void 0;return this.subruleIdx=t,r=e.apply(this,s),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(s){throw this.subruleInternalError(s,n,e.ruleName)}}subruleInternalError(e,t,n){throw x0(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{let s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),r=s):this.consumeInternalError(e,s,n)}catch(s){r=this.consumeInternalRecovery(e,t,s)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r,s=this.LA(0);throw n!==void 0&&n.ERR_MSG?r=n.ERR_MSG:r=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new X6(r,t,s))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(s){throw s.name===Z6?n:s}}else throw n}saveRecogState(){let e=this.errors,t=ar(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Vc)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},VEe=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Ie(e,"errorMessageProvider")?e.errorMessageProvider:oa.errorMessageProvider}SAVE_ERROR(e){if(x0(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:ar(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return ar(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){let r=this.getCurrRuleFullName(),s=this.getGAstProductions()[r],i=dA(e,s,t,this.maxLookahead)[0],o=[];for(let c=1;c<=this.maxLookahead;c++)o.push(this.LA(c));let l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new EEe(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],s=uA(e,r,this.maxLookahead),i=[];for(let c=1;c<=this.maxLookahead;c++)i.push(this.LA(c));let o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:i,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new wEe(l,this.LA(1),o))}},WEe=class{initContentAssist(){}computeContentAssist(e,t){let n=this.gastProductionsCache[e];if(ia(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return B6([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=Ai(e.ruleStack),n=this.getGAstProductions()[t];return new KSe(n,e).startWalking()}},Mb={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Mb);var fI=!0,pI=Math.pow(2,8)-1,tz=$({name:"RECORDING_PHASE_TOKEN",pattern:ht.NA});Mm([tz]);var nz=cA(tz,`This IToken indicates the Parser is in Recording Phase
844	See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(nz);
vendor: 4,454 bytes, lines 844-849
844var HEe={name:`This CSTNode indicates the Parser is in Recording Phase
845	See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},GEe=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let t=e>0?e:"";this[`CONSUME${t}`]=function(n,r){return this.consumeInternalRecord(n,e,r)},this[`SUBRULE${t}`]=function(n,r){return this.subruleInternalRecord(n,e,r)},this[`OPTION${t}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${t}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${t}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${t}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${t}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${t}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let t=0;t<10;t++){let n=t>0?t:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return b0}topLevelRuleRecord(e,t){try{let n=new dh({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
846	 This error was thrown during the "grammar recording phase" For more info see:
847	https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,t){return Lh.call(this,Zr,e,t)}atLeastOneInternalRecord(e,t){Lh.call(this,Eo,t,e)}atLeastOneSepFirstInternalRecord(e,t){Lh.call(this,No,t,e,fI)}manyInternalRecord(e,t){Lh.call(this,Fn,t,e)}manySepFirstInternalRecord(e,t){Lh.call(this,_i,t,e,fI)}orInternalRecord(e,t){return KEe.call(this,e,t)}subruleInternalRecord(e,t,n){if(v0(t),!e||Ie(e,"ruleName")===!1){let o=new Error(`<SUBRULE${mI(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
848 inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let r=Vd(this.recordingProdStack),s=e.ruleName,i=new ks({idx:t,nonTerminalName:s,label:n==null?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(i),this.outputCst?HEe:Mb}consumeInternalRecord(e,t,n){if(v0(t),!D6(e)){let i=new Error(`<CONSUME${mI(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
849 inside top level rule: <${this.recordingProdStack[0].name}>`);throw i.KNOWN_RECORDER_ERROR=!0,i}let r=Vd(this.recordingProdStack),s=new nn({idx:t,terminalType:e,label:n==null?void 0:n.LABEL});return r.definition.push(s),nz}};function Lh(e,t,n,r=!1){v0(n);let s=Vd(this.recordingProdStack),i=da(t)?t:t.DEF,o=new e({definition:[],idx:n});return r&&(o.separator=t.SEP),Ie(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),i.call(this),s.definition.push(o),this.recordingProdStack.pop(),Mb}function KEe(e,t){v0(t);let n=Vd(this.recordingProdStack),r=mt(e)===!1,s=r===!1?e:e.DEF,i=new Ii({definition:[],idx:t,ignoreAmbiguities:r&&e.IGNORE_AMBIGUITIES===!0});Ie(e,"MAX_LOOKAHEAD")&&(i.maxLookahead=e.MAX_LOOKAHEAD);let o=k6(s,l=>da(l.GATE));return i.hasPredicates=o,n.definition.push(i),De(s,l=>{let c=new ns({definition:[]});i.definition.push(c),Ie(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:Ie(l,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),l.ALT.call(this),this.recordingProdStack.pop()}),Mb}function mI(e){return e===0?"":`${e}`}function v0(e){if(e<0||e>
vendor: 5,052 bytes, lines 849-856
849pI){let t=new Error(`Invalid DSL Method idx value: <${e}>
850	Idx value must be a none negative value smaller than ${pI+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var qEe=class{initPerformanceTracer(e){if(Ie(e,"traceInitPerf")){let t=e.traceInitPerf,n=typeof t=="number";this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=oa.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join("	");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:s}=T6(t),i=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&i(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,s}else return t()}};function YEe(e,t){t.forEach(n=>{let r=n.prototype;Object.getOwnPropertyNames(r).forEach(s=>{if(s==="constructor")return;let i=Object.getOwnPropertyDescriptor(r,s);i&&(i.get||i.set)?Object.defineProperty(e.prototype,s,i):e.prototype[s]=n.prototype[s]})})}var b0=cA(Vc,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(b0);var oa=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:F6,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),w0=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),Pr;(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Pr||(Pr={}));var fA=class rz{static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.	\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let n=this.className;this.TRACE_INIT("toFastProps",()=>{A6(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),De(this.definedRulesNames,s=>{let i=this[s].originalGrammarAction,o;this.TRACE_INIT(`${s} Rule`,()=>{o=this.topLevelRuleRecord(s,i)}),this.gastProductionsCache[s]=o})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=vEe({rules:Mn(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(Pt(r)&&this.skipValidations===!1){let s=bEe({rules:Mn(this.gastProductionsCache),tokenTypes:Mn(this.tokensMap),errMsgProvider:nc,grammarName:n}),i=sEe({lookaheadStrategy:this.lookaheadStrategy,rules:Mn(this.gastProductionsCache),tokenTypes:Mn(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(s,i)}}),Pt(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let s=Xwe(Mn(this.gastProductionsCache));this.resyncFollows=s}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var s,i;(i=(s=this.lookaheadStrategy).initialize)===null||i===void 0||i.call(s,{rules:Mn(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Mn(this.gastProductionsCache))})),!rz.DEFER_DEFINITION_ERRORS_HANDLING&&!Pt(this.definitionErrors))throw t=ve(this.definitionErrors,s=>s.message),new Error(`Parser Definition Errors detected:
851 ${t.join(`
852-------------------------------
853`)}`)})}constructor(t,n){this.definitionErrors=[],this.selfAnalysisDone=!1;let r=this;if(r.initErrorHandler(n),r.initLexerAdapter(),r.initLooksAhead(n),r.initRecognizerEngine(t,n),r.initRecoverable(n),r.initTreeBuilder(n),r.initContentAssist(),r.initGastRecorder(n),r.initPerformanceTracer(n),Ie(n,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
854	Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
855	See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
856	For further details.`);this.skipValidations=Ie(n,"skipValidations")?n.skipValidations:oa.skipValidations}};fA.DEFER_DEFINITION_ERRORS_HANDLING=!1;YEe(fA,[kEe,AEe,FEe,BEe,zEe,UEe,VEe,WEe,GEe,qEe]);var QEe=class extends fA{constructor(e,t=oa){let n=ar(t);n.outputCst=!0,super(e,n)}},Tt=$({name:"KeywordReserved",pattern:ht.NA}),We=$({name:"Keyword",pattern:ht.NA}),Os=$({name:"DateFunction",pattern:ht.NA}),fh=$({name:"AggregateFunction",pattern:ht.NA}),sz=$({name:"LocationFunction",pattern:ht.NA}),JEe=$({name:"FieldsFunction",pattern:ht.NA}),Lb=$({name:"FieldsFunctionParamIdentifier",pattern:ht.NA}),Lm=$({name:"OtherFunction",pattern:ht.NA}
856),Ht=$({name:"DateLiteral",pattern:ht.NA}),sn=$({name:"DateLiteralNotIdentifier",pattern:ht.NA}),gn=$({name:"DateNLiteral",pattern:ht.NA}),ph=$({name:"RelationalOperator",pattern:ht.NA}),Mi=$({name:"SymbolIdentifier",pattern:ht.NA}),S0=$({name:"DateIdentifier",pattern:ht.NA}),Uo=$({name:"NumberIdentifier",pattern:ht.NA}),Pb=$({name:"DecimalNumberIdentifier",pattern:ht.NA}),iz=$({name:"IntegerNumberIdentifier",pattern:ht.NA}),XEe=$({name:"IdentifierNotKeyword",pattern:ht.NA}),ha=$({name:"UsingScopeEnumeration",pattern:ht.NA}),ZEe=$({name:"RParenMismatch",pattern:ht.NA}),gI=/[a-zA-Z][a-zA-Z0-9_.]*/y;function eNe(e,t){gI.lastIndex=t;let n=gI.exec(e);return n&&n[0].includes("..")?null:n}var O=$({name:"Identifier",pattern:eNe,line_breaks:!1,categories:[XEe],start_chars_hint:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]}),Ey=$({name:"StringIdentifier",line_breaks:!0,pattern:/(')(?:(?=(\\?))\2.)*?\1/}),tNe=$({name:"WhiteSpace",pattern:/\s+/,group:ht.SKIPPED}),aN=$({name:"AND",pattern:/AND/i,longer_alt:O,categories:[We,Tt]}),nNe=$({name:"AS",pattern:/AS/i,longer_alt:O,categories:[We,Tt]}),lN=$({name:"DESC",pattern:/DESC/i,longer_alt:O,categories:[We,Tt]}),cN=$({name:"ASC",pattern:/ASC/i,longer_alt:O,categories:[We,Tt]}),oz=$({name:"ORDER_BY",pattern:/ORDER BY/i,longer_alt:O}),az=$({name:"CUBE",pattern:/CUBE/i,longer_alt:O,categories:[We,Tt]}),lz=$({name:"ELSE",pattern:/ELSE/i,longer_alt:O,categories:[We,Tt]}),cz=$({name:"EXCLUDES",pattern:/EXCLUDES/i,longer_alt:O,categories:[We,Tt]}),uN=$({name:"FALSE",pattern:/FALSE/i,longer_alt:O,categories:[We,Tt]}),dN=$({name:"FIRST",pattern:/FIRST/i,longer_alt:O,categories:[We,Tt]}),uz=$({name:"FROM",pattern:/FROM/i,longer_alt:O,categories:[We,Tt]}),dz=$({name:"GROUP_BY",pattern:/GROUP BY/i,longer_alt:O}),hz=$({name:"HAVING",pattern:/HAVING/i,longer_alt:O,categories:[We,Tt]}),hN=$({name:"IN",pattern:/IN/i,longer_alt:O,categories:[We,Tt]}),fz=$({name:"INCLUDES",pattern:/INCLUDES/i,longer_alt:O,categories:[We,Tt]}),fN=$({name:"LAST",pattern:/LAST/i,longer_alt:O,categories:[We,Tt]}),pz=$({name:"LIKE",pattern:/LIKE/i,longer_alt:O,categories:[We,Tt]}),mz=$({name:"LIMIT",pattern:/LIMIT/i,longer_alt:O,categories:[We,Tt]}),pN=$({name:"NOT",pattern:/NOT/i,longer_alt:O,categories:[We,Tt]}),mN=$({name:"NULL",pattern:/NULL/i,longer_alt:O,categories:[We,Tt]}),gN=$({name:"NULLS",pattern:/NULLS/i,longer_alt:O,categories:[We,Tt]}),gz=$({name:"OR",pattern:/OR/i,longer_alt:O,categories:[We,Tt]}),yz=$({name:"ROLLUP",pattern:/ROLLUP/i,longer_alt:O,categories:[We,Tt]}),xz=$({name:"SELECT",pattern:/SELECT/i,longer_alt:O,categories:[We,Tt]}),yN=$({name:"TRUE",pattern:/TRUE/i,longer_alt:O,categories:[We,Tt]}),vz=$({name:"USING",pattern:/USING/i,longer_alt:O,categories:[We,Tt]}),bz=$({name:"WHERE",pattern:/WHERE/i,longer_alt:O,categories:[We,Tt]}),wz=$({name:"WITH",pattern:/WITH/i,longer_alt:O,categories:[We,Tt]}),Sz=$({name:"FOR",pattern:/FOR/i,longer_alt:O,categories:[We,Tt]}),xN=$({name:"UPDATE",pattern:/UPDATE/i,longer_alt:O,categories:[We,Tt]}),Ez=$({name:"ABOVE",pattern:/ABOVE/i,longer_alt:O,categories:[We,O]}),Nz=$({name:"ABOVE_OR_BELOW",pattern:/ABOVE_OR_BELOW/i,longer_alt:O,categories:[We,O]}),kz=$({name:"new",pattern:/new/i,longer_alt:O,categories:[We,O]}),Cz=$({name:"AT",pattern:/AT/i,longer_alt:O,categories:[We,O]}),Tz=$({name:"BELOW",pattern:/BELOW/i,longer_alt:O,categories:[We,O]}),Az=$({name:"DATA_CATEGORY",pattern:/DATA CATEGORY/i,longer_alt:O,categories:[We]}),jz=$({name:"END",pattern:/END/i,longer_alt:O,categories:[We,O]}),vN=$({name:"OFFSET",pattern:/OFFSET/i,longer_alt:O,categories:[We,O]}),Oz=$({name:"REFERENCE",pattern:/REFERENCE/i,longer_alt:O,categories:[We,O]}),Rz=$({name:"SCOPE",pattern:/SCOPE/i,longer_alt:O,categories:[We,O]}),_z=$({name:"TRACKING",pattern:/TRACKING/i,longer_alt:O,categories:[We,O]}),Iz=$({name:"THEN",pattern:/THEN/i,longer_alt:O,categories:[We,O]}),Mz=$({name:"TYPEOF",pattern:/TYPEOF/i,longer_alt:O,categories:[We,O]}),Lz=$({name:"VIEW",pattern:/VIEW/i,longer_alt:O,categories:[We,O]}),Pz=$({name:"VIEWSTAT",pattern:/VIEWSTAT/i,longer_alt:O,categories:[We,O]}
856),Dz=$({name:"WHEN",pattern:/WHEN/i,longer_alt:O,categories:[We,O]}),$z=$({name:"SECURITY_ENFORCED",pattern:/SECURITY_ENFORCED/i,longer_alt:O,categories:[We,O]}),Fz=$({name:"SYSTEM_MODE",pattern:/SYSTEM_MODE/i,longer_alt:O,categories:[We,O]}),Bz=$({name:"USER_MODE",pattern:/USER_MODE/i,longer_alt:O,categories:[We,O]}),Uz=$({name:"CALENDAR_MONTH",pattern:/CALENDAR_MONTH/i,longer_alt:O,categories:[Os,O]}),zz=$({name:"CALENDAR_QUARTER",pattern:/CALENDAR_QUARTER/i,longer_alt:O,categories:[Os,O]}),Vz=$({name:"CALENDAR_YEAR",pattern:/CALENDAR_YEAR/i,longer_alt:O,categories:[Os,O]}),Wz=$({name:"DAY_IN_MONTH",pattern:/DAY_IN_MONTH/i,longer_alt:O,categories:[Os,O]}),Hz=$({name:"DAY_IN_WEEK",pattern:/DAY_IN_WEEK/i,longer_alt:O,categories:[Os,O]}),Gz=$({name:"DAY_IN_YEAR",pattern:/DAY_IN_YEAR/i,longer_alt:O,categories:[Os,O]}),Kz=$({name:"DAY_ONLY",pattern:/DAY_ONLY/i,longer_alt:O,categories:[Os,O]}),qz=$({name:"FISCAL_MONTH",pattern:/FISCAL_MONTH/i,longer_alt:O,categories:[Os,O]}),Yz=$({name:"FISCAL_QUARTER",pattern:/FISCAL_QUARTER/i,longer_alt:O,categories:[Os,O]}),Qz=$({name:"FISCAL_YEAR",pattern:/FISCAL_YEAR/i,longer_alt:O,categories:[Os,O]}),Jz=$({name:"HOUR_IN_DAY",pattern:/HOUR_IN_DAY/i,longer_alt:O,categories:[Os,O]}),Xz=$({name:"WEEK_IN_MONTH",pattern:/WEEK_IN_MONTH/i,longer_alt:O,categories:[Os,O]}),Zz=$({name:"WEEK_IN_YEAR",pattern:/WEEK_IN_YEAR/i,longer_alt:O,categories:[Os,O]}),eV=$({name:"AVG",pattern:/AVG/i,longer_alt:O,categories:[fh,O]}),tV=$({name:"COUNT",pattern:/COUNT/i,longer_alt:O,categories:[fh,O]}),nV=$({name:"COUNT_DISTINCT",pattern:/COUNT_DISTINCT/i,longer_alt:O,categories:[fh,O]}),rV=$({name:"MIN",pattern:/MIN/i,longer_alt:O,categories:[fh,O]}),sV=$({name:"MAX",pattern:/MAX/i,longer_alt:O,categories:[fh,O]}),iV=$({name:"SUM",pattern:/SUM/i,longer_alt:O,categories:[fh,O]}),oV=$({name:"DISTANCE",pattern:/DISTANCE/i,longer_alt:O,categories:[sz,O]}),aV=$({name:"GEOLOCATION",pattern:/GEOLOCATION/i,longer_alt:O,categories:[sz,O]}),lV=$({name:"FIELDS",pattern:/FIELDS/i,longer_alt:O,categories:[JEe,O]}),cV=$({name:"FORMAT",pattern:/FORMAT/i,longer_alt:O,categories:[Lm,O]}),uV=$({name:"toLabel",pattern:/TOLABEL/i,longer_alt:O,categories:[Lm,O]}),dV=$({name:"convertTimezone",pattern:/CONVERTTIMEZONE/i,longer_alt:O,categories:[Lm,O]}),hV=$({name:"convertCurrency",pattern:/CONVERTCURRENCY/i,longer_alt:O,categories:[Lm,O]}),bN=$({name:"GROUPING",pattern:/GROUPING/i,longer_alt:O,categories:[Lm,O]}),rNe=$({name:"ALL",pattern:/ALL/i,longer_alt:O,categories:[Lb,O]}),sNe=$({name:"CUSTOM",pattern:/CUSTOM/i,longer_alt:O,categories:[Lb,O]}),iNe=$({name:"STANDARD",pattern:/STANDARD/i,longer_alt:O,categories:[Lb,O]}),oNe=$({name:"YESTERDAY",pattern:/YESTERDAY/i,longer_alt:O,categories:[Ht,O,sn]}),aNe=$({name:"TODAY",pattern:/TODAY/i,longer_alt:O,categories:[Ht,O,sn]}),lNe=$({name:"TOMORROW",pattern:/TOMORROW/i,longer_alt:O,categories:[Ht,O,sn]}),cNe=$({name:"LAST_WEEK",pattern:/LAST_WEEK/i,longer_alt:O,categories:[Ht,O,sn]}),uNe=$({name:"THIS_WEEK",pattern:/THIS_WEEK/i,longer_alt:O,categories:[Ht,O,sn]}),dNe=$({name:"NEXT_WEEK",pattern:/NEXT_WEEK/i,longer_alt:O,categories:[Ht,O,sn]}),hNe=$({name:"LAST_MONTH",pattern:/LAST_MONTH/i,longer_alt:O,categories:[Ht,O,sn]}),fNe=$({name:"THIS_MONTH",pattern:/THIS_MONTH/i,longer_alt:O,categories:[Ht,O,sn]}),pNe=$({name:"NEXT_MONTH",pattern:/NEXT_MONTH/i,longer_alt:O,categories:[Ht,O,sn]}),mNe=$({name:"LAST_90_DAYS",pattern:/LAST_90_DAYS/i,longer_alt:O,categories:[Ht,O,sn]}),gNe=$({name:"NEXT_90_DAYS",pattern:/NEXT_90_DAYS/i,longer_alt:O,categories:[Ht,O,sn]}),yNe=$({name:"THIS_QUARTER",pattern:/THIS_QUARTER/i,longer_alt:O,categories:[Ht,O,sn]}),xNe=$({name:"LAST_QUARTER",pattern:/LAST_QUARTER/i,longer_alt:O,categories:[Ht,O,sn]}),vNe=$({name:"NEXT_QUARTER",pattern:/NEXT_QUARTER/i,longer_alt:O,categories:[Ht,O,sn]}),bNe=$({name:"THIS_YEAR",pattern:/THIS_YEAR/i,longer_alt:O,categories:[Ht,O,sn]}),wNe=$({name:"LAST_YEAR",pattern:/LAST_YEAR/i,longer_alt:O,categories:[Ht,O,sn]}),SNe=$({name:"NEXT_YEAR",pattern:/NEXT_YEAR/i,longer_alt:O,categories:[Ht,O,sn]}
856),ENe=$({name:"THIS_FISCAL_QUARTER",pattern:/THIS_FISCAL_QUARTER/i,longer_alt:O,categories:[Ht,O,sn]}),NNe=$({name:"LAST_FISCAL_QUARTER",pattern:/LAST_FISCAL_QUARTER/i,longer_alt:O,categories:[Ht,O,sn]}),kNe=$({name:"NEXT_FISCAL_QUARTER",pattern:/NEXT_FISCAL_QUARTER/i,longer_alt:O,categories:[Ht,O,sn]}),CNe=$({name:"THIS_FISCAL_YEAR",pattern:/THIS_FISCAL_YEAR/i,longer_alt:O,categories:[Ht,O,sn]}),TNe=$({name:"LAST_FISCAL_YEAR",pattern:/LAST_FISCAL_YEAR/i,longer_alt:O,categories:[Ht,O,sn]}),ANe=$({name:"NEXT_FISCAL_YEAR",pattern:/NEXT_FISCAL_YEAR/i,longer_alt:O,categories:[Ht,O,sn]}),jNe=$({name:"NEXT_N_DAYS",pattern:/NEXT_N_DAYS/i,longer_alt:O,categories:[gn,O]}),ONe=$({name:"LAST_N_DAYS",pattern:/LAST_N_DAYS/i,longer_alt:O,categories:[gn,O]}),RNe=$({name:"N_DAYS_AGO",pattern:/N_DAYS_AGO/i,longer_alt:O,categories:[gn,O]}),_Ne=$({name:"NEXT_N_WEEKS",pattern:/NEXT_N_WEEKS/i,longer_alt:O,categories:[gn,O]}),INe=$({name:"LAST_N_WEEKS",pattern:/LAST_N_WEEKS/i,longer_alt:O,categories:[gn,O]}),MNe=$({name:"N_WEEKS_AGO",pattern:/N_WEEKS_AGO/i,longer_alt:O,categories:[gn,O]}),LNe=$({name:"NEXT_N_MONTHS",pattern:/NEXT_N_MONTHS/i,longer_alt:O,categories:[gn,O]}),PNe=$({name:"LAST_N_MONTHS",pattern:/LAST_N_MONTHS/i,longer_alt:O,categories:[gn,O]}),DNe=$({name:"N_MONTHS_AGO",pattern:/N_MONTHS_AGO/i,longer_alt:O,categories:[gn,O]}),$Ne=$({name:"NEXT_N_QUARTERS",pattern:/NEXT_N_QUARTERS/i,longer_alt:O,categories:[gn,O]}),FNe=$({name:"LAST_N_QUARTERS",pattern:/LAST_N_QUARTERS/i,longer_alt:O,categories:[gn,O]}),BNe=$({name:"N_QUARTERS_AGO",pattern:/N_QUARTERS_AGO/i,longer_alt:O,categories:[gn,O]}),UNe=$({name:"NEXT_N_YEARS",pattern:/NEXT_N_YEARS/i,longer_alt:O,categories:[gn,O]}),zNe=$({name:"LAST_N_YEARS",pattern:/LAST_N_YEARS/i,longer_alt:O,categories:[gn,O]}),VNe=$({name:"N_YEARS_AGO",pattern:/N_YEARS_AGO/i,longer_alt:O,categories:[gn,O]}),WNe=$({name:"NEXT_N_FISCAL_QUARTERS",pattern:/NEXT_N_FISCAL_QUARTERS/i,longer_alt:O,categories:[gn,O]}),HNe=$({name:"LAST_N_FISCAL_QUARTERS",pattern:/LAST_N_FISCAL_QUARTERS/i,longer_alt:O,categories:[gn,O]}),GNe=$({name:"N_FISCAL_QUARTERS_AGO",pattern:/N_FISCAL_QUARTERS_AGO/i,longer_alt:O,categories:[gn,O]}),KNe=$({name:"NEXT_N_FISCAL_YEARS",pattern:/NEXT_N_FISCAL_YEARS/i,longer_alt:O,categories:[gn,O]}),qNe=$({name:"LAST_N_FISCAL_YEARS",pattern:/LAST_N_FISCAL_YEARS/i,longer_alt:O,categories:[gn,O]}),YNe=$({name:"N_FISCAL_YEARS_AGO",pattern:/N_FISCAL_YEARS_AGO/i,longer_alt:O,categories:[gn,O]}),fV=$({name:"EQUAL",pattern:"=",categories:[ph]}),pV=$({name:"NOT_EQUAL",pattern:/!=|<>/,categories:[ph]}),wN=$({name:"LESS_THAN",pattern:"<",categories:[ph]}),mV=$({name:"LESS_THAN_OR_EQUAL",pattern:"<=",categories:[ph]}),SN=$({name:"GREATER_THAN",pattern:">",categories:[ph]}),gV=$({name:"GREATER_THAN_OR_EQUAL",pattern:">=",categories:[ph]}),EN=$({name:"DECIMAL",pattern:".",categories:[Mi]}),NN=$({name:"COLON",pattern:":",categories:[Mi]}),QNe=$({name:"SEMICOLON",pattern:";",categories:[Mi]}),Vr=$({name:"COMMA",pattern:",",categories:[Mi]}),JNe=$({name:"ASTERISK",pattern:"*",categories:[Mi]}),_s=$({name:"L_PAREN",pattern:"(",categories:[Mi]}),si=$({name:"R_PAREN",pattern:")",categories:[Mi]}),yV=$({name:"L_SQUARE_BRACKET",pattern:"[",categories:[Mi]}),xV=$({name:"R_SQUARE_BRACKET",pattern:"]",categories:[Mi]}),XNe=$({name:"PLUS",pattern:"+",categories:[Mi]}),ZNe=$({name:"MINUS",pattern:"-",categories:[Mi]}),eke=$({name:"DATETIME",pattern:/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?(\Z|\.[0-9]+Z|\+[0-9]{2}:[0-9]{2}|\-[0-9]{2}:[0-9]{2}|\+[0-9]{4}|\-[0-9]{4})/i,categories:[S0]}),tke=$({name:"DATE",pattern:/[0-9]{4}-[0-9]{2}-[0-9]{2}/,categories:[S0]}),kN=$({name:"CURRENCY_PREFIXED_DECIMAL",pattern:/[a-zA-Z]{3}[0-9]+\.\d+/,longer_alt:O,categories:[Pb]}),nke=$({name:"SIGNED_DECIMAL",pattern:/(\-|\+)[0-9]*\.\d+/,categories:[Uo,Pb]}),rke=$({name:"UNSIGNED_DECIMAL",pattern:/[0-9]*\.\d+/,categories:[Uo,Pb]}),CN=$({name:"CURRENCY_PREFIXED_INTEGER",pattern:/[a-zA-Z]{3}-?[0-9]+/,longer_alt:O,categories:[Pb,O]}),vV=$({name:"SIGNED_INTEGER",pattern:/(\-|\+)[0-9]+/,categories:[Uo,iz]}),Ny=$({name:"GEOLOCATION_UNIT",pattern:/'(mi|km)'/i,longer_alt:O,categories:[O]}),Nu=$({name:"UNSIGNED_INTEGER",pattern:/0|[1-9]\d*/,categories:[Uo,iz]}),ske=$({name:"Delegated",pattern:/DELEGATED/i,longer_alt:O,categories:[ha,O],start_chars_hint:["D","d"]}),ike=$({name:"Everything",pattern:/EVERYTHING/i,longer_alt:O,categories:[ha,O],start_chars_hint:["E","e"]}),oke=$({name:"MineAndMyGroups",pattern:/MINEANDMYGROUPS/i,longer_alt:O,categories:[ha,O],start_chars_hint:["M","m"]}),ake=$({name:"Mine",pattern:/MINE/i,longer_alt:O,categories:[ha,O],start_chars_hint:["M","m"]}),lke=$({name:"MyTerritory",pattern:/MY_TERRITORY/i,longer_alt:O,categories:[ha,O],start_chars_hint:["M","m"]}),cke=$({name:"MyTeamTerritory",pattern:/MY_TEAM_TERRITORY/i,longer_alt:O,categories:[ha,O],start_chars_hint:["M","m"]}),uke=$({name:"Team",pattern:/TEAM/i,longer_alt:O,categories:[ha,O],start_chars_hint:["T","t"]}),dke=$({name:"AllPrivate",pattern:/ALLPRIVATE/i,longer_alt:O,categories:[ha,O],start_chars_hint:["A","a"]}),bV=[tNe,aN,cN,nNe,oz,az,lN,lz,cz,uN,dN,uz,bN,dz,hz,fz,pz,mz,gN,mN,yz,xz,yN,vz,bz,wz,xN,ske,ike,oke,ake,lke,cke,uke,dke,Nz,Ez,kz,Cz,Tz,Az,jz,vN,Oz,Rz,_z,Iz,Mz,Pz,Lz,Dz,$z,Fz,Bz,Uz,zz,Vz,Wz,Hz,Gz,Kz,qz,Yz,Qz,Jz,Xz,Zz,eV,nV,tV,rV,sV,iV,oV,aV,lV,cV,uV,dV,hV,oNe,aNe,lNe,cNe,uNe,dNe,hNe,fNe,pNe,mNe,gNe,yNe,xNe,vNe,bNe,wNe,SNe,ENe,NNe,kNe,CNe,TNe,ANe,jNe,ONe,RNe,_Ne,INe,MNe,LNe,PNe,DNe,$Ne,FNe,BNe,UNe,zNe,VNe,WNe,HNe,GNe,KNe,qNe,YNe,Ny,rNe,sNe,iNe,hN,Sz,gz,fN,pN,kN,CN,Ey,O,eke,tke,nke,rke,Nu,vV,fV,pV,mV,wN,gV,SN,EN,NN,QNe,Vr,JNe,_s,si,yV,xV,
856XNe,ZNe],hke=new ht(bV,{ensureOptimizations:!0,skipValidations:!1});function fke(e){return hke.tokenize(e)}var pke=class extends Error{constructor(e){super(`${e.message} (${e.line}:${e.column})`),this.name="LexingError"}},yI=class extends Error{constructor(e){super(e.message),this.name=e.name}},pA=class extends QEe{constructor({ignoreParseErrors:e}={ignoreParseErrors:!1}){super(bV,{skipValidations:!1,recoveryEnabled:!!e}),this.$_dateFunctionOr=void 0,this.$_aggregateFunction=void 0,this.$_otherFunction=void 0,this.$_atomicExpression=void 0,this.$_apexBindVariableExpression=void 0,this.$_arrayExpression=void 0,this.$_relationalOperator=void 0,this.$_selectClause=void 0,this.$_selectClauseFunctionIdentifier=void 0,this.$_withDataCategoryArr=void 0,this.allowApexBindVariables=!1,this.ignoreParseErrors=!1,this.selectStatement=this.RULE("selectStatement",()=>{this.SUBRULE(this.selectClause),this.SUBRULE(this.fromClause),this.SUBRULE(this.clauseStatements)}),this.selectStatementPartial=this.RULE("selectStatementPartial",()=>{this.OPTION(()=>{this.SUBRULE(this.selectClause)}),this.OPTION1(()=>{this.SUBRULE(this.fromClause)}),this.SUBRULE(this.clauseStatements)}),this.clauseStatements=this.RULE("clauseStatements",()=>{this.OPTION(()=>{this.SUBRULE(this.usingScopeClause)}),this.OPTION1(()=>{this.SUBRULE(this.whereClause)}),this.OPTION2(()=>{this.MANY({DEF:()=>{this.SUBRULE(this.withClause)}})}),this.OPTION3(()=>{this.SUBRULE(this.groupByClause),this.OPTION4(()=>{this.SUBRULE(this.havingClause)})}),this.OPTION5(()=>{this.SUBRULE(this.orderByClause)}),this.OPTION6(()=>{this.SUBRULE(this.limitClause)}),this.OPTION7(()=>{this.SUBRULE(this.offsetClause)}),this.OPTION8(()=>{this.SUBRULE(this.forViewOrReference)}),this.OPTION9(()=>{this.SUBRULE(this.updateTrackingViewstat)})}),this.selectClause=this.RULE("selectClause",()=>{this.CONSUME(xz),this.AT_LEAST_ONE_SEP({SEP:Vr,DEF:()=>{this.OR(this.$_selectClause||(this.$_selectClause=[{ALT:()=>this.SUBRULE(this.selectClauseFunctionIdentifier,{LABEL:"field"})},{ALT:()=>this.SUBRULE(this.selectClauseSubqueryIdentifier,{LABEL:"field"})},{ALT:()=>this.SUBRULE(this.selectClauseTypeOf,{LABEL:"field"})},{ALT:()=>this.SUBRULE(this.selectClauseIdentifier,{LABEL:"field"})}]))}})},{resyncEnabled:!1}),this.selectClauseFunctionIdentifier=this.RULE("selectClauseFunctionIdentifier",()=>{this.OR(this.$_selectClauseFunctionIdentifier||(this.$_selectClauseFunctionIdentifier=[{ALT:()=>this.SUBRULE(this.dateFunction,{LABEL:"fn"})},{ALT:()=>this.SUBRULE(this.aggregateFunction,{LABEL:"fn"})},{ALT:()=>this.SUBRULE(this.locationFunction,{LABEL:"fn"})},{ALT:()=>this.SUBRULE(this.fieldsFunction,{LABEL:"fn"})},{ALT:()=>this.SUBRULE(this.otherFunction,{LABEL:"fn"})}])),this.OPTION(()=>this.CONSUME(O,{LABEL:"alias"}))},{resyncEnabled:!1}),this.selectClauseSubqueryIdentifier=this.RULE("selectClauseSubqueryIdentifier",()=>{this.CONSUME(_s),this.SUBRULE(this.selectStatement),this.CONSUME(si)},{resyncEnabled:!1}),this.selectClauseTypeOf=this.RULE("selectClauseTypeOf",()=>{this.CONSUME(Mz),this.CONSUME(O,{LABEL:"typeOfField"}),this.AT_LEAST_ONE({DEF:()=>{this.SUBRULE(this.selectClauseTypeOfThen)}}),this.OPTION(()=>{this.SUBRULE(this.selectClauseTypeOfElse)}),this.CONSUME(jz)},{resyncEnabled:!1}),this.selectClauseIdentifier=this.RULE("selectClauseIdentifier",()=>{this.CONSUME(O,{LABEL:"field"}),this.OPTION(()=>this.CONSUME1(O,{LABEL:"alias"}))},{resyncEnabled:!1}),this.selectClauseTypeOfThen=this.RULE("selectClauseTypeOfThen",()=>{this.CONSUME(Dz),this.CONSUME(O,{LABEL:"typeOfField"}),this.CONSUME(Iz),this.AT_LEAST_ONE_SEP({SEP:Vr,DEF:()=>{this.CONSUME1(O,{LABEL:"field"})}})},{resyncEnabled:!1}),this.selectClauseTypeOfElse=this.RULE("selectClauseTypeOfElse",()=>{this.CONSUME(lz),this.AT_LEAST_ONE_SEP({SEP:Vr,DEF:()=>{this.CONSUME(O,{LABEL:"field"})}})},{resyncEnabled:!1}),this.fromClause=this.RULE("fromClause",()=>{this.CONSUME(uz),this.CONSUME(O),this.OPTION({GATE:()=>!(this.LA(1).tokenType===vN&&this.LA(2).tokenType===Nu),DEF:()=>this.CONSUME1(O,{LABEL:"alias"})})},{resyncEnabled:!1}),this.usingScopeClause=this.RULE("usingScopeClause",()=>
856{this.CONSUME(vz),this.CONSUME(Rz),this.CONSUME(ha)}),this.whereClause=this.RULE("whereClause",()=>{this.CONSUME(bz);let t=this.getParenCount();this.AT_LEAST_ONE({DEF:()=>{this.SUBRULE(this.conditionExpression,{ARGS:[t,!0,!0]})}}),this.$_checkBalancedParens(t)}),this.whereClauseSubqueryIdentifier=this.RULE("whereClauseSubqueryIdentifier",()=>{this.CONSUME(_s),this.SUBRULE(this.selectStatement),this.CONSUME(si)}),this.conditionExpression=this.RULE("conditionExpression",(t,n,r)=>{t=this.getParenCount(t),this.OPTION(()=>{this.OR([{ALT:()=>this.CONSUME(aN,{LABEL:"logicalOperator"})},{ALT:()=>this.CONSUME(gz,{LABEL:"logicalOperator"})}])}),this.MANY({MAX_LOOKAHEAD:10,DEF:()=>this.SUBRULE(this.expressionPartWithNegation,{ARGS:[t],LABEL:"expressionNegation"})}),this.OR1({MAX_LOOKAHEAD:10,DEF:[{ALT:()=>this.SUBRULE(this.expression,{ARGS:[t,!1,n,r]})}]})}),this.withClause=this.RULE("withClause",()=>{this.CONSUME(wz),this.OR([{ALT:()=>this.CONSUME($z,{LABEL:"withSecurityEnforced"})},{ALT:()=>this.CONSUME(Bz,{LABEL:"withAccessLevel"})},{ALT:()=>this.CONSUME(Fz,{LABEL:"withAccessLevel"})},{ALT:()=>this.SUBRULE(this.withDataCategory)}])}),this.withDataCategory=this.RULE("withDataCategory",()=>{this.CONSUME(Az),this.AT_LEAST_ONE_SEP({SEP:aN,DEF:()=>{this.SUBRULE(this.withDataCategoryArr)}})}),this.withDataCategoryArr=this.RULE("withDataCategoryArr",()=>{this.CONSUME(O,{LABEL:"dataCategoryGroupName"}),this.OR(this.$_withDataCategoryArr||(this.$_withDataCategoryArr=[{ALT:()=>this.CONSUME(Cz,{LABEL:"filteringSelector"})},{ALT:()=>this.CONSUME(Ez,{LABEL:"filteringSelector"})},{ALT:()=>this.CONSUME(Tz,{LABEL:"filteringSelector"})},{ALT:()=>this.CONSUME(Nz,{LABEL:"filteringSelector"})}])),this.OPTION(()=>{this.CONSUME1(_s)}),this.AT_LEAST_ONE_SEP1({SEP:Vr,DEF:()=>{this.CONSUME1(O,{LABEL:"dataCategoryName"})}}),this.OPTION1(()=>{this.CONSUME2(si)})}),this.groupByClause=this.RULE("groupByClause",()=>{this.CONSUME(dz),this.AT_LEAST_ONE_SEP({SEP:Vr,DEF:()=>{this.OR([{ALT:()=>this.SUBRULE(this.cubeFunction,{LABEL:"groupBy"})},{ALT:()=>this.SUBRULE(this.rollupFunction,{LABEL:"groupBy"})},{ALT:()=>this.SUBRULE(this.dateFunction,{LABEL:"groupBy"})},{ALT:()=>this.CONSUME(O,{LABEL:"groupBy"})}])}})}),this.havingClause=this.RULE("havingClause",()=>{this.CONSUME(hz);let t=this.getParenCount();this.AT_LEAST_ONE({DEF:()=>{this.SUBRULE(this.conditionExpression,{ARGS:[t,!0,!1]})}}),this.$_checkBalancedParens(t)}),this.orderByClause=this.RULE("orderByClause",()=>{this.CONSUME(oz),this.AT_LEAST_ONE_SEP({SEP:Vr,DEF:()=>{this.OR([{ALT:()=>this.SUBRULE(this.orderByGroupingFunctionExpression,{LABEL:"orderByExpressionOrFn"})},{ALT:()=>this.SUBRULE(this.orderBySpecialFunctionExpression,{LABEL:"orderByExpressionOrFn"})},{ALT:()=>this.SUBRULE(this.orderByExpression,{LABEL:"orderByExpressionOrFn"})}])}})}),this.orderByExpression=this.RULE("orderByExpression",()=>{this.CONSUME(O),this.OPTION(()=>{this.OR([{ALT:()=>this.CONSUME(cN,{LABEL:"order"})},{ALT:()=>this.CONSUME(lN,{LABEL:"order"})}])}),this.OPTION1(()=>{this.CONSUME(gN),this.OR1([{ALT:()=>this.CONSUME(dN,{LABEL:"nulls"})},{ALT:()=>this.CONSUME(fN,{LABEL:"nulls"})}])})}),this.orderByGroupingFunctionExpression=this.RULE("orderByGroupingFunctionExpression",()=>{this.CONSUME(bN,{LABEL:"fn"}),this.SUBRULE(this.functionExpression)}),this.orderBySpecialFunctionExpression=this.RULE("orderBySpecialFunctionExpression",()=>{this.OR([{ALT:()=>this.SUBRULE(this.aggregateFunction)},{ALT:()=>this.SUBRULE(this.dateFunction)},{ALT:()=>this.SUBRULE(this.locationFunction)}]),this.OPTION(()=>{this.OR1([{ALT:()=>this.CONSUME(cN,{LABEL:"order"})},{ALT:()=>this.CONSUME(lN,{LABEL:"order"})}])}),this.OPTION1(()=>{this.CONSUME(gN),this.OR2([{ALT:()=>this.CONSUME(dN,{LABEL:"nulls"})},{ALT:()=>this.CONSUME(fN,{LABEL:"nulls"})}])})}),this.limitClause=this.RULE("limitClause",()=>{this.CONSUME(mz),this.CONSUME(Nu,{LABEL:"value"})}),this.offsetClause=this.RULE("offsetClause",()=>{this.CONSUME(vN),this.CONSUME(Nu,{LABEL:"value"})}),this.dateFunction=this.RULE("dateFunction",()=>{this.OR(this.$_dateFunctionOr||(this.$_dateFunctionOr=[{ALT:()=>this.CONSUME(Uz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(zz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Vz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Wz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Hz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Gz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Kz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(qz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Yz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Qz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Jz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Xz,{LABEL:"fn"})},{ALT:()=>this.CONSUME(Zz,{LABEL:"fn"})}])),this.SUBRULE(this.functionExpression)}),this.aggregateFunction=this.RULE("aggregateFunction",()=>{this.OR(this.$_aggregateFunction||(this.$_aggregateFunction=[{ALT:()=>this.CONSUME(eV,{LABEL:"fn"})},{ALT:()=>this.CONSUME(tV,{LABEL:"fn"})},{ALT:()=>this.CONSUME(nV,{LABEL:"fn"})},{ALT:()=>this.CONSUME(rV,{LABEL:"fn"})},{ALT:()=>this.CONSUME(sV,{LABEL:"fn"})},{ALT:()=>this.CONSUME(iV,{LABEL:"fn"})}])),this.SUBRULE(this.functionExpression,{ARGS:[!0]})}),this.fieldsFunction=this.RULE("fieldsFunction",()=>{this.CONSUME(lV,{LABEL:"fn"}),this.CONSUME(_s),this.CONSUME(Lb,{LABEL:"params"}),this.CONSUME(si)}),this.otherFunction=this.RULE("otherFunction",()=>{this.OR(this.$_otherFunction||(this.$_otherFunction=[{ALT:()=>this.CONSUME(cV,{LABEL:"fn"})},{ALT:()=>this.CONSUME(uV,{LABEL:"fn"})},{ALT:()=>this.CONSUME(dV,{LABEL:"fn"})},{ALT:()=>this.CONSUME(hV,{LABEL:"fn"})},{ALT:()=>this.CONSUME(bN,{LABEL:"fn"})}])),this.SUBRULE(this.functionExpression)}),this.cubeFunction=this.RULE("cubeFunction",()=>{this.CONSUME(az,{LABEL:"fn"}),this.SUBRULE(this.functionExpression)}),this.rollupFunction=this.RULE("rollupFunction",()=>{this.CONSUME(yz,{LABEL:"fn"}),this.SUBRULE(this.functionExpression)}),this.functionExpression=this.RULE("functionExpression",t=>{this.CONSUME(_s),this.MANY_SEP({SEP:Vr,DEF:()=>{this.OR([{GATE:()=>!t,ALT:()=>this.SUBRULE(this.aggregateFunction,{LABEL:"params"})},{ALT:()=>this.SUBRULE(this.otherFunction,{LABEL:"params"})},{ALT:()=>this.CONSUME(Ey,{LABEL:"params"})},{ALT:()=>this.CONSUME(Uo,{LABEL:"params"})},{ALT:()=>this.CONSUME(O,{LABEL:"params"})}])}}),this.CONSUME(si)}),this.locationFunction=this.RULE("locationFunction",()=>{this.CONSUME(oV),this.CONSUME(_s),this.CONSUME(O,{LABEL:"location1"}),this.CONSUME(Vr),this.OR([{ALT:()=>this.SUBRULE(this.geolocationFunction,{LABEL:"location2"})},{ALT:()=>this.CONSUME1(O,{LABEL:"location2"})}]),this.CONSUME1(Vr),this.CONSUME(Ny,{LABEL:"unit"}),this.CONSUME(si)}),this.geolocationFunction=this.RULE("geolocationFunction",()=>{this.CONSUME(aV),this.CONSUME(_s),this.CONSUME(Uo,{LABEL:"latitude"}),this.CONSUME(Vr),this.CONSUME1(Uo,{LABEL:"longitude"}),this.CONSUME(si)}),this.expressionPartWithNegation=this.RULE("expressionPartWithNegation",t=>{let n=0;this.MANY(()=>{this.CONSUME(_s),n++}),this.CONSUME(pN,{LABEL:"expressionNegation"}),t&&n&&(t.left+=n)}),this.expression=this.RULE("expression",(t,n,r,s)=>{this.OPTION1(()=>{this.MANY1(()=>{this.CONSUME(_s),t&&t.left++})}),this.OR1([{GATE:()=>!!r,ALT:()=>this.SUBRULE(this.aggregateFunction,{LABEL:"lhs"})},{GATE:()=>!!s,ALT:()=>this.SUBRULE(this.locationFunction,{LABEL:"lhs"})},{ALT:()=>this.SUBRULE(this.dateFunction,{LABEL:"lhs"})},{ALT:()=>this.SUBRULE(this.otherFunction,{LABEL:"lhs"})},{ALT:()=>this.CONSUME(O,{LABEL:"lhs"})}]),this.OR2([{ALT:()=>this.SUBRULE(this.expressionWithRelationalOperator,{LABEL:"operator"})},{ALT:()=>this.SUBRULE(this.expressionWithSetOperator,{LABEL:"operator",ARGS:[n]})}]),this.OPTION3(()=>{this.MANY2({GATE:()=>t?t.left>t.right:!0,DEF:()=>{this.CONSUME(si),t&&t.right++}})})}),this.expressionWithRelationalOperator=this.RULE("expressionWithRelationalOperator",()=>{this.SUBRULE(this.relationalOperator),this.SUBRULE(this.atomicExpression,{LABEL:"rhs"})}),this.expressionWithSetOperator=this.RULE("expressionWithSetOperator",t=>{this.SUBRULE(this.setOperator),this.SUBRULE2(this.atomicExpression,{LABEL:"rhs",ARGS:[!0,t]})}),this.atomicExpression=this.RULE("atomicExpression",(t,n)=>{this.OR(this.$_atomicExpression||(this.$_atomicExpression=[{GATE:()=>this.allowApexBindVariables,ALT:()=>this.SUBRULE(this.apexBindVariableExpression)},{GATE:()=>t,ALT:()=>this.SUBRULE(this.arrayExpression)},{GATE:()=>t&&n,ALT:()=>this.SUBRULE(this.whereClauseSubqueryIdentifier)},{GATE:()=>!t,ALT:()=>this.CONSUME(S0)},{GATE:()=>!t,ALT:()=>this.CONSUME(kN,{LABEL:"CurrencyPrefixedDecimal"})},{GATE:()=>!t,ALT:()=>this.CONSUME(CN,{LABEL:"CurrencyPrefixedInteger"})},{GATE:()=>!t,ALT:()=>this.CONSUME(Uo)},{GATE:()=>!t,ALT:()=>this.CONSUME(mN)},{GATE:()=>!t,ALT:()=>this.SUBRULE(this.booleanValue)},{GATE:()=>!t,ALT:()=>this.CONSUME(Ht)}
856,{GATE:()=>!t,ALT:()=>this.SUBRULE(this.dateNLiteral)},{GATE:()=>!t,ALT:()=>this.CONSUME(Ny,{LABEL:"StringIdentifier"})},{GATE:()=>!t,ALT:()=>this.CONSUME(Ey)}]))}),this.apexBindVariableExpression=this.RULE("apexBindVariableExpression",()=>{this.CONSUME(NN),this.OPTION(()=>{this.SUBRULE(this.apexBindVariableNewInstantiation,{LABEL:"apex"}),this.OPTION1(()=>{this.CONSUME(EN)})}),this.MANY_SEP({SEP:EN,DEF:()=>{this.OR(this.$_apexBindVariableExpression||(this.$_apexBindVariableExpression=[{ALT:()=>this.SUBRULE(this.apexBindVariableFunctionCall,{LABEL:"apex"})},{ALT:()=>this.SUBRULE(this.apexBindVariableIdentifier,{LABEL:"apex"})}]))}})}),this.apexBindVariableIdentifier=this.RULE("apexBindVariableIdentifier",()=>{this.CONSUME(O),this.OPTION(()=>this.SUBRULE(this.apexBindVariableFunctionArrayAccessor))}),this.apexBindVariableNewInstantiation=this.RULE("apexBindVariableNewInstantiation",()=>{this.CONSUME(kz,{LABEL:"new"}),this.CONSUME(O,{LABEL:"function"}),this.OPTION(()=>{this.SUBRULE(this.apexBindVariableGeneric)}),this.SUBRULE(this.apexBindVariableFunctionParams),this.OPTION1(()=>this.SUBRULE(this.apexBindVariableFunctionArrayAccessor))}),this.apexBindVariableFunctionCall=this.RULE("apexBindVariableFunctionCall",()=>{this.CONSUME(O,{LABEL:"function"}),this.SUBRULE(this.apexBindVariableFunctionParams),this.OPTION(()=>this.SUBRULE(this.apexBindVariableFunctionArrayAccessor))}),this.apexBindVariableGeneric=this.RULE("apexBindVariableGeneric",()=>{this.CONSUME(wN),this.AT_LEAST_ONE_SEP({SEP:Vr,DEF:()=>{this.CONSUME(O,{LABEL:"parameter"})}}),this.CONSUME(SN)}),this.apexBindVariableFunctionParams=this.RULE("apexBindVariableFunctionParams",()=>{this.CONSUME(_s),this.MANY_SEP({SEP:Vr,DEF:()=>{this.CONSUME(O,{LABEL:"parameter"})}}),this.CONSUME(si)}),this.apexBindVariableFunctionArrayAccessor=this.RULE("apexBindVariableFunctionArrayAccessor",()=>{this.CONSUME(yV),this.OR([{ALT:()=>this.CONSUME(Nu,{LABEL:"value"})},{ALT:()=>this.CONSUME(O,{LABEL:"value"})}]),this.CONSUME(xV)}),this.arrayExpression=this.RULE("arrayExpression",()=>{this.CONSUME(_s),this.AT_LEAST_ONE_SEP({SEP:Vr,DEF:()=>{this.OR(this.$_arrayExpression||(this.$_arrayExpression=[{ALT:()=>this.CONSUME(kN,{LABEL:"value"})},{ALT:()=>this.CONSUME(CN,{LABEL:"value"})},{ALT:()=>this.CONSUME(Uo,{LABEL:"value"})},{ALT:()=>this.CONSUME(S0,{LABEL:"value"})},{ALT:()=>this.CONSUME(mN,{LABEL:"value"})},{ALT:()=>this.CONSUME(yN,{LABEL:"value"})},{ALT:()=>this.CONSUME(uN,{LABEL:"value"})},{ALT:()=>this.CONSUME(Ht,{LABEL:"value"})},{ALT:()=>this.SUBRULE(this.dateNLiteral,{LABEL:"value"})},{ALT:()=>this.CONSUME(Ny,{LABEL:"value"})},{ALT:()=>this.CONSUME(Ey,{LABEL:"value"})}]))}}),this.CONSUME(si)}),this.relationalOperator=this.RULE("relationalOperator",()=>{this.OR(this.$_relationalOperator||(this.$_relationalOperator=[{ALT:()=>this.CONSUME(fV,{LABEL:"operator"})},{ALT:()=>this.CONSUME(pV,{LABEL:"operator"})},{ALT:()=>this.CONSUME(SN,{LABEL:"operator"})},{ALT:()=>this.CONSUME(gV,{LABEL:"operator"})},{ALT:()=>this.CONSUME(wN,{LABEL:"operator"})},{ALT:()=>this.CONSUME(mV,{LABEL:"operator"})},{ALT:()=>this.CONSUME(pz,{LABEL:"operator"})}]))}),this.setOperator=this.RULE("setOperator",()=>{this.OR([{ALT:()=>this.CONSUME(hN,{LABEL:"operator"})},{ALT:()=>this.SUBRULE(this.notInOperator,{LABEL:"notIn"})},{ALT:()=>this.CONSUME(fz,{LABEL:"operator"})},{ALT:()=>this.CONSUME(cz,{LABEL:"operator"})}])}),this.notInOperator=this.RULE("notInOperator",()=>{this.CONSUME(pN,{LABEL:"operator"}),this.CONSUME(hN,{LABEL:"operator"})}),this.booleanValue=this.RULE("booleanValue",()=>{this.OR([{ALT:()=>this.CONSUME(yN,{LABEL:"boolean"})},{ALT:()=>this.CONSUME(uN,{LABEL:"boolean"})}])}),this.dateNLiteral=this.RULE("dateNLiteral",()=>{this.CONSUME(gn,{LABEL:"dateNLiteral"}),this.CONSUME(NN),this.OR1([{ALT:()=>this.CONSUME(Nu,{LABEL:"variable"})},{ALT:()=>this.CONSUME(vV,{LABEL:"variable"})}])}),this.forViewOrReference=this.RULE("forViewOrReference",()=>{this.CONSUME(Sz),this.OR([{ALT:()=>this.CONSUME(Lz,{LABEL:"value"})},{ALT:()=>this.CONSUME(Oz,{LABEL:"value"})},{ALT:()=>this.CONSUME(xN,{LABEL:"value"})}])}),this.updateTrackingViewstat=this.RULE("updateTrackingViewstat",()=>{this.CONSUME(xN),this.OR([{ALT:()=>this.CONSUME(_z,{LABEL:"value"})},{ALT:()=>this.CONSUME(Pz,{LABEL:"value"})}])}),this.ignoreParseErrors=!!e,this.performSelfAnalysis()}$_checkBalancedParens(e){!this.RECORDING_PHASE&&e&&e.left-e.right!==0&&this.CONSUME(ZEe,{ERR_MSG:"Expecting a token type of --> RParen <-- but found --> '' <--"})}getParenCount(e){return e||{right:0,left:0}}},Fi=new pA;function mke(e,t){let{allowApexBindVariables:n,logErrors:r,ignoreParseErrors:s,allowPartialQuery:i}=t||{allowApexBindVariables:!1,logErrors:!1,ignoreParseErrors:!1},o=fke(e);if(o.errors.length>0)throw r&&(console.log("Lexing Errors:"),console.log(o.errors)),new pke(o.errors[0]);Fi.ignoreParseErrors!==s&&(Fi=new pA({ignoreParseErrors:s}
856)),Fi.input=o.tokens,Fi.allowApexBindVariables=n||!1;let l;if(i?l=Fi.selectStatementPartial():l=Fi.selectStatement(),Fi.errors.length>0&&(r&&(console.log("Parsing Errors:"),console.log(Fi.errors)),!s))throw new yI(Fi.errors[0]);return{cst:l,parseErrors:Fi.errors.map(c=>new yI(c))}}var gke=new pA,yke=gke.getBaseCstVisitorConstructor(),xke=["TRUE","FALSE"],vke=["YESTERDAY","TODAY","TOMORROW","LAST_WEEK","THIS_WEEK","NEXT_WEEK","LAST_MONTH","THIS_MONTH","NEXT_MONTH","LAST_90_DAYS","NEXT_90_DAYS","THIS_QUARTER","LAST_QUARTER","NEXT_QUARTER","THIS_YEAR","LAST_YEAR","NEXT_YEAR","THIS_FISCAL_QUARTER","LAST_FISCAL_QUARTER","NEXT_FISCAL_QUARTER","THIS_FISCAL_YEAR","LAST_FISCAL_YEAR","NEXT_FISCAL_YEAR"],bke=["NEXT_N_DAYS","LAST_N_DAYS","N_DAYS_AGO","NEXT_N_WEEKS","LAST_N_WEEKS","N_WEEKS_AGO","NEXT_N_MONTHS","LAST_N_MONTHS","N_MONTHS_AGO","NEXT_N_QUARTERS","LAST_N_QUARTERS","N_QUARTERS_AGO","NEXT_N_YEARS","LAST_N_YEARS","N_YEARS_AGO","NEXT_N_FISCAL_QUARTERS","LAST_N_FISCAL_QUARTERS","N_FISCAL_QUARTERS_AGO","NEXT_N_FISCAL_YEARS","LAST_N_FISCAL_YEARS","N_FISCAL_YEARS_AGO"],wke=class extends yke{constructor(){super(),this.helpers={$_getFieldFunction:(e,t=!1,n=!0)=>{let r=e.functionExpression?e.functionExpression.map(i=>this.visit(i,{includeType:n})).flat():[],s={};return n&&(s.type="FieldFunctionExpression"),s.functionName=e.fn[0].tokenType.name,s.parameters=r,n&&t&&(s.isAggregateFn=t),s.rawValue=`${e.fn[0].image}(${r.map(i=>typeof i=="string"?i:i.rawValue).join(", ")})`,s},$_getLiteralTypeFromTokenType:e=>e==="REAL_NUMBER"?"DECIMAL":e==="CURRENCY_PREFIXED_DECIMAL"?"DECIMAL_WITH_CURRENCY_PREFIX":e==="CURRENCY_PREFIXED_INTEGER"?"INTEGER_WITH_CURRENCY_PREFIX":e==="SIGNED_DECIMAL"||e==="UNSIGNED_DECIMAL"?"DECIMAL":e==="UNSIGNED_INTEGER"||e==="SIGNED_INTEGER"?"INTEGER":e==="DATETIME"?"DATETIME":e==="DATE"?"DATE":e==="NULL"?"NULL":e==="StringIdentifier"||e==="Identifier"?"STRING":xke.includes(e)?"BOOLEAN":vke.includes(e)?"DATE_LITERAL":bke.includes(e)?"DATE_N_LITERAL":"STRING",$_parseSelect(e,t){let{isSubquery:n}=t||{isSubquery:!1},r={};if(e.selectClause&&(r.fields=this.visit(e.selectClause)),e.fromClause)if(npe(r,n)){let{sObject:s,alias:i,sObjectPrefix:o}=this.visit(e.fromClause);r.relationshipName=s,i&&(r.sObjectAlias=i),o&&(r.sObjectPrefix=o)}else{let{sObject:s,alias:i}=this.visit(e.fromClause);r.sObject=s,i&&(r.sObjectAlias=i)}return Array.isArray(r.fields)&&r.sObjectAlias&&r.fields.forEach(s=>{s.relationships&&s.relationships[0]===r.sObjectAlias&&(s.relationships=s.relationships.slice(1),s.objectPrefix=r.sObjectAlias),s.relationships&&s.relationships.length===0&&(delete s.relationships,s.type="Field")}),r={...r,...this.visit(e.clauseStatements)},r}},this.validateVisitor()}selectStatement(e,t){return this.helpers.$_parseSelect.bind(this)(e,t)}selectStatementPartial(e,t){return this.helpers.$_parseSelect.bind(this)(e,t)}clauseStatements(e){let t={};return e.usingScopeClause&&!e.usingScopeClause[0].recoveredNode&&(t.usingScope=this.visit(e.usingScopeClause)),e.whereClause&&!e.whereClause[0].recoveredNode&&(t.where=this.visit(e.whereClause)),e.withClause&&e.withClause.filter(n=>!n.recoveredNode).forEach(n=>{let{withSecurityEnforced:r,withAccessLevel:s,withDataCategory:i}=this.visit(n);r&&(t.withSecurityEnforced=r),s&&(t.withAccessLevel=s),i&&(t.withDataCategory=i)}),e.groupByClause&&!e.groupByClause[0].recoveredNode&&(t.groupBy=this.visit(e.groupByClause)),e.havingClause&&!e.havingClause[0].recoveredNode&&(t.having=this.visit(e.havingClause)),e.orderByClause&&!e.orderByClause[0].recoveredNode&&(t.orderBy=this.visit(e.orderByClause)),e.limitClause&&!e.limitClause[0].recoveredNode&&(t.limit=Number(this.visit(e.limitClause))),e.offsetClause&&!e.offsetClause[0].recoveredNode&&(t.offset=Number(this.visit(e.offsetClause))),e.forViewOrReference&&!e.forViewOrReference[0].recoveredNode&&(t.for=this.visit(e.forViewOrReference)),e.updateTrackingViewstat&&!e.updateTrackingViewstat[0].recoveredNode&&(t.update=this.visit(e.updateTrackingViewstat)),t}selectClause(e){return e.field?e.field.map(t=>{if(_h(t)){let n=t.image,r;if(!n.includes("."))r={type:"Field",field:n};else{let s=n.split(".");r={type:"FieldRelationship",field:s[s.length-1],relationships:s.slice(0,s.length-1),rawValue:n}}return r}else return this.visit(t)}):[]}selectClauseFunctionIdentifier(e){let t={...this.visit(e.fn)};return e.alias&&(t.alias=e.alias[0].image),t}selectClauseSubqueryIdentifier(e){return{type:"FieldSubquery",subquery:this.visit(e.selectStatement,{isSubquery:!0})}}selectClauseTypeOf(e){let t=e.selectClauseTypeOfThen.map(n=>this.visit(n));return e.selectClauseTypeOfElse&&t.push(this.visit(e.selectClauseTypeOfElse)),{type:"FieldTypeof",field:e.typeOfField[0].image,conditions:t}}selectClauseIdentifier(e){let t=e.field[0],n=e.alias?e.alias[0].image:void 0,r=t.image,s;if(!r.includes("."))s={type:"Field",field:r};else{let i=r.split(".");s={type:"FieldRelationship",field:i[i.length-1],relationships:i.slice(0,i.length-1),rawValue:r}}return n&&(s.alias=n),s}selectClauseTypeOfThen(e){return{type:"WHEN",objectType:e.typeOfField[0].image,fieldList:e.field.map(t=>t.image)}}selectClauseTypeOfElse(e){return{type:"ELSE",fieldList:e.field.map(t=>t.image)}}fromClause(e){let t=e.Identifier[0].image,n;if(t.includes(".")){let r=t.split(".");n={sObjectPrefix:r.slice(0,r.length-1),sObject:r[r.length-1]}}else n={sObject:t};return e.alias&&e.alias[0]&&(n.alias=e.alias[0].image),n}usingScopeClause(e){return e.UsingScopeEnumeration[0].image}whereClauseSubqueryIdentifier(e){return this.visit(e.selectStatement,{isSubquery:!1})}whereClause(e){return e.conditionExpression.reduce((t,n)=>{let r;t.expressionTree?(r=this.visit(n,{prevExpression:t.prevExpression}),t.prevExpression.right=r):(r=this.visit(n),t.expressionTree=r),r.right;let s=r.right;for(;spe(s);)s=s.right;return t.prevExpression=s||r,t},{prevExpression:void 0,expressionTree:void 0}).expressionTree}conditionExpression(e,t){t=t||{},t.prevExpression&&e.logicalOperator&&(t.prevExpression.operator=e.logicalOperator[0].tokenType.name);let n={},r=n;if(Array.isArray(e.expressionNegation))if(e.expressionNegation.length===1)n=this.visit(e.expressionNegation),r=n.right;else{n=this.visit(e.expressionNegation[0]);let s=n;
856e.expressionNegation.slice(1).forEach(i=>{s.right=this.visit(i),r=s.right.right})}return r.left=this.visit(e.expression),n}withClause(e){return e.withSecurityEnforced?{withSecurityEnforced:!0}:e.withAccessLevel?{withAccessLevel:e.withAccessLevel[0].image}:{withDataCategory:{conditions:this.visit(e.withDataCategory)}}}withDataCategory(e){return e.withDataCategoryArr.map(t=>this.visit(t))}withDataCategoryArr(e){return{groupName:e.dataCategoryGroupName[0].image,selector:e.filteringSelector[0].image,parameters:e.dataCategoryName.map(t=>t.image)}}groupByClause(e){return e.groupBy.map(t=>_h(t)?{field:t.image}:{fn:this.visit(t,{includeType:!1})})}havingClause(e){return e.conditionExpression.reduce((t,n)=>(t.expressionTree?(t.prevExpression.right=this.visit(n,{prevExpression:t.prevExpression}),t.prevExpression=t.prevExpression.right):(t.expressionTree=this.visit(n),t.prevExpression=t.expressionTree),t),{prevExpression:void 0,expressionTree:void 0}).expressionTree}orderByClause(e){return e.orderByExpressionOrFn.map(t=>this.visit(t))}orderByExpression(e){let t={field:e.Identifier[0].image};return e.order&&e.order[0]&&(t.order=e.order[0].tokenType.name),e.nulls&&e.nulls[0]&&(t.nulls=e.nulls[0].tokenType.name),t}orderByGroupingFunctionExpression(e){let t={fn:this.helpers.$_getFieldFunction(e,!1,!1)};return e.order&&e.order[0]&&(t.order=e.order[0].tokenType.name),e.nulls&&e.nulls[0]&&(t.nulls=e.nulls[0].tokenType.name),t}orderBySpecialFunctionExpression(e){let t={};return e.aggregateFunction?t.fn=this.visit(e.aggregateFunction,{includeType:!1}):e.dateFunction?t.fn=this.visit(e.dateFunction,{includeType:!1}):e.locationFunction&&(t.fn=this.visit(e.locationFunction,{includeType:!1})),e.order&&e.order[0]&&(t.order=e.order[0].tokenType.name),e.nulls&&e.nulls[0]&&(t.nulls=e.nulls[0].tokenType.name),t}limitClause(e){return e.value[0].image}offsetClause(e){return e.value[0].image}dateFunction(e,t={includeType:!0}){return this.helpers.$_getFieldFunction(e,!0,t.includeType)}aggregateFunction(e,t={includeType:!0}){return this.helpers.$_getFieldFunction(e,!0,t.includeType)}fieldsFunction(e,t={includeType:!0}){let n={};return t.includeType&&(n.type="FieldFunctionExpression"),n={...n,functionName:"FIELDS",parameters:[e.params[0].image]},n.rawValue=`FIELDS(${n.parameters[0]})`,n}otherFunction(e,t={includeType:!0}){return this.helpers.$_getFieldFunction(e,!1,t.includeType)}cubeFunction(e){return this.helpers.$_getFieldFunction(e,!1,!1)}rollupFunction(e){return this.helpers.$_getFieldFunction(e,!1,!1)}locationFunction(e,t={includeType:!0}){let n={};return t.includeType&&(n.type="FieldFunctionExpression"),n={...n,functionName:"DISTANCE",parameters:[e.location1[0].image,_h(e.location2)?e.location2[0].image:this.visit(e.location2,t),e.unit[0].image]},t.includeType&&(n.isAggregateFn=!0),n.rawValue=`DISTANCE(${n.parameters[0]}, ${rpe(n.parameters[1])?n.parameters[1]:n.parameters[1].rawValue}, ${n.parameters[2]})`,n}geolocationFunction(e,t={includeType:!0}){let n={};return t.includeType&&(n.type="FieldFunctionExpression"),n={...n,functionName:"GEOLOCATION",parameters:[e.latitude[0].image,e.longitude[0].image],rawValue:`GEOLOCATION(${e.latitude[0].image}, ${e.longitude[0].image})`},n}functionExpression(e,t={includeType:!0}){return e.params?e.params.map(n=>n.image?n.image:this.visit(n,t)):[]}expression(e){let{value:t,literalType:n,dateLiteralVariable:r,operator:s}=this.visit(e.operator,{returnLiteralType:!0}),i={};return _h(e.lhs)?i.field=e.lhs[0].image:i.fn=this.visit(e.lhs,{includeType:!1}),i.operator=s,i.literalType=n,n==="SUBQUERY"?i.valueQuery=t:i.value=t,r&&(i.dateLiteralVariable=r),e.L_PAREN&&(i.openParen=e.L_PAREN.length),e.R_PAREN&&(i.closeParen=e.R_PAREN.length),i}expressionPartWithNegation(e){return{left:e.L_PAREN?{openParen:e.L_PAREN.length}:null,operator:"NOT",right:{left:{}}}}expressionWithRelationalOperator(e){return e.relationalOperator?{operator:this.visit(e.relationalOperator),...this.visit(e.rhs,{returnLiteralType:!0})}:{operator:this.visit(e.setOperator),...this.visit(e.rhs,{returnLiteralType:!0})}}expressionWithSetOperator(e){return e.relationalOperator?{operator:this.visit(e.relationalOperator),...this.visit(e.rhs,{returnLiteralType:!0})}:{operator:this.visit(e.setOperator),...this.visit(e.rhs,{returnLiteralType:!0})}}atomicExpression(e,t){t=t||{};let n,r,s;if(e.apexBindVariableExpression)n=this.visit(e.apexBindVariableExpression),r="APEX_BIND_VARIABLE";else if(e.NumberIdentifier)n=e.NumberIdentifier[0].image,r=this.helpers.$_getLiteralTypeFromTokenType(e.NumberIdentifier[0].tokenType.name);else if(e.UnsignedInteger)n=e.UnsignedInteger[0].image,r="INTEGER";else if(e.SignedInteger)n=e.SignedInteger[0].image,r="INTEGER";else if(e.RealNumber)n=e.RealNumber[0].image,r="DECIMAL";else if(e.DateIdentifier)n=e.DateIdentifier[0].image,r=this.helpers.$_getLiteralTypeFromTokenType(e.DateIdentifier[0].tokenType.name);else if(e.CurrencyPrefixedInteger)n=e.CurrencyPrefixedInteger[0].image,r="INTEGER_WITH_CURRENCY_PREFIX";else if(e.CurrencyPrefixedDecimal)n=e.CurrencyPrefixedDecimal[0].image,r="DECIMAL_WITH_CURRENCY_PREFIX";else if(e.DateTime)n=e.DateTime[0].image,r="DATETIME";else if(e.date)n=e.DateToken[0].image,r="DATE";else if(e.NULL)n="NULL",r="NULL";else if(e.StringIdentifier)n=e.StringIdentifier[0].image,r="STRING";else if(e.Identifier)n=e.Identifier[0].image,r="STRING";else if(e.booleanValue)n=this.visit(e.booleanValue),r="BOOLEAN";else if(e.DateLiteral)n=e.DateLiteral[0].image,r="DATE_LITERAL";else if(e.dateNLiteral){let i=this.visit(e.dateNLiteral);n=i.value,s=i.variable,r="DATE_N_LITERAL"}else if(e.arrayExpression){let i=this.visit(e.arrayExpression);n=i.map(c=>c.value);let o=i.map(c=>c.variable||null),l=o.some(c=>c!==null);new Set(i.map(c=>c.type)).size===1?r=this.helpers.$_getLiteralTypeFromTokenType(i[0].type):r=i.map(c=>this.helpers.$_getLiteralTypeFromTokenType(c.type)),l&&(s=o),r=r||"STRING"}else e.whereClauseSubqueryIdentifier&&(n=this.visit(e.whereClauseSubqueryIdentifier),r="SUBQUERY");return t.returnLiteralType?{value:n,literalType:r,dateLiteralVariable:s}:n}apexBindVariableExpression(e){return e.apex.map(t=>this.visit(t)).join(".")}apexBindVariableIdentifier(e){let t=e.Identifier[0].image;return e.apexBindVariableFunctionArrayAccessor&&(t+=this.visit(e.apexBindVariableFunctionArrayAccessor[0])),t}apexBindVariableNewInstantiation(e){let t=`new ${e.function[0].image}`;return e.apexBindVariableGeneric&&(t+=this.visit(e.apexBindVariableGeneric[0])),t+=this.visit(e.apexBindVariableFunctionParams[0]),e.apexBindVariableFunctionArrayAccessor&&(t+=this.visit(e.apexBindVariableFunctionArrayAccessor[0])),t}apexBindVariableFunctionCall(e){let t=`${e.function[0].image}${this.visit(e.apexBindVariableFunctionParams[0])}`;return e.apexBindVariableFunctionArrayAccessor&&(t+=this.visit(e.apexBindVariableFunctionArrayAccessor[0])),t}apexBindVariableGeneric(e){return`<${e.parameter.map(t=>t.image).join(", ")}>`}apexBindVariableFunctionParams(e){return`(${(Array.isArray(e.parameter)?e.parameter:[]).map(t=>t.image).join(", ")})`}apexBindVariableFunctionArrayAccessor(e){return`[${e.value[0].image}]`}arrayExpression(e){return e.value.map(t=>_h(t)?{type:t.tokenType.name,value:t.image}:this.visit(t,{includeType:!0}))}relationalOperator(e){return e.operator[0].image}setOperator(e){if(Array.isArray(e.operator))return e.operator[0].tokenType.name.replace("_"," ");
856if(Array.isArray(e.notIn))return this.visit(e.notIn)}notInOperator(e){return"NOT IN"}booleanValue(e){return e.boolean[0].tokenType.name}dateNLiteral(e,t){let n={value:`${e.dateNLiteral[0].image}:${e.variable[0].image}`,variable:Number(e.variable[0].image)};return t&&t.includeType&&(n.type=e.dateNLiteral[0].tokenType.name),n}forViewOrReference(e){return e.value[0].tokenType.name}updateTrackingViewstat(e){return e.value[0].tokenType.name}},Ske=new wke;function Eke(e,t){let{cst:n}=mke(e,t);return Ske.visit(n)}/*! Bundled license information:
857
858lodash-es/lodash.js:
859  (**
860   * @license
861   * Lodash (Custom Build) <https://lodash.com/>
862   * Build: `lodash modularize exports="es" -o ./`
863   * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
864   * Released under MIT license <https://lodash.com/license>
865   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
866   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
867   *)
868*/const Nke={"=":"eq","!=":"ne",like:"like",in:"in",">":"gt",">=":"gte","<":"lt","<=":"lte"},kke="eq",Cke="ASC",Tke="Id",Ake="toLabel",xI={FIELD_RELATIONSHIP:"FieldRelationship",FIELD_SUBQUERY:"FieldSubquery"},vI={BOOLEAN:"BOOLEAN",INTEGER:"INTEGER",APEX_BIND_VARIABLE:"APEX_BIND_VARIABLE"};function jke(e){return Nke[e.operator.toLowerCase()]||kke}function wV(e,t){if(!e||!e.field)throw new Error("Invalid condition: field is required");if(e.field.includes(".")){const[r,...s]=e.field.split(".");return{[r]:{...wV({...e,field:s.join(".")})}}}let n;return e.literalType===vI.BOOLEAN&&typeof e.value=="string"?n=e.value==="TRUE":e.literalType===vI.INTEGER&&typeof e.value=="string"?n=parseInt(e.value):Array.isArray(e.value)?n=e.value.map(r=>JSON.stringify(r).replace(/["']/g,"")):n=JSON.stringify(e.value).replace(/["']/g,""),{[e.field]:{[jke(e)]:n}}}function TN(e,t){if(!e)throw new Error("Invalid condition: condition is required");const n=e;return n.operator&&n.left&&n.right?{[n.operator.toLowerCase()]:[TN(n.left),TN(n.right)]}:wV(n.left||e)}function SV(e){if(!e)throw new Error("Invalid field: field is required");const t=e,{type:n,...r}=t;return n===xI.FIELD_RELATIONSHIP?{[t.field||"unknown"]:SV(r)}:t.field?t.field===Tke?!0:{value:!0}:t.functionName&&t.parameters?t.functionName===Ake?{label:!0}:{label:!0}:t.type===xI.FIELD_SUBQUERY?EV(t.subquery):""}function Oke(e){return e.fields?e.fields.reduce((t,n)=>{var i;const r=n,s=r.relationships&&r.relationships[0]||r.field||((i=r.subquery)==null?void 0:i.relationshipName)||r.parameters&&r.parameters[0];return s&&typeof s=="string"&&(t[s]=SV(n)),t},{}):{}}function Rke(e,t){const n={};if(e.limit&&(n.first=e.limit),e.where&&(n.where=TN(e.where)),e.orderBy){const r=Array.isArray(e.orderBy)?e.orderBy:[e.orderBy];if(r.length>0){const s=r[0];let i="unknown";"field"in s&&typeof s.field=="string"?i=s.field:"functionName"in s&&typeof s.functionName=="string"?i=s.functionName:"orderByField"in s&&typeof s.orderByField=="string"&&(i=s.orderByField),n.orderBy={[i]:{order:s.order||Cke}}}}return n}function EV(e,t){const n=e.limit?{pageInfo:{endCursor:!0,hasNextPage:!0,hasPreviousPage:!0}}:{};return{__args:Rke(e),edges:{node:Oke(e)},...n}}function _ke(e,t){if(!e)throw new Error("Parsed query is required");if(!e.sObject)throw new Error("SOQL query must specify an sObject");return{query:{__variables:t,uiapi:{query:{[e.sObject]:EV(e)}}}}}function Ike(e,t){if(!e||typeof e!="string")throw new Error("SOQL query string is required");const n=Eke(e,{allowApexBindVariables:!0}),r=_ke(n,t);return WU.jsonToGraphQLQuery(r,{pretty:!0}).replaceAll('"ASC"',"ASC").replaceAll('"DESC"',"DESC")}function ky(e,t){if(!!!e)throw new Error(t)}function Mke(e){return typeof e=="object"&&e!==null}function Lke(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const Pke=/\r\n|[\n\r]/g;function AN(e,t){let n=0,r=1;for(const s of e.body.matchAll(Pke)){if(typeof s.index=="number"||Lke(!1),s.index>=t)break;n=s.index+s[0].length,r+=1}return{line:r,column:t+1-n}}function Dke(e){return NV(e.source,AN(e.source,e.start))}function NV(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,s=t.line-1,i=e.locationOffset.line-1,o=t.line+i,l=t.line===1?n:0,c=t.column+l,u=`${e.name}:${o}:${c}
869`,d=r.split(/\r\n|[\n\r]/g),h=d[s];if(h.length>120){const f=Math.floor(c/80),p=c%80,m=[];for(let g=0;g<h.length;g+=80)m.push(h.slice(g,g+80));return u+bI([[`${o} |`,m[0]],...m.slice(1,f+1).map(g=>["|",g]),["|","^".padStart(p)],["|",m[f+1]]])}return u+bI([[`${o-1} |`,d[s-1]],[`${o} |`,h],["|","^".padStart(c)],[`${o+1} |`,d[s+1]]])}function bI(e){const t=e.filter(([r,s])=>s!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,s])=>r.padStart(n)+(s?" "+s:"")).join(`
870`)}function $ke(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}
vendor: 5,559 bytes, lines 870-874
870class mA extends Error{constructor(t,...n){var r,s,i;const{nodes:o,source:l,positions:c,path:u,originalError:d,extensions:h}=$ke(n);super(t),this.name="GraphQLError",this.path=u??void 0,this.originalError=d??void 0,this.nodes=wI(Array.isArray(o)?o:o?[o]:void 0);const f=wI((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=l??(f==null||(s=f[0])===null||s===void 0?void 0:s.source),this.positions=c??(f==null?void 0:f.map(m=>m.start)),this.locations=c&&l?c.map(m=>AN(l,m)):f==null?void 0:f.map(m=>AN(m.source,m.start));const p=Mke(d==null?void 0:d.extensions)?d==null?void 0:d.extensions:void 0;this.extensions=(i=h??p)!==null&&i!==void 0?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,mA):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
871
872`+Dke(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
873
874`+NV(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function wI(e){return e===void 0||e.length===0?void 0:e}function Ln(e,t,n){return new mA(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Fke{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class kV{constructor(t,n,r,s,i,o){this.kind=t,this.start=n,this.end=r,this.line=s,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const CV={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},Bke=new Set(Object.keys(CV));function SI(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&Bke.has(t)}var Fu;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Fu||(Fu={}));var jN;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(jN||(jN={}));var Ne;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="Str
874ingValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(Ne||(Ne={}));function Uke(e){return e===9||e===32}function Hp(e){return e>=48&&e<=57}function TV(e){return e>=97&&e<=122||e>=65&&e<=90}function AV(e){return TV(e)||e===95}function zke(e){return TV(e)||Hp(e)||e===95}function Vke(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,s=-1;for(let o=0;o<e.length;++o){var i;const l=e[o],c=Wke(l);c!==l.length&&(r=(i=r)!==null&&i!==void 0?i:o,s=o,o!==0&&c<n&&(n=c))}return e.map((o,l)=>l===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,s+1)}function Wke(e){let t=0;for(;t<e.length&&Uke(e.charCodeAt(t));)++t;return t}var K;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(K||(K={}));class Hke{constructor(t){const n=new kV(K.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==K.EOF)do if(t.next)t=t.next;else{const n=Kke(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===K.COMMENT);return t}}function Gke(e){return e===K.BANG||e===K.DOLLAR||e===K.AMP||e===K.PAREN_L||e===K.PAREN_R||e===K.DOT||e===K.SPREAD||e===K.COLON||e===K.EQUALS||e===K.AT||e===K.BRACKET_L||e===K.BRACKET_R||e===K.BRACE_L||e===K.PIPE||e===K.BRACE_R}function mh(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Db(e,t){return jV(e.charCodeAt(t))&&OV(e.charCodeAt(t+1))}function jV(e){return e>=55296&&e<=56319}function OV(e){return e>=56320&&e<=57343}function Wc(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return K.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function kn(e,t,n,r,s){const i=e.line,o=1+n-e.lineStart;return new kV(t,n,r,i,o,s)}function Kke(e,t){const n=e.source.body,r=n.length;let s=t;for(;s<r;){const i=n.charCodeAt(s);switch(i){case 65279:case 9:case 32:case 44:++s;continue;case 10:++s,++e.line,e.lineStart=s;continue;case 13:n.charCodeAt(s+1)===10?s+=2:++s,++e.line,e.lineStart=s;continue;case 35:return qke(e,s);case 33:return kn(e,K.BANG,s,s+1);case 36:return kn(e,K.DOLLAR,s,s+1);case 38:return kn(e,K.AMP,s,s+1);case 40:return kn(e,K.PAREN_L,s,s+1);case 41:return kn(e,K.PAREN_R,s,s+1);case 46:if(n.charCodeAt(s+1)===46&&n.charCodeAt(s+2)===46)return kn(e,K.SPREAD,s,s+3);break;case 58:return kn(e,K.COLON,s,s+1);case 61:return kn(e,K.EQUALS,s,s+1);case 64:return kn(e,K.AT,s,s+1);case 91:return kn(e,K.BRACKET_L,s,s+1);case 93:return kn(e,K.BRACKET_R,s,s+1);case 123:return kn(e,K.BRACE_L,s,s+1);case 124:return kn(e,K.PIPE,s,s+1);case 125:return kn(e,K.BRACE_R,s,s+1);
vendor: 5,101 bytes, lines 874-876
874case 34:return n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34?eCe(e,s):Qke(e,s)}if(Hp(i)||i===45)return Yke(e,s,i);if(AV(i))return tCe(e,s);throw Ln(e.source,s,i===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:mh(i)||Db(n,s)?`Unexpected character: ${Wc(e,s)}.`:`Invalid character: ${Wc(e,s)}.`)}return kn(e,K.EOF,r,r)}function qke(e,t){const n=e.source.body,r=n.length;let s=t+1;for(;s<r;){const i=n.charCodeAt(s);if(i===10||i===13)break;if(mh(i))++s;else if(Db(n,s))s+=2;else break}return kn(e,K.COMMENT,t,s,n.slice(t+1,s))}function Yke(e,t,n){const r=e.source.body;let s=t,i=n,o=!1;if(i===45&&(i=r.charCodeAt(++s)),i===48){if(i=r.charCodeAt(++s),Hp(i))throw Ln(e.source,s,`Invalid number, unexpected digit after 0: ${Wc(e,s)}.`)}else s=ww(e,s,i),i=r.charCodeAt(s);if(i===46&&(o=!0,i=r.charCodeAt(++s),s=ww(e,s,i),i=r.charCodeAt(s)),(i===69||i===101)&&(o=!0,i=r.charCodeAt(++s),(i===43||i===45)&&(i=r.charCodeAt(++s)),s=ww(e,s,i),i=r.charCodeAt(s)),i===46||AV(i))throw Ln(e.source,s,`Invalid number, expected digit but got: ${Wc(e,s)}.`);return kn(e,o?K.FLOAT:K.INT,t,s,r.slice(t,s))}function ww(e,t,n){if(!Hp(n))throw Ln(e.source,t,`Invalid number, expected digit but got: ${Wc(e,t)}.`);const r=e.source.body;let s=t+1;for(;Hp(r.charCodeAt(s));)++s;return s}function Qke(e,t){const n=e.source.body,r=n.length;let s=t+1,i=s,o="";for(;s<r;){const l=n.charCodeAt(s);if(l===34)return o+=n.slice(i,s),kn(e,K.STRING,t,s+1,o);if(l===92){o+=n.slice(i,s);const c=n.charCodeAt(s+1)===117?n.charCodeAt(s+2)===123?Jke(e,s):Xke(e,s):Zke(e,s);o+=c.value,s+=c.size,i=s;continue}if(l===10||l===13)break;if(mh(l))++s;else if(Db(n,s))s+=2;else throw Ln(e.source,s,`Invalid character within String: ${Wc(e,s)}.`)}throw Ln(e.source,s,"Unterminated string.")}function Jke(e,t){const n=e.source.body;let r=0,s=3;for(;s<12;){const i=n.charCodeAt(t+s++);if(i===125){if(s<5||!mh(r))break;return{value:String.fromCodePoint(r),size:s}}if(r=r<<4|lf(i),r<0)break}throw Ln(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+s)}".`)}function Xke(e,t){const n=e.source.body,r=EI(n,t+2);if(mh(r))return{value:String.fromCodePoint(r),size:6};if(jV(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const s=EI(n,t+8);if(OV(s))return{value:String.fromCodePoint(r,s),size:12}}throw Ln(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function EI(e,t){return lf(e.charCodeAt(t))<<12|lf(e.charCodeAt(t+1))<<8|lf(e.charCodeAt(t+2))<<4|lf(e.charCodeAt(t+3))}function lf(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Zke(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
875`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:"	",size:2}}throw Ln(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function eCe(e,t){const n=e.source.body,r=n.length;let s=e.lineStart,i=t+3,o=i,l="";const c=[];for(;i<r;){const u=n.charCodeAt(i);if(u===34&&n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34){l+=n.slice(o,i),c.push(l);const d=kn(e,K.BLOCK_STRING,t,i+3,Vke(c).join(`
876`));return e.line+=c.length-1,e.lineStart=s,d}if(u===92&&n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34&&n.charCodeAt(i+3)===34){l+=n.slice(o,i),o=i+1,i+=4;continue}if(u===10||u===13){l+=n.slice(o,i),c.push(l),u===13&&n.charCodeAt(i+1)===10?i+=2:++i,l="",o=i,s=i;continue}if(mh(u))++i;else if(Db(n,i))i+=2;else throw Ln(e.source,i,`Invalid character within String: ${Wc(e,i)}.`)}throw Ln(e.source,i,"Unterminated string.")}function tCe(e,t){const n=e.source.body,r=n.length;let s=t+1;for(;s<r;){const i=n.charCodeAt(s);if(zke(i))++s;else break}return kn(e,K.NAME,t,s,n.slice(t,s))}const nCe=10,RV=2;function gA(e){return $b(e,[])}function $b(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return rCe(e,t);default:return String(e)}}function rCe(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(sCe(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:$b(r,n)}else if(Array.isArray(e))return oCe(e,n);return iCe(e,n)}function sCe(e){return typeof e.toJSON=="function"}function iCe(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>RV?"["+aCe(e)+"]":"{ "+n.map(([s,i])=>s+": "+$b(i,t)).join(", ")+" }"}function oCe(e,t){if(e.length===0)return"[]";if(t.length>RV)return"[Array]";const n=Math.min(nCe,e.length),r=e.length-n,s=[];for(let i=0;i<n;++i)s.push($b(e[i],t));return r===1?s.push("... 1 more item"):r>1&&s.push(`... ${r} more items`),"["+s.join(", ")+"]"}function aCe(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const lCe=globalThis.process&&!0,cCe=lCe?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;
vendor: 4,387 bytes, lines 876-887
876if(typeof t=="object"&&t!==null){var r;const s=n.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(s===i){const o=gA(t);throw new Error(`Cannot use ${s} "${o}" from another module or realm.
877
878Ensure that there is only one instance of "graphql" in the node_modules
879directory. If different versions of "graphql" are the dependencies of other
880relied on modules, use "resolutions" to ensure only one version is installed.
881
882https://yarnpkg.com/en/docs/selective-version-resolutions
883
884Duplicate "graphql" modules cannot be used at the same time since different
885versions may have different capabilities and behavior. The data from one
886version used in the function from another could produce confusing and
887spurious results.`)}}return!1};class _V{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||ky(!1,`Body must be a string. Received: ${gA(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||ky(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ky(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function uCe(e){return cCe(e,_V)}function dCe(e,t){const n=new hCe(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}class hCe{constructor(t,n={}){const{lexer:r,...s}=n;if(r)this._lexer=r;else{const i=uCe(t)?t:new _V(t);this._lexer=new Hke(i)}this._options=s,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(K.NAME);return this.node(t,{kind:Ne.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:Ne.DOCUMENT,definitions:this.many(K.SOF,this.parseDefinition,K.EOF)})}parseDefinition(){if(this.peek(K.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===K.BRACE_L)throw Ln(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===K.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw Ln(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");switch(n.value){case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(K.BRACE_L))return this.node(t,{kind:Ne.OPERATION_DEFINITION,operation:Fu.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseDescription(),r=this.parseOperationType();let s;return this.peek(K.NAME)&&(s=this.parseName()),this.node(t,{kind:Ne.OPERATION_DEFINITION,operation:r,description:n,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(K.NAME);switch(t.value){case"query":return Fu.QUERY;case"mutation":return Fu.MUTATION;case"subscription":return Fu.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(K.PAREN_L,this.parseVariableDefinition,K.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Ne.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(K.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(K.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(K.DOLLAR),this.node(t,{kind:Ne.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Ne.
vendor: 9,361 bytes, line 887
887SELECTION_SET,selections:this.many(K.BRACE_L,this.parseSelection,K.BRACE_R)})}parseSelection(){return this.peek(K.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,s;return this.expectOptionalToken(K.COLON)?(r=n,s=this.parseName()):s=n,this.node(t,{kind:Ne.FIELD,alias:r,name:s,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(K.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(K.PAREN_L,n,K.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(K.COLON),this.node(n,{kind:Ne.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(K.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(K.NAME)?this.node(t,{kind:Ne.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:Ne.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:Ne.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Ne.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case K.BRACKET_L:return this.parseList(t);case K.BRACE_L:return this.parseObject(t);case K.INT:return this.advanceLexer(),this.node(n,{kind:Ne.INT,value:n.value});case K.FLOAT:return this.advanceLexer(),this.node(n,{kind:Ne.FLOAT,value:n.value});case K.STRING:case K.BLOCK_STRING:return this.parseStringLiteral();case K.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:Ne.BOOLEAN,value:!0});case"false":return this.node(n,{kind:Ne.BOOLEAN,value:!1});case"null":return this.node(n,{kind:Ne.NULL});default:return this.node(n,{kind:Ne.ENUM,value:n.value})}case K.DOLLAR:if(t)if(this.expectToken(K.DOLLAR),this._lexer.token.kind===K.NAME){const r=this._lexer.token.value;throw Ln(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:Ne.STRING,value:t.value,block:t.kind===K.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:Ne.LIST,values:this.any(K.BRACKET_L,n,K.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:Ne.OBJECT,fields:this.any(K.BRACE_L,n,K.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(K.COLON),this.node(n,{kind:Ne.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(K.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(K.AT),this.node(n,{kind:Ne.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(K.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(K.BRACKET_R),n=this.node(t,{kind:Ne.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(K.BANG)?this.node(t,{kind:Ne.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:Ne.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(K.STRING)||this.peek(K.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),s=this.many(K.BRACE_L,this.parseOperationTypeDefinition,K.BRACE_R);return this.node(t,{kind:Ne.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:s})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(K.COLON);const r=this.parseNamedType();return this.node(t,{kind:Ne.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),s=this.parseConstDirectives();return this.node(t,{kind:Ne.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:s})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:Ne.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:s,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(K.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(K.BRACE_L,this.parseFieldDefinition,K.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),s=this.parseArgumentDefs();this.expectToken(K.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:Ne.FIELD_DEFINITION,description:n,name:r,arguments:s,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(K.PAREN_L,this.parseInputValueDef,K.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(K.COLON);const s=this.parseTypeReference();let i;this.expectOptionalToken(K.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:Ne.INPUT_VALUE_DEFINITION,description:n,name:r,type:s,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),s=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:Ne.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:s,directives:i,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),s=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:Ne.UNION_TYPE_DEFINITION,description:n,name:r,directives:s,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(K.EQUALS)?this.delimitedMany(K.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),s=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:Ne.ENUM_TYPE_DEFINITION,description:n,name:r,directives:s,values:i})}parseEnumValuesDefinition(){return this.optionalMany(K.BRACE_L,this.parseEnumValueDefinition,K.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),s=this.parseConstDirectives();return this.node(t,{kind:Ne.ENUM_VALUE_DEFINITION,description:n,name:r,directives:s})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Ln(this._lexer.source,this._lexer.token.start,`${Fg(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),s=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:Ne.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:s,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(K.BRACE_L,this.parseInputValueDef,K.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===K.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(K.BRACE_L,this.parseOperationTypeDefinition,K.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();
vendor: 5,774 bytes, line 887
887return this.node(t,{kind:Ne.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:Ne.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(r.length===0&&s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Ne.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:s,fields:i})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(r.length===0&&s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:Ne.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:s,fields:i})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();if(r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:Ne.UNION_TYPE_EXTENSION,name:n,directives:r,types:s})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();if(r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:Ne.ENUM_TYPE_EXTENSION,name:n,directives:r,values:s})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();if(r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:Ne.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:s})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(K.AT);const r=this.parseName(),s=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:Ne.DIRECTIVE_DEFINITION,description:n,name:r,arguments:s,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(K.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(jN,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){const t=this._lexer.token,n=this.expectOptionalToken(K.AT),r=this.parseName();let s;!n&&this.expectOptionalToken(K.DOT)&&(s=this.parseName());let i;return(n||s)&&this.expectOptionalToken(K.PAREN_L)&&(i=this.parseName(),this.expectToken(K.COLON),this.expectToken(K.PAREN_R)),n?i?this.node(t,{kind:Ne.DIRECTIVE_ARGUMENT_COORDINATE,name:r,argumentName:i}):this.node(t,{kind:Ne.DIRECTIVE_COORDINATE,name:r}):s?i?this.node(t,{kind:Ne.ARGUMENT_COORDINATE,name:r,fieldName:s,argumentName:i}):this.node(t,{kind:Ne.MEMBER_COORDINATE,name:r,memberName:s}):this.node(t,{kind:Ne.TYPE_COORDINATE,name:r})}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Fke(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw Ln(this._lexer.source,n.start,`Expected ${IV(t)}, found ${Fg(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===K.NAME&&n.value===t)this.advanceLexer();else throw Ln(this._lexer.source,n.start,`Expected "${t}", found ${Fg(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===K.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return Ln(this._lexer.source,n.start,`Unexpected ${Fg(n)}.`)}any(t,n,r){this.expectToken(t);const s=[];for(;!this.expectOptionalToken(r);)s.push(n.call(this));return s}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const s=[];do s.push(n.call(this));while(!this.expectOptionalToken(r));return s}return[]}many(t,n,r){this.expectToken(t);const s=[];do s.push(n.call(this));while(!this.expectOptionalToken(r));return s}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==K.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw Ln(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function Fg(e){const t=e.value;return IV(e.kind)+(t!=null?` "${t}"`:"")}function IV(e){return Gke(e)?`"${e}"`:e}const fCe=Object.freeze({});function pCe(e,t,n=CV){const r=new Map;for(const y of Object.values(Ne))r.set(y,mCe(t,y));let s,i=Array.isArray(e),o=[e],l=-1,c=[],u=e,d,h;const f=[],p=[];do{l++;const y=l===o.length,b=y&&c.length!==0;if(y){if(d=p.length===0?void 0:f[f.length-1],u=h,h=p.pop(),b)if(i){u=u.slice();let E=0;for(const[N,k]of c){const C=N-E;k===null?(u.splice(C,1),E++):u[C]=k}}else{u={...u};for(const[E,N]of c)u[E]=N}l=s.index,o=s.keys,c=s.edits,i=s.inArray,s=s.prev}else if(h){if(d=i?l:o[l],u=h[d],u==null)continue;f.push(d)}let w;if(!Array.isArray(u)){var m,g;SI(u)||ky(!1,`Invalid AST Node: ${gA(u)}.`);const E=y?(m=r.get(u.kind))===null||m===void 0?void 0:m.leave:(g=r.get(u.kind))===null||g===void 0?void 0:g.enter;
887if(w=E==null?void 0:E.call(t,u,d,h,f,p),w===fCe)break;if(w===!1){if(!y){f.pop();continue}}else if(w!==void 0&&(c.push([d,w]),!y))if(SI(w))u=w;else{f.pop();continue}}if(w===void 0&&b&&c.push([d,u]),y)f.pop();else{var x;s={inArray:i,index:l,keys:o,edits:c,prev:s},i=Array.isArray(u),o=i?u:(x=n[u.kind])!==null&&x!==void 0?x:[],l=-1,c=[],h&&p.push(h),h=u}}while(s!==void 0);return c.length!==0?c[c.length-1][1]:e}function mCe(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}const gCe=[{name:"Basic Account Query",soql:"SELECT Id, Name, Industry FROM Account LIMIT 10"},{name:"Query with Relationships",soql:"SELECT Id, Name, Owner.Name, (SELECT Id, Name FROM Contacts) FROM Account WHERE Industry = 'Technology' LIMIT 5"},{name:"Complex WHERE Clause",soql:"SELECT Id, Name, Amount FROM Opportunity WHERE (Amount > 10000 AND StageName = 'Closed Won') OR StageName = 'Prospecting' ORDER BY Amount DESC LIMIT 20"},{name:"Parent-Child Relationship",soql:"SELECT Name, Account.Name, Account.Industry FROM Contact WHERE Account.Type = 'Customer' ORDER BY Name ASC"}],yCe=[{name:"Basic Account Query",graphql:`query {
888  uiapi {
889    query {
890      Account(first: 10) {
891        edges {
892          node {
893            Id
894            Name {
895              value
896            }
897            Industry {
898              value
899            }
900          }
901        }
902      }
903    }
904  }
905}`},{name:"Query with WHERE Filter",graphql:`query {
906  uiapi {
907    query {
908      Contact(
909        where: { Department: { eq: "Finance" } }
910        first: 5
911      ) {
912        edges {
913          node {
914            Id
915            Name {
916              value
917            }
918            Email {
919              value
920            }
921          }
922        }
923      }
924    }
925  }
926}`}];function xCe(e){try{const t=dCe(e);let n="";const r=[];let s="",i="",o="",l=!1;const c=[],u=h=>{var f;return(f=h.selectionSet)==null?void 0:f.selections.some(p=>{var m;return((m=p.name)==null?void 0:m.value)==="value"})};if(pCe(t,{Field:{enter(h){const f=h.name.value;if(!n&&h.arguments&&h.arguments.length>0&&f!=="query"&&f!=="uiapi"&&(n=f,h.arguments.forEach(p=>{const m=p.name.value;if(m==="first")s=` LIMIT ${p.value.value}`;else if(m==="where")try{const g=p.value.fields[0],x=g.name.value,y=g.value.fields[0],b=y.name.value,w=y.value.value;b==="eq"&&(i=` WHERE ${x} = '${w}'`)}catch{}else if(m==="orderBy")try{const g=p.value.fields[0],x=g.name.value,b=g.value.fields[0].value.value;o=` ORDER BY ${x} ${b}`}catch{}})),f==="node"){l=!0;return}if(!(f==="edges"||f==="value"||f==="uiapi"||f==="query"||f==="displayValue"||f==="cursor")&&l){if(u(h)){const p=c.length>0?[...c,f].join("."):f;r.includes(p)||r.push(p)}else if(h.selectionSet&&f!=="node")c.push(f);else if(!h.selectionSet){const p=c.length>0?[...c,f].join("."):f;r.includes(p)||r.push(p)}}},leave(h){const f=h.name.value;if(f==="node"){l=!1;return}l&&h.selectionSet&&f!=="node"&&f!=="edges"&&f!=="value"&&!u(h)&&c.pop()}}}),!n)throw new Error("Cannot find sObject name in GraphQL query. Expected format: query { uiapi { query { ObjectName(...) { ... } } } }");if(r.length===0)throw new Error("No fields found in GraphQL query. Expected fields inside edges { node { ... } }");return`SELECT ${r.join(", ")} FROM ${n}${i}${o}${s}`}catch(t){throw t instanceof Error&&t.message.includes("Syntax Error")?new Error("Invalid GraphQL syntax. Please check your query format."):new Error(`GraphQL to SOQL conversion failed: ${t instanceof Error?t.message:"Unknown error"}`)}}function vCe(){const[e,t]=v.useState("soql-to-graphql"),[n,r]=v.useState(""),[s,i]=v.useState(""),[o,l]=v.useState(""),[c,u]=v.useState(""),[d,h]=v.useState(""),[f,p]=v.useState(""),[m,g]=v.useState(!1),{toast:x}=Fr(),y=()=>{if(h(""),p(""),i(""),!n.trim()){h("Please enter a SOQL query");return}try{const k=Ike(n);i(k),p("Successfully converted SOQL to GraphQL!"),x({title:"Conversion Successful",description:"SOQL query converted to GraphQL"})}catch(k){const C=k instanceof Error?k.message:"Conversion failed";h(C),x({title:"Conversion Failed",description:C,variant:"destructive"})}},b=()=>{if(h(""),p(""),u(""),!o.trim()){h("Please enter a GraphQL query");return}try{const k=xCe(o);u(k),p("Successfully converted GraphQL to SOQL!"),x({title:"Conversion Successful",description:"GraphQL query converted to SOQL"})}catch(k){const C=k instanceof Error?k.message:"Conversion failed";h(C),x({title:"Conversion Failed",description:C,variant:"destructive"})}},w=(k,C)=>{navigator.clipboard.writeText(k),g(!0),x({title:"Copied!",description:`${C} copied to clipboard`}),setTimeout(()=>g(!1),2e3)},E=k=>{r(k.soql),i(""),h(""),p("")},N=k=>{l(k.graphql),u(""),h(""),p("")};return a.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-7xl",children:[a.jsxs("div",{className:"mb-8 text-center",children:[a.jsx("h1",{className:"text-4xl font-bold mb-4 text-gray-900 dark:text-white",children:"GraphQL ↔ SOQL Converter"}),a.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-400",children:"Convert between SOQL and GraphQL query formats for Salesforce"})]}),a.jsxs(Fd,{value:e,onValueChange:k=>t(k),className:"w-full",children:[a.jsxs(Bc,{className:"grid w-full grid-cols-2 mb-6",children:[a.jsx(Zt,{value:"soql-to-graphql","data-testid":"tab-soql-to-graphql",children:"SOQL → GraphQL"}),a.jsx(Zt,{value:"graphql-to-soql","data-testid":"tab-graphql-to-soql",children:"GraphQL → SOQL"})]}),a.jsxs(Dn,{value:"soql-to-graphql",className:"space-y-6",children:[a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"SOQL Query"}),a.jsx(Xt,{children:"Enter your SOQL query to convert to GraphQL"})]}),a.jsxs(ne,{className:"space-y-4",children:[a.jsx(fs,{value:n,onChange:k=>r(k.target.value),placeholder:"SELECT Id, Name FROM Account LIMIT 10",className:"min-h-[300px] font-mono text-sm","data-testid":"textarea-soql-input"}),a.jsxs(H,{onClick:y,className:"w-full","data-testid":"button-convert-soql",children:[a.jsx(vf,{className:"mr-2 h-4 w-4"}),"Convert to GraphQL"]})]})]}),a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"GraphQL Query"}),a.jsx(Xt,{children:"Converted GraphQL query"})]}),a.jsx(ne,{className:"space-y-4",children:s?a.jsxs(a.Fragment,{children:[a.jsx(fs,{value:s,readOnly:!0,className:"min-h-[300px] font-mono text-sm bg-gray-50 dark:bg-gray-800","data-testid":"textarea-graphql-output"}),a.jsxs(H,{onClick:()=>w(s,"GraphQL query"),variant:"outline",className:"w-full","data-testid":"button-copy-graphql",children:[m?a.jsx(sl,{className:"mr-2 h-4 w-4"}):a.jsx(Ws,{className:"mr-2 h-4 w-4"}),m?"Copied!":"Copy GraphQL"]})]}):a.jsx("div",{className:"min-h-[300px] flex items-center justify-center text-gray-400 border-2 border-dashed rounded-md",children:a.jsx("p",{className:"text-sm",children:"GraphQL output will appear here"})})})]})]}),a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"Sample SOQL Queries"}),a.jsx(Xt,{children:"Click to load a sample query"})]}),a.jsx(ne,{children:a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:gCe.map((k,C)=>a.jsx(H,{onClick:()=>E(k),variant:"outline",className:"justify-start h-auto py-3","data-testid":`button-sample-soql-${C}`,children:a.jsxs("div",{className:"text-left",children:[a.jsx("div",{className:"font-semibold",children:k.name}),a.jsx("div",{className:"text-xs text-gray-500 truncate mt-1",children:k.soql})]})},C))})})]})]}),a.jsxs(Dn,{value:"graphql-to-soql",className:"space-y-6",children:[a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"GraphQL Query"}),a.jsx(Xt,{children:"Enter your GraphQL query to convert to SOQL"})]}),a.jsxs(ne,{className:"space-y-4",children:[a.jsx(fs,{value:o,onChange:k=>l(k.target.value),placeholder:"query { uiapi { query { Account(first: 10) { edges { node { Id Name { value } } } } } } }",className:"min-h-[300px] font-mono text-sm","data-testid":"textarea-graphql-input"}),a.jsxs(H,{onClick:b,className:"w-full","data-testid":"button-convert-graphql",children:[a.jsx(vf,{className:"mr-2 h-4 w-4"}),"Convert to SOQL"]})]})]}),a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"SOQL Query"}),a.jsx(Xt,{children:"Converted SOQL query"})]}),a.jsx(ne,{className:"space-y-4",children:c?a.jsxs(a.Fragment,{children:[a.jsx(fs,{value:c,readOnly:!0,className:"min-h-[300px] font-mono text-sm bg-gray-50 dark:bg-gray-800","data-testid":"textarea-soql-output"}),a.jsxs(H,{onClick:()=>w(c,"SOQL query"),variant:"outline",className:"w-full","data-testid":"button-copy-soql",children:[m?a.jsx(sl,{className:"mr-2 h-4 w-4"}):a.jsx(Ws,{className:"mr-2 h-4 w-4"}),m?"Copied!":"Copy SOQL"]})]}):a.jsx("div",{className:"min-h-[300px] flex items-center justify-center text-gray-400 border-2 border-dashed rounded-md",children:a.jsx("p",{className:"text-sm",children:"SOQL output will appear here"})})})]})]}),a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsx(fe,{children:"Sample GraphQL Quer
926ies"}),a.jsx(Xt,{children:"Click to load a sample query"})]}),a.jsx(ne,{children:a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:yCe.map((k,C)=>a.jsx(H,{onClick:()=>N(k),variant:"outline",className:"justify-start h-auto py-3","data-testid":`button-sample-graphql-${C}`,children:a.jsxs("div",{className:"text-left",children:[a.jsx("div",{className:"font-semibold",children:k.name}),a.jsxs("div",{className:"text-xs text-gray-500 truncate mt-1",children:[k.graphql.substring(0,50),"..."]})]})},C))})})]})]})]}),d&&a.jsxs(Cl,{variant:"destructive",className:"mt-6",children:[a.jsx(Si,{className:"h-4 w-4"}),a.jsx(Tl,{children:d})]}),f&&a.jsxs(Cl,{className:"mt-6 border-green-500 bg-green-50 dark:bg-green-900/20",children:[a.jsx(sl,{className:"h-4 w-4 text-green-600"}),a.jsx(Tl,{className:"text-green-800 dark:text-green-200",children:f})]}),a.jsxs(te,{className:"mt-6",children:[a.jsx(he,{children:a.jsx(fe,{children:"About GraphQL in Salesforce"})}),a.jsxs(ne,{className:"space-y-3 text-sm text-gray-600 dark:text-gray-400",children:[a.jsxs("p",{children:[a.jsx("strong",{children:"GraphQL API"})," is a powerful query language available in Salesforce that allows you to fetch exactly the data you need in a single request."]}),a.jsx("p",{children:a.jsx("strong",{children:"Key Features:"})}),a.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-4",children:[a.jsx("li",{children:"Fetch multiple objects and relationships in one query"}),a.jsx("li",{children:"Request only the fields you need"}),a.jsx("li",{children:"Type-safe queries with strong schema validation"}),a.jsx("li",{children:"Built on top of UI API with automatic FLS/OLS enforcement"}),a.jsx("li",{children:"Supports filtering, sorting, and pagination"})]}),a.jsxs("p",{className:"mt-4",children:[a.jsx("strong",{children:"Note:"})," This converter uses the ",a.jsx("code",{className:"px-1 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"@sf-explorer/soql-to-graphql"})," package for SOQL → GraphQL conversion."]})]})]})]})}var bCe="Separator",NI="horizontal",wCe=["horizontal","vertical"],MV=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=NI,...s}=e,i=SCe(r)?r:NI,l=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return a.jsx(je.div,{"data-orientation":i,...l,...s,ref:t})});MV.displayName=bCe;function SCe(e){return wCe.includes(e)}var LV=MV;const yA=v.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>a.jsx(LV,{ref:s,decorative:n,orientation:t,className:be("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));yA.displayName=LV.displayName;function ECe(){const e=[{icon:eo,title:"Hover Inspection",description:"Hover over any element to see component details"},{icon:Ha,title:"LWC Detection",description:"Automatically identifies Lightning Web Components"},{icon:Bo,title:"Aura Detection",description:"Detects Aura components and their attributes"},{icon:Ku,title:"Apex Classes Details",description:"View Apex controller classes associated with components"},{icon:dG,title:"Rendering Performance",description:"Monitor component rendering times and performance metrics"},{icon:L7,title:"Field Mapping",description:"Lists all fields and data attributes"},{icon:Z7,title:"Visual Highlighting",description:"Components are highlighted on hover with colored borders"},{icon:hG,title:"Toggle On/Off",description:"Enable or disable the inspector from the popup"}],t=[{type:"Lightning Web Components (LWC)",description:"Identified by data-lwc-* attributes and c-* or lightning-* tags"},{type:"Aura Components",description:"Identified by data-aura-* attributes and aura:* or force:* tags"}],n=["Component Type: LWC or Aura","Component Name: The name/identifier of the component","Apex Classes: Associated Apex controller classes","Rendering Performance: Component render times and metrics","Fields: Form fields, inputs, and data field identifiers","Attributes: Relevant data attributes on the component"],r=["*.salesforce.com","*.force.com","*.lightning.force.com","*.visualforce.com"];return a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[a.jsxs("div",{className:"mb-8",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsx("div",{className:"p-3 bg-sf-blue rounded-lg",children:a.jsx(bf,{className:"h-8 w-8 text-white"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:"Salesforce Component Inspector"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Chrome Extension"})]})]}),a.jsx("p",{className:"text-lg text-gray-700 dark:text-gray-300 mb-4",children:"A Chrome extension that helps developers inspect Lightning Web Components (LWC), Aura components, Apex classes, and fields on Salesforce pages with performance monitoring."}),a.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[a.jsx($n,{variant:"secondary",children:"v3.0.0"}),a.jsx($n,{variant:"outline",children:"Chrome Extension"}),a.jsx($n,{variant:"outline",children:"Developer Tool"})]}),a.jsx("a",{href:"https://chromewebstore.google.com/detail/salesforce-component-insp/kjaacikailfmlaghpfbiccdokdaeiofl?hl=en",target:"_blank",rel:"noopener noreferrer",children:a.jsxs(H,{
926className:"gap-2 bg-sf-blue hover:bg-sf-blue/90","data-testid":"button-chrome-store",children:[a.jsx(bf,{className:"h-4 w-4"}),"Add to Chrome",a.jsx(Xy,{className:"h-4 w-4"})]})})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-features",children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(Ha,{className:"h-5 w-5 text-sf-blue"}),"Features"]})}),a.jsx(ne,{children:a.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:e.map((s,i)=>a.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-gray-50 dark:bg-gray-800",children:[a.jsx(s.icon,{className:"h-5 w-5 text-sf-blue mt-0.5 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-900 dark:text-white",children:s.title}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description})]})]},i))})})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-installation",children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(bf,{className:"h-5 w-5 text-sf-blue"}),"Installation"]})}),a.jsx(ne,{children:a.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-gray-700 dark:text-gray-300",children:[a.jsx("li",{children:"Visit the Chrome Web Store extension page"}),a.jsx("li",{children:'Click "Add to Chrome"'}
926),a.jsx("li",{children:'Confirm by clicking "Add extension" in the popup'}),a.jsx("li",{children:"The extension icon will appear in your Chrome toolbar"})]})})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-usage",children:[a.jsx(he,{children:a.jsx(fe,{children:"How to Use"})}),a.jsx(ne,{children:a.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-gray-700 dark:text-gray-300",children:[a.jsx("li",{children:"Navigate to any Salesforce page (including Lightning Experience, Classic, or Visualforce)"}),a.jsx("li",{children:"The extension automatically activates on Salesforce domains"}),a.jsx("li",{children:"Click the extension icon to open the popup"}),a.jsx("li",{children:'Ensure "Enable Inspector" is toggled ON'}),a.jsx("li",{children:"Hover over any element on the page to see component information"})]})})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-detection",children:[a.jsx(he,{children:a.jsx(fe,{children:"What Gets Detected"})}),a.jsxs(ne,{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"Component Types"}),a.jsx("div",{className:"space-y-3",children:t.map((s,i)=>a.jsxs("div",{className:"p-3 rounded-lg bg-gray-50 dark:bg-gray-800",children:[a.jsx("h4",{className:"font-medium text-gray-900 dark:text-white",children:s.type}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description})]},i))})]}),a.jsx(yA,{}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"Information Displayed"}),a.jsx("ul",{className:"space-y-2",children:n.map((s,i)=>a.jsxs("li",{className:"flex items-start gap-2 text-gray-700 dark:text-gray-300",children:[a.jsx("span",{className:"text-sf-blue",children:"•"}),s]},i))})]})]})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-domains",children:[a.jsx(he,{children:a.jsx(fe,{children:"Supported Salesforce Domains"})}),a.jsx(ne,{children:a.jsx("div",{className:"flex flex-wrap gap-2",children:r.map((s,i)=>a.jsx($n,{variant:"secondary",className:"text-sm",children:s},i))})})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-privacy",children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(xr,{className:"h-5 w-5 text-sf-blue"}),"Privacy & Security"]})}),a.jsxs(ne,{children:[a.jsxs("ul",{className:"space-y-2 text-gray-700 dark:text-gray-300",children:[a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"This extension only runs on Salesforce domains"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"No data is collected or sent to external servers"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"All inspection happens locally in your browser"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"Only stores your enable/disable preference in Chrome's sync storage"]})]}),a.jsx("div",{className:"mt-4",children:a.jsx(Te,{href:"/extensions/component-inspector/privacy-policy",children:a.jsxs(H,{variant:"outline",className:"gap-2","data-testid":"button-privacy-policy",children:[a.jsx(xr,{className:"h-4 w-4"}),"View Full Privacy Policy",a.jsx(Xy,{className:"h-4 w-4"})]})})})]})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-version",children:[a.jsx(he,{children:a.jsx(fe,{children:"Version History"})}),a.jsx(ne,{children:a.jsx("div",{className:"border-l-2 border-sf-blue pl-4",children:a.jsxs("div",{className:"mb-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx($n,{children:"v3.0.0"}),a.jsx("span",{className:"text-sm text-gray-500",children:"Latest Release"})]}),a.jsxs("ul",{className:"space-y-1 text-sm text-gray-700 dark:text-gray-300",children:[a.jsx("li",{children:"• LWC and Aura component detection"}),a.jsx("li",{children:"• Apex classes details for components"}),a.jsx("li",{children:"• Component rendering performance monitoring"}),a.jsx("li",{children:"• Field mapping"}),a.jsx("li",{children:"• Hover tooltips with component information"}),a.jsx("li",{children:"• Toggle on/off functionality"})]})]})})})]}),a.jsxs(te,{"data-testid":"card-license",children:[a.jsx(he,{children:a.jsx(fe,{children:"License"})}),a.jsx(ne,{children:a.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:"MIT License - Feel free to use and modify as needed."})})]})]})})}function NCe(){return a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:a.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[a.jsx("div",{className:"mb-6",children:a.jsx(Te,{href:"/extensions/component-inspector",children:a.jsxs(H,{variant:"ghost",className:"gap-2 mb-4","data-testid":"button-back",children:[a.jsx(Cd,{className:"h-4 w-4"}),"Back to Extension"]})})}),a.jsx(te,{className:"mb-8",children:a.jsxs(ne,{className:"pt-8 pb-8",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2",children:"Privacy Policy"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Salesforce Component Inspector - Chrome Extension"}),a.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-500 mt-2",children:"Last Updated: November 26, 2025"})]}),a.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 border-l-4 border-sf-blue p-4 rounded-r-lg mb-8",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(xr,{className:"h-5 w-5 text-sf-blue mt-0.5 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:"Summary"}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:"This extension o
926perates entirely locally on your browser. We do not collect, store, or transmit any of your data."})]})]})}),a.jsxs("section",{className:"mb-8",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4 pb-2 border-b-2 border-sf-blue flex items-center gap-2",children:[a.jsx(q0,{className:"h-5 w-5"}),"Overview"]}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:"Salesforce Component Inspector is a developer tool designed to help identify and inspect Salesforce Lightning Web Components (LWC), Aura components, associated Apex classes, and monitor component rendering performance on Salesforce pages. This privacy policy explains how the extension handles your data."})]}),a.jsxs("section",{className:"mb-8",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4 pb-2 border-b-2 border-sf-blue flex items-center gap-2",children:[a.jsx(Si,{className:"h-5 w-5"}),"Data Collection"]}),a.jsx("p",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"We do not collect any data. Specifically:"}),a.jsxs("ul",{className:"space-y-2 text-gray-700 dark:text-gray-300",children:[a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"No personal information is collected"]}),a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"No browsing history is recorded"]}),a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"No usage analytics are gathered"]}),a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"No data is transmitted to external servers"]}),a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"No cookies or tracking mechanisms are used"]})]})]}),a.jsxs("section",{className:"mb-8",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4 pb-2 border-b-2 border-sf-blue flex items-center gap-2",children:[a.jsx(Zy,{className:"h-5 w-5"}),"How the Extension Works"]}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-4",children:"The extension operates entirely within your browser:"}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"p-4 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"Page Analysis"}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm",children:"When activated on a Salesforce page, the extension reads the DOM (Document Object Model) to identify component structures. This analysis happens locally in your browser."})]}),a.jsxs("div",{className:"p-4 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"Apex Class Detection"}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm",children:"The extension identifies Apex controller classes associated with components by analyzing the page's DOM attributes. This information is read locally and never transmitted externally."})]}),a.jsxs("div",{className:"p-4 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"Performance Monitoring"}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm",children:"Component rendering times are calculated locally using browser performance APIs. These metrics are displayed in real-time and are not stored or transmitted anywhere."})]}),a.jsxs("div",{className:"p-4 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"Tooltip Display"}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm",children:"Component information is displayed in tooltips directly on the page. No data leaves your browser."})]}),a.jsxs("div",{className:"p-4 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"Settings Storage"}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm",children:"User preferences (such as enabled/disabled state and ignore lists) are stored locally using Chrome's built-in storage API. This data stays on your device and syncs only through your Chrome profile if you have sync enabled."})]})]})]}),a.jsxs("section",{className:"mb-8",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4 pb-2 border-b-2 border-sf-blue flex items-center gap-2",children:[a.jsx(Td,{className:"h-5 w-5"}),"Permissions Explained"]}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-4",children:"The extension requires certain permissions to function:"}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"p-4 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsx("code",{className:"bg-sf-blue/10 text-sf-blue px-2 py-0.5 rounded text-sm",children:"activeTab"}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm mt-2",children:"Allows the extension to access the current tab when you activate it. This is used to read component information from Salesforce pages."})]}),a.jsxs("div",{className:"p-4 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsx("code",{className:"bg-sf-blue/10 text-sf-blue px-2 py-0.5 rounded text-sm",children:"storage"}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm mt-2",children:"Allows the extension to save your preferences locally on your device."})]}),a.jsxs("div",{className:"p-4 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsx("code",{className:"bg-sf-blue/10 text-sf-blue px-2 py-0.5 rounded text-sm",children:"scripting"}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm mt-2",children:"Allows the extension to inject the inspection script into Salesforce pages."})]})]}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-4",children:"These permissions are the minimum required for the extension to function and do not grant access to your personal data or browsing history."})]}),a.jsxs("section",{className:"mb-8",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4 pb-2 border-b-2 border-sf-blue",children:"Third-Party Services"}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:"This extension does not use any third-party services, analytics, or tracking tools. All functionality is self-contained within the extension."})]}),a.jsxs("section",{className:"mb-8",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4 pb-2 border-b-2 border-sf-blue flex items-center gap-2",children:[a.jsx(xr,{className:"h-5 w-5"}),"Data Security"]}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:"Since no data is collected or transmitted, there is no data to secure externally. All information processed by the extension remains in your browser's memory and is discarded when you navigate away from the page or close the browser."})]}),a.jsxs("section",{className:"mb-8",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4 pb-2 border-b-2 border-sf-blue flex items-center gap-2",children:[a.jsx(xG,{className:"h-5 w-5"}),"Children's Privacy"]}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:"This extension is a developer tool and is not directed at children. It does not collect any personal information from any users, including children."})]}),a.jsxs("section",{className:"mb-8",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4 pb-2 border-b-2 border-sf-blue flex items-center gap-2",children:[a.jsx(op,{className:"h-5 w-5"}),"Changes to This Policy"]}),a.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:'If we make changes to this privacy policy, we will update the "Last Updated" date at the top of this page. We encourage you to review this policy periodically.'})]}),a.jsxs("section",{className:"bg-gray-100 dark:bg-gray-800 p-6 rounded-lg",children:[a.jsxs("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4 flex items-center gap-2",children:[a.jsx(Bk,{className:"h-5 w-5"}),"Contact"]}),a.jsxs("p",{className:"text-gray-700 dark:text-gray-300",children:["If you have any questions about this privacy policy or the extension, please contact us through the Chrome Web Store listing or write us at"," ",a.jsx("a",{href:"mailto:[email protected]",className:"text-sf-blue hover:underline",children:"[email protected]"})]})]}),a.jsxs("footer",{className:"text-center mt-8 pt-6 border-t border-gray-200 dark:border-gray-700",children:[a.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Salesforce Component Inspector v3.0"}),a.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-500 mt-1",children:"This extension is not affiliated with Salesforce, Inc."})]})]})})]})})}function kCe(){const e=[{icon:Td,title:"Secure Password Storage",description:"Store Salesforce org credentials encrypted locally in your browser"},{icon:G7,title:"Quick Login",description:"One-click login to any saved Salesforce org without re-entering credentials"},{icon:q0,title:"Password Visibility Toggle",description:"Easily show or hide stored passwords within the extension popup"},{icon:rD,title:"Multi-Org Support",description:"Manage credentials for multiple Salesforce orgs (Production, Sandbox, Scratch)"},{icon:R7,title:"Save on Login",description:"After a successful Salesforce login, a popup prompts you to save or update the credentials automatically"},{icon:Ha,title:"Auto-Fill",description:"Automatically fill Salesforce login forms with saved credentials"},{icon:ip,title:"Local-Only Storage",description:"All data stays in your browser — nothing is sent to external servers"}],t=[{type:"Production Orgs",description:"login.salesforce.com — your live Salesforce environments"},{type:"Sandbox Orgs",description:"test.salesforce.com — development and QA environments"},{type:"Scratch Orgs",description:"Custom domain orgs created via Salesforce DX"},{type:"Developer Orgs",description:"Free developer edition orgs for building and testing"}];return a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[a.jsxs("div",{className:"mb-8",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsx("div",{className:"p-3 bg-sf-blue rounded-lg",children:a.jsx(xr,{className:"h-8 w-8 text-white"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:"SecureVault Salesforce Password Manager"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Chrome Extension"})]})]}),a.jsx("p",{className:"text-lg text-gray-700 dark:text-gray-300 mb-4",children:"A secure, browser-based password manager built specifically for Salesforce professionals. Safely store, manage, and auto-fill credentials for all your Salesforce orgs — production, sandbox, scratch, and developer editions."}),a.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[a.jsx($n,{variant:"secondary",children:"v1.0.0"}),a.jsx($n,{variant:"outline",children:"Chrome Extension"}),a.jsx($n,{variant:"outline",children:"Password Manager"}),a.jsx($n,{variant:"outline",children:"Salesforce"})]}),a.jsxs("div",{className:"flex flex-wrap gap-3",children:[a.jsx("a",{href:"https://chromewebstore.google.com/detail/securevault-salesforce-pa/ccopbffggmgfjflfnplegaiiojfpcnab",target:"_blank",rel:"noopener noreferrer",children:a.jsxs(H,{
926className:"gap-2 bg-sf-blue hover:bg-sf-blue/90","data-testid":"button-chrome-store",children:[a.jsx(bf,{className:"h-4 w-4"}),"Add to Chrome",a.jsx(Xy,{className:"h-4 w-4"})]})}),a.jsx(Te,{href:"/extensions/securevault/privacy-policy",children:a.jsxs(H,{variant:"outline",className:"gap-2","data-testid":"button-privacy-policy",children:[a.jsx(xr,{className:"h-4 w-4"}),"Privacy Policy"]})})]})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-features",children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(Ha,{className:"h-5 w-5 text-sf-blue"}),"Features"]})}),a.jsx(ne,{children:a.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:e.map((n,r)=>a.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-gray-50 dark:bg-gray-800",children:[a.jsx(n.icon,{className:"h-5 w-5 text-sf-blue mt-0.5 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium text-gray-900 dark:text-white",children:n.title}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n.description})]})]},r))})})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-installation",children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(bf,{className:"h-5 w-5 text-sf-blue"}),"Installation"]})}),a.jsx(ne,{children:a.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-gray-700 dark:text-gray-300",children:[a.jsx("li",{children:"Visit the Chrome Web Store extension page"}),a.jsx("li",{children:'Click "Add to Chrome"'}
926),a.jsx("li",{children:'Confirm by clicking "Add extension" in the popup'}),a.jsx("li",{children:"Click the SecureVault icon in your Chrome toolbar to get started"}),a.jsx("li",{children:'Add your first Salesforce org by clicking "Add Org"'})]})})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-usage",children:[a.jsx(he,{children:a.jsx(fe,{children:"How to Use"})}),a.jsxs(ne,{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"Option 1 — Add credentials manually"}),a.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-gray-700 dark:text-gray-300",children:[a.jsx("li",{children:"Click the SecureVault icon in your Chrome toolbar"}),a.jsx("li",{children:'Click "Add Org" and enter your Salesforce URL, username, and password'}),a.jsx("li",{children:"Save the entry — it appears in your vault immediately"}),a.jsx("li",{children:"Navigate to any Salesforce login page and click the entry to auto-fill your credentials"}),a.jsx("li",{children:"Use the eye icon in the popup to reveal or hide any stored password"})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-3",children:"Option 2 — Save after a successful login"}),a.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-gray-700 dark:text-gray-300",children:[a.jsx("li",{children:"Log in to Salesforce as you normally would"}),a.jsx("li",{children:"After a successful login, SecureVault shows a popup asking if you want to save or update the credentials"}),a.jsx("li",{children:'Click "Save" — the org entry is added to your vault automatically'}),a.jsx("li",{children:"Next time, click the entry in the popup to auto-fill with one click"})]})]})]})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-org-types",children:[a.jsx(he,{children:a.jsx(fe,{children:"Supported Org Types"})}),a.jsx(ne,{children:a.jsx("div",{className:"space-y-3",children:t.map((n,r)=>a.jsxs("div",{className:"p-3 rounded-lg bg-gray-50 dark:bg-gray-800",children:[a.jsx("h4",{className:"font-medium text-gray-900 dark:text-white",children:n.type}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n.description})]},r))})})]}),a.jsxs(te,{className:"mb-8","data-testid":"card-privacy",children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(xr,{className:"h-5 w-5 text-sf-blue"}),"Privacy & Security"]})}),a.jsxs(ne,{children:[a.jsxs("ul",{className:"space-y-2 text-gray-700 dark:text-gray-300",children:[a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"All credentials are stored locally in Chrome's encrypted storage — never on external servers"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"No data is collected, transmitted, or sold to third parties"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"The extension only activates on Salesforce login pages"]}),a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"text-green-500",children:"✓"}),"Open source — you can review exactly what the extension does"]})]}),a.jsx("div",{className:"mt-4",children:a.jsx(Te,{href:"/extensions/securevault/privacy-policy",children:a.jsxs(H,{variant:"outline",className:"gap-2","data-testid":"button-privacy-policy-card",children:[a.jsx(xr,{className:"h-4 w-4"}),"View Full Privacy Policy",a.jsx(Xy,{className:"h-4 w-4"})]})})})]})]})]})})}function CCe(){return a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:a.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[a.jsx("div",{className:"mb-6",children:a.jsx(Te,{href:"/extensions/securevault",children:a.jsxs(H,{variant:"ghost",className:"gap-2 mb-4","data-testid":"button-back",children:[a.jsx(Cd,{className:"h-4 w-4"}),"Back to Extension"]})})}),a.jsx(te,{className:"mb-8",children:a.jsxs(ne,{className:"pt-8 pb-8",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2",children:"Privacy Policy"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"SecureVault Salesforce Password Manager - Chrome Extension"}),a.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-500 mt-2",children:"Last Updated: May 13, 2026"})]}),a.jsxs("div",{className:"space-y-8 text-gray-700 dark:text-gray-300",children:[a.jsxs("section",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(xr,{className:"h-5 w-5 text-sf-blue"}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Overview"})]}),a.jsx("p",{className:"leading-relaxed",children:'SecureVault Salesforce Password Manager ("the Extension") is a Chrome browser extension that helps Salesforce professionals securely store and manage login credentials for their Salesforce orgs. This Privacy Policy describes what data the Extension handles, how it is stored, and 
926your rights regarding that data.'}),a.jsx("p",{className:"leading-relaxed mt-3",children:"We are committed to protecting your privacy. The Extension is designed with a local-first, zero-transmission architecture — your credentials never leave your device."})]}),a.jsxs("section",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(ip,{className:"h-5 w-5 text-sf-blue"}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Data We Store"})]}),a.jsx("p",{className:"leading-relaxed mb-3",children:"The Extension stores only the information you explicitly provide when adding an org entry:"}),a.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-2",children:[a.jsx("li",{children:"Salesforce org URL (e.g., login.salesforce.com, test.salesforce.com, or a custom domain)"}),a.jsx("li",{children:"Salesforce username or email address"}),a.jsx("li",{children:"Salesforce password (stored in Chrome's encrypted local storage)"}),a.jsx("li",{children:"Optional label or nickname you assign to an org entry"})]}),a.jsxs("p",{className:"leading-relaxed mt-3",children:["All of the above is stored exclusively in ",a.jsx("strong",{children:"Chrome's local extension storage"}),"on your device. It is never uploaded, synced to external servers, or shared with anyone."]})]}),a.jsxs("section",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Td,{className:"h-5 w-5 text-sf-blue"}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Data We Do NOT Collect"})]}),a.jsxs("p",{className:"leading-relaxed mb-3",children:["The Extension does ",a.jsx("strong",{children:"not"})," collect, transmit, or store any of the following:"]}),a.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-2",children:[a.jsx("li",{children:"Browsing history or page content"}),a.jsx("li",{children:"Any data from Salesforce pages beyond the login form fields"}),a.jsx("li",{children:"Analytics, telemetry, or usage statistics"}),a.jsx("li",{children:"Personal information beyond the credentials you explicitly add"}),a.jsx("li",{children:"Cookies or authentication tokens from your Salesforce sessions"}),a.jsx("li",{children:"Any information from non-Salesforce websites"})]})]}),a.jsxs("section",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(q0,{className:"h-5 w-5 text-sf-blue"}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"How Your Data Is Used"})]}),a.jsx("p",{className:"leading-relaxed mb-3",children:"The data you store in SecureVault is used solely for the following purposes:"}),a.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-2",children:[a.jsx("li",{children:"Displaying your saved org entries in the extension popup"}),a.jsx("li",{children:"Auto-filling the username and password fields on Salesforce login pages you navigate to"}),a.jsx("li",{children:"Prompting you to save or update credentials after a successful Salesforce login"}),a.jsx("li",{children:"Allowing you to view, edit, or delete your stored entries"})]}),a.jsx("p",{className:"leading-relaxed mt-3",children:"No third parties — including the extension developer — have access to your stored credentials."})]}),a.jsxs("section",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(xr,{className:"h-5 w-5 text-sf-blue"}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Security"})]}),a.jsx("p",{className:"leading-relaxed mb-3",children:"Your credentials are protected by the following measures:"}),a.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-2",children:[a.jsx("li",{children:"All data is stored using Chrome's built-in extension storage, which benefits from Chrome's native security model"}),a.jsx("li",{children:"The extension only activates on Salesforce login pages (login.salesforce.com, test.salesforce.com, and custom Salesforce domains)"}),a.jsx("li",{children:"The extension requests only the minimum necessary browser permissions"}),a.jsx("li",{children:"No external network connections are made — the extension o
926perates entirely offline"})]})]}),a.jsxs("section",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Si,{className:"h-5 w-5 text-sf-blue"}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Permissions Explained"})]}),a.jsx("p",{className:"leading-relaxed mb-3",children:"The Extension requests the following Chrome permissions:"}),a.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"storage"})," — to save your org entries locally in Chrome's extension storage"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"activeTab"})," — to detect when you are on a Salesforce login page and fill credentials"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"scripting"})," — to inject the auto-fill script into Salesforce login pages only"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"host permissions (*.salesforce.com, *.force.com)"})," — to limit the extension's activity strictly to Salesforce domains"]})]}),a.jsx("p",{className:"leading-relaxed mt-3",children:"The Extension does not request access to all URLs, your browsing history, bookmarks, or any other sensitive browser APIs."})]}),a.jsxs("section",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(ip,{className:"h-5 w-5 text-sf-blue"}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Data Retention & Deletion"})]}),a.jsx("p",{className:"leading-relaxed mb-3",children:"Your data is retained locally for as long as you keep the Extension installed, or until you manually delete entries. You can:"}),a.jsxs("ul",{className:"list-disc list-inside space-y-2 ml-2",children:[a.jsx("li",{children:"Delete individual org entries from within the extension popup at any time"}),a.jsx("li",{children:"Clear all stored data by uninstalling the Extension from Chrome"}),a.jsx("li",{children:`Use Chrome's built-in "Clear extension data" option in Chrome settings`})]}),a.jsx("p",{className:"leading-relaxed mt-3",children:"Because no data is sent to external servers, there is nothing to request deletion of from us."})]}),a.jsxs("section",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(xr,{className:"h-5 w-5 text-sf-blue"}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Changes to This Policy"})]}),a.jsx("p",{className:"leading-relaxed",children:'We may update this Privacy Policy from time to time. Any changes will be reflected on this page with an updated "Last Updated" date. Continued use of the Extension after changes constitutes your acceptance of the revised policy. We encourage you to review this page periodically.'})]}),a.jsxs("section",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Bk,{className:"h-5 w-5 text-sf-blue"}),a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Contact"})]}),a.jsxs("p",{className:"leading-relaxed",children:["If you have any questions or concerns about this Privacy Policy or the Extension's data practices, please reach out via the contact information available on"," ",a.jsx("a",{href:"https://salesforcesage.com",className:"text-sf-blue hover:underline",target:"_blank",rel:"noopener noreferrer",children:"salesforcesage.com"}),"."]})]})]})]})}),a.jsx("div",{className:"text-center",children:a.jsx(Te,{href:"/extensions/securevault",children:a.jsxs(H,{variant:"outline",className:"gap-2",children:[a.jsx(Cd,{className:"h-4 w-4"}),"Back to SecureVault Extension"]})})})]})})}var xA="Progress",vA=100,[TCe,gAe]=As(xA),[ACe,jCe]=TCe(xA),PV=v.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:s,getValueLabel:i=OCe,...o}=e;(s||s===0)&&!kI(s)&&console.error(RCe(`${s}`,"Progress"));const l=kI(s)?s:vA;r!==null&&!CI(r,l)&&console.error(_Ce(`${r}`,"Progress"));const c=CI(r,l)?r:null,u=E0(c)?i(c,l):void 0;return a.jsx(ACe,{scope:n,value:c,max:l,children:a.jsx(je.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":E0(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":FV(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});PV.displayName=xA;var DV="ProgressIndicator",$V=v.forwardRef((e,t)=>
926{const{__scopeProgress:n,...r}=e,s=jCe(DV,n);return a.jsx(je.div,{"data-state":FV(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...r,ref:t})});$V.displayName=DV;function OCe(e,t){return`${Math.round(e/t*100)}%`}function FV(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function E0(e){return typeof e=="number"}function kI(e){return E0(e)&&!isNaN(e)&&e>0}function CI(e,t){return E0(e)&&!isNaN(e)&&e<=t&&e>=0}function RCe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${vA}\`.`}function _Ce(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
927  - a positive number
928  - less than the value passed to \`max\` (or ${vA} if no \`max\` prop is set)
929  - \`null\` or \`undefined\` if the progress is indeterminate.
930
931Defaulting to \`null\`.`}var BV=PV,ICe=$V;const UV=v.forwardRef(({className:e,value:t,...n},r)=>a.jsx(BV,{ref:r,className:be("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:a.jsx(ICe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));UV.displayName=BV.displayName;function Bg(e){switch(e){case"critical":return"bg-red-500";case"high":return"bg-orange-500";case"medium":return"bg-yellow-500";case"low":return"bg-blue-500";default:return"bg-gray-500"}}function Ph(e){switch(e){case"good":return"text-green-500";case"warning":return"text-yellow-500";case"critical":return"text-red-500";default:return"text-gray-500"}}function TI(e){return e>=80?"text-green-500":e>=60?"text-yellow-500":"text-red-500"}function Dh({score:e,label:t,icon:n}){const r=e??0;return a.jsxs("div",{className:"flex flex-col items-center p-4",children:[a.jsxs("div",{className:"relative w-24 h-24 mb-2",children:[a.jsxs("svg",{className:"w-24 h-24 transform -rotate-90",children:[a.jsx("circle",{className:"text-gray-200 dark:text-gray-700",strokeWidth:"8",stroke:"currentColor",fill:"transparent",r:"40",cx:"48",cy:"48"}),a.jsx("circle",{className:TI(r),strokeWidth:"8",strokeDasharray:`${r*2.51} 251`,strokeLinecap:"round",stroke:"currentColor",fill:"transparent",r:"40",cx:"48",cy:"48"})]}),a.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a.jsx("span",{className:`text-2xl font-bold ${TI(r)}`,children:r})})]}),a.jsxs("div",{className:"flex items-center gap-1 text-sm text-gray-600 dark:text-gray-400",children:[a.jsx(n,{className:"w-4 h-4"}),t]})]})}function MCe(){var S,R,_,L,A,B,U,V,P,D,q,Q;go();const{toast:e}=Fr(),{user:t,isLoading:n,isAuthenticated:r}=kB(),[s,i]=v.useState(null),[o,l]=v.useState(null),c=new URLSearchParams(window.location.search),u=c.get("connected"),d=c.get("orgId"),h=c.get("error");v.useEffect(()=>{u==="true"&&d&&(i(d),e({title:"Org Connected Successfully",description:"Your Salesforce org has been connected. You can now run a health scan."}),window.history.replaceState({},"","/org-health")),h&&(e({title:"Connection Failed",description:h==="no_code"?"Authorization was cancelled":h,variant:"destructive"}),window.history.replaceState({},"","/org-health"))},[u,d,h,e]);const{data:f,isLoading:p}=tn({queryKey:["/api/salesforce/orgs"],enabled:r}),{data:m,isLoading:g,refetch:x}=tn({queryKey:[`/api/org-health/orgs/${s}/latest-scan`],enabled:!!s&&r}),{data:y,refetch:b}=tn({queryKey:[`/api/org-health/scan/${o}`],enabled:!!o&&r,refetchInterval:o?2e3:!1});v.useEffect(()=>{((y==null?void 0:y.status)==="completed"||(y==null?void 0:y.status)==="failed")&&(l(null),x(),y.status==="completed"?e({title:"Scan Complete",description:"Your org health scan has finished successfully."}):e({title:"Scan Failed",description:y.scanError||"An error occurred during scanning.",variant:"destructive"}))},[y,x,e]);const w=zs({mutationFn:async F=>(await(await fetch(`/api/salesforce/auth-url?sandbox=${F}`)).json()).authUrl,onSuccess:F=>{window.location.href=F},onError:()=>{e({title:"Error",description:"Failed to initiate Salesforce connection. Please ensure SF_CONSUMER_KEY and SF_CONSUMER_SECRET are configured.",variant:"destructive"})}}),E=zs({mutationFn:async F=>(await sp("POST","/api/org-health/scan",{orgId:F})).json(),onSuccess:F=>{l(F.scanId),e({title:"Scan Started",description:"Analyzing your Salesforce org..."})},onError:()=>{e({title:"Error",description:"Failed to start scan",variant:"destructive"})}}),N=zs({mutationFn:async F=>{await sp("DELETE",`/api/salesforce/orgs/${F}`)},onSuccess:()=>
931{jP.invalidateQueries({queryKey:["/api/salesforce/orgs"]}),i(null),e({title:"Org Disconnected",description:"The Salesforce org has been disconnected."})}}),k=o&&y&&y.status==="scanning",C=(m==null?void 0:m.metrics.reduce((F,ge)=>(F[ge.category]||(F[ge.category]=[]),F[ge.category].push(ge),F),{}))||{},T=(m==null?void 0:m.findings.reduce((F,ge)=>(F[ge.category]||(F[ge.category]=[]),F[ge.category].push(ge),F),{}))||{},j={critical:(m==null?void 0:m.findings.filter(F=>F.severity==="critical"))||[],high:(m==null?void 0:m.findings.filter(F=>F.severity==="high"))||[],medium:(m==null?void 0:m.findings.filter(F=>F.severity==="medium"))||[],low:(m==null?void 0:m.findings.filter(F=>F.severity==="low"))||[]};return n?a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center",children:a.jsxs("div",{className:"text-center",children:[a.jsx(qu,{className:"w-12 h-12 text-sf-blue mx-auto mb-4 animate-spin"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Loading..."})]})}):r?a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:"mb-8",children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2","data-testid":"heading-org-health",children:"Check Org Health"}),a.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Connect your Salesforce org and get a comprehensive health analysis with actionable recommendations."})]}),!(f!=null&&f.length)&&!p&&a.jsxs(te,{className:"mb-8",children:[a.jsxs(he,{className:"text-center",children:[a.jsx("div",{className:"mx-auto w-16 h-16 bg-sf-blue/10 rounded-full flex items-center justify-center mb-4",children:a.jsx(Bo,{className:"w-8 h-8 text-sf-blue"})}),a.jsx(fe,{children:"Connect Your Salesforce Org"}),a.jsx(Xt,{children:"Authorize access to analyze your org's health, security, and performance. We only read metadata - no transactional data is collected."})]}),a.jsxs(ne,{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[a.jsxs(H,{onClick:()=>w.mutate(!1),disabled:w.isPending,className:"bg-sf-blue hover:bg-sf-dark-blue","data-testid":"button-connect-production",children:[a.jsx(Bo,{className:"w-4 h-4 mr-2"}),"Connect Production Org"]}),a.jsxs(H,{onClick:()=>w.mutate(!0),disabled:w.isPending,variant:"outline","data-testid":"button-connect-sandbox",children:[a.jsx(Bo,{className:"w-4 h-4 mr-2"}),"Connect Sandbox Org"]})]})]}),p&&a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[a.jsx("div",{className:"lg:col-span-1",children:a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{className:"text-lg",children:"Connected Orgs"})}),a.jsx(ne,{className:"space-y-3",children:[1,2,3].map(F=>a.jsxs("div",{className:"p-3 rounded-lg border border-gray-200 dark:border-gray-700",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx(Xe,{className:"h-4 w-24"}),a.jsx(Xe,{className:"h-5 w-16"})]}),a.jsx(Xe,{className:"h-3 w-32 mt-2"}),a.jsx(Xe,{className:"h-3 w-20 mt-1"})]},F))})]})}),a.jsx("div",{className:"lg:col-span-3",children:a.jsx(te,{children:a.jsxs(ne,{className:"py-12 text-center",children:[a.jsx(qu,{className:"w-8 h-8 text-sf-blue mx-auto mb-4 animate-spin"}),a.jsx("p",{className:"text-gray-500",children:"Loading connected orgs..."})]})})})]}),f&&f.length>0&&a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[a.jsx("div",{className:"lg:col-span-1",children:a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{className:"text-lg",children:"Connected Orgs"})}),a.jsxs(ne,{className:"space-y-3",children:[f.map(F=>a.jsxs("div",{className:`p-3 rounded-lg border cursor-pointer transition-colors ${s===F.id?"border-sf-blue bg-sf-blue/5":"border-gray-200 dark:border-gray-700 hover:border-sf-blue/50"}`,onClick:()=>i(F.id),"data-testid":`org-card-${F.id}`,children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"font-medium text-sm truncate",children:F.username.split("@")[0]}),a.jsx($n,{variant:F.orgType==="production"?"default":"secondary",className:"text-xs",children:F.orgType})]}),F.lastScanAt&&a.jsxs("p",{className:"text-xs text-gray-400",children:["Last scan: ",new Date(F.lastScanAt).toLocaleDateString()]})]},F.id)),a.jsx(yA,{className:"my-4"}),a.jsxs(H,{onClick:()=>w.mutate(!1),disabled:w.isPending,variant:"outline",className:"w-full",size:"sm","data-testid":"button-add-org",children:[a.jsx(Bo,{className:"w-4 h-4 mr-2"}),"Add Another Org"]})]})]})}),a.jsx("div",{className:"lg:col-span-3",children:s?a.jsxs("div",{className:"space-y-6",children:[a.jsxs(te,{children:[a.jsxs(he,{className:"flex flex-row items-center justify-between",children:[a.jsxs("div",{children:[a.jsx(fe,{children:((S=f.find(F=>F.id===s))==null?void 0:S.username.split("@")[0])||"Org Health"}),a.jsxs(Xt,{children:["Last scan: ",(R=f.find(F=>F.id===s))!=null&&R.lastScanAt?new Date(f.find(F=>F.id===s).lastScanAt).toLocaleDateString():"Never"]})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(H,{onClick:()=>E.mutate(s),disabled:k||E.isPending,className:"bg-sf-blue hover:bg-sf-dark-blue","data-testid":"button-start-scan",children:k?a.jsxs(a.Fragment,{children:[a.jsx(rD,{className:"w-4 h-4 mr-2 animate-spin"}),"Scanning... ",y==null?void 0:y.scanProgress,"%"]}):a.jsxs(a.Fragment,{children:[a.jsx(Ha,{className:"w-4 h-4 mr-2"}),"Run Health Scan"]})}),a.jsx(H,{onClick:()=>N.mutate(s),variant:"outline",size:"icon",title:"Remove this org",className:"border-red-200 hover:bg-red-50 hover:border-red-300","data-testid":"button-disconnect-org",children:a.jsx(hc,{className:"w-4 h-4 text-red-500"})})]})]}),k&&a.jsxs(ne,{children:[a.jsx(UV,{value:(y==null?void 0:y.scanProgress)||0,className:"h-3"}),a.jsxs("div",{className:"mt-3 space-y-2",children:[a.jsxs("p",{className:"text-sm font-medium text-center",children:[((y==null?void 0:y.scanProgress)||0)<15&&"Connecting to org...",((y==null?void 0:y.scanProgress)||0)>=15&&((y==null?void 0:y.scanProgress)||0)<30&&"Analyzing org limits...",((y==null?void 0:y.scanProgress)||0)>=30&&((y==null?void 0:y.scanProgress)||0)<45&&"Scanning Apex classes...",((y==null?void 0:y.scanProgress)||0)>=45&&((y==null?void 0:y.scanProgress)||0)<55&&"Checking triggers...",((y==null?void 0:y.scanProgress)||0)>=55&&((y==null?void 0:y.scanProgress)||0)<65&&"Analyzing flows...",((y==null?void 0:y.scanProgress)||0)>=65&&((y==null?void 0:y.scanProgress)||0)<75&&"Scanning objects & profiles...",((y==null?void 0:y.scanProgress)||0)>=75&&((y==null?void 0:y.scanProgress)||0)<90&&"Checking packages & apps...",((y==null?void 0:y.scanProgress)||0)>=90&&"Calculating health scores..."]}),a.jsx("p",{className:"text-xs text-gray-500 text-center",children:"This typically takes 1-2 minutes depending on org size"})]})]})]}),m&&!k&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 ga
931p-4",children:[a.jsx(te,{children:a.jsx(ne,{className:"pt-4",children:a.jsx(Dh,{score:m.scan.healthScore,label:"Health",icon:v1})})}),a.jsx(te,{children:a.jsx(ne,{className:"pt-4",children:a.jsx(Dh,{score:m.scan.securityScore,label:"Security",icon:xr})})}),a.jsx(te,{children:a.jsx(ne,{className:"pt-4",children:a.jsx(Dh,{score:m.scan.automationScore,label:"Automation",icon:Ha})})}),a.jsx(te,{children:a.jsx(ne,{className:"pt-4",children:a.jsx(Dh,{score:m.scan.codeQualityScore,label:"Code Quality",icon:Ku})})}),a.jsx(te,{children:a.jsx(ne,{className:"pt-4",children:a.jsx(Dh,{score:m.scan.complexityScore,label:"Complexity",icon:fG})})})]}),a.jsxs(Fd,{defaultValue:"summary",className:"w-full",children:[a.jsxs(Bc,{className:"grid w-full grid-cols-6",children:[a.jsx(Zt,{value:"summary","data-testid":"tab-summary",children:"Summary"}),a.jsxs(Zt,{value:"recommendations","data-testid":"tab-recommendations",children:["Recommendations",m.findings.length>0&&a.jsx($n,{variant:"secondary",className:"ml-2",children:m.findings.length})]}),a.jsx(Zt,{value:"code","data-testid":"tab-code",children:"Code"}),a.jsx(Zt,{value:"automation","data-testid":"tab-automation",children:"Automation"}),a.jsx(Zt,{value:"utilization","data-testid":"tab-utilization",children:"Utilization"}),a.jsx(Zt,{value:"security","data-testid":"tab-security",children:"Security"})]}),a.jsx(Dn,{value:"summary",className:"mt-6",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"text-lg flex items-center gap-2",children:[a.jsx(pG,{className:"w-5 h-5 text-yellow-500"}),"Issues Overview"]})}),a.jsx(ne,{children:a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"}),a.jsx("span",{children:"Critical"})]}),a.jsx("span",{className:"font-semibold",children:j.critical.length})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-3 h-3 rounded-full bg-orange-500"}),a.jsx("span",{children:"High"})]}),a.jsx("span",{className:"font-semibold",children:j.high.length})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),a.jsx("span",{children:"Medium"})]}),a.jsx("span",{className:"font-semibold",children:j.medium.length})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),a.jsx("span",{children:"Low"})]}),a.jsx("span",{className:"font-semibold",children:j.low.length})]})]})})]}),a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"text-lg flex items-center gap-2",children:[a.jsx(ip,{className:"w-5 h-5 text-sf-blue"}),"Quick Stats"]})}),a.jsx(ne,{children:a.jsx("div",{className:"space-y-3",children:(_=C.utilization)==null?void 0:_.slice(0,4).map(F=>a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:F.metricName}),a.jsx("span",{className:"font-semibold",children:F.metricValue})]},F.id))})})]})]})}),a.jsx(Dn,{value:"recommendations",className:"mt-6",children:a.jsxs(te,{children:[a.jsxs(he,{children:[a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(Si,{className:"w-5 h-5"}),"Recommendations"]}),a.jsx(Xt,{children:"Prioritized list of issues and improvements for your org"})]}),a.jsx(ne,{children:m.findings.length===0?a.jsxs("div",{className:"text-center py-8",children:[a.jsx(sl,{className:"w-12 h-12 text-green-500 mx-auto mb-4"}),a.jsx("p",{className:"text-lg font-medium",children:"No issues found!"}),a.jsx("p",{className:"text-gray-500",children:"Your org looks healthy."})]}):a.jsx("div",{className:"space-y-4",children:m.findings.map(F=>
931a.jsx("div",{className:"p-4 border rounded-lg",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:`w-2 h-2 rounded-full mt-2 ${Bg(F.severity)}`}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("h4",{className:"font-medium",children:F.title}),a.jsx($n,{variant:"outline",className:"text-xs",children:F.category})]}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:F.description}),F.recommendation&&a.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-3 rounded text-sm",children:[a.jsx("strong",{children:"Recommendation:"})," ",F.recommendation]}),F.affectedItem&&a.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Affected: ",F.affectedItem]})]})]})},F.id))})})]})}),a.jsx(Dn,{value:"code",className:"mt-6",children:a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(Ku,{className:"w-5 h-5"}),"Code Analysis"]})}),a.jsxs(ne,{children:[a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:(L=C.code)==null?void 0:L.map(F=>a.jsxs("div",{className:"p-4 border rounded-lg",children:[a.jsx("p",{className:"text-sm text-gray-500",children:F.metricName}),a.jsx("p",{className:`text-2xl font-bold ${Ph(F.status)}`,children:F.metricValue}),F.description&&a.jsx("p",{className:"text-xs text-gray-400 mt-1",children:F.description})]},F.id))}),((A=T.code)==null?void 0:A.length)>0&&a.jsxs("div",{className:"mt-6",children:[a.jsx("h4",{className:"font-medium mb-3",children:"Code Issues"}),a.jsx("div",{className:"space-y-3",children:T.code.map(F=>a.jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:`w-2 h-2 rounded-full ${Bg(F.severity)}`}),a.jsx("span",{className:"font-medium",children:F.title})]}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:F.description})]},F.id))})]})]})]})}),a.jsx(Dn,{value:"automation",className:"mt-6",children:a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(Ha,{className:"w-5 h-5"}),"Automation Analysis"]})}),a.jsxs(ne,{children:[a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:(B=C.automation)==null?void 0:B.map(F=>a.jsxs("div",{className:"p-4 border rounded-lg",children:[a.jsx("p",{className:"text-sm text-gray-500",children:F.metricName}),a.jsx("p",{className:`text-2xl font-bold ${Ph(F.status)}`,children:F.metricValue})]},F.id))}),((U=T.automation)==null?void 0:U.length)>0&&a.jsxs("div",{className:"mt-6",children:[a.jsx("h4",{className:"font-medium mb-3",children:"Automation Issues"}),a.jsx("div",{className:"space-y-3",children:T.automation.map(F=>a.jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:`w-2 h-2 rounded-full ${Bg(F.severity)}`}),a.jsx("span",{className:"font-medium",children:F.title})]}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:F.description})]},F.id))})]})]})]})}),a.jsx(Dn,{value:"utilization",className:"mt-6",children:a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(ip,{className:"w-5 h-5"}),"Org Utilization"]})}),a.jsx(ne,{children:a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:(V=C.utilization)==null?void 0:V.map(F=>a.jsxs("div",{className:"p-4 border rounded-lg",children:[a.jsx("p",{className:"text-sm text-gray-500",children:F.metricName}),a.jsxs("p",{className:`text-2xl font-bold ${Ph(F.status)}`,children:[F.metricValue,F.metricUnit&&a.jsx("span",{className:"text-sm ml-1",children:F.metricUnit})]}),F.description&&a.jsx("p",{className:"text-xs text-gray-400 mt-1",children:F.description})]},F.id))})})]})}),a.jsx(Dn,{value:"security",className:"mt-6",children:a.jsxs(te,{children:[a.jsx(he,{children:a.jsxs(fe,{className:"flex items-center gap-2",children:[a.jsx(xr,{className:"w-5 h-5"}),"Security & Permissions"]})}),a.jsxs(ne,{children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[(P=C.security)==null?void 0:P.map(F=>a.jsxs("div",{className:"p-4 border rounded-lg",children:[a.jsx("p",{className:"text-sm text-gray-500",children:F.metricName}),a.jsx("p",{className:`text-2xl font-bold ${Ph(F.status)}`,children:F.metricValue})]},F.id)),(D=C.permissions)==null?void 0:D.map(F=>
931a.jsxs("div",{className:"p-4 border rounded-lg",children:[a.jsx("p",{className:"text-sm text-gray-500",children:F.metricName}),a.jsx("p",{className:`text-2xl font-bold ${Ph(F.status)}`,children:F.metricValue})]},F.id))]}),(((q=T.security)==null?void 0:q.length)>0||((Q=T.permissions)==null?void 0:Q.length)>0)&&a.jsxs("div",{className:"mt-6",children:[a.jsx("h4",{className:"font-medium mb-3",children:"Security Issues"}),a.jsx("div",{className:"space-y-3",children:[...T.security||[],...T.permissions||[]].map(F=>a.jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:`w-2 h-2 rounded-full ${Bg(F.severity)}`}),a.jsx("span",{className:"font-medium",children:F.title})]}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:F.description})]},F.id))})]})]})]})})]})]}),g&&a.jsx(te,{children:a.jsxs(ne,{className:"py-12",children:[a.jsxs("div",{className:"flex flex-col items-center gap-4",children:[a.jsx(qu,{className:"w-8 h-8 text-sf-blue animate-spin"}),a.jsx("p",{className:"text-gray-500",children:"Loading scan results..."})]}),a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-4 mt-8",children:[1,2,3,4,5].map(F=>a.jsxs("div",{className:"flex flex-col items-center p-4",children:[a.jsx(Xe,{className:"w-24 h-24 rounded-full"}),a.jsx(Xe,{className:"h-4 w-16 mt-2"})]},F))})]})}),!m&&!k&&!g&&a.jsx(te,{children:a.jsxs(ne,{className:"py-12 text-center",children:[a.jsx(v1,{className:"w-16 h-16 text-gray-300 dark:text-gray-600 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:"No Scan Results Yet"}),a.jsx("p",{className:"text-gray-500 mb-4",children:"Run your first health scan to get insights about your Salesforce org."}),a.jsxs(H,{onClick:()=>E.mutate(s),className:"bg-sf-blue hover:bg-sf-dark-blue","data-testid":"button-first-scan",children:[a.jsx(Ha,{className:"w-4 h-4 mr-2"}),"Start First Scan"]})]})})]}):a.jsx(te,{children:a.jsxs(ne,{className:"py-12 text-center",children:[a.jsx(Bo,{className:"w-16 h-16 text-gray-300 dark:text-gray-600 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:"Select an Org"}),a.jsx("p",{className:"text-gray-500",children:"Choose a connected org from the sidebar to view its health status."})]})})})]})]})}):a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:a.jsx("div",{className:"max-w-4xl mx-auto px-4 py-16",children:a.jsxs(te,{className:"text-center",children:[a.jsxs(he,{children:[a.jsx("div",{className:"mx-auto mb-4 p-4 rounded-full bg-sf-blue/10",children:a.jsx(xr,{className:"w-12 h-12 text-sf-blue"})}),a.jsx(fe,{className:"text-2xl",children:"Sign in to Check Org Health"}),a.jsx(Xt,{className:"text-lg mt-2",children:"Connect your Salesforce orgs and run comprehensive health scans to identify security issues, automation problems, and optimization opportunities."})]}),a.jsxs(ne,{className:"space-y-6",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-left",children:[a.jsxs("div",{className:"p-4 rounded-lg bg-gray-50 dark:bg-gray-800",children:[a.jsx(xr,{className:"w-8 h-8 text-sf-blue mb-2"}),a.jsx("h3",{className:"font-semibold mb-1",children:"Security Analysis"}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Identify security vulnerabilities and configuration risks"})]}),a.jsxs("div",{className:"p-4 rounded-lg bg-gray-50 dark:bg-gray-800",children:[a.jsx(v1,{className:"w-8 h-8 text-sf-blue mb-2"}),a.jsx("h3",{className:"font-semibold mb-1",children:"Automation Review"}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Analyze flows, triggers, and process builders"})]}),a.jsxs("div",{className:"p-4 rounded-lg bg-gray-50 dark:bg-gray-800",children:[a.jsx(Ku,{className:"w-8 h-8 text-sf-blue mb-2"}),a.jsx("h3",{className:"font-semibold mb-1",children:"Code Quality"}),a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Review Apex classes and trigger best practices"})]})]}),a.jsxs(H,{size:"lg",className:"bg-sf-blue hover:bg-sf-dark-blue",onClick:()=>window.location.href="/login","data-testid":"button-login",children:[a.jsx(Q7,{className:"w-5 h-5 mr-2"}),"Sign In to Get Started"]}),a.jsx("p",{className:"text-sm text-gray-500",children:"Create an account or sign in with your email to securely connect your Salesforce orgs."})]})]})})})}function Li(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Hc(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const zV=6048e5,LCe=864e5;let PCe={};function Fb(){return PCe}function Gp(e,t){var l,c,u,d;const n=Fb(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=Li(e),i=s.getDay(),o=(i<r?7:0)+i-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function N0(e){return Gp(e,{weekStartsOn:1}
vendor: 19,229 bytes, line 931
931)}function VV(e){const t=Li(e),n=t.getFullYear(),r=Hc(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=N0(r),i=Hc(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=N0(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function AI(e){const t=Li(e);return t.setHours(0,0,0,0),t}function jI(e){const t=Li(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function DCe(e,t){const n=AI(e),r=AI(t),s=+n-jI(n),i=+r-jI(r);return Math.round((s-i)/LCe)}function $Ce(e){const t=VV(e),n=Hc(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),N0(n)}function FCe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function BCe(e){if(!FCe(e)&&typeof e!="number")return!1;const t=Li(e);return!isNaN(Number(t))}function UCe(e){const t=Li(e),n=Hc(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const zCe={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"}},VCe=(e,t,n)=>{let r;const s=zCe[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Sw(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const WCe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HCe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},GCe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},KCe={date:Sw({formats:WCe,defaultWidth:"full"}),time:Sw({formats:HCe,defaultWidth:"full"}),dateTime:Sw({formats:GCe,defaultWidth:"full"})},qCe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},YCe=(e,t,n,r)=>qCe[e];function $h(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):o;s=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[l]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const QCe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},JCe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},XCe={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"]},ZCe={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"]},eTe={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"}},tTe={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"}},nTe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},rTe={ordinalNumber:nTe,era:$h({values:QCe,defaultWidth:"wide"}),quarter:$h({values:JCe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$h({values:XCe,defaultWidth:"wide"}),day:$h({values:ZCe,defaultWidth:"wide"}),dayPeriod:$h({values:eTe,defaultWidth:"wide",formattingValues:tTe,defaultFormattingWidth:"wide"})};function Fh(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const o=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?iTe(l,h=>h.test(o)):sTe(l,h=>h.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function sTe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function iTe(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function oTe(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const l=t.slice(s.length);return{value:o,rest:l}}}const aTe=/^(\d+)(th|st|nd|rd)?/i,lTe=/\d+/i,cTe={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},uTe={any:[/^b/i,/^(a|c)/i]},dTe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hTe={any:[/1/i,/2/i,/3/i,/4/i]},fTe={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},pTe={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]},mTe={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},gTe={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]},yTe={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},xTe={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}},vTe={ordinalNumber:oTe({matchPattern:aTe,parsePattern:lTe,valueCallback:e=>parseInt(e,10)}),era:Fh({matchPatterns:cTe,defaultMatchWidth:"wide",parsePatterns:uTe,defaultParseWidth:"any"}),quarter:Fh({matchPatterns:dTe,defaultMatchWidth:"wide",parsePatterns:hTe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Fh({matchPatterns:fTe,defaultMatchWidth:"wide",parsePatterns:pTe,defaultParseWidth:"any"}),day:Fh({matchPatterns:mTe,defaultMatchWidth:"wide",parsePatterns:gTe,defaultParseWidth:"any"}),dayPeriod:Fh({matchPatterns:yTe,defaultMatchWidth:"any",parsePatterns:xTe,defaultParseWidth:"any"})},bTe={code:"en-US",formatDistance:VCe,formatLong:KCe,formatRelative:YCe,localize:rTe,match:vTe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function wTe(e){const t=Li(e);return DCe(t,UCe(t))+1}function STe(e){const t=Li(e),n=+N0(t)-+$Ce(t);return Math.round(n/zV)+1}function WV(e,t){var d,h,f,p;const n=Li(e),r=n.getFullYear(),s=Fb(),i=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(f=s.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=Hc(e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const l=Gp(o,t),c=Hc(e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=Gp(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function ETe(e,t){var l,c,u,d;const n=Fb(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=WV(e,t),i=Hc(e,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),Gp(i,t)}function NTe(e,t){const n=Li(e),r=+Gp(n,t)-+ETe(n,t);return Math.round(r/zV)+1}function Et(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ya={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Et(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Et(n+1,2)},d(e,t){return Et(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Et(e.getHours()%12||12,t.length)},H(e,t){return Et(e.getHours(),t.length)},m(e,t){return Et(e.getMinutes(),t.length)},s(e,t){return Et(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return Et(s,t.length)}},yu={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},OI={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return ya.y(e,t)},Y:function(e,t,n,r){const s=WV(e,r),i=s>0?s:1-s;if(t==="YY"){const o=i%100;return Et(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Et(i,t.length)},R:function(e,t){const n=VV(e);return Et(n,t.length)},u:function(e,t){const n=e.getFullYear();return Et(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Et(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Et(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ya.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Et(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=NTe(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):Et(s,t.length)},I:function(e,t,n){const r=STe(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Et(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ya.d(e,t)},D:function(e,t,n){const r=wTe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Et(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Et(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Et(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return Et(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=yu.noon:r===0?s=yu.midnight:s=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=yu.evening:r>=12?s=yu.afternoon:r>=4?s=yu.morning:s=yu.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ya.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ya.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Et(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Et(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ya.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ya.s(e,t)},S:function(e,t){return ya.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return _I(r);case"XXXX":case"XX":return Hl(r);case"XXXXX":case"XXX":default:return Hl(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return _I(r);case"xxxx":case"xx":return Hl(r);case"xxxxx":case"xxx":default:return Hl(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+RI(r,":");case"OOOO":default:return"GMT"+Hl(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+RI(r,":");case"zzzz":default:return"GMT"+Hl(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Et(r,t.length)},T:function(e,t,n){const r=e.getTime();return Et(r,t.length)}};function RI(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+t+Et(i,2)}function _I(e,t){return e%60===0?(e>0?"-":"+")+Et(Math.abs(e)/60,2):Hl(e,t)}function Hl(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Et(Math.trunc(r/60),2),i=Et(r%60,2);return n+s+t+i}const II=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},HV=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},kTe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return II(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",II(r,t)).replace("{{time}}",HV(s,t))},CTe={p:HV,P:kTe},TTe=/^D+$/,ATe=/^Y+$/,jTe=["D","DD","YY","YYYY"];function OTe(e){return TTe.test(e)}function RTe(e){return ATe.test(e)}function _Te(e,t,n){const r=ITe(e,t,n);if(console.warn(r),jTe.includes(e))throw new RangeError(r)}function ITe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const MTe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,LTe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,PTe=/^'([^]*?)'?$/,DTe=/''/g,$Te=/[a-zA-Z]/;function FTe(e,t,n){var d,h,f,p;const r=Fb(),s=r.locale??bTe,i=r.firstWeekContainsDate??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,o=r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,l=Li(e);if(!BCe(l))throw new RangeError("Invalid time value");let c=t.match(LTe).map(m=>{const g=m[0];if(g==="p"||g==="P"){const x=CTe[g];return x(m,s.formatLong)}return m}).join("").match(MTe).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:BTe(m)};if(OI[g])return{isToken:!0,value:m};
931if(g.match($Te))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return c.map(m=>{if(!m.isToken)return m.value;const g=m.value;(RTe(g)||OTe(g))&&_Te(g,t,String(e));const x=OI[g[0]];return x(l,g,s.localize,u)}).join("")}function BTe(e){const t=e.match(PTe);return t?t[1].replace(DTe,"'"):e}const GV="learn-sfdc-sidebar-width",KV="learn-sfdc-sidebar-collapsed",bA=240,k0=600,MI=320;function Ew(e){const t=typeof window>"u"?k0:window.innerWidth-440;return Math.max(bA,Math.min(e,k0,t))}function UTe(){try{const e=window.localStorage.getItem(GV);return e!==null&&Number.isFinite(Number(e))?Math.max(bA,Math.min(Number(e),k0)):MI}catch{return MI}}function zTe(){try{return window.localStorage.getItem(KV)==="true"}catch{return!1}}function VTe(){const[e,t]=v.useState(UTe),[n,r]=v.useState(zTe),s=v.useRef(null),i=v.useRef(null),o=v.useRef({cursor:"",userSelect:""});v.useEffect(()=>{try{window.localStorage.setItem(GV,String(e)),window.localStorage.setItem(KV,String(n))}catch{}},[e,n]);const l=()=>{i.current!==null&&(i.current=null,document.body.style.cursor=o.current.cursor,document.body.style.userSelect=o.current.userSelect)};return v.useEffect(()=>()=>{i.current!==null&&(document.body.style.cursor=o.current.cursor,document.body.style.userSelect=o.current.userSelect)},[]),{width:e,collapsed:n,toggleCollapsed:()=>r(f=>!f),sidebarRef:s,onResizeStart:f=>{f.pointerType==="mouse"&&f.button!==0||(f.preventDefault(),f.currentTarget.setPointerCapture(f.pointerId),i.current=f.pointerId,o.current={cursor:document.body.style.cursor,userSelect:document.body.style.userSelect},document.body.style.cursor="col-resize",document.body.style.userSelect="none")},onResizeMove:f=>{i.current!==f.pointerId||!s.current||t(Ew(f.clientX-s.current.getBoundingClientRect().left))},onResizeEnd:f=>{i.current===f.pointerId&&(f.currentTarget.releasePointerCapture(f.pointerId),l())},onResizeKeyDown:f=>{const p=f.key==="ArrowLeft"?-24:f.key==="ArrowRight"?24:null;if(p!==null)t(m=>Ew(m+p));else if(f.key==="Home")t(bA);else if(f.key==="End")t(Ew(k0));else return;f.preventDefault()},stopResizing:l}}function WTe(){const[e,t]=v.useState(new Set),[n,r]=v.useState(new Set),[s,i]=v.useState(null),[o,l]=v.useState(!1),c=VTe(),{data:u,isLoading:d}=tn({queryKey:["/api/tutorials/structure"]}),{data:h,isLoading:f}=tn({queryKey:[`/api/tutorials/pages/${s}`],enabled:!!s});v.useLayoutEffect(()=>{s&&window.scrollTo(0,0)},[s,h==null?void 0:h.id]),v.useEffect(()=>{if(u&&u.length>0&&!s){const y=u[0];if(y.subtopics.length>0){const b=y.subtopics[0];b.pages.length>0&&(i(b.pages[0].id),t(new Set([y.id])),r(new Set([b.id])))}}},[u,s]);const p=y=>{t(b=>{const w=new Set(b);return w.has(y)?w.delete(y):w.add(y),w})},m=y=>{r(b=>{const w=new Set(b);return w.has(y)?w.delete(y):w.add(y),w})},g=(y,b,w)=>{i(y.id),t(E=>new Set(Array.from(E).concat([w]))),r(E=>new Set(Array.from(E).concat([b]))),l(!1),window.scrollTo(0,0)},x=a.jsxs("div",{className:"h-full overflow-y-auto",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2 p-4 border-b border-gray-200 dark:border-gray-700",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($k,{className:"h-6 w-6 text-sf-blue"}),a.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"Learn SFDC"})]}),a.jsx("button",{type:"button",onClick:c.toggleCollapsed,"aria-label":"Collapse tutorial sidebar",title:"Collapse sidebar",className:"hidden lg:inline-flex rounded p-1 text-gray-600 hover:bg-gray-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sf-blue dark:text-gray-300 dark:hover:bg-gray-700",children:a.jsx(eG,{className:"h-5 w-5"})})]}),a.jsx("nav",{className:"p-2",children:d?a.jsx("div",{className:"space-y-2",children:[1,2,3].map(y=>a.jsx(Xe,{className:"h-8 w-full"},y))}):u&&u.length>0?a.jsx("div",{className:"space-y-1",children:u.map(y=>a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>p(y.id),className:"w-full flex items-center justify-between px-3 py-2 text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("i",{className:be(y.icon||"fas fa-book","text-sf-blue w-4")}),a.jsx("span",{children:y.title})]}),e.has(y.id)?a.jsx(Wa,{className:"h-4 w-4"}):a.jsx(PS,{className:"h-4 w-4"})]}),e.has(y.id)&&a.jsx("div",{className:"ml-4 mt-1 space-y-1",children:y.subto
931pics.map(b=>a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>m(b.id),className:"w-full flex items-center justify-between px-3 py-1.5 text-sm text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",children:[a.jsx("span",{children:b.title}),b.pages.length>0&&(n.has(b.id)?a.jsx(Wa,{className:"h-3 w-3"}):a.jsx(PS,{className:"h-3 w-3"}))]}),n.has(b.id)&&b.pages.length>0&&a.jsx("div",{className:"ml-4 mt-1 space-y-0.5",children:b.pages.map(w=>a.jsxs("button",{onClick:()=>g(w,b.id,y.id),className:be("w-full flex items-center gap-2 px-3 py-1.5 text-sm rounded-md transition-colors text-left",s===w.id?"bg-sf-blue text-white":"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700"),children:[a.jsx(op,{className:"h-3 w-3 flex-shrink-0"}),a.jsx("span",{className:"truncate",children:w.title})]},w.id))})]},b.id))})]},y.id))}):a.jsxs("div",{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:[a.jsx(LS,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),a.jsx("p",{children:"No tutorials available yet."}),a.jsx("p",{className:"text-sm mt-1",children:"Check back soon!"})]})})]});return a.jsxs("div",{className:"min-h-screen bg-white dark:bg-gray-900",children:[a.jsx("div",{className:"lg:hidden sticky top-0 z-40 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-4 py-3",children:a.jsxs("button",{onClick:()=>l(!o),className:"flex items-center gap-2 text-gray-700 dark:text-gray-200",children:[o?a.jsx(Y0,{className:"h-5 w-5"}):a.jsx(nD,{className:"h-5 w-5"}),a.jsx("span",{className:"font-medium",children:"Tutorial Menu"})]})}),o&&a.jsx("div",{className:"lg:hidden fixed inset-0 z-30 bg-black/50",onClick:()=>l(!1),children:a.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-80 bg-white dark:bg-gray-800 shadow-xl",onClick:y=>y.stopPropagation(),children:x})}),a.jsxs("div",{className:"flex",children:[a.jsx("div",{ref:c.sidebarRef,className:"relative hidden lg:flex shrink-0 sticky top-0 h-screen bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700",style:{width:c.collapsed?48:`min(${c.width}px, calc(100vw - 440px))`},children:c.collapsed?a.jsx("button",{type:"button",onClick:c.toggleCollapsed,"aria-label":"Expand tutorial sidebar",title:"Expand sidebar",className:"flex h-12 w-full items-center justify-center text-gray-600 hover:bg-gray-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sf-blue dark:text-gray-300 dark:hover:bg-gray-700",children:a.jsx(tG,{className:"h-5 w-5"})}):a.jsxs(a.Fragment,{children:[a.jsx("aside",{id:"tutorial-sidebar",className:"w-full min-w-0 overflow-hidden",children:x}),a.jsx("div",{role:"separator","aria-label":"Resize tutorial sidebar","aria-orientation":"vertical","aria-controls":"tutorial-sidebar","aria-valuemin":240,"aria-valuemax":600,"aria-valuenow":c.width,tabIndex:0,onPointerDown:c.onResizeStart,onPointerMove:c.onResizeMove,onPointerUp:c.onResizeEnd,onPointerCancel:c.onResizeEnd,onLostPointerCapture:c.stopResizing,onKeyDown:c.onResizeKeyDown,className:"group absolute inset-y-0 -right-1.5 z-10 flex w-3 cursor-col-resize touch-none items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sf-blue",title:"Drag to resize sidebar; use left and right arrow keys when focused",children:a.jsx("span",{className:"rounded border border-gray-300 bg-white py-2 text-gray-500 shadow-sm group-hover:border-sf-blue group-hover:text-sf-blue dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400",children:a.jsx(B7,{className:"h-4 w-3"})})})]})}),a.jsx("main",{className:"flex-1 min-w-0",children:f?a.jsxs("div",{className:"p-8",children:[a.jsx(Xe,{className:"h-10 w-3/4 mb-4"}),a.jsx(Xe,{className:"h-4 w-48 mb-8"}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(Xe,{className:"h-4 w-full"}),a.jsx(Xe,{className:"h-4 w-full"}),a.jsx(Xe,{className:"h-4 w-3/4"})]})]}):h?a.jsxs("article",{className:"max-w-4xl mx-auto p-6 lg:p-8",children:[a.jsxs("header",{className:"mb-8",children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-gray-900 dark:text-white mb-3",children:h.title}),a.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 dark:text-gray-400",children:[a.jsx(Pk,{className:"h-4 w-4"}),a.jsxs("span",{children:["Last Updated: ",FTe(new Date(h.lastUpdated),"dd MMM, yyyy")]})]})]}),a.jsx("div",{className:`prose prose-gray dark:prose-invert max-w-none
932                  prose-headings:scroll-mt-20
933                  prose-h1:text-2xl prose-h1:font-bold
934                  prose-h2:text-xl prose-h2:font-semibold prose-h2:mt-8 prose-h2:mb-4
935                  prose-h3:text-lg prose-h3:font-medium prose-h3:mt-6 prose-h3:mb-3
936                  prose-p:text-gray-700 dark:prose-p:text-gray-300 prose-p:leading-relaxed
937                  prose-a:text-sf-blue prose-a:no-underline hover:prose-a:underline
938                  prose-code:bg-gray-100 dark:prose-code:bg-gray-800 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded
939                  prose-pre:bg-gray-900 dark:prose-pre:bg-gray-950 prose-pre:text-gray-100
940                  prose-img:rounded-lg prose-img:shadow-md
941                  prose-ul:list-disc prose-ul:pl-6
942                  prose-ol:list-decimal prose-ol:pl-6
943                  prose-li:text-gray-700 dark:prose-li:text-gray-300
944                  prose-blockquote:border-l-4 prose-blockquote:border-sf-blue prose-blockquote:pl-4 prose-blockquote:italic`,dangerouslySetInnerHTML:{__html:h.content}})]}):a.jsx("div",{className:"flex items-center justify-center h-96",children:a.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[a.jsx(LS,{className:"h-16 w-16 mx-auto mb-4 opacity-50"}),a.jsx("h2",{className:"text-xl font-medium mb-2",children:"Welcome to Learn SFDC"}),a.jsx("p",{children:"Select a topic from the sidebar to get started."})]})})})]})]})}function qV(){return a.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:a.jsx(te,{className:"w-full max-w-md mx-4",children:a.jsxs(ne,{className:"pt-6",children:[a.jsxs("div",{className:"flex mb-4 gap-2",children:[a.jsx(Si,{className:"h-8 w-8 text-red-500"}),a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),a.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function HTe(){const[,e]=Tk("/cheatsheets/:slug"),t=(e==null?void 0:e.slug)??"",n=S$[t];if(!n)return a.jsx(qV,{});const r=`/cheatsheets/${t}.pdf`;return a.jsxs("div",{className:"flex flex-col bg-white dark:bg-gray-900",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-gray-200 px-4 py-3 dark:border-gray-700",children:[a.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:n}),a.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-sf-blue hover:underline",children:"Open original PDF"})]}),a.jsx("iframe",{src:r,title:`${n} PDF`,className:"h-[calc(100vh-12rem)] min-h-[32rem] w-full"})]})}const GTe=Ye.object({title:Ye.string().min(2,"Title is required"),slug:Ye.string().min(2,"Slug is required").regex(/^[a-z0-9-]+$/,"Slug can only contain lowercase letters, numbers, and hyphens"),description:Ye.string().optional(),icon:Ye.string().optional(),order:Ye.number().min(0),published:Ye.boolean()}),KTe=Ye.object({topicId:Ye.string().min(1,"Topic is required"),title:Ye.string().min(2,"Title is required"),slug:Ye.string().min(2,"Slug is required").regex(/^[a-z0-9-]+$/,"Slug can only contain lowercase letters, numbers, and hyphens"),order:Ye.number().min(0),published:Ye.boolean()}),qTe=Ye.object({subtopicId:Ye.string().min(1,"Subtopic is required"),title:Ye.string().min(2,"Title is required"),slug:Ye.string().min(2,"Slug is required").regex(/^[a-z0-9-]+$/,"Slug can only contain lowercase letters, numbers, and hyphens"),content:Ye.string().min(10,"Content is required"),order:Ye.number().min(0),published:Ye.boolean()}),Nw=e=>e.reduce((t,n)=>Math.max(t,n.order),-1)+1;function YTe(){const[e,t]=v.useState("list"),[n,r]=v.useState(!1),[s,i]=v.useState(!0),[o,l]=v.useState(null),[c,u]=v.useState(null),[d,h]=v.useState(null),[,f]=go(),{toast:p}=Fr(),m=Qd();v.useEffect(()=>{const A=localStorage.getItem("adminToken");if(!A){i(!1),f("/admin/login");return}(async()=>{try{(await fetch("/api/admin/verify",{headers:{Authorization:`Bearer ${A}`}})).ok?r(!0):(localStorage.removeItem("adminToken"),f("/admin/login"))}catch{localStorage.removeItem("adminToken"),f("/admin/login")}finally{i(!1)}})()},[f]);const{data:g=[],isLoading:x}=tn({queryKey:["/api/tutorials/structure?published=false"]}),y=il({resolver:ol(GTe),defaultValues:{title:"",slug:"",description:"",icon:"fas fa-book",order:0,published:!0}}),b=il({resolver:ol(KTe),defaultValues:{topicId:"",title:"",slug:"",order:0,published:!0}}),w=il({resolver:ol(qTe),defaultValues:{subtopicId:"",title:"",slug:"",content:"",order:0,published:!0}}),E=A=>A.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),N=zs({mutationFn:async A=>{const B=localStorage.getItem("adminToken"),U=o?`/api/admin/tutorials/topics/${o.id}`:"/api/admin/tutorials/topics",P=await fetch(U,{method:o?"PUT":"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${B}`},body:JSON.stringify(A)});if(!P.ok)throw new Error("Failed to save topic");return P.json()},onSuccess:()=>
944{m.invalidateQueries({queryKey:["/api/tutorials/structure?published=false"]}),p({title:o?"Topic updated":"Topic created"}),t("list"),l(null),y.reset()},onError:()=>p({title:"Error saving topic",variant:"destructive"})}),k=zs({mutationFn:async A=>{const B=localStorage.getItem("adminToken"),U=o?`/api/admin/tutorials/subtopics/${o.id}`:"/api/admin/tutorials/subtopics",P=await fetch(U,{method:o?"PUT":"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${B}`},body:JSON.stringify(A)});if(!P.ok)throw new Error("Failed to save subtopic");return P.json()},onSuccess:()=>{m.invalidateQueries({queryKey:["/api/tutorials/structure?published=false"]}),p({title:o?"Subtopic updated":"Subtopic created"}),t("list"),l(null),b.reset()},onError:()=>p({title:"Error saving subtopic",variant:"destructive"})}),C=zs({mutationFn:async A=>{const B=localStorage.getItem("adminToken"),U=o?`/api/admin/tutorials/pages/${o.id}`:"/api/admin/tutorials/pages",P=await fetch(U,{method:o?"PUT":"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${B}`},body:JSON.stringify(A)});if(!P.ok)throw new Error("Failed to save page");return P.json()},onSuccess:()=>{m.invalidateQueries({queryKey:["/api/tutorials/structure?published=false"]}),p({title:o?"Page updated":"Page created"}),t("list"),l(null),w.reset()},onError:()=>p({title:"Error saving page",variant:"destructive"})}),T=zs({mutationFn:async({type:A,id:B})=>{const U=localStorage.getItem("adminToken"),V=await fetch(`/api/admin/tutorials/${A}/${B}`,{method:"DELETE",headers:{Authorization:`Bearer ${U}`}});if(!V.ok){const P=await V.json().catch(()=>null);throw new Error((P==null?void 0:P.message)||`Failed to delete (${V.status})`)}return V.json()},onSuccess:()=>{m.invalidateQueries({queryKey:["/api/tutorials/structure?published=false"]}),m.invalidateQueries({queryKey:["/api/tutorials/structure"]}),p({title:"Deleted successfully"})},onError:A=>{m.invalidateQueries({queryKey:["/api/tutorials/structure?published=false"]}),p({title:"Error deleting item",description:A.message,variant:"destructive"})}}),j=A=>{l(A),y.reset({title:A.title,slug:A.slug,description:A.description||"",icon:A.icon||"fas fa-book",order:A.order,published:A.published}),t("topic")},S=A=>{l(A),b.reset({topicId:A.topicId,title:A.title,slug:A.slug,order:A.order,published:A.published}),t("subtopic")},R=A=>{l(A),w.reset({subtopicId:A.subtopicId,title:A.title,slug:A.slug,content:A.content,order:A.order,published:A.published}),t("page")},_=A=>{u(A);const B=g.find(U=>U.id===A);b.reset({topicId:A,title:"",slug:"",order:Nw((B==null?void 0:B.subtopics)??[]),published:!0}),t("subtopic")},L=A=>{h(A);const B=g.flatMap(U=>U.subtopics).find(U=>U.id===A);w.reset({subtopicId:A,title:"",slug:"",content:"",order:Nw((B==null?void 0:B.pages)??[]),published:!0}),t("page")};return s?a.jsx("div",{className:"min-h-screen flex items-center justify-center",children:a.jsx("div",{className:"animate-spin h-8 w-8 border-4 border-sf-blue border-t-transparent rounded-full"})}):n?a.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 py-8",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-8",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx(Te,{href:"/admin",children:a.jsxs(H,{variant:"ghost",size:"sm",children:[a.jsx(Cd,{className:"h-4 w-4 mr-2"}),"Back to Admin"]})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($k,{className:"h-6 w-6 text-sf-blue"}),a.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Tutorial Manager"})]})]}),e==="list"&&a.jsxs(H,{onClick:()=>{l(null),y.reset({title:"",slug:"",description:"",icon:"fas fa-book",order:Nw(g),published:!0}),t("topic")},children:[a.jsx(wf,{className:"h-4 w-4 mr-2"}),"New Topic"]})]}),e==="list"&&a.jsx("div",{className:"space-y-4",children:x?a.jsx("div",{className:"text-center py-8",children:"Loading..."}):g.length===0?a.jsx(te,{children:a.jsxs(ne,{className:"py-12 text-center",children:[a.jsx(LS,{className:"h-12 w-12 mx-auto mb-4 text-gray-400"}),a.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No tutorials yet. Create your first topic!"})]})}):g.map(A=>a.jsxs(te,{children:[a.jsx(he,{className:"pb-2",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("i",{className:`${A.icon||"fas fa-book"} text-sf-blue`}),a.jsx(fe,{className:"text-lg",children:A.title}),!A.published&&a.jsx("span",{className:"text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded",children:"Draft"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>_(A.id),children:a.jsx(wf,{className:"h-4 w-4"})}),a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>j(A),children:a.jsx(ny,{className:"h-4 w-4"})}),a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>T.mutate({type:"topics",id:A.id}),children:a.jsx(hc,{className:"h-4 w-4 text-red-500"})})]})]})}),a.jsx(ne,{children:A.subtopics.length===0?a.jsx("p",{className:"text-sm text-gray-500",children:"No subtopics yet"}):a.jsx("div",{className:"space-y-2",children:A.subtopics.map(B=>a.jsxs("div",{className:"pl-4 border-l-2 border-gray-200 dark:border-gray-700",children:[a.jsxs("div",{className:"flex items-center justify-between py-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(F7,{className:"h-4 w-4 text-gray-500"}),a.jsx("span",{className:"font-medium",children:B.title}),!B.published&&a.jsx("span",{className:"text-xs bg-yellow-100 text-yellow-800 px-1.5 py-0.5 rounded",children:"Draft"}),a.jsxs("span",{className:"text-xs text-gray-500",children:["(",B.pages.length," pages)"]})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>L(B.id),children:a.jsx(wf,{className:"h-3 w-3"})}),a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>S(B),children:a.jsx(ny,{className:"h-3 w-3"})}),a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>T.mutate({type:"subtopics",id:B.id}),children:a.jsx(hc,{className:"h-3 w-3 text-red-500"})})]})]}),B.pages.length>0&&a.jsx("div",{className:"pl-4 space-y-1 mt-1",children:B.pages.map(U=>a.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(op,{className:"h-3 w-3 text-gray-400"}),a.jsx("span",{className:"text-sm",children:U.title}),!U.published&&a.jsx("span",{className:"text-xs bg-yellow-100 text-yellow-800 px-1 py-0.5 rounded text-[10px]",children:"Draft"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>R(U),children:a.jsx(ny,{className:"h-3 w-3"})}),a.jsx(H,{variant:"ghost",size:"sm",onClick:()=>T.mutate({type:"pages",id:U.id}),children:a.jsx(hc,{className:"h-3 w-3 text-red-500"})})]})]},U.id))})]},B.id))})})]},A.id))}),e==="topic"&&a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:o?"Edit Topic":"New Topic"})}),a.jsx(ne,{children:a.jsx(al,{...y,children:a.jsxs("form",{onSubmit:y.handleSubmit(A=>N.mutate(A)),className:"space-y-4",children:[a.jsx(ct,{control:y.control,name:"title",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Title"}),a.jsx(at,{children:a.jsx(Ke,{...A,onChange:B=>{A.onChange(B),o||y.setValue("slug",E(B.target.value))}})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:y.control,name:"slug",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Slug"}),a.jsx(at,{children:a.jsx(Ke,{...A})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:y.control,name:"description",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Description"}),a.jsx(at,{children:a.jsx(Ke,{...A})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:y.control,name:"icon",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Icon (Font Awesome class)"}),a.jsx(at,{children:a.jsx(Ke,{...A,placeholder:"fas fa-book"})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:y.control,name:"order",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Order"}),a.jsx(at,{children:a.jsx(Ke,{type:"number",...A,onChange:B=>A.onChange(parseInt(B.target.value))})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:y.control,name:"published",render:({field:A})=>a.jsxs(it,{className:"flex items-center gap-2",children:[a.jsx(at,{children:a.jsx(Nf,{checked:A.value,onCheckedChange:A.onChange})}),a.jsx(ot,{className:"!mt-0",children:"Published"})]})}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(H,{type:"submit",disabled:N.isPending,children:N.isPending?"Saving...":"Save Topic"}),a.jsx(H,{type:"button",variant:"outline",onClick:()=>{t("list"),l(null)},children:"Cancel"})]})]})})})]}),e==="subtopic"&&a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:o?"Edit Subtopic":"New Subtopic"})}),a.jsx(ne,{children:a.jsx(al,{...b,children:a.jsxs("form",{onSubmit:b.handleSubmit(A=>k.mutate(A)),className:"space-y-4",children:[a.jsx(ct,{control:b.control,name:"topicId",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Topic"}),a.jsxs(pr,{onValueChange:A.onChange,value:A.value,children:[a.jsx(at,{children:a.jsx(er,{children:a.jsx(mr,{placeholder:"Select topic"})})}),a.jsx(tr,{children:g.map(B=>a.jsx(qe,{value:B.id,children:B.title},B.id))})]}),a.jsx(ft,{})]})}),a.jsx(ct,{control:b.control,name:"title",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Title"}),a.jsx(at,{children:a.jsx(Ke,{...A,onChange:B=>{A.onChange(B),o||b.setValue("slug",E(B.target.value))}})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:b.control,name:"slug",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Slug"}),a.jsx(at,{children:a.jsx(Ke,{...A})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:b.control,name:"order",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Order"}),a.jsx(at,{children:a.jsx(Ke,{type:"number",...A,onChange:B=>A.onChange(parseInt(B.target.value))})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:b.control,name:"published",render:({field:A})=>a.jsxs(it,{className:"flex items-center gap-2",children:[a.jsx(at,{children:a.jsx(Nf,{checked:A.value,onCheckedChange:A.onChange})}),a.jsx(ot,{className:"!mt-0",children:"Published"})]})}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(H,{type:"submit",disabled:k.isPending,children:k.isPending?"Saving...":"Save Subto
944pic"}),a.jsx(H,{type:"button",variant:"outline",onClick:()=>{t("list"),l(null)},children:"Cancel"})]})]})})})]}),e==="page"&&a.jsxs(te,{children:[a.jsx(he,{children:a.jsx(fe,{children:o?"Edit Page":"New Page"})}),a.jsx(ne,{children:a.jsx(al,{...w,children:a.jsxs("form",{onSubmit:w.handleSubmit(A=>C.mutate(A)),className:"space-y-4",children:[a.jsx(ct,{control:w.control,name:"subtopicId",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Subtopic"}),a.jsxs(pr,{onValueChange:A.onChange,value:A.value,children:[a.jsx(at,{children:a.jsx(er,{children:a.jsx(mr,{placeholder:"Select subtopic"})})}),a.jsx(tr,{children:g.flatMap(B=>B.subtopics.map(U=>a.jsxs(qe,{value:U.id,children:[B.title," > ",U.title]},U.id)))})]}),a.jsx(ft,{})]})}),a.jsx(ct,{control:w.control,name:"title",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Title"}),a.jsx(at,{children:a.jsx(Ke,{...A,onChange:B=>{A.onChange(B),o||w.setValue("slug",E(B.target.value))}})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:w.control,name:"slug",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Slug"}),a.jsx(at,{children:a.jsx(Ke,{...A})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:w.control,name:"content",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Content"}),a.jsx(at,{children:a.jsx(NB,{content:A.value,onChange:A.onChange})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:w.control,name:"order",render:({field:A})=>a.jsxs(it,{children:[a.jsx(ot,{children:"Order"}),a.jsx(at,{children:a.jsx(Ke,{type:"number",...A,onChange:B=>A.onChange(parseInt(B.target.value))})}),a.jsx(ft,{})]})}),a.jsx(ct,{control:w.control,name:"published",render:({field:A})=>a.jsxs(it,{className:"flex items-center gap-2",children:[a.jsx(at,{children:a.jsx(Nf,{checked:A.value,onCheckedChange:A.onChange})}),a.jsx(ot,{className:"!mt-0",children:"Published"})]})}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(H,{type:"submit",disabled:C.isPending,children:C.isPending?"Saving...":"Save Page"}),a.jsx(H,{type:"button",variant:"outline",onClick:()=>{t("list"),l(null)},children:"Cancel"})]})]})})})]})]})}):null}function QTe(){return a.jsxs("div",{className:"min-h-screen flex flex-col",children:[a.jsx(yJ,{}),a.jsx(fJ,{}),a.jsx("main",{className:"flex-1",children:a.jsxs(XW,{children:[a.jsx(Ct,{path:"/",component:CO}),a.jsx(Ct,{path:"/home",component:CO}),a.jsx(Ct,{path:"/post/:slug",component:XJ}),a.jsx(Ct,{path:"/category/:slug",component:ZJ}),a.jsx(Ct,{path:"/archive",component:eX}),a.jsx(Ct,{path:"/search",component:tX}),a.jsx(Ct,{path:"/about",component:nX}),a.jsx(Ct,{path:"/contact",component:rX}),a.jsx(Ct,{path:"/login",component:nle}),a.jsx(Ct,{path:"/admin/login",component:sle}),a.jsx(Ct,{path:"/tools/id-converter",component:ule}),a.jsx(Ct,{path:"/tools/cron-builder",component:gle}),a.jsx(Ct,{path:"/tools/json-to-apex",component:ble}),a.jsx(Ct,{path:"/tools/api-viewer",component:wle}),a.jsx(Ct,{path:"/tools/json-formatter",component:Kfe}),a.jsx(Ct,{path:"/tools/regex-builder",component:Zfe}),a.jsx(Ct,{path:"/tools/graphql-converter",component:vCe}),a.jsx(Ct,{path:"/extensions/component-inspector",component:ECe}),a.jsx(Ct,{path:"/extensions/component-inspector/privacy-policy",component:NCe}),a.jsx(Ct,{path:"/extensions/securevault",component:kCe}),a.jsx(Ct,{path:"/extensions/securevault/privacy-policy",component:CCe}),a.jsx(Ct,{path:"/org-health",component:MCe}),a.jsx(Ct,{path:"/learn",component:WTe}),a.jsx(Ct,{path:"/cheatsheets/:slug",component:HTe}),a.jsx(Ct,{path:"/admin",component:Qae}),a.jsx(Ct,{path:"/admin/tutorials",component:YTe}),a.jsx(Ct,{path:"/admin/settings",component:Xae}),a.jsx(Ct,{component:qV})]})}),a.jsx(pJ,{})]})}function JTe(){return a.jsx(xH,{client:jP,children:a.jsx(Tq,{children:a.jsxs(kq,{children:[a.jsx(eK,{}),a.jsx(QTe,{})]})})})}sP(document.getElementById("root")).render(a.jsx(JTe,{}))});export default XTe();

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.