1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/jszip.min-CCODYnd_.js","assets/_commonjs-dynamic-modules-TDtrdbi3.js","assets/Layout-D0sK9dmB.js","assets/broadcastSync-Bxymz8bD.js","assets/index-xSdyNPg7.js","assets/share-2-CNcYfc7P.js","assets/more-horizontal-CzzSxaHy.js","assets/pen-line-Fq8TC4Qi.js","assets/zoom-out-DwpmibdW.js","assets/zoom-in-CWl6FHRb.js","assets/Select-CBvYay3K.js","assets/undo-2-B7yg3O6I.js","assets/underline-x2bjYOL2.js","assets/undo-D42EHzQk.js","assets/link-C1iEqoKY.js","assets/filter-l8m5dkwE.js","assets/rotate-cw-Cs8sg7VG.js","assets/maximize-C_UxdIWU.js","assets/save-BInnCtLF.js","assets/redo-2-BNRfpAAM.js","assets/columns-2-CeB2BBlB.js","assets/grip-vertical-DlO1V8kJ.js","assets/star-D2cPXFZS.js","assets/pen-Cr8eAFPX.js","assets/locale-en-B8Z5F_o1.js","assets/locale-zh-CN-CFdD1mPv.js","assets/locale-fr-j4CMJpfE.js","assets/locale-de-DuE2gagy.js","assets/locale-it-C6yb6RzN.js","assets/locale-ja-VjZBy5eF.js","assets/locale-ko-Cl0W-Az5.js","assets/locale-es-DwboUZze.js","assets/locale-zh-Hant-uT5aTnfX.js","assets/locale-ru-DEr1xfTZ.js","assets/locale-id-Buh3Uolz.js","assets/locale-pt-BR-CqD5J4_0.js","assets/ChatPage--Go5rJOr.js","assets/WritingPage-2Rf942AK.js","assets/chat-Cp3tSG9E.js","assets/index-CKRYCHHU.js","assets/file-up-DwQYvKZ7.js","assets/table-DvUKeEob.js","assets/file-type-nKRGBr5R.js","assets/useMutation-D0Pwndul.js","assets/arrow-down-to-line-B7YpRwzl.js","assets/focus-B2P-yv9L.js","assets/history-CWHZzLwH.js","assets/WritingLayout-BDo7juV9.js","assets/TemplatesPage-4PnAzRpc.js","assets/TranslationPage-CXzZQhNV.js","assets/arrow-right-left-6Rvk9MW1.js","assets/SearchPage-CNfKcAuo.js","assets/ToolsPage-BIgQIZVz.js","assets/utensils-crossed-DkdXdCqk.js","assets/BillingPage-Dg0Cg9zP.js","assets/PageHeader-CVqQ1h3V.js","assets/SummaryPage-BpwIoflA.js","assets/useTextCreditEstimate-BRFi1zgD.js","assets/ReplyPage-D--ewUBz.js","assets/GrammarPage-C7KWTD4T.js","assets/TextTranslatePage-DT_54Bfs.js","assets/LanguageDropdown-CjWQVSie.js","assets/DocumentTranslatePage--jx6Zr2t.js","assets/file-down-BLVBqil9.js","assets/SubtitleTranslatePage-FMjBJ2zR.js","assets/TranslationHistoryDetailPage-4D7Ljq3E.js","assets/ImageEditPage-DPThs_XY.js","assets/useFeatureCreditEstimate-CKYhAOwQ.js","assets/brush-DxaqDCGx.js","assets/ImageOCRPage-DiBvXULO.js","assets/ImageAnalysisPage-C8ElPQzs.js","assets/ImageRemoveBgPage-CoAEGJBw.js","assets/ImageUpscalePage-8eA5q8dE.js","assets/ImageRestorePage-DXlVFEPB.js","assets/ImageTranslatePage-4rOBgS8P.js","assets/ImageEditorPage-CGRydluy.js","assets/sliders-horizontal-Bmdy766e.js","assets/unlock-BWBTEvlK.js","assets/TTSPage-D611PCbx.js","assets/VoiceCloneUpload-16anCSFt.js","assets/TTSHistoryPage-DOdna4T8.js","assets/x-circle-DDqrFxTS.js","assets/STTPage-Bajnp1ST.js","assets/STTHistoryPage-CsVfxbtz.js","assets/PodcastPage-Dx3tVVCt.js","assets/scroll-text-DojZ4qGN.js","assets/PodcastHistoryPage-znbHWIQJ.js","assets/VoiceClonePage-De-k5dYI.js","assets/VoiceCloneHistoryPage-DK9c4HrF.js","assets/MusicGeneratePage-DgFjBLxG.js","assets/MusicHistoryPage-K6ltgxlh.js","assets/CreatePage-BSMFehld.js","assets/CameraTagText-BSBI_lza.js","assets/SignedAudio-Cd4iNmpu.js","assets/at-sign-DxM3J95g.js","assets/VideoQuickPage-rYkKw5RA.js","assets/VideoModePage-QuyZ0zbM.js","assets/video-agent-workflow-BbCnAYvW.js","assets/VideoStoryPage-CbCgEyS5.js","assets/VideoMusicMVPage-D2OCIj4x.js","assets/VideoImageAnimPage-DKvzJ0wO.js","assets/VideoAgentWorkspacePage-ZKOQQf0T.js","assets/PipelineHomePage-CCKRDnxm.js","assets/pipeline-BcFGB0IF.js","assets/PipelineWorkspacePage-BDtuj-cH.js","assets/three.module-ClqPj1K9.js","assets/html2canvas.esm-CBrSDip1.js","assets/ResearchAgentPage-CJIRH7lo.js","assets/MarketingAgentPage-CbYik5XR.js","assets/DataAnalysisPage-CVZX88Mh.js","assets/DocumentPage-BPrPFnh_.js","assets/hard-drive-grbqlV1N.js","assets/ProfilePage-DqICj7ky.js","assets/TransferPage-C--WEQHS.js","assets/ReferralPage-TzdFzaMX.js","assets/FeedbackPage-NhE_VP-b.js","assets/inbox-Dkqck6og.js","assets/FeedbackDetailPage-Cv5ZystT.js","assets/AssetsHomePage-DMmheimz.js","assets/EmptyState-Bb9o2ULs.js","assets/audio-lines-Ck_a7u0h.js","assets/ImagesGalleryPage-DTF7Ygus.js","assets/AssetPreviewModal-0qkIxjyq.js","assets/useInfiniteAssets-OYG9OFsW.js","assets/VideosGalleryPage-Dcd17YN1.js","assets/AudioFilesPage-XP9ts--7.js","assets/TranslationHistoryPage-DVANvqay.js","assets/RecycleBinPage-jijiRjpx.js","assets/ArtWorkspacePage-
vendor: 7,512 bytes, lines 1-10
1D56PFZ2P.js","assets/ReadOnlyCanvas-7SylNLF0.js","assets/OrbitControls-DYqG4YG1.js","assets/user-plus-CrHE3AF_.js","assets/jspdf.es.min-BHjX0qxm.js","assets/ArtProjectsPage-BMzVdYbb.js","assets/TvWorksListPage-CsTKq0m2.js","assets/BackButton-BZ0REayw.js","assets/TvWorkDetailPage-Djv4yaAc.js","assets/TvUserPage-CRG4iReP.js","assets/TemplatePreviewPage-Dn7Q1HbW.js","assets/SharePreviewPage-BwjZ9Qut.js","assets/SharedGroupView-Dx89k1rt.js","assets/TeamList-60pt0o9U.js","assets/TeamSettings-DO--p9Uv.js","assets/TestAIPage-Chc3RTG_.js"])))=>i.map(i=>d[i]); 2var WO=Object.defineProperty;var nE=e=>{throw TypeError(e)};var VO=(e,t,r)=>t in e?WO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var nt=(e,t,r)=>VO(e,typeof t!="symbol"?t+"":t,r),dx=(e,t,r)=>t.has(e)||nE("Cannot "+r);var le=(e,t,r)=>(dx(e,t,"read from private field"),r?r.call(e):t.get(e)),pt=(e,t,r)=>t.has(e)?nE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),rt=(e,t,r,n)=>(dx(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Dt=(e,t,r)=>(dx(e,t,"access private method"),r);var Em=(e,t,r,n)=>({set _(s){rt(e,t,s,r)},get _(){return le(e,t,n)}});import{e as GO}from"./locale-en-B8Z5F_o1.js";import{z as KO}from"./locale-zh-CN-CFdD1mPv.js";import{f as YO}from"./locale-fr-j4CMJpfE.js";import{d as QO}from"./locale-de-DuE2gagy.js";import{i as XO}from"./locale-it-C6yb6RzN.js";import{j as ZO}from"./locale-ja-VjZBy5eF.js";import{k as JO}from"./locale-ko-Cl0W-Az5.js";import{e as eL}from"./locale-es-DwboUZze.js";import{z as tL}from"./locale-zh-Hant-uT5aTnfX.js";import{r as rL}from"./locale-ru-DEr1xfTZ.js";import{i as nL}from"./locale-id-Buh3Uolz.js";import{p as sL}from"./locale-pt-BR-CqD5J4_0.js";function aL(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(n,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>n[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"]'))n(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(s){if(s.ep)return;s.ep=!0;const a=r(s);fetch(s.href,a)}})();var Ep=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z8={exports:{}},Pg={},J8={exports:{}},It={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var $h=Symbol.for("react.element"),iL=Symbol.for("react.portal"),oL=Symbol.for("react.fragment"),lL=Symbol.for("react.strict_mode"),cL=Symbol.for("react.profiler"),uL=Symbol.for("react.provider"),dL=Symbol.for("react.context"),hL=Symbol.for("react.forward_ref"),mL=Symbol.for("react.suspense"),fL=Symbol.for("react.memo"),pL=Symbol.for("react.lazy"),sE=Symbol.iterator;function gL(e){return e===null||typeof e!="object"?null:(e=sE&&e[sE]||e["@@iterator"],typeof e=="function"?e:null)}var eC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tC=Object.assign,rC={};function rd(e,t,r){this.props=e,this.context=t,this.refs=rC,this.updater=r||eC}rd.prototype.isReactComponent={};rd.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")};rd.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nC(){}nC.prototype=rd.prototype;function T4(e,t,r){this.props=e,this.context=t,this.refs=rC,this.updater=r||eC}var C4=T4.prototype=new nC;C4.constructor=T4;tC(C4,rd.prototype);C4.isPureReactComponent=!0;var aE=Array.isArray,sC=Object.prototype.hasOwnProperty,_4={current:null},aC={key:!0,ref:!0,__self:!0,__source:!0};function iC(e,t,r){var n,s={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)sC.call(t,n)&&!aC.hasOwnProperty(n)&&(s[n]=t[n]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];s.children=u}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)s[n]===void 0&&(s[n]=l[n]);return{$$typeof:$h,type:e,key:a,ref:o,props:s,_owner:_4.current}}function xL(e,t){return{$$typeof:$h,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function A4(e){return typeof e=="object"&&e!==null&&e.$$typeof===$h}function bL(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var iE=/\/+/g;function hx(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bL(""+e.key):t.toString(36)}function Pf(e,t,r,n,s){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case $h:case iL:o=!0}}if(o)return o=e,s=s(o),e=n===""?"."+hx(o,0):n,aE(s)?(r="",e!=null&&(r=e.replace(iE,"$&/")+"/"),Pf(s,t,r,"",function(c){return c})):s!=null&&(A4(s)&&(s=xL(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(iE,"$&/")+"/")+e)),t.push(s)),1;if(o=0,n=n===""?".":n+":",aE(e))for(var l=0;l<e.length;l++){a=e[l];var u=n+hx(a,l);o+=Pf(a,t,r,u,s)}else if(u=gL(e),typeof u=="function")for(e=u.call(e),l=0;!(a=e.next()).done;)a=a.value,u=n+hx(a,l++),o+=Pf(a,t,r,u,s);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function km(e,t,r){if(e==null)return e;var n=[],s=0;return Pf(e,n,"","",function(a){return t.call(r,a,s++)}),n}function yL(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Yn={current:null},Ff={transition:null},vL={ReactCurrentDispatcher:Yn,ReactCurrentBatchConfig:Ff,ReactCurrentOwner:_4};function oC(){throw Error("act(...) is not supported in production builds of React.")}It.Children={map:km,forEach:function(e,t,r){km(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return km(e,function(){t++}),t},toArray:function(e){return km(e,function(t){return t})||[]},only:function(e){if(!A4(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};It.Component=rd;It.Fragment=oL;It.Profiler=cL;It.PureComponent=T4;It.StrictMode=lL;It.Suspense=mL;
vendor: 9,018 bytes, lines 10-34
10It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vL;It.act=oC;It.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=tC({},e.props),s=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=_4.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)sC.call(t,u)&&!aC.hasOwnProperty(u)&&(n[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)n.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];n.children=l}return{$$typeof:$h,type:e.type,key:s,ref:a,props:n,_owner:o}};It.createContext=function(e){return e={$$typeof:dL,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:uL,_context:e},e.Consumer=e};It.createElement=iC;It.createFactory=function(e){var t=iC.bind(null,e);return t.type=e,t};It.createRef=function(){return{current:null}};It.forwardRef=function(e){return{$$typeof:hL,render:e}};It.isValidElement=A4;It.lazy=function(e){return{$$typeof:pL,_payload:{_status:-1,_result:e},_init:yL}};It.memo=function(e,t){return{$$typeof:fL,type:e,compare:t===void 0?null:t}};It.startTransition=function(e){var t=Ff.transition;Ff.transition={};try{e()}finally{Ff.transition=t}};It.unstable_act=oC;It.useCallback=function(e,t){return Yn.current.useCallback(e,t)};It.useContext=function(e){return Yn.current.useContext(e)};It.useDebugValue=function(){};It.useDeferredValue=function(e){return Yn.current.useDeferredValue(e)};It.useEffect=function(e,t){return Yn.current.useEffect(e,t)};It.useId=function(){return Yn.current.useId()};It.useImperativeHandle=function(e,t,r){return Yn.current.useImperativeHandle(e,t,r)};It.useInsertionEffect=function(e,t){return Yn.current.useInsertionEffect(e,t)};It.useLayoutEffect=function(e,t){return Yn.current.useLayoutEffect(e,t)};It.useMemo=function(e,t){return Yn.current.useMemo(e,t)};It.useReducer=function(e,t,r){return Yn.current.useReducer(e,t,r)};It.useRef=function(e){return Yn.current.useRef(e)};It.useState=function(e){return Yn.current.useState(e)};It.useSyncExternalStore=function(e,t,r){return Yn.current.useSyncExternalStore(e,t,r)};It.useTransition=function(){return Yn.current.useTransition()};It.version="18.3.1";J8.exports=It;var v=J8.exports;const or=Bi(v),Fg=aL({__proto__:null,default:or},[v]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var wL=v,EL=Symbol.for("react.element"),kL=Symbol.for("react.fragment"),NL=Object.prototype.hasOwnProperty,SL=wL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TL={key:!0,ref:!0,__self:!0,__source:!0};function lC(e,t,r){var n,s={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)NL.call(t,n)&&!TL.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:EL,type:e,key:a,ref:o,props:s,_owner:SL.current}}Pg.Fragment=kL;Pg.jsx=lC;Pg.jsxs=lC;Z8.exports=Pg;var i=Z8.exports,kp={},cC={exports:{}},_s={},uC={exports:{}},dC={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(G,Q){var D=G.length;G.push(Q);e:for(;0<D;){var K=D-1>>>1,V=G[K];if(0<s(V,Q))G[K]=Q,G[D]=V,D=K;else break e}}function r(G){return G.length===0?null:G[0]}function n(G){if(G.length===0)return null;var Q=G[0],D=G.pop();if(D!==Q){G[0]=D;e:for(var K=0,V=G.length,C=V>>>1;K<C;){var O=2*(K+1)-1,q=G[O],ne=O+1,he=G[ne];if(0>s(q,D))ne<V&&0>s(he,q)?(G[K]=he,G[ne]=D,K=ne):(G[K]=q,G[O]=D,K=O);else if(ne<V&&0>s(he,D))G[K]=he,G[ne]=D,K=ne;else break e}}return Q}function s(G,Q){var D=G.sortIndex-Q.sortIndex;return D!==0?D:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],c=[],d=1,h=null,m=3,f=!1,p=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(G){for(var Q=r(c);Q!==null;){if(Q.callback===null)n(c);else if(Q.startTime<=G)n(c),Q.sortIndex=Q.expirationTime,t(u,Q);else break;Q=r(c)}}function k(G){if(g=!1,b(G),!p)if(r(u)!==null)p=!0,$(T);else{var Q=r(c);Q!==null&&ee(k,Q.startTime-G)}}function T(G,Q){p=!1,g&&(g=!1,w(E),E=-1),f=!0;var D=m;try{for(b(Q),h=r(u);h!==null&&(!(h.expirationTime>Q)||G&&!M());){var K=h.callback;if(typeof K=="function"){h.callback=null,m=h.priorityLevel;var V=K(h.expirationTime<=Q);Q=e.unstable_now(),typeof V=="function"?h.callback=V:h===r(u)&&n(u),b(Q)}else n(u);h=r(u)}if(h!==null)var C=!0;else{var O=r(c);O!==null&&ee(k,O.startTime-Q),C=!1}return C}finally{h=null,m=D,f=!1}}var S=!1,j=null,E=-1,A=5,R=-1;function M(){return!(e.unstable_now()-R<A)}function B(){if(j!==null){var G=e.unstable_now();R=G;var Q=!0;try{Q=j(!0,G)}finally{Q?W():(S=!1,j=null)}}else S=!1}var W;if(typeof y=="function")W=function(){y(B)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,L=H.port2;H.port1.onmessage=B,W=function(){L.postMessage(null)}}else W=function(){x(B,0)};function $(G){j=G,S||(S=!0,W())}function ee(G,Q){E=x(function(){G(e.unstable_now())},Q)}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(G){G.callback=null},e.unstable_continueExecution=function(){p||f||(p=!0,$(T))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(G){switch(m){case 1:case 2:case 3:var Q=3;break;default:Q=m}var D=m;m=Q;try{return G()}finally{m=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,Q){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var D=m;m=G;try{return Q()}finally{m=D}},e.unstable_scheduleCallback=function(G,Q,D){var K=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?K+D:K):D=K,G){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=D+V,G={id:d++,callback:Q,priorityLevel:G,startTime:D,expirationTime:V,sortIndex:-1},D>K?(G.sortIndex=D,t(c,G),r(u)===null&&G===r(c)&&(g?(w(E),E=-1):g=!0,ee(k,D-K))):(G.sortIndex=V,t(u,G),p||f||(p=!0,$(T))),G},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(G){var Q=m;return function(){var D=m;m=Q;try{return G.apply(this,arguments)}finally{m=D}}}})(dC);uC.exports=dC;var CL=uC.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var _L=v,Ns=CL;function Ue(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 hC=new Set,V0={};function cc(e,t){Pu(e,t),Pu(e+"Capture",t)}function Pu(e,t){for(V0[e]=t,e=0;e<t.length;e++)hC.add(t[e])}var Ri=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ay=Object.prototype.hasOwnProperty,AL=/^[: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]*$/,oE={},lE={};function jL(e){return Ay.call(lE,e)?!0:Ay.call(oE,e)?!1:AL.test(e)?lE[e]=!0:(oE[e]=!0,!1)}function IL(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function RL(e,t,r,n){if(t===null||typeof t>"u"||IL(e,t,r,n))return!0;
vendor: 5,200 bytes, lines 34-35
34if(n)return!1;if(r!==null)switch(r.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 Qn(e,t,r,n,s,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var mn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mn[e]=new Qn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mn[t]=new Qn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mn[e]=new Qn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mn[e]=new Qn(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){mn[e]=new Qn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mn[e]=new Qn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mn[e]=new Qn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mn[e]=new Qn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mn[e]=new Qn(e,5,!1,e.toLowerCase(),null,!1,!1)});var j4=/[\-:]([a-z])/g;function I4(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(j4,I4);mn[t]=new Qn(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(j4,I4);mn[t]=new Qn(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(j4,I4);mn[t]=new Qn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mn[e]=new Qn(e,1,!1,e.toLowerCase(),null,!1,!1)});mn.xlinkHref=new Qn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mn[e]=new Qn(e,1,!1,e.toLowerCase(),null,!0,!0)});function R4(e,t,r,n){var s=mn.hasOwnProperty(t)?mn[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(RL(t,r,s,n)&&(r=null),n||s===null?jL(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ui=_L.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Nm=Symbol.for("react.element"),Gc=Symbol.for("react.portal"),Kc=Symbol.for("react.fragment"),D4=Symbol.for("react.strict_mode"),jy=Symbol.for("react.profiler"),mC=Symbol.for("react.provider"),fC=Symbol.for("react.context"),M4=Symbol.for("react.forward_ref"),Iy=Symbol.for("react.suspense"),Ry=Symbol.for("react.suspense_list"),O4=Symbol.for("react.memo"),io=Symbol.for("react.lazy"),pC=Symbol.for("react.offscreen"),cE=Symbol.iterator;function _d(e){return e===null||typeof e!="object"?null:(e=cE&&e[cE]||e["@@iterator"],typeof e=="function"?e:null)}var wr=Object.assign,mx;function h0(e){if(mx===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);mx=t&&t[1]||""}return` 35`+mx+e}var fx=!1;function px(e,t){if(!e||fx)return"";fx=!0;var r=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(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}
vendor: 14,106 bytes, lines 35-38
35catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(` 36`),a=n.stack.split(` 37`),o=s.length-1,l=a.length-1;1<=o&&0<=l&&s[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==a[l]){var u=` 38`+s[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=l);break}}}finally{fx=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?h0(e):""}function DL(e){switch(e.tag){case 5:return h0(e.type);case 16:return h0("Lazy");case 13:return h0("Suspense");case 19:return h0("SuspenseList");case 0:case 2:case 15:return e=px(e.type,!1),e;case 11:return e=px(e.type.render,!1),e;case 1:return e=px(e.type,!0),e;default:return""}}function Dy(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 Kc:return"Fragment";case Gc:return"Portal";case jy:return"Profiler";case D4:return"StrictMode";case Iy:return"Suspense";case Ry:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fC:return(e.displayName||"Context")+".Consumer";case mC:return(e._context.displayName||"Context")+".Provider";case M4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case O4:return t=e.displayName||null,t!==null?t:Dy(e.type)||"Memo";case io:t=e._payload,e=e._init;try{return Dy(e(t))}catch{}}return null}function ML(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 Dy(t);case 8:return t===D4?"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 Ho(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function OL(e){var t=gC(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sm(e){e._valueTracker||(e._valueTracker=OL(e))}function xC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=gC(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Np(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 My(e,t){var r=t.checked;return wr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function uE(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ho(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function bC(e,t){t=t.checked,t!=null&&R4(e,"checked",t,!1)}function Oy(e,t){bC(e,t);var r=Ho(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ly(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ly(e,t.type,Ho(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function dE(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Ly(e,t,r){(t!=="number"||Np(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var m0=Array.isArray;function lu(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Ho(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Py(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ue(91));return wr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function hE(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Ue(92));if(m0(r)){if(1<r.length)throw Error(Ue(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ho(r)}}function yC(e,t){var r=Ho(t.value),n=Ho(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function mE(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function vC(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 Fy(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?vC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tm,wC=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tm=Tm||document.createElement("div"),Tm.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function G0(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var k0={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},LL=["Webkit","ms","Moz","O"];Object.keys(k0).forEach(function(e){LL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),k0[t]=k0[e]})});function EC(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||k0.hasOwnProperty(e)&&k0[e]?(""+t).trim():t+"px"}function kC(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=EC(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var PL=wr({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 By(e,t){if(t){if(PL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ue(62))}}function Uy(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 $y=null;function L4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zy=null,cu=null,uu=null;function fE(e){if(e=qh(e)){if(typeof zy!="function")throw Error(Ue(280));var t=e.stateNode;t&&(t=Hg(t),zy(e.stateNode,e.type,t))}}function NC(e){cu?uu?uu.push(e):uu=[e]:cu=e}function SC(){if(cu){var e=cu,t=uu;if(uu=cu=null,fE(e),t)for(e=0;e<t.length;e++)fE(t[e])}}function TC(e,t){return e(t)}function CC(){}var gx=!1;function _C(e,t,r){if(gx)return e(t,r);gx=!0;try{return TC(e,t,r)}finally{gx=!1,(cu!==null||uu!==null)&&(CC(),SC())}}function K0(e,t){var r=e.stateNode;if(r===null)return null;var n=Hg(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Ue(231,t,typeof r));return r}var Hy=!1;if(Ri)try{var Ad={};Object.defineProperty(Ad,"passive",{get:function(){Hy=!0}}),window.addEventListener("test",Ad,Ad),window.removeEventListener("test",Ad,Ad)}catch{Hy=!1}function FL(e,t,r,n,s,a,o,l,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var N0=!1,Sp=null,Tp=!1,qy=null,BL={onError:function(e){N0=!0,Sp=e}};function UL(e,t,r,n,s,a,o,l,u){N0=!1,Sp=null,FL.apply(BL,arguments)}function $L(e,t,r,n,s,a,o,l,u){if(UL.apply(this,arguments),N0){if(N0){var c=Sp;N0=!1,Sp=null}else throw Error(Ue(198));Tp||(Tp=!0,qy=c)}}function uc(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function AC(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 pE(e){if(uc(e)!==e)throw Error(Ue(188))}function zL(e){var t=e.alternate;if(!t){if(t=uc(e),t===null)throw Error(Ue(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var a=s.alternate;if(a===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===a.child){for(a=s.child;a;){if(a===r)return pE(s),e;if(a===n)return pE(s),t;a=a.sibling}throw Error(Ue(188))}if(r.return!==n.return)r=s,n=a;else{for(var o=!1,l=s.child;l;){if(l===r){o=!0,r=s,n=a;break}if(l===n){o=!0,n=s,r=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===r){o=!0,r=a,n=s;break}if(l===n){o=!0,n=a,r=s;break}l=l.sibling}if(!o)throw Error(Ue(189))}}if(r.alternate!==n)throw Error(Ue(190))}if(r.tag!==3)throw Error(Ue(188));return r.stateNode.current===r?e:t}function jC(e){return e=zL(e),e!==null?IC(e):null}function IC(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=IC(e);if(t!==null)return t;e=e.sibling}return null}var RC=Ns.unstable_scheduleCallback,gE=Ns.unstable_cancelCallback,HL=Ns.unstable_shouldYield,qL=Ns.unstable_requestPaint,Ar=Ns.unstable_now,WL=Ns.unstable_getCurrentPriorityLevel,P4=Ns.unstable_ImmediatePriority,DC=Ns.unstable_UserBlockingPriority,Cp=Ns.unstable_NormalPriority,VL=Ns.unstable_LowPriority,MC=Ns.unstable_IdlePriority,Bg=null,Ka=null;function GL(e){if(Ka&&typeof Ka.onCommitFiberRoot=="function")try{Ka.onCommitFiberRoot(Bg,e,void 0,(e.current.flags&128)===128)}catch{}}var da=Math.clz32?Math.clz32:QL,KL=Math.log,YL=Math.LN2;function QL(e){return e>>>=0,e===0?32:31-(KL(e)/YL|0)|0}var Cm=64,_m=4194304;function f0(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 _p(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var l=o&~s;l!==0?n=f0(l):(a&=o,a!==0&&(n=f0(a)))}else o=r&~s,o!==0?n=f0(o):a!==0&&(n=f0(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-da(t),s=1<<r,n|=e[r],t&=~s;return n}function XL(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 ZL(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-da(a),l=1<<o,u=s[o];u===-1?(!(l&r)||l&n)&&(s[o]=XL(l,t)):u<=t&&(e.expiredLanes|=l),a&=~l}}function Wy(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function OC(){var e=Cm;return Cm<<=1,!(Cm&4194240)&&(Cm=64),e}function xx(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 38
38function zh(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-da(t),e[t]=r}function JL(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-da(r),a=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~a}}function F4(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-da(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var Kt=0;function LC(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var PC,B4,FC,BC,UC,Vy=!1,Am=[],Ao=null,jo=null,Io=null,Y0=new Map,Q0=new Map,co=[],eP="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 xE(e,t){switch(e){case"focusin":case"focusout":Ao=null;break;case"dragenter":case"dragleave":jo=null;break;case"mouseover":case"mouseout":Io=null;break;case"pointerover":case"pointerout":Y0.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Q0.delete(t.pointerId)}}function jd(e,t,r,n,s,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[s]},t!==null&&(t=qh(t),t!==null&&B4(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function tP(e,t,r,n,s){switch(t){case"focusin":return Ao=jd(Ao,e,t,r,n,s),!0;case"dragenter":return jo=jd(jo,e,t,r,n,s),!0;case"mouseover":return Io=jd(Io,e,t,r,n,s),!0;case"pointerover":var a=s.pointerId;return Y0.set(a,jd(Y0.get(a)||null,e,t,r,n,s)),!0;case"gotpointercapture":return a=s.pointerId,Q0.set(a,jd(Q0.get(a)||null,e,t,r,n,s)),!0}return!1}function $C(e){var t=kl(e.target);if(t!==null){var r=uc(t);if(r!==null){if(t=r.tag,t===13){if(t=AC(r),t!==null){e.blockedOn=t,UC(e.priority,function(){FC(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Gy(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);$y=n,r.target.dispatchEvent(n),$y=null}else return t=qh(r),t!==null&&B4(t),e.blockedOn=r,!1;t.shift()}return!0}function bE(e,t,r){Bf(e)&&r.delete(t)}function rP(){Vy=!1,Ao!==null&&Bf(Ao)&&(Ao=null),jo!==null&&Bf(jo)&&(jo=null),Io!==null&&Bf(Io)&&(Io=null),Y0.forEach(bE),Q0.forEach(bE)}function Id(e,t){e.blockedOn===t&&(e.blockedOn=null,Vy||(Vy=!0,Ns.unstable_scheduleCallback(Ns.unstable_NormalPriority,rP)))}function X0(e){function t(s){return Id(s,e)}if(0<Am.length){Id(Am[0],e);for(var r=1;r<Am.length;r++){var n=Am[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ao!==null&&Id(Ao,e),jo!==null&&Id(jo,e),Io!==null&&Id(Io,e),Y0.forEach(t),Q0.forEach(t),r=0;r<co.length;r++)n=co[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<co.length&&(r=co[0],r.blockedOn===null);)$C(r),r.blockedOn===null&&co.shift()}var du=Ui.ReactCurrentBatchConfig,Ap=!0;function nP(e,t,r,n){var s=Kt,a=du.transition;du.transition=null;try{Kt=1,U4(e,t,r,n)}finally{Kt=s,du.transition=a}}function sP(e,t,r,n){var s=Kt,a=du.transition;du.transition=null;try{Kt=4,U4(e,t,r,n)}finally{Kt=s,du.transition=a}}function U4(e,t,r,n){if(Ap){var s=Gy(e,t,r,n);if(s===null)Cx(e,t,n,jp,r),xE(e,n);else if(tP(s,e,t,r,n))n.stopPropagation();else if(xE(e,n),t&4&&-1<eP.indexOf(e)){for(;s!==null;){var a=qh(s);if(a!==null&&PC(a),a=Gy(e,t,r,n),a===null&&Cx(e,t,n,jp,r),a===s)break;s=a}s!==null&&n.stopPropagation()}else Cx(e,t,n,null,r)}}var jp=null;function Gy(e,t,r,n){if(jp=null,e=L4(n),e=kl(e),e!==null)if(t=uc(e),t===null)e=null;else if(r=t.tag,r===13){if(e=AC(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return jp=e,null}
vendor: 10,401 bytes, line 38
38function zC(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(WL()){case P4:return 1;case DC:return 4;case Cp:case VL:return 16;case MC:return 536870912;default:return 16}default:return 16}}var wo=null,$4=null,Uf=null;function HC(){if(Uf)return Uf;var e,t=$4,r=t.length,n,s="value"in wo?wo.value:wo.textContent,a=s.length;for(e=0;e<r&&t[e]===s[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===s[a-n];n++);return Uf=s.slice(e,1<n?1-n:void 0)}function $f(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 jm(){return!0}function yE(){return!1}function As(e){function t(r,n,s,a,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?jm:yE,this.isPropagationStopped=yE,this}return wr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=jm)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=jm)},persist:function(){},isPersistent:jm}),t}var nd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},z4=As(nd),Hh=wr({},nd,{view:0,detail:0}),aP=As(Hh),bx,yx,Rd,Ug=wr({},Hh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:H4,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!==Rd&&(Rd&&e.type==="mousemove"?(bx=e.screenX-Rd.screenX,yx=e.screenY-Rd.screenY):yx=bx=0,Rd=e),bx)},movementY:function(e){return"movementY"in e?e.movementY:yx}}),vE=As(Ug),iP=wr({},Ug,{dataTransfer:0}),oP=As(iP),lP=wr({},Hh,{relatedTarget:0}),vx=As(lP),cP=wr({},nd,{animationName:0,elapsedTime:0,pseudoElement:0}),uP=As(cP),dP=wr({},nd,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hP=As(dP),mP=wr({},nd,{data:0}),wE=As(mP),fP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pP={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"},gP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xP(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gP[e])?!!t[e]:!1}function H4(){return xP}var bP=wr({},Hh,{key:function(e){if(e.key){var t=fP[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$f(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pP[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:H4,charCode:function(e){return e.type==="keypress"?$f(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$f(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yP=As(bP),vP=wr({},Ug,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),EE=As(vP),wP=wr({},Hh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:H4}),EP=As(wP),kP=wr({},nd,{propertyName:0,elapsedTime:0,pseudoElement:0}),NP=As(kP),SP=wr({},Ug,{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}),TP=As(SP),CP=[9,13,27,32],q4=Ri&&"CompositionEvent"in window,S0=null;Ri&&"documentMode"in document&&(S0=document.documentMode);var _P=Ri&&"TextEvent"in window&&!S0,qC=Ri&&(!q4||S0&&8<S0&&11>=S0),kE=" ",NE=!1;function WC(e,t){switch(e){case"keyup":return CP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yc=!1;function AP(e,t){switch(e){case"compositionend":return VC(t);case"keypress":return t.which!==32?null:(NE=!0,kE);case"textInput":return e=t.data,e===kE&&NE?null:e;default:return null}}function jP(e,t){if(Yc)return e==="compositionend"||!q4&&WC(e,t)?(e=HC(),Uf=$4=wo=null,Yc=!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 qC&&t.locale!=="ko"?null:t.data;default:return null}}var IP={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 SE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!IP[e.type]:t==="textarea"}function GC(e,t,r,n){NC(n),t=Ip(t,"onChange"),0<t.length&&(r=new z4("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var T0=null,Z0=null;function RP(e){s_(e,0)}function $g(e){var t=Zc(e);if(xC(t))return e}function DP(e,t){if(e==="change")return t}var KC=!1;if(Ri){var wx;if(Ri){var Ex="oninput"in document;if(!Ex){var TE=document.createElement("div");TE.setAttribute("oninput","return;"),Ex=typeof TE.oninput=="function"}wx=Ex}else wx=!1;KC=wx&&(!document.documentMode||9<document.documentMode)}function CE(){T0&&(T0.detachEvent("onpropertychange",YC),Z0=T0=null)}function YC(e){if(e.propertyName==="value"&&$g(Z0)){var t=[];GC(t,Z0,e,L4(e)),_C(RP,t)}}function MP(e,t,r){e==="focusin"?(CE(),T0=t,Z0=r,T0.attachEvent("onpropertychange",YC)):e==="focusout"&&CE()}function OP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $g(Z0)}function LP(e,t){if(e==="click")return $g(t)}function PP(e,t){if(e==="input"||e==="change")return $g(t)}function FP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pa=typeof Object.is=="function"?Object.is:FP;function J0(e,t){if(pa(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Ay.call(t,s)||!pa(e[s],t[s]))return!1}return!0}function _E(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function AE(e,t){var r=_E(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=_E(r)}}function QC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function XC(){for(var e=window,t=Np();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Np(e.document)}return t}function W4(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 BP(e){var t=XC(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&QC(r.ownerDocument.documentElement,r)){if(n!==null&&W4(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,a=Math.min(n.start,s);n=n.end===void 0?a:Math.min(n.end,s),!e.extend&&a>n&&(s=n,n=a,a=s),s=AE(r,a);var o=AE(r,n);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var UP=Ri&&"documentMode"in document&&11>=document.documentMode,Qc=null,Ky=null,C0=null,Yy=!1;function jE(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Yy||Qc==null||Qc!==Np(n)||(n=Qc,"selectionStart"in n&&W4(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 38
38sNode:n.focusNode,focusOffset:n.focusOffset}),C0&&J0(C0,n)||(C0=n,n=Ip(Ky,"onSelect"),0<n.length&&(t=new z4("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Qc)))}function Im(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Xc={animationend:Im("Animation","AnimationEnd"),animationiteration:Im("Animation","AnimationIteration"),animationstart:Im("Animation","AnimationStart"),transitionend:Im("Transition","TransitionEnd")},kx={},ZC={};Ri&&(ZC=document.createElement("div").style,"AnimationEvent"in window||(delete Xc.animationend.animation,delete Xc.animationiteration.animation,delete Xc.animationstart.animation),"TransitionEvent"in window||delete Xc.transitionend.transition);function zg(e){if(kx[e])return kx[e];if(!Xc[e])return e;var t=Xc[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in ZC)return kx[e]=t[r];return e}var JC=zg("animationend"),e_=zg("animationiteration"),t_=zg("animationstart"),r_=zg("transitionend"),n_=new Map,IE="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 el(e,t){n_.set(e,t),cc(t,[e])}for(var Nx=0;Nx<IE.length;Nx++){var Sx=IE[Nx],$P=Sx.toLowerCase(),zP=Sx[0].toUpperCase()+Sx.slice(1);el($P,"on"+zP)}el(JC,"onAnimationEnd");el(e_,"onAnimationIteration");el(t_,"onAnimationStart");el("dblclick","onDoubleClick");el("focusin","onFocus");el("focusout","onBlur");el(r_,"onTransitionEnd");Pu("onMouseEnter",["mouseout","mouseover"]);Pu("onMouseLeave",["mouseout","mouseover"]);Pu("onPointerEnter",["pointerout","pointerover"]);Pu("onPointerLeave",["pointerout","pointerover"]);cc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));cc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));cc("onBeforeInput",["compositionend","keypress","textInput","paste"]);cc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));cc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));cc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var p0="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(" "),HP=new Set("cancel close invalid load scroll toggle".split(" ").concat(p0));function RE(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,$L(n,t,void 0,e),e.currentTarget=null}function s_(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var o=n.length-1;0<=o;o--){var l=n[o],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==a&&s.isPropagationStopped())break e;RE(s,l,c),a=u}else for(o=0;o<n.length;o++){if(l=n[o],u=l.instance,c=l.currentTarget,l=l.listener,u!==a&&s.isPropagationStopped())break e;RE(s,l,c),a=u}}}if(Tp)throw e=qy,Tp=!1,qy=null,e}function ir(e,t){var r=t[ev];r===void 0&&(r=t[ev]=new Set);var n=e+"__bubble";r.has(n)||(a_(t,e,2,!1),r.add(n))}function Tx(e,t,r){var n=0;t&&(n|=4),a_(r,e,n,t)}var Rm="_reactListening"+Math.random().toString(36).slice(2);function eh(e){if(!e[Rm]){e[Rm]=!0,hC.forEach(function(r){r!=="selectionchange"&&(HP.has(r)||Tx(r,!1,e),Tx(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Rm]||(t[Rm]=!0,Tx("selectionchange",!1,t))}}function a_(e,t,r,n){switch(zC(t)){case 1:var s=nP;break;case 4:s=sP;break;default:s=U4}r=s.bind(null,t,r,e),s=void 0,!Hy||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function Cx(e,t,r,n,s){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;
vendor: 2,527 bytes, line 38
38if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;o=o.return}for(;l!==null;){if(o=kl(l),o===null)return;if(u=o.tag,u===5||u===6){n=a=o;continue e}l=l.parentNode}}n=n.return}_C(function(){var c=a,d=L4(r),h=[];e:{var m=n_.get(e);if(m!==void 0){var f=z4,p=e;switch(e){case"keypress":if($f(r)===0)break e;case"keydown":case"keyup":f=yP;break;case"focusin":p="focus",f=vx;break;case"focusout":p="blur",f=vx;break;case"beforeblur":case"afterblur":f=vx;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=vE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=oP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=EP;break;case JC:case e_:case t_:f=uP;break;case r_:f=NP;break;case"scroll":f=aP;break;case"wheel":f=TP;break;case"copy":case"cut":case"paste":f=hP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=EE}var g=(t&4)!==0,x=!g&&e==="scroll",w=g?m!==null?m+"Capture":null:m;g=[];for(var y=c,b;y!==null;){b=y;var k=b.stateNode;if(b.tag===5&&k!==null&&(b=k,w!==null&&(k=K0(y,w),k!=null&&g.push(th(y,k,b)))),x)break;y=y.return}0<g.length&&(m=new f(m,p,null,r,d),h.push({event:m,listeners:g}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",m&&r!==$y&&(p=r.relatedTarget||r.fromElement)&&(kl(p)||p[Di]))break e;if((f||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,f?(p=r.relatedTarget||r.toElement,f=c,p=p?kl(p):null,p!==null&&(x=uc(p),p!==x||p.tag!==5&&p.tag!==6)&&(p=null)):(f=null,p=c),f!==p)){if(g=vE,k="onMouseLeave",w="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=EE,k="onPointerLeave",w="onPointerEnter",y="pointer"),x=f==null?m:Zc(f),b=p==null?m:Zc(p),m=new g(k,y+"leave",f,r,d),m.target=x,m.relatedTarget=b,k=null,kl(d)===c&&(g=new g(w,y+"enter",p,r,d),g.target=b,g.relatedTarget=x,k=g),x=k,f&&p)t:{for(g=f,w=p,y=0,b=g;b;b=kc(b))y++;for(b=0,k=w;k;k=kc(k))b++;for(;0<y-b;)g=kc(g),y--;for(;0<b-y;)w=kc(w),b--;for(;y--;){if(g===w||w!==null&&g===w.alternate)break t;g=kc(g),w=kc(w)}g=null}else g=null;f!==null&&DE(h,m,f,g,!1),p!==null&&x!==null&&DE(h,x,p,g,!0)}}
vendor: 5,068 bytes, lines 38-39
38e:{if(m=c?Zc(c):window,f=m.nodeName&&m.nodeName.toLowerCase(),f==="select"||f==="input"&&m.type==="file")var T=DP;else if(SE(m))if(KC)T=PP;else{T=OP;var S=MP}else(f=m.nodeName)&&f.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(T=LP);if(T&&(T=T(e,c))){GC(h,T,r,d);break e}S&&S(e,m,c),e==="focusout"&&(S=m._wrapperState)&&S.controlled&&m.type==="number"&&Ly(m,"number",m.value)}switch(S=c?Zc(c):window,e){case"focusin":(SE(S)||S.contentEditable==="true")&&(Qc=S,Ky=c,C0=null);break;case"focusout":C0=Ky=Qc=null;break;case"mousedown":Yy=!0;break;case"contextmenu":case"mouseup":case"dragend":Yy=!1,jE(h,r,d);break;case"selectionchange":if(UP)break;case"keydown":case"keyup":jE(h,r,d)}var j;if(q4)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Yc?WC(e,r)&&(E="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(E="onCompositionStart");E&&(qC&&r.locale!=="ko"&&(Yc||E!=="onCompositionStart"?E==="onCompositionEnd"&&Yc&&(j=HC()):(wo=d,$4="value"in wo?wo.value:wo.textContent,Yc=!0)),S=Ip(c,E),0<S.length&&(E=new wE(E,e,null,r,d),h.push({event:E,listeners:S}),j?E.data=j:(j=VC(r),j!==null&&(E.data=j)))),(j=_P?AP(e,r):jP(e,r))&&(c=Ip(c,"onBeforeInput"),0<c.length&&(d=new wE("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:c}),d.data=j))}s_(h,t)})}function th(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Ip(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,a=s.stateNode;s.tag===5&&a!==null&&(s=a,a=K0(e,r),a!=null&&n.unshift(th(e,a,s)),a=K0(e,t),a!=null&&n.push(th(e,a,s))),e=e.return}return n}function kc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function DE(e,t,r,n,s){for(var a=t._reactName,o=[];r!==null&&r!==n;){var l=r,u=l.alternate,c=l.stateNode;if(u!==null&&u===n)break;l.tag===5&&c!==null&&(l=c,s?(u=K0(r,a),u!=null&&o.unshift(th(r,u,l))):s||(u=K0(r,a),u!=null&&o.push(th(r,u,l)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var qP=/\r\n?/g,WP=/\u0000|\uFFFD/g;function ME(e){return(typeof e=="string"?e:""+e).replace(qP,` 39`).replace(WP,"")}function Dm(e,t,r){if(t=ME(t),ME(e)!==t&&r)throw Error(Ue(425))}function Rp(){}var Qy=null,Xy=null;function Zy(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 Jy=typeof setTimeout=="function"?setTimeout:void 0,VP=typeof clearTimeout=="function"?clearTimeout:void 0,OE=typeof Promise=="function"?Promise:void 0,GP=typeof queueMicrotask=="function"?queueMicrotask:typeof OE<"u"?function(e){return OE.resolve(null).then(e).catch(KP)}:Jy;function KP(e){setTimeout(function(){throw e})}function _x(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),X0(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);X0(t)}function Ro(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 LE(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var sd=Math.random().toString(36).slice(2),za="__reactFiber$"+sd,rh="__reactProps$"+sd,Di="__reactContainer$"+sd,ev="__reactEvents$"+sd,YP="__reactListeners$"+sd,QP="__reactHandles$"+sd;function kl(e){var t=e[za];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Di]||r[za]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=LE(e);e!==null;){if(r=e[za])return r;e=LE(e)}return t}e=r,r=e.parentNode}return null}function qh(e){return e=e[za]||e[Di],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ue(33))}function Hg(e){return e[rh]||null}var tv=[],Jc=-1;function tl(e){return{current:e}}function lr(e){0>Jc||(e.current=tv[Jc],tv[Jc]=null,Jc--)}function sr(e,t){Jc++,tv[Jc]=e.current,e.current=t}var qo={},_n=tl(qo),os=tl(!1),Wl=qo;function Fu(e,t){var r=e.type.contextTypes;if(!r)return qo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in r)s[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ls(e){return e=e.childContextTypes,e!=null}function Dp(){lr(os),lr(_n)}function PE(e,t,r){if(_n.current!==qo)throw Error(Ue(168));sr(_n,t),sr(os,r)}function i_(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(Ue(108,ML(e)||"Unknown",s));return wr({},r,n)}function Mp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qo,Wl=_n.current,sr(_n,e),sr(
vendor: 14,735 bytes, line 39
39os,os.current),!0}function FE(e,t,r){var n=e.stateNode;if(!n)throw Error(Ue(169));r?(e=i_(e,t,Wl),n.__reactInternalMemoizedMergedChildContext=e,lr(os),lr(_n),sr(_n,e)):lr(os),sr(os,r)}var pi=null,qg=!1,Ax=!1;function o_(e){pi===null?pi=[e]:pi.push(e)}function XP(e){qg=!0,o_(e)}function rl(){if(!Ax&&pi!==null){Ax=!0;var e=0,t=Kt;try{var r=pi;for(Kt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}pi=null,qg=!1}catch(s){throw pi!==null&&(pi=pi.slice(e+1)),RC(P4,rl),s}finally{Kt=t,Ax=!1}}return null}var eu=[],tu=0,Op=null,Lp=0,Ps=[],Fs=0,Vl=null,ki=1,Ni="";function gl(e,t){eu[tu++]=Lp,eu[tu++]=Op,Op=e,Lp=t}function l_(e,t,r){Ps[Fs++]=ki,Ps[Fs++]=Ni,Ps[Fs++]=Vl,Vl=e;var n=ki;e=Ni;var s=32-da(n)-1;n&=~(1<<s),r+=1;var a=32-da(t)+s;if(30<a){var o=s-s%5;a=(n&(1<<o)-1).toString(32),n>>=o,s-=o,ki=1<<32-da(t)+s|r<<s|n,Ni=a+e}else ki=1<<a|r<<s|n,Ni=e}function V4(e){e.return!==null&&(gl(e,1),l_(e,1,0))}function G4(e){for(;e===Op;)Op=eu[--tu],eu[tu]=null,Lp=eu[--tu],eu[tu]=null;for(;e===Vl;)Vl=Ps[--Fs],Ps[Fs]=null,Ni=Ps[--Fs],Ps[Fs]=null,ki=Ps[--Fs],Ps[Fs]=null}var vs=null,bs=null,hr=!1,ia=null;function c_(e,t){var r=zs(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function BE(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,vs=e,bs=Ro(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,vs=e,bs=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Vl!==null?{id:ki,overflow:Ni}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=zs(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,vs=e,bs=null,!0):!1;default:return!1}}function rv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function nv(e){if(hr){var t=bs;if(t){var r=t;if(!BE(e,t)){if(rv(e))throw Error(Ue(418));t=Ro(r.nextSibling);var n=vs;t&&BE(e,t)?c_(n,r):(e.flags=e.flags&-4097|2,hr=!1,vs=e)}}else{if(rv(e))throw Error(Ue(418));e.flags=e.flags&-4097|2,hr=!1,vs=e}}}function UE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;vs=e}function Mm(e){if(e!==vs)return!1;if(!hr)return UE(e),hr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Zy(e.type,e.memoizedProps)),t&&(t=bs)){if(rv(e))throw u_(),Error(Ue(418));for(;t;)c_(e,t),t=Ro(t.nextSibling)}if(UE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ue(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){bs=Ro(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}bs=null}}else bs=vs?Ro(e.stateNode.nextSibling):null;return!0}function u_(){for(var e=bs;e;)e=Ro(e.nextSibling)}function Bu(){bs=vs=null,hr=!1}function K4(e){ia===null?ia=[e]:ia.push(e)}var ZP=Ui.ReactCurrentBatchConfig;function Dd(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Ue(309));var n=r.stateNode}if(!n)throw Error(Ue(147,e));var s=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var l=s.refs;o===null?delete l[a]:l[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(Ue(284));if(!r._owner)throw Error(Ue(290,e))}return e}function Om(e,t){throw e=Object.prototype.toString.call(t),Error(Ue(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $E(e){var t=e._init;return t(e._payload)}function d_(e){function t(w,y){if(e){var b=w.deletions;b===null?(w.deletions=[y],w.flags|=16):b.push(y)}}function r(w,y){if(!e)return null;for(;y!==null;)t(w,y),y=y.sibling;return null}function n(w,y){for(w=new Map;y!==null;)y.key!==null?w.set(y.key,y):w.set(y.index,y),y=y.sibling;return w}function s(w,y){return w=Lo(w,y),w.index=0,w.sibling=null,w}function a(w,y,b){return w.index=b,e?(b=w.alternate,b!==null?(b=b.index,b<y?(w.flags|=2,y):b):(w.flags|=2,y)):(w.flags|=1048576,y)}function o(w){return e&&w.alternate===null&&(w.flags|=2),w}function l(w,y,b,k){return y===null||y.tag!==6?(y=Lx(b,w.mode,k),y.return=w,y):(y=s(y,b),y.return=w,y)}function u(w,y,b,k){var T=b.type;return T===Kc?d(w,y,b.props.children,k,b.key):y!==null&&(y.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===io&&$E(T)===y.type)?(k=s(y,b.props),k.ref=Dd(w,y,b),k.return=w,k):(k=Kf(b.type,b.key,b.props,null,w.mode,k),k.ref=Dd(w,y,b),k.return=w,k)}function c(w,y,b,k){return y===null||y.tag!==4||y.stateNode.containerInfo!==b.containerInfo||y.stateNode.implementation!==b.implementation?(y=Px(b,w.mode,k),y.return=w,y):(y=s(y,b.children||[]),y.return=w,y)}function d(w,y,b,k,T){return y===null||y.tag!==7?(y=Ul(b,w.mode,k,T),y.return=w,y):(y=s(y,b),y.return=w,y)}function h(w,y,b){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Lx(""+y,w.mode,b),y.return=w,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Nm:return b=Kf(y.type,y.key,y.props,null,w.mode,b),b.ref=Dd(w,null,y),b.return=w,b;case Gc:return y=Px(y,w.mode,b),y.return=w,y;case io:var k=y._init;return h(w,k(y._payload),b)}if(m0(y)||_d(y))return y=Ul(y,w.mode,b,null),y.return=w,y;Om(w,y)}return null}function m(w,y,b,k){var T=y!==null?y.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return T!==null?null:l(w,y,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Nm:return b.key===T?u(w,y,b,k):null;case Gc:return b.key===T?c(w,y,b,k):null;case io:return T=b._init,m(w,y,T(b._payload),k)}if(m0(b)||_d(b))return T!==null?null:d(w,y,b,k,null);Om(w,b)}return null}function f(w,y,b,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return w=w.get(b)||null,l(y,w,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Nm:return w=w.get(k.key===null?b:k.key)||null,u(y,w,k,T);case Gc:return w=w.get(k.key===null?b:k.key)||null,c(y,w,k,T);case io:var S=k._init;return f(w,y,b,S(k._payload),T)}if(m0(k)||_d(k))return w=w.get(b)||null,d(y,w,k,T,null);Om(y,k)}return null}function p(w,y,b,k){for(var T=null,S=null,j=y,E=y=0,A=null;j!==null&&E<b.length;E++){j.index>E?(A=j,j=null):A=j.sibling;var R=m(w,j,b[E],k);if(R===null){j===null&&(j=A);break}e&&j&&R.alternate===null&&t(w,j),y=a(R,y,E),S===null?T=R:S.sibling=R,S=R,j=A}if(E===b.length)return r(w,j),hr&&gl(w,E),T;if(j===null){for(;E<b.length;E++)j=h(w,b[E],k),j!==null&&(y=a(j,y,E),S===null?T=j:S.sibling=j,S=j);return hr&&gl(w,E),T}for(j=n(w,j);E<b.length;E++)A=f(j,w,E,b[E],k),A!==null&&(e&&A.alternate!==null&&j.delete(A.key===null?E:A.key),y=a(A,y,E),S===null?T=A:S.sibling=A,S=A);return e&&j.forEach(function(M){return t(w,M)}),hr&&gl(w,E),T}function g(w,y,b,k){var T=_d(b);if(typeof T!="function")throw Error(Ue(150));if(b=T.call(b),b==null)throw Error(Ue(151));for(var S=T=null,j=y,E=y=0,A=null,R=b.next();j!==null&&!R.done;E++,R=b.next()){j.index>E?(A=j,j=null):A=j.sibling;var M=m(w,j,R.value,k);if(M===null){j===null&&(j=A);break}e&&j&&M.alternate===null&&t(w,j),y=a(M,y,E),S===null?T=M:S.sibling=M,S=M,j=A}if(R.done)return r(w,j),hr&&gl(w,E),T;if(j===null){for(;!R.done;E++,R=b.next())R=h(w,R.value,k),R!==null&&(y=a(R,y,E),S===null?T=R:S.sibling=R,S=R);return hr&&gl(w,E),T}for(j=n(w,j);!R.done;E++,R=b.next())R=f(j,w,E,R.value,k),R!==null&&(e&&R.alternate!==null&&j.delete(R.key===null?E:R.key),y=a(R,y,E),S===null?T=R:S.sibling=R,S=R);return e&&j.forEach(function(B){return t(w,B)}),hr&&gl(w,E),T}function x(w,y,b,k){if(typeof b=="object"&&b!==null&&b.type===Kc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Nm:e:{for(var T=b.key,S=y;S!==null;){if(S.key===T){if(T=b.type,T===Kc){if(S.tag===7){r(w,S.sibling),y=s(S,b.props.children),y.return=w,w=y;break e}}else if(S.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===io&&$E(T)===S.type){r(w,S.sibling),y=s(S,b.props),y.ref=Dd(w,S,b),y.return=w,w=y;break e}r(w,S);break}else t(w,S);S=S.sibling}b.type===Kc?(y=Ul(b.props.children,w.mode,k,b.key),y.return=w,w=y):(k=Kf(b.type,b.key,b.props,null,w.mode,k),k.ref=Dd(w,y,b),k.return=w,w=k)}return o(w);case Gc:e:{for(S=b.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){r(w,y.sibling),y=s(y,b.children||[]),y.return=w,w=y;break e}else{r(w,y);break}else t(w,y);y=y.sibling}y=Px(b,w.mode,k),y.return=w,w=y}return o(w);case io:return S=b._init,x(w,y,S(b._payload),k)}if(m0(b))return p(w,y,b,k);if(_d(b))return g(w,y,b,k);Om(w,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(r(w,y.sibling),y=s(y,b),y.return=w,w=y):(r(w,y),y=Lx(b,w.mode,k),y.return=w,w=y),o(w)):r(w,y)}return x}var Uu=d_(!0),h_=d_(!1),Pp=tl(null),Fp=null,ru=null,Y4=null;function Q4(){Y4=ru=Fp=null}function X4(e){var t=Pp.current;lr(Pp),e._currentValue=t}function sv(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function hu(e,t){Fp=e,Y4=ru=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(is=!0),e.firstContext=null)}function Ws(e){var t=e._currentValue;if(Y4!==e)if(e={context:e,memoizedValue:t,next:null},ru===null){if(Fp===null)throw Error(Ue(308));ru=e,Fp.dependencies={lanes:0,firstContext:e}}else ru=ru.next=e;return t}var Nl=null;function Z4(e){Nl===null?Nl=[e]:Nl.push(e)}function m_(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Z4(t)):(r.next=s.next,s.next=r),t.interleaved=r,Mi(e,n)}function Mi(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var oo=!1;function J4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function f_(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 _i(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Do(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Bt&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Mi(e,r)}return s=n.interleaved,s===null?(t.next=t,Z4(n)):(t.next=s.next,s.next=t),n.interleaved=t,Mi(e,r)}function zf(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,F4(e,r)}}function zE(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?s=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?s=a=t:a=a.next=t}else s=a=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Bp(e,t,r,n){var s=e.updateQueue;oo=!1;var a=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var u=l,c=u.next;u.next=null,o===null?a=c:o.next=c,o=u;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=c:l.next=c,d.lastBaseUpdate=u))}if(a!==null){var h=s.baseState;o=0,d=c=u=null,l=a;do{var m=l.lane,f=l.eventTime;if((n&m)===m){d!==null&&(d=d.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var p=e,g=l;switch(m=t,f=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){h=p.call(f,h,m);break e}h=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,m=typeof p=="function"?p.call(f,h,m):p,m==null)break e;h=wr({},h,m);break e;case 2:oo=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[l]:m.push(l))}else f={eventTime:f,lane:m,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(c=d=f,u=h):d=d.next=f,o|=m;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;m=l,l=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(d===null&&(u=h),s.baseState=u,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else a===null&&(s.shared.lanes=0);Kl|=o,e.lanes=o,e.memoizedState=h}}function HE(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(Ue(191,s));s.call(n)}}}var Wh={},Ya=tl(Wh),nh=tl(Wh),sh=tl(Wh);function Sl(e){if(e===Wh)throw Error(Ue(174));return e}function ew(e,t){switch(sr(sh,t),sr(nh,e),sr(Ya,Wh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fy(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fy(t,e)}lr(Ya),sr(Ya,t)}function $u(){lr(Ya),lr(nh),lr(sh)}function p_(e){Sl(sh.current);var t=Sl(Ya.current),r=Fy(t,e.type);t!==r&&(sr(nh,e),sr(Ya,r))}function tw(e){nh.current===e&&(lr(Ya),lr(nh))}var br=tl(0);function Up(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 jx=[];function rw(){for(var e=0;e<jx.length;e++)jx[e]._workInProgressVersionPrimary=null;jx.length=0}var Hf=Ui.ReactCurrentDispatcher,Ix=Ui.ReactCurrentBatchConfig,Gl=0,vr=null,Kr=null,nn=null,$p=!1,_0=!1,ah=0,JP=0;function bn(){throw Error(Ue(321))}function nw(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!pa(e[r],t[r]))return!1;return!0}function sw(e,t,r,n,s,a){if(Gl=a,vr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hf.current=e===null||e.memoizedState===null?nF:sF,e=r(n,s),_0){a=0;do{if(_0=!1,ah=0,25<=a)throw Error(Ue(301));a+=1,nn=Kr=null,t.updateQueue=null,Hf.current=aF,e=r(n,s)}while(_0)}if(Hf.current=zp,t=Kr!==null&&Kr.next!==null,Gl=0,nn=Kr=vr=null,$p=!1,t)throw Error(Ue(300));return e}function aw(){var e=ah!==0;return ah=0,e}function Ma(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nn===null?vr.memoizedState=nn=e:nn=nn.next=e,nn}function Vs(){if(Kr===null){var e=vr.alternate;e=e!==null?e.memoizedState:null}else e=Kr.next;var t=nn===null?vr.memoizedState:nn.next;if(t!==null)nn=t,Kr=e;else{if(e===null)throw Error(Ue(310));
vendor: 5,164 bytes, line 39
39Kr=e,e={memoizedState:Kr.memoizedState,baseState:Kr.baseState,baseQueue:Kr.baseQueue,queue:Kr.queue,next:null},nn===null?vr.memoizedState=nn=e:nn=nn.next=e}return nn}function ih(e,t){return typeof t=="function"?t(e):t}function Rx(e){var t=Vs(),r=t.queue;if(r===null)throw Error(Ue(311));r.lastRenderedReducer=e;var n=Kr,s=n.baseQueue,a=r.pending;if(a!==null){if(s!==null){var o=s.next;s.next=a.next,a.next=o}n.baseQueue=s=a,r.pending=null}if(s!==null){a=s.next,n=n.baseState;var l=o=null,u=null,c=a;do{var d=c.lane;if((Gl&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(l=u=h,o=n):u=u.next=h,vr.lanes|=d,Kl|=d}c=c.next}while(c!==null&&c!==a);u===null?o=n:u.next=l,pa(n,t.memoizedState)||(is=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=u,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do a=s.lane,vr.lanes|=a,Kl|=a,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Dx(e){var t=Vs(),r=t.queue;if(r===null)throw Error(Ue(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,a=t.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do a=e(a,o.action),o=o.next;while(o!==s);pa(a,t.memoizedState)||(is=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function g_(){}function x_(e,t){var r=vr,n=Vs(),s=t(),a=!pa(n.memoizedState,s);if(a&&(n.memoizedState=s,is=!0),n=n.queue,iw(v_.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||nn!==null&&nn.memoizedState.tag&1){if(r.flags|=2048,oh(9,y_.bind(null,r,n,s,t),void 0,null),an===null)throw Error(Ue(349));Gl&30||b_(r,t,s)}return s}function b_(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=vr.updateQueue,t===null?(t={lastEffect:null,stores:null},vr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function y_(e,t,r,n){t.value=r,t.getSnapshot=n,w_(t)&&E_(e)}function v_(e,t,r){return r(function(){w_(t)&&E_(e)})}function w_(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!pa(e,r)}catch{return!0}}function E_(e){var t=Mi(e,1);t!==null&&ha(t,e,1,-1)}function qE(e){var t=Ma();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ih,lastRenderedState:e},t.queue=e,e=e.dispatch=rF.bind(null,vr,e),[t.memoizedState,e]}function oh(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=vr.updateQueue,t===null?(t={lastEffect:null,stores:null},vr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function k_(){return Vs().memoizedState}function qf(e,t,r,n){var s=Ma();vr.flags|=e,s.memoizedState=oh(1|t,r,void 0,n===void 0?null:n)}function Wg(e,t,r,n){var s=Vs();n=n===void 0?null:n;var a=void 0;if(Kr!==null){var o=Kr.memoizedState;if(a=o.destroy,n!==null&&nw(n,o.deps)){s.memoizedState=oh(t,r,a,n);return}}vr.flags|=e,s.memoizedState=oh(1|t,r,a,n)}function WE(e,t){return qf(8390656,8,e,t)}function iw(e,t){return Wg(2048,8,e,t)}function N_(e,t){return Wg(4,2,e,t)}function S_(e,t){return Wg(4,4,e,t)}function T_(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 C_(e,t,r){return r=r!=null?r.concat([e]):null,Wg(4,4,T_.bind(null,t,e),r)}function ow(){}function __(e,t){var r=Vs();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&nw(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function A_(e,t){var r=Vs();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&nw(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function j_(e,t,r){return Gl&21?(pa(r,t)||(r=OC(),vr.lanes|=r,Kl|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,is=!0),e.memoizedState=r)}function eF(e,t){var r=Kt;Kt=r!==0&&4>r?r:4,e(!0);var n=Ix.transition;Ix.transition={};try{e(!1),t()}finally{Kt=r,Ix.transition=n}}function I_(){return Vs().memoizedState}function tF(e,t,r){var n=Oo(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},R_(e))D_(t,r);else if(r=m_(e,t,r,n),r!==null){var s=Vn();ha(r,e,n,s),M_(r,t,n)}}function rF(e,t,r){var n=Oo(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(R_(e))D_(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,l=a(o,r);if(s.hasEagerState=!0,s.eagerState=l,pa(l,o)){var u=t.interleaved;u===null?(s.next=s,Z4(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}r=m_(e,t,s,n),r!==null&&(s=Vn(),ha(r,e,n,s),M_(r,t,n))}}function R_(e){var t=e.alternate;return e===vr||t!==null&&t===vr}function D_(e,t){_0=$p=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function M_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,F4(e,r)}}var zp={readContext:Ws,useCallback:bn,useContext:bn,useEffect:bn,useImperativeHandle:bn,useInsertionEffect:bn,useLayoutEffect:bn,useMemo:bn,useReducer:bn,useRef
vendor: 6,761 bytes, lines 39-41
39:bn,useState:bn,useDebugValue:bn,useDeferredValue:bn,useTransition:bn,useMutableSource:bn,useSyncExternalStore:bn,useId:bn,unstable_isNewReconciler:!1},nF={readContext:Ws,useCallback:function(e,t){return Ma().memoizedState=[e,t===void 0?null:t],e},useContext:Ws,useEffect:WE,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,qf(4194308,4,T_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return qf(4194308,4,e,t)},useInsertionEffect:function(e,t){return qf(4,2,e,t)},useMemo:function(e,t){var r=Ma();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ma();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=tF.bind(null,vr,e),[n.memoizedState,e]},useRef:function(e){var t=Ma();return e={current:e},t.memoizedState=e},useState:qE,useDebugValue:ow,useDeferredValue:function(e){return Ma().memoizedState=e},useTransition:function(){var e=qE(!1),t=e[0];return e=eF.bind(null,e[1]),Ma().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=vr,s=Ma();if(hr){if(r===void 0)throw Error(Ue(407));r=r()}else{if(r=t(),an===null)throw Error(Ue(349));Gl&30||b_(n,t,r)}s.memoizedState=r;var a={value:r,getSnapshot:t};return s.queue=a,WE(v_.bind(null,n,a,e),[e]),n.flags|=2048,oh(9,y_.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=Ma(),t=an.identifierPrefix;if(hr){var r=Ni,n=ki;r=(n&~(1<<32-da(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ah++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=JP++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sF={readContext:Ws,useCallback:__,useContext:Ws,useEffect:iw,useImperativeHandle:C_,useInsertionEffect:N_,useLayoutEffect:S_,useMemo:A_,useReducer:Rx,useRef:k_,useState:function(){return Rx(ih)},useDebugValue:ow,useDeferredValue:function(e){var t=Vs();return j_(t,Kr.memoizedState,e)},useTransition:function(){var e=Rx(ih)[0],t=Vs().memoizedState;return[e,t]},useMutableSource:g_,useSyncExternalStore:x_,useId:I_,unstable_isNewReconciler:!1},aF={readContext:Ws,useCallback:__,useContext:Ws,useEffect:iw,useImperativeHandle:C_,useInsertionEffect:N_,useLayoutEffect:S_,useMemo:A_,useReducer:Dx,useRef:k_,useState:function(){return Dx(ih)},useDebugValue:ow,useDeferredValue:function(e){var t=Vs();return Kr===null?t.memoizedState=e:j_(t,Kr.memoizedState,e)},useTransition:function(){var e=Dx(ih)[0],t=Vs().memoizedState;return[e,t]},useMutableSource:g_,useSyncExternalStore:x_,useId:I_,unstable_isNewReconciler:!1};function ta(e,t){if(e&&e.defaultProps){t=wr({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function av(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:wr({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Vg={isMounted:function(e){return(e=e._reactInternals)?uc(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Vn(),s=Oo(e),a=_i(n,s);a.payload=t,r!=null&&(a.callback=r),t=Do(e,a,s),t!==null&&(ha(t,e,s,n),zf(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Vn(),s=Oo(e),a=_i(n,s);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Do(e,a,s),t!==null&&(ha(t,e,s,n),zf(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Vn(),n=Oo(e),s=_i(r,n);s.tag=2,t!=null&&(s.callback=t),t=Do(e,s,n),t!==null&&(ha(t,e,n,r),zf(t,e,n))}};function VE(e,t,r,n,s,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):t.prototype&&t.prototype.isPureReactComponent?!J0(r,n)||!J0(s,a):!0}function O_(e,t,r){var n=!1,s=qo,a=t.contextType;return typeof a=="object"&&a!==null?a=Ws(a):(s=ls(t)?Wl:_n.current,n=t.contextTypes,a=(n=n!=null)?Fu(e,s):qo),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Vg,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=a),t}function GE(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Vg.enqueueReplaceState(t,t.state,null)}function iv(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},J4(e);var a=t.contextType;typeof a=="object"&&a!==null?s.context=Ws(a):(a=ls(t)?Wl:_n.current,s.context=Fu(e,a)),s.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(av(e,t,a,r),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&&Vg.enqueueReplaceState(s,s.state,null),Bp(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function zu(e,t){try{var r="",n=t;do r+=DL(n),n=n.return;while(n);var s=r}catch(a){s=` 40Error generating stack: `+a.message+` 41`+a.stack}return{value:e,source:t,stack:s,digest:null}}function Mx(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ov(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var iF=typeof WeakMap=="function"?WeakMap:Map;function L_(e,t,r){r=_i(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){qp||(qp=!0,xv=n),ov(e,t)},r}function P_(e,t,r){r=_i(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){ov(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){ov(e,t),typeof n!="function"&&(Mo===null?Mo=new Set([this]):Mo.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function KE(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new iF;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=vF.bind(null,e,t,r),t.then(e,e))}function YE(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 QE(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=_i(-1,1),t.tag=2,Do(r,t,1))),r.lanes|=1),e)}var oF=Ui.ReactCurrentOwner,is=!1;function Fn(e,t,r,n){t.child=e===null?h_(t,null,r,n):Uu(t,e.child,r,n)}function XE(e,t,r,n,s){r=r.render;var a=t.ref;
vendor: 6,220 bytes, line 41
41return hu(t,s),n=sw(e,t,r,n,a,s),r=aw(),e!==null&&!is?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Oi(e,t,s)):(hr&&r&&V4(t),t.flags|=1,Fn(e,t,n,s),t.child)}function ZE(e,t,r,n,s){if(e===null){var a=r.type;return typeof a=="function"&&!pw(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,F_(e,t,a,n,s)):(e=Kf(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&s)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:J0,r(o,n)&&e.ref===t.ref)return Oi(e,t,s)}return t.flags|=1,e=Lo(a,n),e.ref=t.ref,e.return=t,t.child=e}function F_(e,t,r,n,s){if(e!==null){var a=e.memoizedProps;if(J0(a,n)&&e.ref===t.ref)if(is=!1,t.pendingProps=n=a,(e.lanes&s)!==0)e.flags&131072&&(is=!0);else return t.lanes=e.lanes,Oi(e,t,s)}return lv(e,t,r,n,s)}function B_(e,t,r){var n=t.pendingProps,s=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},sr(su,xs),xs|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,sr(su,xs),xs|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,sr(su,xs),xs|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,sr(su,xs),xs|=n;return Fn(e,t,s,r),t.child}function U_(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function lv(e,t,r,n,s){var a=ls(r)?Wl:_n.current;return a=Fu(t,a),hu(t,s),r=sw(e,t,r,n,a,s),n=aw(),e!==null&&!is?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Oi(e,t,s)):(hr&&n&&V4(t),t.flags|=1,Fn(e,t,r,s),t.child)}function JE(e,t,r,n,s){if(ls(r)){var a=!0;Mp(t)}else a=!1;if(hu(t,s),t.stateNode===null)Wf(e,t),O_(t,r,n),iv(t,r,n,s),n=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var u=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=Ws(c):(c=ls(r)?Wl:_n.current,c=Fu(t,c));var d=r.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||u!==c)&&GE(t,o,n,c),oo=!1;var m=t.memoizedState;o.state=m,Bp(t,n,o,s),u=t.memoizedState,l!==n||m!==u||os.current||oo?(typeof d=="function"&&(av(t,r,d,n),u=t.memoizedState),(l=oo||VE(t,r,l,n,m,u,c))?(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=n,t.memoizedState=u),o.props=n,o.state=u,o.context=c,n=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,f_(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:ta(t.type,l),o.props=c,h=t.pendingProps,m=o.context,u=r.contextType,typeof u=="object"&&u!==null?u=Ws(u):(u=ls(r)?Wl:_n.current,u=Fu(t,u));var f=r.getDerivedStateFromProps;(d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==h||m!==u)&&GE(t,o,n,u),oo=!1,m=t.memoizedState,o.state=m,Bp(t,n,o,s);var p=t.memoizedState;l!==h||m!==p||os.current||oo?(typeof f=="function"&&(av(t,r,f,n),p=t.memoizedState),(c=oo||VE(t,r,c,n,m,p,u)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),o.props=n,o.state=p,o.context=u,n=c):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return cv(e,t,r,n,a,s)}function cv(e,t,r,n,s,a){U_(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return s&&FE(t,r,!1),Oi(e,t,a);n=t.stateNode,oF.current=t;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Uu(t,e.child,null,a),t.child=Uu(t,null,l,a)):Fn(e,t,l,a),t.memoizedState=n.state,s&&FE(t,r,!0),t.child}function $_(e){var t=e.stateNode;t.pendingContext?PE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&PE(e,t.context,!1),ew(e,t.containerInfo)}function e6(e,t,r,n,s){return Bu(),K4(s),t.flags|=256,Fn(e,t,r,n),t.child}var uv={dehydrated:null,treeContext:null,retryLane:0};function dv(e){return{baseLanes:e,cachePool:null,transitions:null}}function z_(e,t,r){var n=t.pendingProps,s=br.current,a=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),sr(br,s&1),e===null)return nv(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=n.children,e=n.fallback,a?(n=t.mode,a=t.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Yg(o,n,0,null),e=Ul(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=dv(r),t.memoizedState=uv,e):lw(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return lF(e,t,o,n,l,s,r);if(a){a=n.fallback,o=t.mode,s=e.child,l=s.sibling;var u={mode:"hidden",children:n.children};return!(o&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=Lo(s,u),n.subtreeFlags=s.subtreeFlags&14680064),l!==null?a=Lo(l,a):(a=Ul(a,o,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,o=e.child.memoizedState,o=o===null?dv(r):{base
vendor: 8,923 bytes, line 41
41Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=uv,n}return a=e.child,e=a.sibling,n=Lo(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function lw(e,t){return t=Yg({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lm(e,t,r,n){return n!==null&&K4(n),Uu(t,e.child,null,r),e=lw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lF(e,t,r,n,s,a,o){if(r)return t.flags&256?(t.flags&=-257,n=Mx(Error(Ue(422))),Lm(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,s=t.mode,n=Yg({mode:"visible",children:n.children},s,0,null),a=Ul(a,s,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&Uu(t,e.child,null,o),t.child.memoizedState=dv(o),t.memoizedState=uv,a);if(!(t.mode&1))return Lm(e,t,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var l=n.dgst;return n=l,a=Error(Ue(419)),n=Mx(a,n,void 0),Lm(e,t,o,n)}if(l=(o&e.childLanes)!==0,is||l){if(n=an,n!==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&(n.suspendedLanes|o)?0:s,s!==0&&s!==a.retryLane&&(a.retryLane=s,Mi(e,s),ha(n,e,s,-1))}return fw(),n=Mx(Error(Ue(421))),Lm(e,t,o,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=wF.bind(null,e),s._reactRetry=t,null):(e=a.treeContext,bs=Ro(s.nextSibling),vs=t,hr=!0,ia=null,e!==null&&(Ps[Fs++]=ki,Ps[Fs++]=Ni,Ps[Fs++]=Vl,ki=e.id,Ni=e.overflow,Vl=t),t=lw(t,n.children),t.flags|=4096,t)}function t6(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),sv(e.return,t,r)}function Ox(e,t,r,n,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=s)}function H_(e,t,r){var n=t.pendingProps,s=n.revealOrder,a=n.tail;if(Fn(e,t,n.children,r),n=br.current,n&2)n=n&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&&t6(e,r,t);else if(e.tag===19)t6(e,r,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}n&=1}if(sr(br,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Up(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Ox(t,!1,s,r,a);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Up(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Ox(t,!0,r,null,a);break;case"together":Ox(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wf(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Oi(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ue(153));if(t.child!==null){for(e=t.child,r=Lo(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Lo(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function cF(e,t,r){switch(t.tag){case 3:$_(t),Bu();break;case 5:p_(t);break;case 1:ls(t.type)&&Mp(t);break;case 4:ew(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;sr(Pp,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(sr(br,br.current&1),t.flags|=128,null):r&t.child.childLanes?z_(e,t,r):(sr(br,br.current&1),e=Oi(e,t,r),e!==null?e.sibling:null);sr(br,br.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return H_(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),sr(br,br.current),n)break;return null;case 22:case 23:return t.lanes=0,B_(e,t,r)}return Oi(e,t,r)}var q_,hv,W_,V_;q_=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};hv=function(){};W_=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Sl(Ya.current);var a=null;switch(r){case"input":s=My(e,s),n=My(e,n),a=[];break;case"select":s=wr({},s,{value:void 0}),n=wr({},n,{value:void 0}),a=[];break;case"textarea":s=Py(e,s),n=Py(e,n),a=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Rp)}By(r,n);var o;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var l=s[c];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(V0.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in n){var u=n[c];if(l=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(r||(r={}),r[o]=u[o])}else r||(a||(a=[]),a.push(c,r)),r=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(a=a||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(a=a||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(V0.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&ir("scroll",e),a||l===u||(a=[])):(a=a||[]).push(c,u))}r&&(a=a||[]).push("style",r);var c=a;(t.updateQueue=c)&&(t.flags|=4)}};V_=function(e,t,r,n){r!==n&&(t.flags|=4)};function Md(e,t){if(!hr)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function yn(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function uF(e,t,r){var n=t.pendingProps;switch(G4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yn(t),null;case 1:return ls(t.type)&&Dp(),yn(t),null;case 3:return n=t.stateNode,$u(),lr(os),lr(_n),rw(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Mm(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ia!==null&&(vv(ia),ia=null))),hv(e,t),yn(t),null;case 5:tw(t);var s=Sl(sh.current);if(r=t.type,e!==null&&t.stateNode!=null)W_(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Ue(166));return yn(t),null}if(e=Sl(Ya.current),Mm(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[za]=t,n[rh]=a,e=(t.mode&1)!==0,r){case"dialog":ir("cancel",n),ir("close",n);break;case"iframe":case"object":case"embed":ir("load",n);break;case"video":case"audio":for(s=0;s<p0.length;s++)ir(p0[s],n);break;case"source":ir("error",n);break;case"img":case"image":case"link":ir("error",n),ir("load",n);break;case"details":ir("toggle",n);break;case"input":uE(n,a),ir("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},ir("invalid",n);break;case"textarea":hE(n,a),ir("invalid",n)}By(r,a),s=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?n.textContent!==l&&(a.suppressHydrationWarning!==!0&&Dm(n.textContent,l,e),s=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Dm(n.textContent,l,e),s=["children",""+l]):V0.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&ir("scroll",n)}switch(r){case"input":Sm(n),dE(n,a,!0);break;case"textarea":Sm(n),mE(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Rp)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=vC(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
41",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[za]=t,e[rh]=n,q_(e,t,!1,!1),t.stateNode=e;e:{switch(o=Uy(r,n),r){case"dialog":ir("cancel",e),ir("close",e),s=n;break;case"iframe":case"object":case"embed":ir("load",e),s=n;break;case"video":case"audio":for(s=0;s<p0.length;s++)ir(p0[s],e);s=n;break;case"source":ir("error",e),s=n;break;case"img":case"image":case"link":ir("error",e),ir("load",e),s=n;break;case"details":ir("toggle",e),s=n;break;case"input":uE(e,n),s=My(e,n),ir("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=wr({},n,{value:void 0}),ir("invalid",e);break;case"textarea":hE(e,n),s=Py(e,n),ir("invalid",e);break;default:s=n}By(r,s),l=s;for(a in l)if(l.hasOwnProperty(a)){var u=l[a];a==="style"?kC(e,u):a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&wC(e,u)):a==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&G0(e,u):typeof u=="number"&&G0(e,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(V0.hasOwnProperty(a)?u!=null&&a==="onScroll"&&ir("scroll",e):u!=null&&R4(e,a,u,o))}switch(r){case"input":Sm(e),dE(e,n,!1);break;case"textarea":Sm(e),mE(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Ho(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?lu(e,!!n.multiple,a,!1):n.defaultValue!=null&&lu(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Rp)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return yn(t),null;case 6:if(e&&t.stateNode!=null)V_(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Ue(166));if(r=Sl(sh.current),Sl(Ya.current),Mm(t)){if(n=t.stateNode,r=t.memoizedProps,n[za]=t,(a=n.nodeValue!==r)&&(e=vs,e!==null))switch(e.tag){case 3:Dm(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Dm(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[za]=t,t.stateNode=n}return yn(t),null;case 13:if(lr(br),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(hr&&bs!==null&&t.mode&1&&!(t.flags&128))u_(),Bu(),t.flags|=98560,a=!1;else if(a=Mm(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(Ue(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Ue(317));a[za]=t}else Bu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yn(t),a=!1}else ia!==null&&(vv(ia),ia=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||br.current&1?Yr===0&&(Yr=3):fw())),t.updateQueue!==null&&(t.flags|=4),yn(t),null);case 4:return $u(),hv(e,t),e===null&&eh(t.stateNode.containerInfo),yn(t),null;case 10:return X4(t.type._context),yn(t),null;case 17:return ls(t.type)&&Dp(),yn(t),null;case 19:if(lr(br),a=t.memoizedState,a===null)return yn(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)Md(a,!1);else{if(Yr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Up(e),o!==null){for(t.flags|=128,Md(a,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return sr(br,br.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ar()>Hu&&(t.flags|=128,n=!0,Md(a,!1),t.lanes=4194304)}else{if(!n)if(e=Up(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Md(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!hr)return yn(t),null}else 2*Ar()-a.renderingStartTime>Hu&&r!==1073741824&&(t.flags|=128,n=!0,Md(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ar(),t.sibling=null,r=br.current,sr(br,n?r&1|2:r&1),t):(yn(t),null);case 22:case 23:return mw(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?xs&1073741824&&(yn(t),t.subtreeFlags&6&&(t.flags|=8192)):yn(t),null;case 24:return null;case 25:return null}throw Error(Ue(156,t.tag))}function dF(e,t){switch(G4(t),t.tag){case 1:return ls(t.type)&&Dp(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 26,035 bytes, line 41
41case 3:return $u(),lr(os),lr(_n),rw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return tw(t),null;case 13:if(lr(br),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ue(340));Bu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return lr(br),null;case 4:return $u(),null;case 10:return X4(t.type._context),null;case 22:case 23:return mw(),null;case 24:return null;default:return null}}var Pm=!1,vn=!1,hF=typeof WeakSet=="function"?WeakSet:Set,st=null;function nu(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Cr(e,t,n)}else r.current=null}function mv(e,t,r){try{r()}catch(n){Cr(e,t,n)}}var r6=!1;function mF(e,t){if(Qy=Ap,e=XC(),W4(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,l=-1,u=-1,c=0,d=0,h=e,m=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(l=o+s),h!==a||n!==0&&h.nodeType!==3||(u=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)m=h,h=f;for(;;){if(h===e)break t;if(m===r&&++c===s&&(l=o),m===a&&++d===n&&(u=o),(f=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=f}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Xy={focusedElem:e,selectionRange:r},Ap=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){t=st;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,x=p.memoizedState,w=t.stateNode,y=w.getSnapshotBeforeUpdate(t.elementType===t.type?g:ta(t.type,g),x);w.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ue(163))}}catch(k){Cr(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}return p=r6,r6=!1,p}function A0(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&mv(t,r,a)}s=s.next}while(s!==n)}}function Gg(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function fv(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function G_(e){var t=e.alternate;t!==null&&(e.alternate=null,G_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[za],delete t[rh],delete t[ev],delete t[YP],delete t[QP])),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 K_(e){return e.tag===5||e.tag===3||e.tag===4}function n6(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||K_(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 pv(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Rp));else if(n!==4&&(e=e.child,e!==null))for(pv(e,t,r),e=e.sibling;e!==null;)pv(e,t,r),e=e.sibling}function gv(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(gv(e,t,r),e=e.sibling;e!==null;)gv(e,t,r),e=e.sibling}var cn=null,sa=!1;function Yi(e,t,r){for(r=r.child;r!==null;)Y_(e,t,r),r=r.sibling}function Y_(e,t,r){if(Ka&&typeof Ka.onCommitFiberUnmount=="function")try{Ka.onCommitFiberUnmount(Bg,r)}catch{}switch(r.tag){case 5:vn||nu(r,t);case 6:var n=cn,s=sa;cn=null,Yi(e,t,r),cn=n,sa=s,cn!==null&&(sa?(e=cn,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):cn.removeChild(r.stateNode));break;case 18:cn!==null&&(sa?(e=cn,r=r.stateNode,e.nodeType===8?_x(e.parentNode,r):e.nodeType===1&&_x(e,r),X0(e)):_x(cn,r.stateNode));break;case 4:n=cn,s=sa,cn=r.stateNode.containerInfo,sa=!0,Yi(e,t,r),cn=n,sa=s;break;case 0:case 11:case 14:case 15:if(!vn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var a=s,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&mv(r,t,o),s=s.next}while(s!==n)}Yi(e,t,r);break;case 1:if(!vn&&(nu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Cr(r,t,l)}Yi(e,t,r);break;case 21:Yi(e,t,r);break;case 22:r.mode&1?(vn=(n=vn)||r.memoizedState!==null,Yi(e,t,r),vn=n):Yi(e,t,r);break;default:Yi(e,t,r)}}function s6(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new hF),t.forEach(function(n){var s=EF.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Zs(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var a=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:cn=l.stateNode,sa=!1;break e;case 3:cn=l.stateNode.containerInfo,sa=!0;break e;case 4:cn=l.stateNode.containerInfo,sa=!0;break e}l=l.return}if(cn===null)throw Error(Ue(160));Y_(a,o,s),cn=null,sa=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(c){Cr(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Q_(t,e),t=t.sibling}function Q_(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Zs(t,e),Sa(e),n&4){try{A0(3,e,e.return),Gg(3,e)}catch(g){Cr(e,e.return,g)}try{A0(5,e,e.return)}catch(g){Cr(e,e.return,g)}}break;case 1:Zs(t,e),Sa(e),n&512&&r!==null&&nu(r,r.return);break;case 5:if(Zs(t,e),Sa(e),n&512&&r!==null&&nu(r,r.return),e.flags&32){var s=e.stateNode;try{G0(s,"")}catch(g){Cr(e,e.return,g)}}if(n&4&&(s=e.stateNode,s!=null)){var a=e.memoizedProps,o=r!==null?r.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&bC(s,a),Uy(l,o);var c=Uy(l,a);for(o=0;o<u.length;o+=2){var d=u[o],h=u[o+1];d==="style"?kC(s,h):d==="dangerouslySetInnerHTML"?wC(s,h):d==="children"?G0(s,h):R4(s,d,h,c)}switch(l){case"input":Oy(s,a);break;case"textarea":yC(s,a);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!a.multiple;var f=a.value;f!=null?lu(s,!!a.multiple,f,!1):m!==!!a.multiple&&(a.defaultValue!=null?lu(s,!!a.multiple,a.defaultValue,!0):lu(s,!!a.multiple,a.multiple?[]:"",!1))}s[rh]=a}catch(g){Cr(e,e.return,g)}}break;case 6:if(Zs(t,e),Sa(e),n&4){if(e.stateNode===null)throw Error(Ue(162));s=e.stateNode,a=e.memoizedProps;try{s.nodeValue=a}catch(g){Cr(e,e.return,g)}}break;case 3:if(Zs(t,e),Sa(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{X0(t.containerInfo)}catch(g){Cr(e,e.return,g)}break;case 4:Zs(t,e),Sa(e);break;case 13:Zs(t,e),Sa(e),s=e.child,s.flags&8192&&(a=s.memoizedState!==null,s.stateNode.isHidden=a,!a||s.alternate!==null&&s.alternate.memoizedState!==null||(dw=Ar())),n&4&&s6(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(vn=(c=vn)||d,Zs(t,e),vn=c):Zs(t,e),Sa(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(st=e,d=e.child;d!==null;){for(h=st=d;st!==null;){switch(m=st,f=m.child,m.tag){case 0:case 11:case 14:case 15:A0(4,m,m.return);break;case 1:nu(m,m.return);var p=m.stateNode;if(typeof p.componentWillUnmount=="function"){n=m,r=m.return;try{t=n,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){Cr(n,r,g)}}break;case 5:nu(m,m.return);break;case 22:if(m.memoizedState!==null){i6(h);continue}}f!==null?(f.return=m,st=f):i6(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,c?(a=s.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=h.stateNode,u=h.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=EC("display",o))}catch(g){Cr(e,e.return,g)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(g){Cr(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:Zs(t,e),Sa(e),n&4&&s6(e);break;case 21:break;default:Zs(t,e),Sa(e)}}function Sa(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(K_(r)){var n=r;break e}r=r.return}throw Error(Ue(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(G0(s,""),n.flags&=-33);var a=n6(e);gv(e,a,s);break;case 3:case 4:var o=n.stateNode.containerInfo,l=n6(e);pv(e,l,o);break;default:throw Error(Ue(161))}}catch(u){Cr(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fF(e,t,r){st=e,X_(e)}function X_(e,t,r){for(var n=(e.mode&1)!==0;st!==null;){var s=st,a=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||Pm;if(!o){var l=s.alternate,u=l!==null&&l.memoizedState!==null||vn;l=Pm;var c=vn;if(Pm=o,(vn=u)&&!c)for(st=s;st!==null;)o=st,u=o.child,o.tag===22&&o.memoizedState!==null?o6(s):u!==null?(u.return=o,st=u):o6(s);for(;a!==null;)st=a,X_(a),a=a.sibling;st=s,Pm=l,vn=c}a6(e)}else s.subtreeFlags&8772&&a!==null?(a.return=s,st=a):a6(e)}}function a6(e){for(;st!==null;){var t=st;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:vn||Gg(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!vn)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:ta(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&HE(t,a,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}HE(t,o,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&X0(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ue(163))}vn||t.flags&512&&fv(t)}catch(m){Cr(t,t.return,m)}}if(t===e){st=null;break}if(r=t.sibling,r!==null){r.return=t.return,st=r;break}st=t.return}}function i6(e){for(;st!==null;){var t=st;if(t===e){st=null;break}var r=t.sibling;if(r!==null){r.return=t.return,st=r;break}st=t.return}}function o6(e){for(;st!==null;){var t=st;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Gg(4,t)}catch(u){Cr(t,r,u)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(u){Cr(t,s,u)}}var a=t.return;try{fv(t)}catch(u){Cr(t,a,u)}break;case 5:var o=t.return;try{fv(t)}catch(u){Cr(t,o,u)}}}catch(u){Cr(t,t.return,u)}if(t===e){st=null;break}var l=t.sibling;if(l!==null){l.return=t.return,st=l;break}st=t.return}}var pF=Math.ceil,Hp=Ui.ReactCurrentDispatcher,cw=Ui.ReactCurrentOwner,qs=Ui.ReactCurrentBatchConfig,Bt=0,an=null,Br=null,hn=0,xs=0,su=tl(0),Yr=0,lh=null,Kl=0,Kg=0,uw=0,j0=null,as=null,dw=0,Hu=1/0,fi=null,qp=!1,xv=null,Mo=null,Fm=!1,Eo=null,Wp=0,I0=0,bv=null,Vf=-1,Gf=0;function Vn(){return Bt&6?Ar():Vf!==-1?Vf:Vf=Ar()}function Oo(e){return e.mode&1?Bt&2&&hn!==0?hn&-hn:ZP.transition!==null?(Gf===0&&(Gf=OC()),Gf):(e=Kt,e!==0||(e=window.event,e=e===void 0?16:zC(e.type)),e):1}function ha(e,t,r,n){if(50<I0)throw I0=0,bv=null,Error(Ue(185));zh(e,r,n),(!(Bt&2)||e!==an)&&(e===an&&(!(Bt&2)&&(Kg|=r),Yr===4&&uo(e,hn)),cs(e,n),r===1&&Bt===0&&!(t.mode&1)&&(Hu=Ar()+500,qg&&rl()))}function cs(e,t){var r=e.callbackNode;ZL(e,t);var n=_p(e,e===an?hn:0);if(n===0)r!==null&&gE(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&gE(r),t===1)e.tag===0?XP(l6.bind(null,e)):o_(l6.bind(null,e)),GP(function(){!(Bt&6)&&rl()}),r=null;else{switch(LC(n)){case 1:r=P4;break;case 4:r=DC;break;case 16:r=Cp;break;case 536870912:r=MC;break;default:r=Cp}r=a7(r,Z_.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Z_(e,t){if(Vf=-1,Gf=0,Bt&6)throw Error(Ue(327));var r=e.callbackNode;if(mu()&&e.callbackNode!==r)return null;var n=_p(e,e===an?hn:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Vp(e,n);else{t=n;var s=Bt;Bt|=2;var a=e7();(an!==e||hn!==t)&&(fi=null,Hu=Ar()+500,Bl(e,t));do try{bF();break}catch(l){J_(e,l)}while(!0);Q4(),Hp.current=a,Bt=s,Br!==null?t=0:(an=null,hn=0,t=Yr)}if(t!==0){if(t===2&&(s=Wy(e),s!==0&&(n=s,t=yv(e,s))),t===1)throw r=lh,Bl(e,0),uo(e,n),cs(e,Ar()),r;if(t===6)uo(e,n);else{if(s=e.current.alternate,!(n&30)&&!gF(s)&&(t=Vp(e,n),t===2&&(a=Wy(e),a!==0&&(n=a,t=yv(e,a))),t===1))throw r=lh,Bl(e,0),uo(e,n),cs(e,Ar()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(Ue(345));case 2:xl(e,as,fi);break;case 3:if(uo(e,n),(n&130023424)===n&&(t=dw+500-Ar(),10<t)){if(_p(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Vn(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Jy(xl.bind(null,e,as,fi),t);break}xl(e,as,fi);break;case 4:if(uo(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var o=31-da(n);a=1<<o,o=t[o],o>s&&(s=o),n&=~a}if(n=s,n=Ar()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*pF(n/1960))-n,10<n){e.timeoutHandle=Jy(xl.bind(null,e,as,fi),n);break}xl(e,as,fi);break;case 5:xl(e,as,fi);break;default:throw Error(Ue(329))}}}return cs(e,Ar()),e.callbackNode===r?Z_.bind(null,e):null}function yv(e,t){var r=j0;return e.current.memoizedState.isDehydrated&&(Bl(e,t).flags|=256),e=Vp(e,t),e!==2&&(t=as,as=r,t!==null&&vv(t)),e}function vv(e){as===null?as=e:as.push.apply(as,e)}function gF(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],a=s.getSnapshot;s=s.value;try{if(!pa(a(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 uo(e,t){for(t&=~uw,t&=~Kg,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-da(t),n=1<<r;e[r]=-1,t&=~n}}function l6(e){if(Bt&6)throw Error(Ue(327));mu();var t=_p(e,0);if(!(t&1))return cs(e,Ar()),null;var r=Vp(e,t);if(e.tag!==0&&r===2){var n=Wy(e);n!==0&&(t=n,r=yv(e,n))}if(r===1)throw r=lh,Bl(e,0),uo(e,t),cs(e,Ar()),r;if(r===6)throw Error(Ue(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xl(e,as,fi),cs(e,Ar()),null}function hw(e,t){var r=Bt;Bt|=1;try{return e(t)}finally{Bt=r,Bt===0&&(Hu=Ar()+500,qg&&rl())}}function Yl(e){Eo!==null&&Eo.tag===0&&!(Bt&6)&&mu();var t=Bt;Bt|=1;var r=qs.transition,n=Kt;try{if(qs.transition=null,Kt=1,e)return e()}finally{Kt=n,qs.transition=r,Bt=t,!(Bt&6)&&rl()}}function mw(){xs=su.current,lr(su)}function Bl(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,VP(r)),Br!==null)for(r=Br.return;r!==null;){var n=r;switch(G4(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Dp();break;case 3:$u(),lr(os),lr(_n),rw();break;case 5:tw(n);break;case 4:$u();break;case 13:lr(br);break;case 19:lr(br);break;case 10:X4(n.type._context);break;case 22:case 23:mw()}r=r.return}if(an=e,Br=e=Lo(e.current,null),hn=xs=t,Yr=0,lh=null,uw=Kg=Kl=0,as=j0=null,Nl!==null){for(t=0;t<Nl.length;t++)if(r=Nl[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=s,n.next=o}r.pending=n}Nl=null}return e}function J_(e,t){do{var r=Br;try{if(Q4(),Hf.current=zp,$p){for(var n=vr.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}$p=!1}if(Gl=0,nn=Kr=vr=null,_0=!1,ah=0,cw.current=null,r===null||r.return===null){Yr=1,lh=t,Br=null;break}e:{var a=e,o=r.return,l=r,u=t;if(t=hn,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=YE(o);if(f!==null){f.flags&=-257,QE(f,o,l,a,t),f.mode&1&&KE(a,c,t),t=f,u=c;var p=t.updateQueue;if(p===null){var g=new Set;g.add(u),t.updateQueue=g}else p.add(u);break e}else{if(!(t&1)){KE(a,c,t),fw();break e}u=Error(Ue(426))}}else if(hr&&l.mode&1){var x=YE(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),QE(x,o,l,a,t),K4(zu(u,l));break e}}a=u=zu(u,l),Yr!==4&&(Yr=2),j0===null?j0=[a]:j0.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var w=L_(a,u,t);zE(a,w);break e;case 1:l=u;var y=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof y.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Mo===null||!Mo.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var k=P_(a,l,t);zE(a,k);break e}}a=a.return}while(a!==null)}r7(r)}catch(T){t=T,Br===r&&r!==null&&(Br=r=r.return);continue}break}while(!0)}function e7(){var e=Hp.current;return Hp.current=zp,e===null?zp:e}function fw(){(Yr===0||Yr===3||Yr===2)&&(Yr=4),an===null||!(Kl&268435455)&&!(Kg&268435455)||uo(an,hn)}function Vp(e,t){var r=Bt;Bt|=2;var n=e7();(an!==e||hn!==t)&&(fi=null,Bl(e,t));do try{xF();break}catch(s){J_(e,s)}while(!0);if(Q4(),Bt=r,Hp.current=n,Br!==null)throw Error(Ue(261));return an=null,hn=0,Yr}function xF(){for(;Br!==null;)t7(Br)}function bF(){for(;Br!==null&&!HL();)t7(Br)}function t7(e){var t=s7(e.alternate,e,xs);e.memoizedProps=e.pendingProps,t===null?r7(e):Br=t,cw.current=null}function r7(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=dF(r,t),r!==null){r.flags&=32767,Br=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Yr=6,Br=null;return}}else if(r=uF(r,t,xs),r!==null){Br=r;return}if(t=t.sibling,t!==null){Br=t;return}Br=t=e}while(t!==null);Yr===0&&(Yr=5)}function xl(e,t,r){var n=Kt,s=qs.transition;try{qs.transition=null,Kt=1,yF(e,t,r,n)}finally{qs.transition=s,Kt=n}return null}function yF(e,t,r,n){do mu();while(Eo!==null);if(Bt&6)throw Error(Ue(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Ue(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(JL(e,a),e===an&&(Br=an=null,hn=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Fm||(Fm=!0,a7(Cp,function(){return mu(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=qs.transition,qs.transition=null;var o=Kt;Kt=1;var l=Bt;Bt|=4,cw.current=null,mF(e,r),Q_(r,e),BP(Xy),Ap=!!Qy,Xy=Qy=null,e.current=r,fF(r),qL(),Bt=l,Kt=o,qs.transition=a}else e.current=r;if(Fm&&(Fm=!1,Eo=e,Wp=s),a=e.pendingLanes,a===0&&(Mo=null),GL(r.stateNode),cs(e,Ar()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(qp)throw qp=!1,e=xv,xv=null,e;return Wp&1&&e.tag!==0&&mu(),a=e.pendingLanes,a&1?e===bv?I0++:(I0=0,bv=e):I0=0,rl(),null}function mu(){if(Eo!==null){var e=LC(Wp),t=qs.transition,r=Kt;try{if(qs.transition=null,Kt=16>e?16:e,Eo===null)var n=!1;else{if(e=Eo,Eo=null,Wp=0,Bt&6)throw Error(Ue(331));var s=Bt;for(Bt|=4,st=e.current;st!==null;){var a=st,o=a.child;if(st.flags&16){var l=a.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(st=c;st!==null;){var d=st;switch(d.tag){case 0:case 11:case 15:A0(8,d,a)}var h=d.child;if(h!==null)h.return=d,st=h;else for(;st!==null;){d=st;var m=d.sibling,f=d.return;if(G_(d),d===c){st=null;break}if(m!==null){m.return=f,st=m;break}st=f}}}var p=a.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}st=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,st=o;else e:for(;st!==null;){if(a=st,a.flags&2048)switch(a.tag){case 0:case 11:case 15:A0(9,a,a.return)}var w=a.sibling;if(w!==null){w.return=a.return,st=w;break e}st=a.return}}var y=e.current;for(st=y;st!==null;){o=st;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,st=b;else e:for(o=y;st!==null;){if(l=st,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Gg(9,l)}}catch(T){Cr(l,l.return,T)}if(l===o){st=null;break e}var k=l.sibling;if(k!==null){k.return=l.return,st=k;break e}st=l.return}}if(Bt=s,rl(),Ka&&typeof Ka.onPostCommitFiberRoot=="function")try{Ka.onPostCommitFiberRoot(Bg,e)}catch{}n=!0}return n}finally{Kt=r,qs.transition=t}}return!1}function c6(e,t,r){t=zu(r,t),t=L_(e,t,1),e=Do(e,t,1),t=Vn(),e!==null&&(zh(e,1,t),cs(e,t))}function Cr(e,t,r){if(e.tag===3)c6(e,e,r);else for(;t!==null;){if(t.tag===3){c6(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Mo===null||!Mo.has(n))){e=zu(r,e),e=P_(t,e,1),t=Do(t,e,1),e=Vn(),t!==null&&(zh(t,1,e),cs(t,e));break}}t=t.return}}function vF(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Vn(),e.pingedLanes|=e.suspendedLanes&r,an===e&&(hn&r)===r&&(Yr===4||Yr===3&&(hn&130023424)===hn&&500>Ar()-dw?Bl(e,0):uw|=r),cs(e,t)}function n7(e,t){t===0&&(e.mode&1?(t=_m,_m<<=1,!(_m&130023424)&&(_m=4194304)):t=1);var r=Vn();e=Mi(e,t),e!==null&&(zh(e,t,r),cs(e,r))}function wF(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),n7(e,r)}function EF(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Ue(314))}n!==null&&n.delete(t),n7(e,r)}var s7;s7=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||os.current)is=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return is=!1,cF(e,t,r);is=!!(e.flags&131072)}else is=!1,hr&&t.flags&1048576&&l_(t,Lp,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Wf(e,t),e=t.pendingProps;var s=Fu(t,_n.current);hu(t,r),s=sw(null,t,n,e,s,r);var a=aw();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,ls(n)?(a=!0,Mp(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,J4(t),s.updater=Vg,t.stateNode=s,s._reactInternals=t,iv(t,n,e,r),t=cv(null,t,n,!0,a,r)):(t.tag=0,hr&&a&&V4(t),Fn(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Wf(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=NF(n),e=ta(n,e),s){case 0:t=lv(null,t,n,e,r);break e;case 1:t=JE(null,t,n,e,r);break e;case 11:t=XE(null,t,n,e,r);break e;case 14:t=ZE(null,t,n,ta(n.type,e),r);break e}throw Error(Ue(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:ta(n,s),lv(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:ta(n,s),JE(e,t,n,s,r);case 3:e:{if($_(t),e===null)throw Error(Ue(387));n=t.pendingProps,a=t.memoizedState,s=a.element,f_(e,t),Bp(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=zu(Error(Ue(423)),t),t=e6(e,t,n,r,s);break e}else if(n!==s){s=zu(Error(Ue(424)),t),t=e6(e,t,n,r,s);break e}else for(bs=Ro(t.stateNode.containerInfo.firstChild),vs=t,hr=!0,ia=null,r=h_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Bu(),n===s){t=Oi(e,t,r);break e}Fn(e,t,n,r)}t=t.child}return t;case 5:return p_(t),e===null&&nv(t),n=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,o=s.children,Zy(n,s)?o=null:a!==null&&Zy(n,a)&&(t.flags|=32),U_(e,t),Fn(e,t,o,r),t.child;case 6:return e===null&&nv(t),null;case 13:return z_(e,t,r);case 4:return ew(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Uu(t,null,n,r):Fn(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:ta(n,s),XE(e,t,n,s,r);case 7:return Fn(e,t,t.pendingProps,r),t.child;case 8:return Fn(e,t,t.pendingProps.children,r),t.child;case 12:return Fn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,a=t.memoizedProps,o=s.value,sr(Pp,n._currentValue),n._currentValue=o,a!==null)if(pa(a.value,o)){if(a.children===s.children&&!os.current){t=Oi(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var u=l.firstContext;u!==null;){if(u.context===n){if(a.tag===1){u=_i(-1,r&-r),u.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=r,u=a.alternate,u!==null&&(u.lanes|=r),sv(a.return,r,t),l.lanes|=r;break}u=u.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Ue(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),sv(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Fn(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,hu(t,r),s=Ws(s),n=n(s),t.flags|=1,Fn(e,t,n,r),t.child;case 14:return n=t.type,s=ta(n,t.pendingProps),s=ta(n.type,s),ZE(e,t,n,s,r);case 15:return F_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:ta(n,s),Wf(e,t),t.tag=1,ls(n)?(e=!0,Mp(t)):e=!1,hu(t,r),O_(t,n,s),iv(t,n,s,r),cv(null,t,n,!0,e,r);case 19:return H_(e,t,r);case 22:return B_(e,t,r)}throw Error(Ue(156,t.tag))};function a7(e,t){return RC(e,t)}function kF(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 6,256 bytes, line 41
41ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zs(e,t,r,n){return new kF(e,t,r,n)}function pw(e){return e=e.prototype,!(!e||!e.isReactComponent)}function NF(e){if(typeof e=="function")return pw(e)?1:0;if(e!=null){if(e=e.$$typeof,e===M4)return 11;if(e===O4)return 14}return 2}function Lo(e,t){var r=e.alternate;return r===null?(r=zs(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Kf(e,t,r,n,s,a){var o=2;if(n=e,typeof e=="function")pw(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Kc:return Ul(r.children,s,a,t);case D4:o=8,s|=8;break;case jy:return e=zs(12,r,t,s|2),e.elementType=jy,e.lanes=a,e;case Iy:return e=zs(13,r,t,s),e.elementType=Iy,e.lanes=a,e;case Ry:return e=zs(19,r,t,s),e.elementType=Ry,e.lanes=a,e;case pC:return Yg(r,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mC:o=10;break e;case fC:o=9;break e;case M4:o=11;break e;case O4:o=14;break e;case io:o=16,n=null;break e}throw Error(Ue(130,e==null?e:typeof e,""))}return t=zs(o,r,t,s),t.elementType=e,t.type=n,t.lanes=a,t}function Ul(e,t,r,n){return e=zs(7,e,n,t),e.lanes=r,e}function Yg(e,t,r,n){return e=zs(22,e,n,t),e.elementType=pC,e.lanes=r,e.stateNode={isHidden:!1},e}function Lx(e,t,r){return e=zs(6,e,null,t),e.lanes=r,e}function Px(e,t,r){return t=zs(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function SF(e,t,r,n,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=xx(0),this.expirationTimes=xx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xx(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function gw(e,t,r,n,s,a,o,l,u){return e=new SF(e,t,r,l,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=zs(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},J4(a),e}function TF(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Gc,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function i7(e){if(!e)return qo;e=e._reactInternals;e:{if(uc(e)!==e||e.tag!==1)throw Error(Ue(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ls(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ue(171))}if(e.tag===1){var r=e.type;if(ls(r))return i_(e,r,t)}return t}function o7(e,t,r,n,s,a,o,l,u){return e=gw(r,n,!0,e,s,a,o,l,u),e.context=i7(null),r=e.current,n=Vn(),s=Oo(r),a=_i(n,s),a.callback=t??null,Do(r,a,s),e.current.lanes=s,zh(e,s,n),cs(e,n),e}function Qg(e,t,r,n){var s=t.current,a=Vn(),o=Oo(s);return r=i7(r),t.context===null?t.context=r:t.pendingContext=r,t=_i(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Do(s,t,o),e!==null&&(ha(e,s,o,a),zf(e,s,o)),o}function Gp(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 u6(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function xw(e,t){u6(e,t),(e=e.alternate)&&u6(e,t)}function CF(){return null}var l7=typeof reportError=="function"?reportError:function(e){console.error(e)};function bw(e){this._internalRoot=e}Xg.prototype.render=bw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ue(409));Qg(e,t,null,null)};Xg.prototype.unmount=bw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yl(function(){Qg(null,e,null,null)}),t[Di]=null}};function Xg(e){this._internalRoot=e}Xg.prototype.unstable_scheduleHydration=function(e){if(e){var t=BC();e={blockedOn:null,target:e,priority:t};for(var r=0;r<co.length&&t!==0&&t<co[r].priority;r++);co.splice(r,0,e),r===0&&$C(e)}};function yw(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function d6(){}function _F(e,t,r,n,s){if(s){if(typeof n=="function"){var a=n;n=function(){var c=Gp(o);a.call(c)}}var o=o7(t,n,e,0,null,!1,!1,"",d6);return e._reactRootContainer=o,e[Di]=o.current,eh(e.nodeType===8?e.parentNode:e),Yl(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var l=n;n=function(){var c=Gp(u);l.call(c)}}var u=gw(e,0,!1,null,null,!1,!1,"",d6);return e._reactRootContainer=u,e[Di]=u.current,eh(e.nodeType===8?e.parentNode:e),Yl(function(){Qg(t,u,r,n)}),u}function Jg(e,t,r,n,s){var a=r._reactRootContainer;if(a){var o=a;if(typeof s=="function"){var l=s;s=function(){var u=Gp(o);l.call(u)}}Qg(t,o,e,s)}else o=_F(r,t,e,s,n);return Gp(o)}PC=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=f0(t.pendingLanes);r!==0&&(F4(t,r|1),cs(t,Ar()),!(Bt&6)&&(Hu=Ar()+500,rl()))}break;case 13:Yl(function(){var n=Mi(e,1);if(n!==null){var s=Vn();ha(n,e,1,s)}}),xw(e,1)}};B4=function(e){if(e.tag===13){var t=Mi(e,134217728);if(t!==null){var r=Vn();ha(t,e,134217728,r)}xw(e,134217728)}};FC=function(e){if(e.tag===13){var t=Oo(e),r=Mi(e,t);if(r!==null){var n=Vn();ha(r,e,t,n)}xw(e,t)}};BC=function(){return Kt};UC=function(e,t){var r=Kt;
41try{return Kt=e,t()}finally{Kt=r}};zy=function(e,t,r){switch(t){case"input":if(Oy(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=Hg(n);if(!s)throw Error(Ue(90));xC(n),Oy(n,s)}}}break;case"textarea":yC(e,r);break;case"select":t=r.value,t!=null&&lu(e,!!r.multiple,t,!1)}};TC=hw;CC=Yl;var AF={usingClientEntryPoint:!1,Events:[qh,Zc,Hg,NC,SC,hw]},Od={findFiberByHostInstance:kl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jF={bundleType:Od.bundleType,version:Od.version,rendererPackageName:Od.rendererPackageName,rendererConfig:Od.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ui.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=jC(e),e===null?null:e.stateNode},findFiberByHostInstance:Od.findFiberByHostInstance||CF,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bm.isDisabled&&Bm.supportsFiber)try{Bg=Bm.inject(jF),Ka=Bm}catch{}}_s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AF;_s.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yw(t))throw Error(Ue(200));return TF(e,t,null,r)};_s.createRoot=function(e,t){if(!yw(e))throw Error(Ue(299));var r=!1,n="",s=l7;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=gw(e,1,!1,null,null,r,!1,n,s),e[Di]=t.current,eh(e.nodeType===8?e.parentNode:e),new bw(t)};_s.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(Ue(188)):(e=Object.keys(e).join(","),Error(Ue(268,e)));return e=jC(t),e=e===null?null:e.stateNode,e};_s.flushSync=function(e){return Yl(e)};_s.hydrate=function(e,t,r){if(!Zg(t))throw Error(Ue(200));return Jg(null,e,t,!0,r)};_s.hydrateRoot=function(e,t,r){if(!yw(e))throw Error(Ue(405));var n=r!=null&&r.hydratedSources||null,s=!1,a="",o=l7;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=o7(t,null,e,1,r??null,s,!1,a,o),e[Di]=t.current,eh(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Xg(t)};_s.render=function(e,t,r){if(!Zg(t))throw Error(Ue(200));return Jg(null,e,t,!1,r)};_s.unmountComponentAtNode=function(e){if(!Zg(e))throw Error(Ue(40));return e._reactRootContainer?(Yl(function(){Jg(null,null,e,!1,function(){e._reactRootContainer=null,e[Di]=null})}),!0):!1};_s.unstable_batchedUpdates=hw;_s.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Zg(r))throw Error(Ue(200));if(e==null||e._reactInternals===void 0)throw Error(Ue(38));return Jg(e,t,r,!1,n)};_s.version="18.3.1-next-f1338f8080-20240426";function c7(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c7)}catch(e){console.error(e)}}c7(),cC.exports=_s;var fn=cC.exports;const IF=Bi(fn);var u7,h6=fn;u7=kp.createRoot=h6.createRoot,kp.hydrateRoot=h6.hydrateRoot;const sye=Object.freeze(Object.defineProperty({__proto__:null,get createRoot(){return u7},default:kp},Symbol.toStringTag,{value:"Module"}));var Vh=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(){}},RF={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},mo,S4,z8,DF=(z8=class{constructor(){pt(this,mo,RF);pt(this,S4,!1)}setTimeoutProvider(e){rt(this,mo,e)}setTimeout(e,t){return le(this,mo).setTimeout(e,t)}clearTimeout(e){le(this,mo).clearTimeout(e)}setInterval(e,t){return le(this,mo).setInterval(e,t)}clearInterval(e){le(this,mo).clearInterval(e)}},mo=new WeakMap,S4=new WeakMap,z8),Tl=new DF;function MF(e){setTimeout(e,0)}var Ql=typeof window>"u"||"Deno"in globalThis;function ns(){}function OF(e,t){return typeof e=="function"?e(t):e}function wv(e){return typeof e=="number"&&e>=0&&e!==1/0}function d7(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Po(e,t){return typeof e=="function"?e(t):e}function Ls(e,t){return typeof e=="function"?e(t):e}function m6(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:a,queryKey:o,stale:l}=e;if(o){if(n){if(t.queryHash!==vw(o,t.options))return!1}else if(!uh(t.queryKey,o))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||a&&!a(t))}function f6(e,t){const{exact:r,status:n,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(ch(t.options.mutationKey)!==ch(a))return!1}else if(!uh(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function vw(e,t){return((t==null?void 0:t.queryKeyHashFn)||ch)(e)}function ch(e){return JSON.stringify(e,(t,r)=>kv(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function uh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>uh(e[r],t[r])):!1}var LF=Object.prototype.hasOwnProperty;function h7(e,t){if(e===t)return e;const r=p6(e)&&p6(t);if(!r&&!(kv(e)&&kv(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,l=r?new Array(o):{};let u=0;for(let c=0;c<o;c++){const d=r?c:a[c],h=e[d],m=t[d];if(h===m){l[d]=h,(r?c<s:LF.call(e,d))&&u++;continue}if(h===null||m===null||typeof h!="object"||typeof m!="object"){l[d]=m;continue}const f=h7(h,m);l[d]=f,f===h&&u++}return s===o&&u===s?e:l}function Ev(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function p6(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function kv(e){if(!g6(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!g6(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function g6(e){return Object.prototype.toString.call(e)==="[object Object]"}function PF(e){return new Promise(t=>{Tl.setTimeout(t,e)})}function Nv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?h7(e,t):t}function FF(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function BF(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ww=Symbol();function m7(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ww?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function f7(e,t){return typeof e=="function"?e(...t):!!e}function UF(e,t,r){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),n||(n=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}var Al,fo,Su,H8,$F=(H8=class extends Vh{constructor(){super();pt(this,Al);pt(this,fo);pt(this,Su);
41rt(this,Su,t=>{if(!Ql&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){le(this,fo)||this.setEventListener(le(this,Su))}onUnsubscribe(){var t;this.hasListeners()||((t=le(this,fo))==null||t.call(this),rt(this,fo,void 0))}setEventListener(t){var r;rt(this,Su,t),(r=le(this,fo))==null||r.call(this),rt(this,fo,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){le(this,Al)!==t&&(rt(this,Al,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof le(this,Al)=="boolean"?le(this,Al):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Al=new WeakMap,fo=new WeakMap,Su=new WeakMap,H8),Ew=new $F;function Sv(){let e,t;const r=new Promise((s,a)=>{e=s,t=a});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var zF=MF;function HF(){let e=[],t=0,r=l=>{l()},n=l=>{l()},s=zF;const a=l=>{t?e.push(l):s(()=>{r(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{n(()=>{l.forEach(u=>{r(u)})})})};return{batch:l=>{let u;t++;try{u=l()}finally{t--,t||o()}return u},batchCalls:l=>(...u)=>{a(()=>{l(...u)})},schedule:a,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}var un=HF(),Tu,po,Cu,q8,qF=(q8=class extends Vh{constructor(){super();pt(this,Tu,!0);pt(this,po);pt(this,Cu);rt(this,Cu,t=>{if(!Ql&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){le(this,po)||this.setEventListener(le(this,Cu))}onUnsubscribe(){var t;this.hasListeners()||((t=le(this,po))==null||t.call(this),rt(this,po,void 0))}setEventListener(t){var r;rt(this,Cu,t),(r=le(this,po))==null||r.call(this),rt(this,po,t(this.setOnline.bind(this)))}setOnline(t){le(this,Tu)!==t&&(rt(this,Tu,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return le(this,Tu)}},Tu=new WeakMap,po=new WeakMap,Cu=new WeakMap,q8),Kp=new qF;function WF(e){return Math.min(1e3*2**e,3e4)}function p7(e){return(e??"online")==="online"?Kp.isOnline():!0}var Tv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function g7(e){let t=!1,r=0,n;const s=Sv(),a=()=>s.status!=="pending",o=g=>{var x;if(!a()){const w=new Tv(g);m(w),(x=e.onCancel)==null||x.call(e,w)}},l=()=>{t=!0},u=()=>{t=!1},c=()=>Ew.isFocused()&&(e.networkMode==="always"||Kp.isOnline())&&e.canRun(),d=()=>p7(e.networkMode)&&e.canRun(),h=g=>{a()||(n==null||n(),s.resolve(g))},m=g=>{a()||(n==null||n(),s.reject(g))},f=()=>new Promise(g=>{var x;n=w=>{(a()||c())&&g(w)},(x=e.onPause)==null||x.call(e)}).then(()=>{var g;n=void 0,a()||(g=e.onContinue)==null||g.call(e)}),p=()=>{if(a())return;let g;const x=r===0?e.initialPromise:void 0;try{g=x??e.fn()}catch(w){g=Promise.reject(w)}Promise.resolve(g).then(h).catch(w=>{var S;if(a())return;const y=e.retry??(Ql?0:3),b=e.retryDelay??WF,k=typeof b=="function"?b(r,w):b,T=y===!0||typeof y=="number"&&r<y||typeof y=="function"&&y(r,w);if(t||!T){m(w);return}r++,(S=e.onFail)==null||S.call(e,r,w),PF(k).then(()=>c()?void 0:f()).then(()=>{t?m(w):p()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:l,continueRetry:u,canStart:d,start:()=>(d()?p():f().then(p),s)}}var jl,W8,x7=(W8=class{constructor(){pt(this,jl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wv(this.gcTime)&&rt(this,jl,Tl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ql?1/0:5*60*1e3))}clearGcTimeout(){le(this,jl)&&(Tl.clearTimeout(le(this,jl)),rt(this,jl,void 0))}},jl=new WeakMap,W8),Il,_u,Os,Rl,rn,Lh,Dl,ra,mi,V8,VF=(V8=class extends x7{constructor(t){super();pt(this,ra);pt(this,Il);pt(this,_u);pt(this,Os);pt(this,Rl);pt(this,rn);pt(this,Lh);pt(this,Dl);rt(this,Dl,!1),rt(this,Lh,t.defaultOptions),this.setOptions(t.options),this.observers=[],rt(this,Rl,t.client),rt(this,Os,le(this,Rl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,rt(this,Il,b6(this.options)),this.state=t.state??le(this,Il),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=le(this,rn))==null?void 0:t.promise}setOptions(t){if(this.options={...le(this,Lh),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=b6(this.options);r.data!==void 0&&(this.setState(x6(r.data,r.dataUpdatedAt)),rt(this,Il,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&le(this,Os).remove(this)}setData(t,r){const n=Nv(this.state.data,t,this.options);return Dt(this,ra,mi).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Dt(this,ra,mi).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=le(this,rn))==null?void 0:n.promise;return(s=le(this,rn))==null||s.cancel(t),r?r.then(ns).catch(ns):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(le(this,Il))}isActive(){return this.observers.some(t=>Ls(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ww||this.state.dataUpdateCount+this.state.errorUpdate
41Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Po(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!d7(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=le(this,rn))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=le(this,rn))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),le(this,Os).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(le(this,rn)&&(le(this,Dl)?le(this,rn).cancel({revert:!0}):le(this,rn).cancelRetry()),this.scheduleGc()),le(this,Os).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Dt(this,ra,mi).call(this,{type:"invalidate"})}async fetch(t,r){var u,c,d,h,m,f,p,g,x,w,y,b;if(this.state.fetchStatus!=="idle"&&((u=le(this,rn))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(le(this,rn))return le(this,rn).continueRetry(),le(this,rn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const k=this.observers.find(T=>T.options.queryFn);k&&this.setOptions(k.options)}const n=new AbortController,s=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(rt(this,Dl,!0),n.signal)})},a=()=>{const k=m7(this.options,r),S=(()=>{const j={client:le(this,Rl),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return rt(this,Dl,!1),this.options.persister?this.options.persister(k,S,this):k(S)},l=(()=>{const k={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:le(this,Rl),state:this.state,fetchFn:a};return s(k),k})();(c=this.options.behavior)==null||c.onFetch(l,this),rt(this,_u,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Dt(this,ra,mi).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta}),rt(this,rn,g7({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:k=>{k instanceof Tv&&k.revert&&this.setState({...le(this,_u),fetchStatus:"idle"}),n.abort()},onFail:(k,T)=>{Dt(this,ra,mi).call(this,{type:"failed",failureCount:k,error:T})},onPause:()=>{Dt(this,ra,mi).call(this,{type:"pause"})},onContinue:()=>{Dt(this,ra,mi).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const k=await le(this,rn).start();if(k===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(k),(f=(m=le(this,Os).config).onSuccess)==null||f.call(m,k,this),(g=(p=le(this,Os).config).onSettled)==null||g.call(p,k,this.state.error,this),k}catch(k){if(k instanceof Tv){if(k.silent)return le(this,rn).promise;if(k.revert){if(this.state.data===void 0)throw k;return this.state.data}}throw Dt(this,ra,mi).call(this,{type:"error",error:k}),(w=(x=le(this,Os).config).onError)==null||w.call(x,k,this),(b=(y=le(this,Os).config).onSettled)==null||b.call(y,this.state.data,k,this),k}finally{this.scheduleGc()}}},Il=new WeakMap,_u=new WeakMap,Os=new WeakMap,Rl=new WeakMap,rn=new WeakMap,Lh=new WeakMap,Dl=new WeakMap,ra=new WeakSet,mi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...b7(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...x6(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return rt(this,_u,t.manual?s:void 0),s;case"error":const a=t.error;
41return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),un.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),le(this,Os).notify({query:this,type:"updated",action:t})})},V8);function b7(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:p7(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function x6(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function b6(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var rs,Mt,Ph,On,Ml,Au,bi,go,Fh,ju,Iu,Ol,Ll,xo,Ru,Wt,g0,Cv,_v,Av,jv,Iv,Rv,Dv,y7,G8,GF=(G8=class extends Vh{constructor(t,r){super();pt(this,Wt);pt(this,rs);pt(this,Mt);pt(this,Ph);pt(this,On);pt(this,Ml);pt(this,Au);pt(this,bi);pt(this,go);pt(this,Fh);pt(this,ju);pt(this,Iu);pt(this,Ol);pt(this,Ll);pt(this,xo);pt(this,Ru,new Set);this.options=r,rt(this,rs,t),rt(this,go,null),rt(this,bi,Sv()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(le(this,Mt).addObserver(this),y6(le(this,Mt),this.options)?Dt(this,Wt,g0).call(this):this.updateResult(),Dt(this,Wt,jv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Mv(le(this,Mt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Mv(le(this,Mt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Dt(this,Wt,Iv).call(this),Dt(this,Wt,Rv).call(this),le(this,Mt).removeObserver(this)}setOptions(t){const r=this.options,n=le(this,Mt);if(this.options=le(this,rs).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ls(this.options.enabled,le(this,Mt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Dt(this,Wt,Dv).call(this),le(this,Mt).setOptions(this.options),r._defaulted&&!Ev(this.options,r)&&le(this,rs).getQueryCache().notify({type:"observerOptionsUpdated",query:le(this,Mt),observer:this});const s=this.hasListeners();s&&v6(le(this,Mt),n,this.options,r)&&Dt(this,Wt,g0).call(this),this.updateResult(),s&&(le(this,Mt)!==n||Ls(this.options.enabled,le(this,Mt))!==Ls(r.enabled,le(this,Mt))||Po(this.options.staleTime,le(this,Mt))!==Po(r.staleTime,le(this,Mt)))&&Dt(this,Wt,Cv).call(this);const a=Dt(this,Wt,_v).call(this);s&&(le(this,Mt)!==n||Ls(this.options.enabled,le(this,Mt))!==Ls(r.enabled,le(this,Mt))||a!==le(this,xo))&&Dt(this,Wt,Av).call(this,a)}getOptimisticResult(t){const r=le(this,rs).getQueryCache().build(le(this,rs),t),n=this.createResult(r,t);return YF(this,n)&&(rt(this,On,n),rt(this,Au,this.options),rt(this,Ml,le(this,Mt).state)),n}getCurrentResult(){return le(this,On)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&le(this,bi).status==="pending"&&le(this,bi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){le(this,Ru).add(t)}getCurrentQuery(){return le(this,Mt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=le(this,rs).defaultQueryOptions(t),n=le(this,rs).getQueryCache().build(le(this,rs),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Dt(this,Wt,g0).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),le(this,On)))}createResult(t,r){var A;const n=le(this,Mt),s=this.options,a=le(this,On),o=le(this,Ml),l=le(this,Au),c=t!==n?t.state:le(this,Ph),{state:d}=t;let h={...d},m=!1,f;if(r._optimisticResults){const R=this.hasListeners(),M=!R&&y6(t,r),B=R&&v6(t,n,r,s);(M||B)&&(h={...h,...b7(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:x}=h;f=h.data;let w=!1;if(r.placeholderData!==void 0&&f===void 0&&x==="pending"){let R;a!=null&&a.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(R=a.data,w=!0):R=typeof r.placeholderData=="function"?r.placeholderData((A=le(this,Iu))==null?void 0:A.state.data,le(this,Iu)):r.placeholderData,R!==void 0&&(x="success",f=Nv(a==null?void 0:a.data,R,r),m=!0)}
41if(r.select&&f!==void 0&&!w)if(a&&f===(o==null?void 0:o.data)&&r.select===le(this,Fh))f=le(this,ju);else try{rt(this,Fh,r.select),f=r.select(f),f=Nv(a==null?void 0:a.data,f,r),rt(this,ju,f),rt(this,go,null)}catch(R){rt(this,go,R)}le(this,go)&&(p=le(this,go),f=le(this,ju),g=Date.now(),x="error");const y=h.fetchStatus==="fetching",b=x==="pending",k=x==="error",T=b&&y,S=f!==void 0,E={status:x,fetchStatus:h.fetchStatus,isPending:b,isSuccess:x==="success",isError:k,isInitialLoading:T,isLoading:T,data:f,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:k&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:k&&S,isStale:kw(t,r),refetch:this.refetch,promise:le(this,bi),isEnabled:Ls(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=W=>{E.status==="error"?W.reject(E.error):E.data!==void 0&&W.resolve(E.data)},M=()=>{const W=rt(this,bi,E.promise=Sv());R(W)},B=le(this,bi);switch(B.status){case"pending":t.queryHash===n.queryHash&&R(B);break;case"fulfilled":(E.status==="error"||E.data!==B.value)&&M();break;case"rejected":(E.status!=="error"||E.error!==B.reason)&&M();break}}return E}updateResult(){const t=le(this,On),r=this.createResult(le(this,Mt),this.options);if(rt(this,Ml,le(this,Mt).state),rt(this,Au,this.options),le(this,Ml).data!==void 0&&rt(this,Iu,le(this,Mt)),Ev(r,t))return;rt(this,On,r);const n=()=>
41{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!le(this,Ru).size)return!0;const o=new Set(a??le(this,Ru));return this.options.throwOnError&&o.add("error"),Object.keys(le(this,On)).some(l=>{const u=l;return le(this,On)[u]!==t[u]&&o.has(u)})};Dt(this,Wt,y7).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Dt(this,Wt,jv).call(this)}},rs=new WeakMap,Mt=new WeakMap,Ph=new WeakMap,On=new WeakMap,Ml=new WeakMap,Au=new WeakMap,bi=new WeakMap,go=new WeakMap,Fh=new WeakMap,ju=new WeakMap,Iu=new WeakMap,Ol=new WeakMap,Ll=new WeakMap,xo=new WeakMap,Ru=new WeakMap,Wt=new WeakSet,g0=function(t){Dt(this,Wt,Dv).call(this);let r=le(this,Mt).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(ns)),r},Cv=function(){Dt(this,Wt,Iv).call(this);const t=Po(this.options.staleTime,le(this,Mt));if(Ql||le(this,On).isStale||!wv(t))return;const n=d7(le(this,On).dataUpdatedAt,t)+1;rt(this,Ol,Tl.setTimeout(()=>{le(this,On).isStale||this.updateResult()},n))},_v=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(le(this,Mt)):this.options.refetchInterval)??!1},Av=function(t){Dt(this,Wt,Rv).call(this),rt(this,xo,t),!(Ql||Ls(this.options.enabled,le(this,Mt))===!1||!wv(le(this,xo))||le(this,xo)===0)&&rt(this,Ll,Tl.setInterval(()=>{(this.options.refetchIntervalInBackground||Ew.isFocused())&&Dt(this,Wt,g0).call(this)},le(this,xo)))},jv=function(){Dt(this,Wt,Cv).call(this),Dt(this,Wt,Av).call(this,Dt(this,Wt,_v).call(this))},Iv=function(){le(this,Ol)&&(Tl.clearTimeout(le(this,Ol)),rt(this,Ol,void 0))},Rv=function(){le(this,Ll)&&(Tl.clearInterval(le(this,Ll)),rt(this,Ll,void 0))},Dv=function(){const t=le(this,rs).getQueryCache().build(le(this,rs),this.options);if(t===le(this,Mt))return;const r=le(this,Mt);rt(this,Mt,t),rt(this,Ph,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},y7=function(t){un.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(le(this,On))}),le(this,rs).getQueryCache().notify({query:le(this,Mt),type:"observerResultsUpdated"})})},G8);function KF(e,t){return Ls(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function y6(e,t){return KF(e,t)||e.state.data!==void 0&&Mv(e,t,t.refetchOnMount)}function Mv(e,t,r){if(Ls(t.enabled,e)!==!1&&Po(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&kw(e,t)}return!1}function v6(e,t,r,n){return(e!==t||Ls(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&kw(e,r)}function kw(e,t){return Ls(t.enabled,e)!==!1&&e.isStaleByTime(Po(t.staleTime,e))}function YF(e,t){return!Ev(e.getCurrentResult(),t)}function w6(e){return{onFetch:(t,r)=>{var d,h,m,f,p;const n=t.options,s=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,a=((f=t.state.data)==null?void 0:f.pages)||[],o=((p=t.state.data)==null?void 0:p.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const c=async()=>{let g=!1;const x=b=>{UF(b,()=>t.signal,()=>g=!0)},w=m7(t.options,t.fetchOptions),y=async(b,k,T)=>{if(g)return Promise.reject();if(k==null&&b.pages.length)return Promise.resolve(b);const j=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:k,direction:T?"backward":"forward",meta:t.options.meta};return x(M),M})(),E=await w(j),{maxPages:A}=t.options,R=T?BF:FF;return{pages:R(b.pages,E,A),pageParams:R(b.pageParams,k,A)}};if(s&&a.length){const b=s==="backward",k=b?v7:Ov,T={pages:a,pageParams:o},S=k(n,T);l=await y(T,S,b)}else{const b=e??a.length;do{const k=u===0?o[0]??n.initialPageParam:Ov(n,l);if(u>0&&k==null)break;l=await y(l,k),u++}while(u<b)}return l};t.options.persister?t.fetchFn=()=>{var g,x;return(x=(g=t.options).persister)==null?void 0:x.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function Ov(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function v7(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function aye(e,t){return t?Ov(e,t)!=null:!1}function iye(e,t){return!t||!e.getPreviousPageParam?!1:v7(e,t)!=null}var Bh,La,Ln,Pl,Pa,ro,K8,QF=(K8=class extends x7{constructor(t){super();pt(this,Pa);pt(this,Bh);pt(this,La);pt(this,Ln);pt(this,Pl);rt(this,Bh,t.client),this.mutationId=t.mutationId,rt(this,Ln,t.mutationCache),rt(this,La,[]),this.state=t.state||XF(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){le(this,La).includes(t)||(le(this,La).push(t),this.clearGcTimeout(),le(this,Ln).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){rt(this,La,le(this,La).filter(r=>r!==t)),this.scheduleGc(),le(this,Ln).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){le(this,La).length||(this.state.status==="pending"?this.scheduleGc():le(this,Ln).remove(this))}continue(){var t;return((t=le(this,Pl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,u,c,d,h,m,f,p,g,x,w,y,b,k,T,S,j,E,A;const r=()=>{Dt(this,Pa,ro).call(this,{type:"continue"})},n={client:le(this,Bh),meta:this.options.meta,mutationKey:this.options.mutationKey};rt(this,Pl,g7({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(R,M)=>{Dt(this,Pa,ro).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{Dt(this,Pa,ro).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>le(this,Ln).canRun(this)}));const s=this.state.status==="pending",a=!le(this,Pl).canStart();try{if(s)r();else{Dt(this,Pa,ro).call(this,{type:"pending",variables:t,isPaused:a}),await((l=(o=le(this,Ln).config).onMutate)==null?void 0:l.call(o,t,this,n));const M=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t,n));M!==this.state.context&&Dt(this,Pa,ro).call(this,{type:"pending",context:M,variables:t,isPaused:a})}const R=await le(this,Pl).start();return await((h=(d=le(this,Ln).config).onSuccess)==null?void 0:h.call(d,R,t,this.state.context,this,n)),await((f=(m=this.options).onSuccess)==null?void 0:f.call(m,R,t,this.state.context,n)),await((g=(p=le(this,Ln).config).onSettled)==null?void 0:g.call(p,R,null,this.state.variables,this.state.context,this,n)),await((w=(x=this.options).onSettled)==null?void 0:w.call(x,R,null,t,this.state.context,n)),Dt(this,Pa,ro).call(this,{type:"success",data:R}),R}catch(R){try{await((b=(y=le(this,Ln).config).onError)==null?void 0:b.call(y,R,t,this.state.context,this,n))}catch(M){Promise.reject(M)}try{await((T=(k=this.options).onError)==null?void 0:T.call(k,R,t,this.state.context,n))}catch(M){Promise.reject(M)}try{await((j=(S=le(this,Ln).config).onSettled)==null?void 0:j.call(S,void 0,R,this.state.variables,this.state.context,this,n))}catch(M){Promise.reject(M)}try{await((A=(E=this.options).onSettled)==null?void 0:A.call(E,void 0,R,t,this.state.context,n))}catch(M){Promise.reject(M)}throw Dt(this,Pa,ro).call(this,{type:"error",error:R}),R}finally{le(this,Ln).runNext(this)}}},Bh=new WeakMap,La=new WeakMap,Ln=new WeakMap,Pl=new WeakMap,Pa=new WeakSet,ro=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};
41case"pending":return{...n,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{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),un.batch(()=>{le(this,La).forEach(n=>{n.onMutationUpdate(t)}),le(this,Ln).notify({mutation:this,type:"updated",action:t})})},K8);function XF(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var yi,na,Uh,Y8,ZF=(Y8=class extends Vh{constructor(t={}){super();pt(this,yi);pt(this,na);pt(this,Uh);this.config=t,rt(this,yi,new Set),rt(this,na,new Map),rt(this,Uh,0)}build(t,r,n){const s=new QF({client:t,mutationCache:this,mutationId:++Em(this,Uh)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){le(this,yi).add(t);const r=Um(t);if(typeof r=="string"){const n=le(this,na).get(r);n?n.push(t):le(this,na).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(le(this,yi).delete(t)){const r=Um(t);if(typeof r=="string"){const n=le(this,na).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&le(this,na).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Um(t);if(typeof r=="string"){const n=le(this,na).get(r),s=n==null?void 0:n.find(a=>a.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Um(t);if(typeof r=="string"){const s=(n=le(this,na).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){un.batch(()=>{le(this,yi).forEach(t=>{this.notify({type:"removed",mutation:t})}),le(this,yi).clear(),le(this,na).clear()})}getAll(){return Array.from(le(this,yi))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>f6(r,n))}findAll(t={}){return this.getAll().filter(r=>f6(t,r))}notify(t){un.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 6,200 bytes, line 41
41r.state.isPaused);return un.batch(()=>Promise.all(t.map(r=>r.continue().catch(ns))))}},yi=new WeakMap,na=new WeakMap,Uh=new WeakMap,Y8);function Um(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Fa,Q8,JF=(Q8=class extends Vh{constructor(t={}){super();pt(this,Fa);this.config=t,rt(this,Fa,new Map)}build(t,r,n){const s=r.queryKey,a=r.queryHash??vw(s,r);let o=this.get(a);return o||(o=new VF({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){le(this,Fa).has(t.queryHash)||(le(this,Fa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=le(this,Fa).get(t.queryHash);r&&(t.destroy(),r===t&&le(this,Fa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){un.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return le(this,Fa).get(t)}getAll(){return[...le(this,Fa).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>m6(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>m6(t,n)):r}notify(t){un.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){un.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){un.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Fa=new WeakMap,Q8),Tr,bo,yo,Du,Mu,vo,Ou,Lu,X8,eB=(X8=class{constructor(e={}){pt(this,Tr);pt(this,bo);pt(this,yo);pt(this,Du);pt(this,Mu);pt(this,vo);pt(this,Ou);pt(this,Lu);rt(this,Tr,e.queryCache||new JF),rt(this,bo,e.mutationCache||new ZF),rt(this,yo,e.defaultOptions||{}),rt(this,Du,new Map),rt(this,Mu,new Map),rt(this,vo,0)}mount(){Em(this,vo)._++,le(this,vo)===1&&(rt(this,Ou,Ew.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Tr).onFocus())})),rt(this,Lu,Kp.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Tr).onOnline())})))}unmount(){var e,t;Em(this,vo)._--,le(this,vo)===0&&((e=le(this,Ou))==null||e.call(this),rt(this,Ou,void 0),(t=le(this,Lu))==null||t.call(this),rt(this,Lu,void 0))}isFetching(e){return le(this,Tr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return le(this,bo).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=le(this,Tr).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=le(this,Tr).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Po(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return le(this,Tr).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=le(this,Tr).get(n.queryHash),a=s==null?void 0:s.state.data,o=OF(t,a);if(o!==void 0)return le(this,Tr).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return un.batch(()=>le(this,Tr).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=le(this,Tr).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=le(this,Tr);un.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=le(this,Tr);return un.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=un.batch(()=>le(this,Tr).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(ns).catch(ns)}invalidateQueries(e,t={}){return un.batch(()=>(le(this,Tr).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=un.batch(()=>le(this,Tr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,r);return r.throwOnError||(a=a.catch(ns)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(ns)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=le(this,Tr).build(this,t);return r.isStaleByTime(Po(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ns).catch(ns)}fetchInfiniteQuery(e){return e.behavior=w6(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ns).catch(ns)}ensureInfiniteQueryData(e){return e.behavior=w6(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Kp.isOnline()?le(this,bo).resumePausedMutations():Promise.resolve()}getQueryCache(){return le(this,Tr)}getMutationCache(){return le(this,bo)}getDefaultOptions(){return le(this,yo)}setDefaultOptions(e){rt(this,yo,e)}setQueryDefaults(e,t){le(this,Du).set(ch(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...le(this,Du).values()],r={};return t.forEach(n=>{uh(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){le(this,Mu).set(ch(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...le(this,Mu).values()],r={};return t.forEach(n=>{uh(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...le(this,yo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=vw(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ww&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...le(this,yo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){le(this,Tr).clear(),le(this,bo).clear()}},Tr=new WeakMap,bo=new WeakMap,yo=new WeakMap,Du=new WeakMap,Mu=new WeakMap,vo=new WeakMap,Ou=new WeakMap,Lu=new WeakMap,X8),w7=v.createContext(void 0),Nw=e=>{const t=v.useContext(w7);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},tB=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}
41),[e]),i.jsx(w7.Provider,{value:e,children:t})),E7=v.createContext(!1),rB=()=>v.useContext(E7);E7.Provider;function nB(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sB=v.createContext(nB()),aB=()=>v.useContext(sB),iB=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?f7(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},oB=e=>{v.useEffect(()=>{e.clearReset()},[e])},lB=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||f7(r,[e.error,n])),cB=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},uB=(e,t)=>e.isLoading&&e.isFetching&&!t,dB=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,E6=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function hB(e,t,r){var m,f,p,g;const n=rB(),s=aB(),a=Nw(),o=a.defaultQueryOptions(e);(f=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||f.call(m,o);const l=a.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",cB(o),iB(o,s,l),oB(s);const u=!a.getQueryCache().get(o.queryHash),[c]=v.useState(()=>new t(a,o)),d=c.getOptimisticResult(o),h=!n&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(x=>{const w=h?c.subscribe(un.batchCalls(x)):ns;return c.updateResult(),w},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),v.useEffect(()=>{c.setOptions(o)},[o,c]),dB(o,d))throw E6(o,c,s);if(lB({result:d,errorResetBoundary:s,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw d.error;if((g=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||g.call(p,o,d),o.experimental_prefetchInRender&&!Ql&&uB(d,n)){const x=u?E6(o,c,s):l==null?void 0:l.promise;x==null||x.catch(ns).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?d:c.trackResult(d)}function ga(e,t){return hB(e,GF)}var mB=typeof Element<"u",fB=typeof Map=="function",pB=typeof Set=="function",gB=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Yf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Yf(e[n],t[n]))return!1;return!0}var a;if(fB&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;for(a=e.entries();!(n=a.next()).done;)if(!Yf(n.value[1],t.get(n.value[0])))return!1;return!0}if(pB&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(gB&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;if(mB&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((s[n]==="_owner"||s[n]==="__v"||s[n]==="__o")&&e.$$typeof)&&!Yf(e[s[n]],t[s[n]]))return!1;return!0}return e!==e&&t!==t}var xB=function(t,r){try{return Yf(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const bB=Bi(xB);var yB=function(e,t,r,n,s,a,o,l){if(!e){var u;if(t===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,s,a,o,l],d=0;u=new Error(t.replace(/%s/g,function(){return c[d++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},vB=yB;const k6=Bi(vB);var wB=function(t,r,n,s){var a=n?n.call(s,t,r):void 0;if(a!==void 0)return!!a;if(t===r)return!0;
41if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var o=Object.keys(t),l=Object.keys(r);if(o.length!==l.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(r),c=0;c<o.length;c++){var d=o[c];if(!u(d))return!1;var h=t[d],m=r[d];if(a=n?n.call(s,h,m,d):void 0,a===!1||a===void 0&&h!==m)return!1}return!0};const EB=Bi(wB);var k7=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(k7||{}),Fx={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},N6=Object.values(k7),e1={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},N7=Object.entries(e1).reduce((e,[t,r])=>(e[r]=t,e),{}),ua="data-rh",fu={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},pu=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},kB=e=>{let t=pu(e,"title");const r=pu(e,fu.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=pu(e,fu.DEFAULT_TITLE);return t||n||void 0},NB=e=>pu(e,fu.ON_CHANGE_CLIENT_STATE)||(()=>{}),Bx=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),SB=(e,t)=>t.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const s=Object.keys(n);for(let a=0;a<s.length;a+=1){const l=s[a].toLowerCase();if(e.indexOf(l)!==-1&&n[l])return r.concat(n)}}return r},[]),TB=e=>console&&typeof console.warn=="function"&&console.warn(e),Ld=(e,t,r)=>{const n={};return r.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&TB(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,a)=>{const o={};a.filter(u=>{let c;const d=Object.keys(u);for(let m=0;m<d.length;m+=1){const f=d[m],p=f.toLowerCase();t.indexOf(p)!==-1&&!(c==="rel"&&u[c].toLowerCase()==="canonical")&&!(p==="rel"&&u[p].toLowerCase()==="stylesheet")&&(c=p),t.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(c=f)}if(!c||!u[c])return!1;const h=u[c].toLowerCase();return n[c]||(n[c]={}),o[c]||(o[c]={}),n[c][h]?!1:(o[c][h]=!0,!0)}).reverse().forEach(u=>s.push(u));const l=Object.keys(o);for(let u=0;u<l.length;u+=1){const c=l[u],d={...n[c],...o[c]};n[c]=d}return s},[]).reverse()},CB=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},_B=e=>({baseTag:SB(["href"],e),bodyAttributes:Bx("bodyAttributes",e),defer:pu(e,fu.DEFER),encode:pu(e,fu.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Bx("htmlAttributes",e),linkTags:Ld("link",["rel","href"],e),metaTags:Ld("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Ld("noscript",["innerHTML"],e),onChangeClientState:NB(e),scriptTags:Ld("script",["src","innerHTML"],e),styleTags:Ld("style",["cssText"],e),title:kB(e),titleAttributes:Bx("titleAttributes",e),prioritizeSeoTags:CB(e,fu.PRIORITIZE_SEO_TAGS)}),S7=e=>Array.isArray(e)?e.join(""):e,AB=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},Ux=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(AB(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},S6=(e,t)=>({...e,[t]:void 0}
41),jB=["noscript","script","style"],Lv=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),T7=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),IB=(e,t,r,n)=>{const s=T7(r),a=S7(t);return s?`<${e} ${ua}="true" ${s}>${Lv(a,n)}</${e}>`:`<${e} ${ua}="true">${Lv(a,n)}</${e}>`},RB=(e,t,r=!0)=>t.reduce((n,s)=>{const a=s,o=Object.keys(a).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,d)=>{const h=typeof a[d]>"u"?d:`${d}="${Lv(a[d],r)}"`;return c?`${c} ${h}`:h},""),l=a.innerHTML||a.cssText||"",u=jB.indexOf(e)===-1;return`${n}<${e} ${ua}="true" ${o}${u?"/>":`>${l}</${e}>`}`},""),C7=(e,t={})=>Object.keys(e).reduce((r,n)=>{const s=e1[n];return r[s||n]=e[n],r},t),DB=(e,t,r)=>{const n={key:t,[ua]:!0},s=C7(r,n);return[or.createElement("title",s,t)]},Qf=(e,t)=>t.map((r,n)=>{const s={key:n,[ua]:!0};return Object.keys(r).forEach(a=>{const l=e1[a]||a;if(l==="innerHTML"||l==="cssText"){const u=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:u}}else s[l]=r[a]}),or.createElement(e,s)}),Ds=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>DB(e,t.title,t.titleAttributes),toString:()=>IB(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>C7(t),toString:()=>T7(t)};default:return{toComponent:()=>Qf(e,t),toString:()=>RB(e,t,r)}}},MB=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const s=Ux(e,Fx.meta),a=Ux(t,Fx.link),o=Ux(r,Fx.script);return{priorityMethods:{toComponent:()=>[...Qf("meta",s.priority),...Qf("link",a.priority),...Qf("script",o.priority)],toString:()=>`${Ds("meta",s.priority,n)} ${Ds("link",a.priority,n)} ${Ds("script",o.priority,n)}`},metaTags:s.default,linkTags:a.default,scriptTags:o.default}},OB=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:a,styleTags:o,title:l="",titleAttributes:u,prioritizeSeoTags:c}=e;let{linkTags:d,metaTags:h,scriptTags:m}=e,f={toComponent:()=>[],toString:()=>""};return c&&({priorityMethods:f,linkTags:d,metaTags:h,scriptTags:m}=MB(e)),{priority:f,base:Ds("base",t,n),bodyAttributes:Ds("bodyAttributes",r,n),htmlAttributes:Ds("htmlAttributes",s,n),link:Ds("link",d,n),meta:Ds("meta",h,n),noscript:Ds("noscript",a,n),script:Ds("script",m,n),style:Ds("style",o,n),title:Ds("title",{title:l,titleAttributes:u},n)}},Pv=OB,$m=[],Sw=!!(typeof window<"u"&&window.document&&window.document.createElement),Fv=class{constructor(e,t){nt(this,"instances",[]);nt(this,"canUseDOM",Sw);nt(this,"context");nt(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?$m:this.instances,add:e=>{(this.canUseDOM?$m:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?$m:this.instances).indexOf(e);(this.canUseDOM?$m:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Pv({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},LB=parseInt(or.version.split(".")[0],10),Bv=LB>=19,PB={},_7=or.createContext(PB),Fl,A7=(Fl=class extends v.Component{constructor(r){super(r);nt(this,"helmetData");Bv?this.helmetData=null:this.helmetData=new Fv(this.props.context||{},Fl.canUseDOM)}render(){return Bv?or.createElement(or.Fragment,null,this.props.children):or.createElement(_7.Provider,{value:this.helmetData.value},this.props.children)}},nt(Fl,"canUseDOM",Sw),Fl),Nc=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${ua}]`),s=[].slice.call(n),a=[];let o;return t&&t.length&&t.forEach(l=>{const u=document.createElement(e);for(const c in l)if(Object.prototype.hasOwnProperty.call(l,c))if(c==="innerHTML")u.innerHTML=l.innerHTML;else if(c==="cssText"){const d=l.cssText;u.appendChild(document.createTextNode(d))}else{const d=c,h=typeof l[d]>"u"?"":l[d];u.setAttribute(c,h)}u.setAttribute(ua,"true"),s.some((c,d)=>(o=d,u.isEqualNode(c)))?s.splice(o,1):a.push(u)}),s.forEach(l=>{var u;return(u=l.parentNode)==null?void 0:u.removeChild(l)}),a.forEach(l=>r.appendChild(l)),{oldTags:s,newTags:a}},Uv=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(ua),s=n?n.split(","):[],a=[...s],o=Object.keys(t);for(const l of o){const u=t[l]||"";r.getAttribute(l)!==u&&r.setAttribute(l,u),s.indexOf(l)===-1&&s.push(l);const c=a.indexOf(l);c!==-1&&a.splice(c,1)}for(let l=a.length-1;l>=0;l-=1)r.removeAttribute(a[l]);s.length===a.length?r.removeAttribute(ua):r.getAttribute(ua)!==o.join(",")&&r.setAttribute(ua,o.join(","))},FB=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=S7(e)),Uv("title",t)},T6=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:a,metaTags:o,noscriptTags:l,onChangeClientState:u,scriptTags:c,styleTags:d,title:h,titleAttributes:m}=e;Uv("body",n),Uv("html",s),FB(h,m);const f={baseTag:Nc("base",r),linkTags:Nc("link",a),metaTags:Nc("meta",o),noscriptTags:Nc("noscript",l),scriptTags:Nc("script",c),styleTags:Nc("style",d)},p={},g={};Object.keys(f).forEach(x=>{const{newTags:w,oldTags:y}=f[x];w.length&&(p[x]=w),y.length&&(g[x]=f[x].oldTags)}),t&&t(),u(e,p,g)},Pd=null,BB=e=>{Pd&&cancelAnimationFrame(Pd),e.defer?Pd=requestAnimationFrame(()=>{T6(e,()=>{Pd=null})}):(T6(e),Pd=null)},UB=BB,C6=class extends v.Component{constructor(){super(...arguments);nt(this,"rendered",!1)}shouldComponentUpdate(t){return!EB(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const s=_B(t.get().map(a=>{const{context:o,...l}=a.props;return l}));A7.canUseDOM?UB(s):Pv&&(n=Pv(s)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Xf=[],_6=e=>{const t={};for(const r of Object.keys(e))t[N7[r]||r]=e[r];return t},dl=e=>{const t={};for(const r of Object.keys(e)){const n=e1[r];t[n||r]=e[r]}return t},A6=(e,t)=>{if(!Sw)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",s=r.getAttribute(n),a=s?s.split(","):[],o=Object.keys(t);for(const l of a)o.includes(l)||r.removeAttribute(l);for(const l of o){const u=t[l];u==null||u===!1?r.removeAttribute(l):u===!0?r.setAttribute(l,""):r.setAttribute(l,String(u))}o.length>0?r.setAttribute(n,o.join(",")):r.removeAttribute(n)},$x=()=>{const e={},t={};for(const r of Xf){const{htmlAttributes:n,bodyAttributes:s}=r.props;n&&Object.assign(e,_6(n)),s&&Object.assign(t,_6(s))}A6("html",e),A6("body",t)},$B=class extends v.Component{componentDidMount(){Xf.push(this),$x()}componentDidUpdate(){$x()}componentWillUnmount(){const e=Xf.indexOf(this);e!==-1&&Xf.splice(e,1),$x()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:r}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return or.createElement("title",dl(t),e)}renderBase(){const{base:e}=this.props;return e?or.createElement("base",dl(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>or.createElement("meta",{key:r,...dl(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>or.createElement("link",{key:r,...dl(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...s}=t,a=dl(s);return n&&(a.dangerouslySetInnerHTML={__html:n}),or.createElement("script",{key:r,...a})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{cssText:n,...s}=t,a=dl(s);return n&&(a.dangerouslySetInnerHTML={__html:n}),or.createElement("style",{key:r,...a})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...s}=t,a=dl(s);return n&&(a.dangerouslySetInnerHTML={__html:n}),or.createElement("noscript",{key:r,...a})})}render(){return or.createElement(or.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},_y,Tw=(_y=class extends v.Component{shouldComponentUpdate(e){return!bB(S6(this.props,"helmetData"),S6(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}
41warnOnInvalidChildren(e,t){return k6(N6.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${N6.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),k6(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return or.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:s,...a}=n.props,o=Object.keys(a).reduce((u,c)=>(u[N7[c]||c]=a[c],u),{});let{type:l}=n;switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(n,s),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,o,s);break;default:t=this.mapObjectTypeChildren(n,t,o,s);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof Fv)){const s=n;n=new Fv(s.context,!0),delete r.helmetData}return Bv?or.createElement($B,{...r}):n?or.createElement(C6,{...r,context:n.value}):or.createElement(_7.Consumer,null,s=>or.createElement(C6,{...r,context:s}))}},nt(_y,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),_y);const j7=new eB({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});class zB extends or.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,r){console.error("[ErrorBoundary]",t,r)}render(){return this.state.hasError?i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",gap:"16px",fontFamily:"system-ui, sans-serif"},children:[i.jsx("h1",{style:{fontSize:"24px",fontWeight:600,margin:0},children:"Something went wrong"}),i.jsx("p",{style:{color:"#666",margin:0},children:"An unexpected error occurred. Please refresh the page."}),i.jsx("button",{onClick:()=>window.location.reload(),style:{padding:"8px 24px",borderRadius:"8px",border:"1px solid #ddd",background:"#000",color:"#fff",cursor:"pointer",fontSize:"14px"},children:"Refresh"})]}):this.props.children}}const HB="modulepreload",qB=function(e){return"/"+e},j6={},Je=function(t,r,n){let s=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(r.map(u=>{if(u=qB(u),u in j6)return;j6[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":HB,c||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),c)return new Promise((m,f)=>{h.addEventListener("load",m),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${u}`)))})}))}function a(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&a(l.reason);return t().catch(a)})};/** 42 * @remix-run/router v1.23.1 43 * 44 * Copyright (c) Remix Software Inc. 45 * 46 * This source code is licensed under the MIT license found in the 47 * LICENSE.md file in the root directory of this source tree. 48 * 49 * @license MIT 50 */function dh(){return dh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dh.apply(this,arguments)}var ko;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ko||(ko={}));const I6="popstate";function WB(e){e===void 0&&(e={});function t(n,s){let{pathname:a,search:o,hash:l}=n.location;return $v("",{pathname:a,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:Yp(s)}return GB(t,r,null,e)}function Ir(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Cw(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function VB(){return Math.random().toString(36).substr(2,8)}function R6(e,t){return{usr:e.state,key:e.key,idx:t}}function $v(e,t,r,n){return r===void 0&&(r=null),dh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ad(t):t,{state:r,key:t&&t.key||n||VB()})}function Yp(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function ad(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function GB(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:a=!1}=n,o=s.history,l=ko.Pop,u=null,c=d();c==null&&(c=0,o.replaceState(dh({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function h(){l=ko.Pop;let x=d(),w=x==null?null:x-c;c=x,u&&u({action:l,location:g.location,delta:w})}function m(x,w){l=ko.Push;let y=$v(g.location,x,w);c=d()+1;let b=R6(y,c),k=g.createHref(y);try{o.pushState(b,"",k)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;s.location.assign(k)}a&&u&&u({action:l,location:g.location,delta:1})}function f(x,w){l=ko.Replace;let y=$v(g.location,x,w);c=d();let b=R6(y,c),k=g.createHref(y);o.replaceState(b,"",k),a&&u&&u({action:l,location:g.location,delta:0})}function p(x){let w=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof x=="str
50ing"?x:Yp(x);return y=y.replace(/ $/,"%20"),Ir(w,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,w)}let g={get action(){return l},get location(){return e(s,o)},listen(x){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(I6,h),u=x,()=>{s.removeEventListener(I6,h),u=null}},createHref(x){return t(s,x)},createURL:p,encodeLocation(x){let w=p(x);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:m,replace:f,go(x){return o.go(x)}};return g}var D6;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(D6||(D6={}));function KB(e,t,r){return r===void 0&&(r="/"),YB(e,t,r)}function YB(e,t,r,n){let s=typeof t=="string"?ad(t):t,a=_w(s.pathname||"/",r);if(a==null)return null;let o=I7(e);QB(o);let l=null;for(let u=0;l==null&&u<o.length;++u){let c=lU(a);l=aU(o[u],c)}return l}function I7(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(a,o,l)=>{let u={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};u.relativePath.startsWith("/")&&(Ir(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let c=Fo([n,u.relativePath]),d=r.concat(u);a.children&&a.children.length>0&&(Ir(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),I7(a.children,t,d,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:nU(c,a.index),routesMeta:d})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))s(a,o);else for(let u of R7(a.path))s(a,o,u)}),t}function R7(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return s?[a,""]:[a];let o=R7(n.join("/")),l=[];return l.push(...o.map(u=>u===""?a:[a,u].join("/"))),s&&l.push(...o),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function QB(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:sU(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const XB=/^:[\w-]+$/,ZB=3,JB=2,eU=1,tU=10,rU=-2,M6=e=>e==="*";function nU(e,t){let r=e.split("/"),n=r.length;return r.some(M6)&&(n+=rU),t&&(n+=JB),r.filter(s=>!M6(s)).reduce((s,a)=>s+(XB.test(a)?ZB:a===""?eU:tU),n)}function sU(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function aU(e,t,r){let{routesMeta:n}=e,s={},a="/",o=[];for(let l=0;l<n.length;++l){let u=n[l],c=l===n.length-1,d=a==="/"?t:t.slice(a.length)||"/",h=iU({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),m=u.route;if(!h)return null;
vendor: 4,333 bytes, lines 50-59
50Object.assign(s,h.params),o.push({params:s,pathname:Fo([a,h.pathname]),pathnameBase:mU(Fo([a,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(a=Fo([a,h.pathnameBase]))}return o}function iU(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=oU(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let a=s[0],o=a.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:n.reduce((c,d,h)=>{let{paramName:m,isOptional:f}=d;if(m==="*"){let g=l[h]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=l[h];return f&&!p?c[m]=void 0:c[m]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:o,pattern:e}}function oU(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Cw(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,u)=>(n.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function lU(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Cw(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function _w(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const cU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uU=e=>cU.test(e);function dU(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?ad(e):e,a;if(r)if(uU(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),Cw(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=O6(r.substring(1),"/"):a=O6(r,t)}else a=t;return{pathname:a,search:fU(n),hash:pU(s)}}function O6(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function zx(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function hU(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Aw(e,t){let r=hU(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function jw(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=ad(e):(s=dh({},e),Ir(!s.pathname||!s.pathname.includes("?"),zx("?","pathname","search",s)),Ir(!s.pathname||!s.pathname.includes("#"),zx("#","pathname","hash",s)),Ir(!s.search||!s.search.includes("#"),zx("#","search","hash",s)));let a=e===""||s.pathname==="",o=a?"/":s.pathname,l;if(o==null)l=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),h-=1;s.pathname=m.join("/")}l=h>=0?t[h]:"/"}let u=dU(s,l),c=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const Fo=e=>e.join("/").replace(/\/\/+/g,"/"),mU=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),fU=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pU=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function gU(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const D7=["post","put","patch","delete"];new Set(D7);const xU=["get",...D7];new Set(xU);/** 51 * React Router v6.30.2 52 * 53 * Copyright (c) Remix Software Inc. 54 * 55 * This source code is licensed under the MIT license found in the 56 * LICENSE.md file in the root directory of this source tree. 57 * 58 * @license MIT 59 */function hh(){return hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
59for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hh.apply(this,arguments)}const Iw=v.createContext(null),bU=v.createContext(null),nl=v.createContext(null),t1=v.createContext(null),Xa=v.createContext({outlet:null,matches:[],isDataRoute:!1}),M7=v.createContext(null);function yU(e,t){let{relative:r}=t===void 0?{}:t;id()||Ir(!1);let{basename:n,navigator:s}=v.useContext(nl),{hash:a,pathname:o,search:l}=L7(e,{relative:r}),u=o;return n!=="/"&&(u=o==="/"?n:Fo([n,o])),s.createHref({pathname:u,search:l,hash:a})}function id(){return v.useContext(t1)!=null}function Xn(){return id()||Ir(!1),v.useContext(t1).location}function O7(e){v.useContext(nl).static||v.useLayoutEffect(e)}function Er(){let{isDataRoute:e}=v.useContext(Xa);return e?MU():vU()}function vU(){id()||Ir(!1);let e=v.useContext(Iw),{basename:t,future:r,navigator:n}=v.useContext(nl),{matches:s}=v.useContext(Xa),{pathname:a}=Xn(),o=JSON.stringify(Aw(s,r.v7_relativeSplatPath)),l=v.useRef(!1);return O7(()=>{l.current=!0}),v.useCallback(function(c,d){if(d===void 0&&(d={}),!l.current)return;if(typeof c=="number"){n.go(c);return}let h=jw(c,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Fo([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,o,a,e])}const wU=v.createContext(null);function EU(e){let t=v.useContext(Xa).outlet;return t&&v.createElement(wU.Provider,{value:e},t)}function Ut(){let{matches:e}=v.useContext(Xa),t=e[e.length-1];return t?t.params:{}}function L7(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=v.useContext(nl),{matches:s}=v.useContext(Xa),{pathname:a}=Xn(),o=JSON.stringify(Aw(s,n.v7_relativeSplatPath));return v.useMemo(()=>jw(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function kU(e,t){return NU(e,t)}function NU(e,t,r,n){id()||Ir(!1);let{navigator:s}=v.useContext(nl),{matches:a}=v.useContext(Xa),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let c=Xn(),d;if(t){var h;let x=typeof t=="string"?ad(t):t;u==="/"||(h=x.pathname)!=null&&h.startsWith(u)||Ir(!1),d=x}else d=c;let m=d.pathname||"/",f=m;if(u!=="/"){let x=u.replace(/^\//,"").split("/");f="/"+m.replace(/^\//,"").split("/").slice(x.length).join("/")}let p=KB(e,{pathname:f}),g=AU(p&&p.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:Fo([u,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:Fo([u,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),a,r,n);return t&&g?v.createElement(t1.Provider,{value:{location:hh({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ko.Pop}},g):g}function SU(){let e=DU(),t=gU(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),r?v.createElement("pre",{style:s},r):null,null)}const TU=v.createElement(SU,null);class CU extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?v.createElement(Xa.Provider,{value:this.props.routeContext},v.createElement(M7.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _U(e){let{routeContext:t,match:r,children:n}=e,s=v.useContext(Iw);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(Xa.Provider,{value:t},n)}function AU(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=(s=r)==null?void 0:s.errors;if(l!=null){let d=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||Ir(!1),o=o.slice(0,Math.min(o.length,d+1))}
59let u=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=d),h.route.id){let{loaderData:m,errors:f}=r,p=h.route.loader&&m[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||p){u=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,h,m)=>{let f,p=!1,g=null,x=null;r&&(f=l&&h.route.id?l[h.route.id]:void 0,g=h.route.errorElement||TU,u&&(c<0&&m===0?(OU("route-fallback"),p=!0,x=null):c===m&&(p=!0,x=h.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,m+1)),y=()=>{let b;return f?b=g:p?b=x:h.route.Component?b=v.createElement(h.route.Component,null):h.route.element?b=h.route.element:b=d,v.createElement(_U,{match:h,routeContext:{outlet:d,matches:w,isDataRoute:r!=null},children:b})};return r&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?v.createElement(CU,{location:r.location,revalidation:r.revalidation,component:g,error:f,children:y(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):y()},null)}var P7=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(P7||{}),F7=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(F7||{});function jU(e){let t=v.useContext(Iw);return t||Ir(!1),t}function IU(e){let t=v.useContext(bU);return t||Ir(!1),t}function RU(e){let t=v.useContext(Xa);return t||Ir(!1),t}function B7(e){let t=RU(),r=t.matches[t.matches.length-1];return r.route.id||Ir(!1),r.route.id}function DU(){var e;let t=v.useContext(M7),r=IU(),n=B7();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function MU(){let{router:e}=jU(P7.UseNavigateStable),t=B7(F7.UseNavigateStable),r=v.useRef(!1);return O7(()=>{r.current=!0}),v.useCallback(function(s,a){a===void 0&&(a={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,hh({fromRouteId:t},a)))},[e,t])}const L6={};function OU(e,t,r){L6[e]||(L6[e]=!0)}function LU(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Bn(e){let{to:t,replace:r,state:n,relative:s}=e;id()||Ir(!1);let{future:a,static:o}=v.useContext(nl),{matches:l}=v.useContext(Xa),{pathname:u}=Xn(),c=Er(),d=jw(t,Aw(l,a.v7_relativeSplatPath),u,s==="path"),h=JSON.stringify(d);return v.useEffect(()=>c(JSON.parse(h),{replace:r,state:n,relative:s}),[c,h,s,r,n]),null}function zv(e){return EU(e.context)}function Te(e){Ir(!1)}function PU(e){let{basename:t="/",children:r=null,location:n,navigationType:s=ko.Pop,navigator:a,static:o=!1,future:l}=e;id()&&Ir(!1);let u=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:u,navigator:a,static:o,future:hh({v7_relativeSplatPath:!1},l)}),[u,l,a,o]);typeof n=="string"&&(n=ad(n));let{pathname:d="/",search:h="",hash:m="",state:f=null,key:p="default"}=n,g=v.useMemo(()=>{let x=_w(d,u);return x==null?null:{location:{pathname:x,search:h,hash:m,state:f,key:p},navigationType:s}},[u,d,h,m,f,p,s]);return g==null?null:v.createElement(nl.Provider,{value:c},v.createElement(t1.Provider,{children:r,value:g}))}function U7(e){let{children:t,location:r}=e;return kU(Hv(t),r)}new Promise(()=>{});function Hv(e,t){t===void 0&&(t=[]);let r=[];return v.Children.forEach(e,(n,s)=>{if(!v.isValidElement(n))return;let a=[...t,s];if(n.type===v.Fragment){r.push.apply(r,Hv(n.props.children,a));return}n.type!==Te&&Ir(!1),!n.props.index||!n.props.children||Ir(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Hv(n.props.children,a)),r.push(o)}),r}/** 60 * React Router DOM v6.30.2 61 * 62 * Copyright (c) Remix Software Inc. 63 * 64 * This source code is licensed under the MIT license found in the 65 * LICENSE.md file in the root directory of this source tree. 66 * 67 * @license MIT 68 */function qv(){return qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
68for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qv.apply(this,arguments)}function FU(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,a;for(a=0;a<n.length;a++)s=n[a],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function BU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function UU(e,t){return e.button===0&&(!t||t==="_self")&&!BU(e)}function Wv(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function $U(e,t){let r=Wv(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(a=>{r.append(s,a)})}),r}const zU=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],HU="6";try{window.__reactRouterVersion=HU}catch{}const qU="startTransition",P6=Fg[qU];function WU(e){let{basename:t,children:r,future:n,window:s}=e,a=v.useRef();a.current==null&&(a.current=WB({window:s,v5Compat:!0}));let o=a.current,[l,u]=v.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},d=v.useCallback(h=>{c&&P6?P6(()=>u(h)):u(h)},[u,c]);return v.useLayoutEffect(()=>o.listen(d),[o,d]),v.useEffect(()=>LU(n),[n]),v.createElement(PU,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:o,future:n})}const VU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",GU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ke=v.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:a,replace:o,state:l,target:u,to:c,preventScrollReset:d,viewTransition:h}=t,m=FU(t,zU),{basename:f}=v.useContext(nl),p,g=!1;if(typeof c=="string"&&GU.test(c)&&(p=c,VU))try{let b=new URL(window.location.href),k=c.startsWith("//")?new URL(b.protocol+c):new URL(c),T=_w(k.pathname,f);k.origin===b.origin&&T!=null?c=T+k.search+k.hash:g=!0}catch{}let x=yU(c,{relative:s}),w=KU(c,{replace:o,state:l,target:u,preventScrollReset:d,relative:s,viewTransition:h});function y(b){n&&n(b),b.defaultPrevented||w(b)}return v.createElement("a",qv({},m,{href:p||x,onClick:g||a?n:y,ref:r,target:u}))});var F6;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(F6||(F6={}));var B6;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(B6||(B6={}));function KU(e,t){let{target:r,replace:n,state:s,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,u=Er(),c=Xn(),d=L7(e,{relative:o});return v.useCallback(h=>{if(UU(h,r)){h.preventDefault();let m=n!==void 0?n:Yp(c)===Yp(d);u(e,{replace:m,state:s,preventScrollReset:a,relative:o,viewTransition:l})}},[c,u,d,n,s,r,e,a,o,l])}function Gh(e){let t=v.useRef(Wv(e)),r=v.useRef(!1),n=Xn(),s=v.useMemo(()=>$U(n.search,r.current?null:t.current),[n.search]),a=Er(),o=v.useCallback((l,u)=>{const c=Wv(typeof l=="function"?l(s):l);r.current=!0,a("?"+c,u)},[a,s]);return[s,o]}const xt=e=>typeof e=="string",Fd=()=>{let e,t;const r=new Promise((n,s)=>{e=n,t=s});return r.resolve=e,r.reject=t,r},U6=e=>e==null?"":""+e,YU=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},QU=/###/g,$6=e=>e&&e.indexOf("###")>-1?e.replace(QU,"."):e,z6=e=>!e||xt(e),R0=(e,t,r)=>{const n=xt(t)?t.split("."):t;let s=0;for(;s<n.length-1;){if(z6(e))return{};const a=$6(n[s]);!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++s}return z6(e)?{}:{obj:e,k:$6(n[s])}},H6=(e,t,r)=>{const{obj:n,k:s}=R0(e,t,Object);if(n!==void 0||t.length===1){n[s]=r;return}let a=t[t.length-1],o=t.slice(0,t.length-1),l=R0(e,o,Object);for(;l.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),l=R0(e,o,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=r},XU=(e,t,r,n)=>{const{obj:s,k:a}=R0(e,t,Object);s[a]=s[a]||[],s[a].push(r)},Qp=(e,t)=>{const{obj:r,k:n}=R0(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},ZU=(e,t,r)=>{const n=Qp(e,r);return n!==void 0?n:Qp(t,r)},$7=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?xt(e[n])||e[n]instanceof String||xt(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):$7(e[n],t[n],r):e[n]=t[n]);return e},Sc=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var JU={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const e$=e=>xt(e)?e.replace(/[&<>
68"'\/]/g,t=>JU[t]):e;class t${constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const r$=[" ",",","?","!",";"],n$=new t$(20),s$=(e,t,r)=>{t=t||"",r=r||"";const n=r$.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const s=n$.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!s.test(e);if(!a){const o=e.indexOf(r);o>0&&!s.test(e.substring(0,o))&&(a=!0)}return a},Vv=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let s=e;for(let a=0;a<n.length;){if(!s||typeof s!="object")return;let o,l="";for(let u=a;u<n.length;++u)if(u!==a&&(l+=r),l+=n[u],o=s[l],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;a+=u-a+1;break}s=o}return s},mh=e=>e==null?void 0:e.replace("_","-"),a$={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var r,n;(n=(r=console==null?void 0:console[e])==null?void 0:r.apply)==null||n.call(r,console,t)}};class Xp{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||a$,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,s){return s&&!this.debug?null:(xt(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new Xp(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Xp(this.logger,t)}}var qa=new Xp;class r1{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const s=this.observers[n].get(r)||0;this.observers[n].set(r,s+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([s,a])=>{for(let o=0;o<a;o++)s(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let o=0;o<a;o++)s.apply(s,[t,...r])})}}class q6 extends r1{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n,s={}){var c,d;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,r],n&&(Array.isArray(n)?l.push(...n):xt(n)&&a?l.push(...n.split(a)):l.push(n)));const u=Qp(this.data,l);return!u&&!r&&!n&&t.indexOf(".")>-1&&(t=l[0],r=l[1],n=l.slice(2).join(".")),u||!o||!xt(n)?u:Vv((d=(c=this.data)==null?void 0:c[t])==null?void 0:d[r],n,a)}addResource(t,r,n,s,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[t,r];n&&(l=l.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(l=t.split("."),s=r,r=l[1]),this.addNamespaces(r),H6(this.data,l,s),a.silent||this.emit("added",t,r,n,s)}addResources(t,r,n,s={silent:!1}){for(const a in n)(xt(n[a])||Array.isArray(n[a]))&&this.addResource(t,r,a,n[a],{silent:!0});s.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,s,a,o={silent:!1,skipCopy:!1}){let l=[t,r];t.indexOf(".")>-1&&(l=t.split("."),s=n,n=r,r=l[1]),this.addNamespaces(r);let u=Qp(this.data,l)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?$7(u,n,a):u={...u,...n}
68,H6(this.data,l,u),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(s=>r[s]&&Object.keys(r[s]).length>0)}toJSON(){return this.data}}var z7={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,s){return e.forEach(a=>{var o;t=((o=this.processors[a])==null?void 0:o.process(t,r,n,s))??t}),t}};const H7=Symbol("i18next/PATH_KEY");function i$(){const e=[],t=Object.create(null);let r;return t.get=(n,s)=>{var a;return(a=r==null?void 0:r.revoke)==null||a.call(r),s===H7?e:(e.push(s),r=Proxy.revocable(n,t),r.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Gv(e,t){const{[H7]:r}=e(i$());return r.join((t==null?void 0:t.keySeparator)??".")}const W6={},Hx=e=>!xt(e)&&typeof e!="boolean"&&typeof e!="number";class Zp extends r1{constructor(t,r={}){super(),YU(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
68i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=qa.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const n={...r};if(t==null)return!1;const s=this.resolve(t,n);if((s==null?void 0:s.res)===void 0)return!1;const a=Hx(s.res);return!(n.returnObjects===!1&&a)}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,l=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!s$(t,n,s);if(o&&!l){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:xt(a)?[a]:a};const c=t.split(n);(n!==s||n===s&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),t=c.join(s)}return{key:t,namespaces:xt(a)?[a]:a}}translate(t,r,n){let s=typeof r=="object"?{...r}:r;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),t==null)return"";typeof t=="function"&&(t=Gv(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]);const a=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:l,namespaces:u}=this.extractFromKey(t[t.length-1],s),c=u[u.length-1];let d=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const h=s.lng||this.language,m=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((h==null?void 0:h.toLowerCase())==="cimode")return m?a?{res:`${c}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:h,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:`${c}${d}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:h,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:l;const f=this.resolve(t,s);let p=f==null?void 0:f.res;const g=(f==null?void 0:f.usedKey)||l,x=(f==null?void 0:f.exactUsedKey)||l,w=["[object Number]","[object Function]","[object RegExp]"],y=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,k=s.count!==void 0&&!xt(s.count),T=Zp.hasDefaultValue(s),S=k?this.pluralResolver.getSuffix(h,s.count,s):"",j=s.ordinal&&k?this.pluralResolver.getSuffix(h,s.count,{ordinal:!1}):"",E=k&&!s.ordinal&&s.count===0,A=E&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${S}`]||s[`defaultValue${j}`]||s.defaultValue;let R=p;b&&!p&&T&&(R=A);const M=Hx(R),B=Object.prototype.toString.apply(R);if(b&&R&&M&&w.indexOf(B)<0&&!(xt(y)&&Array.isArray(R))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const W=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,R,{...s,ns:u}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(f.res=W,f.usedParams=this.getUsedParamsDetails(s),f):W}if(o){const W=Array.isArray(R),H=W?[]:{},L=W?x:g;for(const $ in R)if(Object.prototype.hasOwnProperty.call(R,$)){const ee=`${L}${o}${$}`;T&&!p?H[$]=this.translate(ee,{...s,defaultValue:Hx(A)?A[$]:void 0,joinArrays:!1,ns:u}):H[$]=this.translate(ee,{...s,joinArrays:!1,ns:u}),H[$]===ee&&(H[$]=R[$])}p=H}}else if(b&&xt(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,s,n));else{let W=!1,H=!1;!this.isValidLookup(p)&&T&&(W=!0,p=A),this.isValidLookup(p)||(H=!0,p=l);const $=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:p,ee=T&&A!==p&&this.options.updateMissing;if(H||W||ee){if(this.logger.log(ee?"updateKey":"missingKey",h,c,l,ee?A:p),o){const K=this.resolve(l,{...s,keySeparator:!1});K&&K.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let G=[];const Q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Q&&Q[0])for(let K=0;K<Q.length;K++)G.push(Q[K]);else this.options.saveMissingTo==="all"?G=this.languageUtils.toResolveHierarchy(s.lng||this.language):G.push(s.lng||this.language);const D=(K,V,C)=>{var q;const O=T&&C!==p?C:$;this.options.missingKeyHandler?this.options.missingKeyHandler(K,c,V,O,ee,s):(q=this.backendConnector)!=null&&q.saveMissing&&this.backendConnector.saveMissing(K,c,V,O,ee,s),this.emit
vendor: 28,972 bytes, line 68
68("missingKey",K,c,V,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?G.forEach(K=>{const V=this.pluralResolver.getSuffixes(K,s);E&&s[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(C=>{D([K],l+C,s[`defaultValue${C}`]||A)})}):D(G,l,A))}p=this.extendTranslation(p,t,s,f,n),H&&p===l&&this.options.appendNamespaceToMissingKey&&(p=`${c}${d}${l}`),(H||W)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${d}${l}`:l,W?p:void 0,s))}return a?(f.res=p,f.usedParams=this.getUsedParamsDetails(s),f):p}extendTranslation(t,r,n,s,a){var u,c;if((u=this.i18nFormat)!=null&&u.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const d=xt(t)&&(((c=n==null?void 0:n.interpolation)==null?void 0:c.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(d){const f=t.match(this.interpolator.nestingRegexp);h=f&&f.length}let m=n.replace&&!xt(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,n.lng||this.language||s.usedLng,n),d){const f=t.match(this.interpolator.nestingRegexp),p=f&&f.length;h<p&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,(...f)=>(a==null?void 0:a[0])===f[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${r[0]}`),null):this.translate(...f,r),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,l=xt(o)?[o]:o;return t!=null&&(l!=null&&l.length)&&n.applyPostProcessor!==!1&&(t=z7.handle(l,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,r={}){let n,s,a,o,l;return xt(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(u,r),d=c.key;s=d;let h=c.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const m=r.count!==void 0&&!xt(r.count),f=m&&!r.ordinal&&r.count===0,p=r.context!==void 0&&(xt(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(x=>{var w,y;this.isValidLookup(n)||(l=x,!W6[`${g[0]}-${x}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(l))&&(W6[`${g[0]}-${x}`]=!0,this.logger.warn(`key "${s}" for languages "${g.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{var S;if(this.isValidLookup(n))return;o=b;const k=[d];if((S=this.i18nFormat)!=null&&S.addLookupKeys)this.i18nFormat.addLookupKeys(k,d,b,x,r);else{let j;m&&(j=this.pluralResolver.getSuffix(b,r.count,r));const E=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(r.ordinal&&j.indexOf(A)===0&&k.push(d+j.replace(A,this.options.pluralSeparator)),k.push(d+j),f&&k.push(d+E)),p){const R=`${d}${this.options.contextSeparator||"_"}${r.context}`;k.push(R),m&&(r.ordinal&&j.indexOf(A)===0&&k.push(R+j.replace(A,this.options.pluralSeparator)),k.push(R+j),f&&k.push(R+E))}}let T;for(;T=k.pop();)this.isValidLookup(n)||(a=T,n=this.getResource(b,x,T,r))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:o,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,r,n,s):this.resourceStore.getResource(t,r,n,s)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!xt(t.replace);let s=n?t.replace:t;if(n&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const a of r)delete s[a]}return s}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}class V6{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=qa.create("languageUtils")}getScriptPartFromCode(t){if(t=mh(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=mh(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(xt(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(r=s)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return r=s;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),xt(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),s=[],a=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return xt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):xt(t)&&a(this.formatLanguageCode(t)),n.forEach(o=>{s.indexOf(o)<0&&a(this.formatLanguageCode(o))}),s}}const G6={zero:0,one:1,two:2,few:3,many:4,other:5},K6={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class o${constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=qa.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const n=mh(t==="dev"?"en":t),s=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),K6;if(!t.match(/-|_/))return K6;const u=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(u,r)}return this.pluralRulesCache[a]=o,o}needsPlural(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,r,n={}){return this.getSuffixes(t,n).map(s=>`${r}${s}`)}getSuffixes(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((s,a)=>G6[s]-G6[a]).map(s=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(t,r,n={}){const s=this.getRule(t,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}}const Y6=(e,t,r,n=".",s=!0)=>{let a=ZU(e,t,r);return!a&&s&&xt(r)&&(a=Vv(e,r,n),a===void 0&&(a=Vv(t,r,n))),a},qx=e=>e.replace(/\$/g,"$$$$");class Q6{constructor(t={}){var r;this.logger=qa.create("interpolator"),this.options=t,this.format=((r=t==null?void 0:t.interpolation)==null?void 0:r.format)||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:s,prefix:a,prefixEscaped:o,suffix:l,suffixEscaped:u,formatSeparator:c,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:m,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:x,maxReplaces:w,alwaysFormat:y}=t.interpolation;this.escape=r!==void 0?r:e$,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Sc(a):o||"{{",this.suffix=l?Sc(l):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?Sc(m):f||Sc("$t("),this.nestingSuffix=p?Sc(p):g||Sc(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=w||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,n,s){var f;let a,o,l;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){const y=Y6(r,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,n,{...s,...r,interpolationkey:p}):y}const g=p.split(this.formatSeparator),x=g.shift().trim(),w=g.join(this.formatSeparator).trim();return this.format(Y6(r,u,x,this.options.keySeparator,this.options.ignoreJSONStructure),w,n,{...s,...r,interpolationkey:x})};this.resetRegExp();const d=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=((f=s==null?void 0:s.interpolation)==null?void 0:f.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>qx(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?qx(this.escape(p)):qx(p)}].forEach(p=>{for(l=0;a=p.regex.exec(t);){const g=a[1].trim();if(o=c(g),o===void 0)if(typeof d=="function"){const w=d(t,a,s);o=xt(w)?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,g))o="";else if(h){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),o="";else!xt(o)&&!this.useRawValueToEscape&&(o=U6(o));const x=p.safeValue(o);if(t=t.replace(a[0],x),h?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,r,n={}){let s,a,o;const l=(u,c)=>{const d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;const h=u.split(new RegExp(`${d}[ ]*{`));let m=`{${h[1]}`;u=h[0],m=this.interpolate(m,o);const f=m.match(/'/g),p=m.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!p||p.length%2!==0)&&(m=m.replace(/'/g,'"'));try{o=JSON.parse(m),c&&(o={...c,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,g),`${u}${d}${m}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;s=this.nestingRegexp.exec(t);){let u=[];o={...n},o=o.replace&&!xt(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const c=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(c!==-1&&(u=s[1].slice(c).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),s[1]=s[1].slice(0,c)),a=r(l.call(this,s[1].trim(),o),o),a&&s[0]===t&&!xt(a))return a;xt(a)||(a=U6(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),a=""),u.length&&(a=u.reduce((d,h)=>this.format(d,h,n.lng,{...n,interpolationkey:s[1].trim()}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}const l$=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);t==="currency"&&s.indexOf(":")<0?r.currency||(r.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?r.range||(r.range=s.trim()):s.split(";").forEach(o=>{if(o){const[l,...u]=o.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();r[d]||(r[d]=c),c==="false"&&(r[d]=!1),c==="true"&&(r[d]=!0),isNaN(c)||(r[d]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},X6=e=>{const t={};return(r,n,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const o=n+JSON.stringify(a);let l=t[o];return l||(l=e(mh(n),s),t[o]=l),l(r)}},c$=e=>(t,r,n)=>e(mh(r),n)(t);class u${constructor(t={}){this.logger=qa.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?X6:c$;this.formats={number:n((s,a)=>{const o=new Intl.NumberFormat(s,{...a});return l=>o.format(l)}),currency:n((s,a)=>{const o=new Intl.NumberFormat(s,{...a,style:"currency"});return l=>o.format(l)}),datetime:n((s,a)=>{const o=new Intl.DateTimeFormat(s,{...a});return l=>o.format(l)}),relativetime:n((s,a)=>{const o=new Intl.RelativeTimeFormat(s,{...a});return l=>o.format(l,a.range||"day")}),list:n((s,a)=>{const o=new Intl.ListFormat(s,{...a});return l=>o.format(l)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=X6(r)}format(t,r,n,s={}){const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,u)=>{var h;const{formatName:c,formatOptions:d}=l$(u);if(this.formats[c]){let m=l;try{const f=((h=s==null?void 0:s.formatParams)==null?void 0:h[s.interpolationkey])||{},p=f.locale||f.lng||s.locale||s.lng||n;m=this.formats[c](l,p,{...d,...s,...f})}catch(f){this.logger.warn(f)}return m}else this.logger.warn(`there was no format function for ${c}`);return l},t)}}const d$=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class h$ extends r1{constructor(t,r,n,s={}){var a,o;super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=qa.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(a=this.backend)==null?void 0:a.init)==null||o.call(a,n,s.backend,s)}queueLoad(t,r,n,s){const a={},o={},l={},u={};return t.forEach(c=>{let d=!0;r.forEach(h=>{const m=`${c}|${h}`;!n.reload&&this.store.hasResourceBundle(c,h)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?o[m]===void 0&&(o[m]=!0):(this.state[m]=1,d=!1,o[m]===void 0&&(o[m]=!0),a[m]===void 0&&(a[m]=!0),u[h]===void 0&&(u[h]=!0)))}),d||(l[c]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(u)}}loaded(t,r,n){const s=t.split("|"),a=s[0],o=s[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const l={};this.queue.forEach(u=>{XU(u.loaded,[a],o),d$(u,t),r&&u.errors.push(r),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{l[c]||(l[c]={});const d=u.loaded[c];d.length&&d.forEach(h=>{l[c][h]===void 0&&(l[c][h]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(u=>!u.done)}read(t,r,n,s=0,a=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:s,wait:a,callback:o});return}this.readingCalls++;const l=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(c&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,s+1,a*2,o)},a);return}o(c,d)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const c=u(t,r);c&&typeof c.then=="function"?c.then(d=>l(null,d)).catch(l):l(null,c)}catch(c){l(c)}return}return u(t,r,l)}prepareLoading(t,r,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();xt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),xt(r)&&(r=[r]);const a=this.queueLoad(t,r,n,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t,r=""){const n=t.split("|"),s=n[0],a=n[1];this.read(s,a,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${s} failed`,o),!o&&l&&this.logger.log(`${r}loaded namespace ${a} for language ${s}`,l),this.loaded(t,o,l)})}saveMissing(t,r,n,s,a,o={},l=()=>{}){var u,c,d,h,m;if((c=(u=this.services)==null?void 0:u.utils)!=null&&c.hasLoadedNamespace&&!((h=(d=this.services)==null?void 0:d.utils)!=null&&h.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((m=this.backend)!=null&&m.create){const f={...o,isUpdate:a},p=this.backend.create.bind(this.backend);if(p.length<6)try{let g;p.length===5?g=p(t,r,n,s,f):g=p(t,r,n,s),g&&typeof g.then=="function"?g.then(x=>l(null,x)).catch(l):l(null,g)}catch(g){l(g)}else p(t,r,n,s,l,f)}!t||!t[0]||this.store.addResource(t[0],r,n,s)}}}const Z6=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),xt(e[1])&&(t.defaultValue=e[1]),xt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),J6=e=>{var t,r;return xt(e.ns)&&(e.ns=[e.ns]),xt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),xt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((r=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:r.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},zm=()=>{},m$=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class D0 extends r1{constructor(t={},r){if(super(),this.options=J6(t),this.services={},this.logger=qa,this.modules={external:[]},m$(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(xt(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=Z6();this.options={...n,...this.options,...J6(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?qa.init(s(this.modules.logger),this.options):qa.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=u$;const d=new V6(this.options);this.store=new q6(this.options.resources,this.options);const h=this.services;h.logger=qa,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new o$(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(h.formatter=s(c),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new Q6(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new h$(s(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.languageDetector&&(h.languageDetector=s(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=s(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Zp(this.services,this.options),this.translator.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,r||(r=zm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...d)=>this.store[c](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...d)=>(this.store[c](...d),this)});const l=Fd(),u=()=>{const c=(d,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(h),r(d,h)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),l}loadResources(t,r=zm){var a,o;let n=r;const s=xt(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const l=[],u=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(h=>{h!=="cimode"&&l.indexOf(h)<0&&l.push(h)})};s?u(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>u(d)),(o=(a=this.options.preload)==null?void 0:a.forEach)==null||o.call(a,c=>u(c)),this.services.backendConnector.load(l,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(t,r,n){const s=Fd();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=zm),this.services.backendConnector.reload(t,r,a=>{s.resolve(),n(a)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&z7.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const n=Fd();this.emit("languageChanging",t);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?this.isLanguageChangingTo===t&&(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),r&&r(l,(...c)=>this.t(...c))},o=l=>{var d,h;!t&&!l&&this.services.languageDetector&&(l=[]);const u=xt(l)?l:l&&l[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(xt(l)?[l]:l);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(h=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||h.call(d,c)),this.loadResources(c,m=>{a(m,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),n}getFixedT(t,r,n){const s=(a,o,...l)=>{let u;typeof o!="object"?u=this.options.overloadTranslationOptionHandler([a,o].concat(l)):u={...o},u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||s.keyPrefix);const c=this.options.keySeparator||".";let d;return u.keyPrefix&&Array.isArray(a)?d=a.map(h=>(typeof h=="function"&&(h=Gv(h,{...this.options,...o})),`${u.keyPrefix}${c}${h}`)):(typeof a=="function"&&(a=Gv(a,{...this.options,...o})),d=u.keyPrefix?`${u.keyPrefix}${c}${a}`:a),this.t(d,u)};return xt(t)?s.lng=t:s.lngs=t,s.ns=r,s.keyPrefix=n,s}t(...t){var r;return(r=this.translator)==null?void 0:r.translate(...t)}exists(...t){var r;return(r=this.translator)==null?void 0:r.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
vendor: 2,612 bytes, line 68
68if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(l,u)=>{const c=this.services.backendConnector.state[`${l}|${u}`];return c===-1||c===0||c===2};if(r.precheck){const l=r.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!s||o(a,t)))}loadNamespaces(t,r){const n=Fd();return this.options.ns?(xt(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),r&&r(s)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=Fd();xt(t)&&(t=[t]);const s=this.options.preload||[],a=t.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=s.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){var s,a;if(t||(t=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const l=o.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new V6(Z6());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){const n=new D0(t,r);return n.createInstance=D0.createInstance,n}cloneInstance(t={},r=zm){const n=t.forkResourceStore;n&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},a=new D0(s);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const l=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},u[c]=Object.keys(u[c]).reduce((d,h)=>(d[h]={...u[c][h]},d),u[c]),u),{});
68a.store=new q6(l,s),a.services.resourceStore=a.store}return t.interpolation&&(a.services.interpolator=new Q6(s)),a.translator=new Zp(a.services,s),a.translator.on("*",(l,...u)=>{a.emit(l,...u)}),a.init(s,r),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Rt=D0.createInstance();Rt.createInstance;Rt.dir;Rt.init;Rt.loadResources;Rt.reloadResources;Rt.use;Rt.changeLanguage;Rt.getFixedT;Rt.t;Rt.exists;Rt.setDefaultNamespace;Rt.hasLoadedNamespace;Rt.loadNamespaces;Rt.loadLanguages;const f$=(e,t,r,n)=>{var a,o,l,u;const s=[r,{code:t,...n||{}}];if((o=(a=e==null?void 0:e.services)==null?void 0:a.logger)!=null&&o.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);Xl(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(u=(l=e==null?void 0:e.services)==null?void 0:l.logger)!=null&&u.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},ek={},q7=(e,t,r,n)=>{Xl(r)&&ek[r]||(Xl(r)&&(ek[r]=new Date),f$(e,t,r,n))},W7=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},Kv=(e,t,r)=>{e.loadNamespaces(t,W7(e,r))},tk=(e,t,r,n)=>{if(Xl(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Kv(e,r,n);r.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,W7(e,n))},p$=(e,t,r={})=>!t.languages||!t.languages.length?(q7(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!s(n.isLanguageChangingTo,e))return!1}}),Xl=e=>typeof e=="string",g$=e=>typeof e=="object"&&e!==null,x$=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,b$={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"â¦","…":"â¦","/":"/","/":"/"},y$=e=>b$[e],v$=e=>e.replace(x$,y$);let Yv={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:v$,transDefaultProps:void 0};const w$=(e={})=>{Yv={...Yv,...e}},E$=()=>Yv;let V7;const k$=e=>{V7=e},N$=()=>V7,S$={type:"3rdParty",init(e){w$(e.options.react),k$(e)}},T$=v.createContext();class C${constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var G7={exports:{}},K7={};/** 69 * @license React 70 * use-sync-external-store-shim.production.js 71 * 72 * Copyright (c) Meta Platforms, Inc. and affiliates. 73 * 74 * This source code is licensed under the MIT license found in the 75 * LICENSE file in the root directory of this source tree. 76 */var qu=v;function _$(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var A$=typeof Object.is=="function"?Object.is:_$,j$=qu.useState,I$=qu.useEffect,R$=qu.useLayoutEffect,D$=qu.useDebugValue;function M$(e,t){var r=t(),n=j$({inst:{value:r,getSnapshot:t}}),s=n[0].inst,a=n[1];return R$(function(){s.value=r,s.getSnapshot=t,Wx(s)&&a({inst:s})},[e,r,t]),I$(function(){return Wx(s)&&a({inst:s}),e(function(){Wx(s)&&a({inst:s})})},[e]),D$(r),r}function Wx(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!A$(e,r)}catch{return!0}}function O$(e,t){return t()}var L$=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?O$:M$;K7.useSyncExternalStore=qu.useSyncExternalStore!==void 0?qu.useSyncExternalStore:L$;G7.exports=K7;var Y7=G7.exports;const P$=(e,t)=>Xl(t)?t:g$(t)&&Xl(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,F$={t:P$,ready:!1},B$=()=>()=>{},We=(e,t={})=>{var A,R,M;const{i18n:r}=t,{i18n:n,defaultNS:s}=v.useContext(T$)||{},a=r||n||N$();a&&!a.reportNamespaces&&(a.reportNamespaces=new C$),a||q7(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const o=v.useMemo(()=>{var B;return{...E$(),...(B=a==null?void 0:a.options)==null?void 0:B.react,...t}},[a,t]),{useSuspense:l,keyPrefix:u}=o,c=s||((A=a==null?void 0:a.options)==null?void 0:A.defaultNS),d=Xl(c)?[c]:c||["translation"],h=v.useMemo(()=>d,d);(M=(R=a==null?void 0:a.reportNamespaces)==null?void 0:R.addUsedNamespaces)==null||M.call(R,h);const m=v.useRef(0),f=v.useCallback(B=>{if(!a)return B$;const{bindI18n:W,bindI18nStore:H}=o,L=()=>{m.current+=1,B()};return W&&a.on(W,L),H&&a.store.on(H,L),()=>{W&&W.split(" ").forEach($=>a.off($,L)),H&&H.split(" ").forEach($=>a.store.off($,L))}},[a,o]),p=v.useRef(),g=v.useCallback(()=>
76{if(!a)return F$;const B=!!(a.isInitialized||a.initializedStoreOnce)&&h.every(G=>p$(G,a,o)),W=t.lng||a.language,H=m.current,L=p.current;if(L&&L.ready===B&&L.lng===W&&L.keyPrefix===u&&L.revision===H)return L;const ee={t:a.getFixedT(W,o.nsMode==="fallback"?h:h[0],u),ready:B,lng:W,keyPrefix:u,revision:H};return p.current=ee,ee},[a,h,u,o,t.lng]),[x,w]=v.useState(0),{t:y,ready:b}=Y7.useSyncExternalStore(f,g,g);v.useEffect(()=>{if(a&&!b&&!l){const B=()=>w(W=>W+1);t.lng?tk(a,t.lng,h,B):Kv(a,h,B)}},[a,t.lng,h,b,l,x]);const k=a||{},T=v.useRef(null),S=v.useRef(),j=B=>{const W=Object.getOwnPropertyDescriptors(B);W.__original&&delete W.__original;const H=Object.create(Object.getPrototypeOf(B),W);if(!Object.prototype.hasOwnProperty.call(H,"__original"))try{Object.defineProperty(H,"__original",{value:B,writable:!1,enumerable:!1,configurable:!1})}catch{}return H},E=v.useMemo(()=>{const B=k,W=B==null?void 0:B.language;let H=B;B&&(T.current&&T.current.__original===B?S.current!==W?(H=j(B),T.current=H,S.current=W):H=T.current:(H=j(B),T.current=H,S.current=W));const L=[y,H,b];return L.t=y,L.i18n=H,L.ready=b,L},[y,k,b,k.resolvedLanguage,k.language,k.languages]);if(a&&l&&!b)throw new Promise(B=>{const W=()=>B();t.lng?tk(a,t.lng,h,W):Kv(a,h,W)});return E};let U$={data:""},$$=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||U$}
76,z$=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,H$=/\/\*[^]*?\*\/| +/g,rk=/\n+/g,ho=(e,t)=>{let r="",n="",s="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?r=a+" "+o+";":n+=a[1]=="f"?ho(o,a):a+"{"+ho(o,a[1]=="k"?"":t)+"}":typeof o=="object"?n+=ho(o,t?t.replace(/([^,])+/g,l=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,l):l?l+" "+u:u)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=ho.p?ho.p(a,o):a+":"+o+";")}return r+(t&&s?t+"{"+s+"}":s)+n},ii={},Q7=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+Q7(e[r]);return t}return e},q$=(e,t,r,n,s)=>{let a=Q7(e),o=ii[a]||(ii[a]=(u=>{let c=0,d=11;for(;c<u.length;)d=101*d+u.charCodeAt(c++)>>>0;return"go"+d})(a));if(!ii[o]){let u=a!==e?e:(c=>{let d,h,m=[{}];for(;d=z$.exec(c.replace(H$,""));)d[4]?m.shift():d[3]?(h=d[3].replace(rk," ").trim(),m.unshift(m[0][h]=m[0][h]||{})):m[0][d[1]]=d[2].replace(rk," ").trim();return m[0]})(e);ii[o]=ho(s?{["@keyframes "+o]:u}:u,r?"":"."+o)}let l=r&&ii.g?ii.g:null;return r&&(ii.g=ii[o]),((u,c,d,h)=>{h?c.data=c.data.replace(h,u):c.data.indexOf(u)===-1&&(c.data=d?u+c.data:c.data+u)})(ii[o],t,n,l),o},W$=(e,t,r)=>e.reduce((n,s,a)=>{let o=t[a];if(o&&o.call){let l=o(r),u=l&&l.props&&l.props.className||/^go/.test(l)&&l;o=u?"."+u:l&&typeof l=="object"?l.props?"":ho(l,""):l===!1?"":l}return n+s+(o??"")},"");function n1(e){let t=this||{},r=e.call?e(t.p):e;return q$(r.unshift?r.raw?W$(r,[].slice.call(arguments,1),t.p):r.reduce((n,s)=>Object.assign(n,s&&s.call?s(t.p):s),{}):r,$$(t.target),t.g,t.o,t.k)}let X7,Qv,Xv;n1.bind({g:1});let Li=n1.bind({k:1});function V$(e,t,r,n){ho.p=t,X7=e,Qv=r,Xv=n}function sl(e,t){let r=this||{};return function(){let n=arguments;function s(a,o){let l=Object.assign({},a),u=l.className||s.className;r.p=Object.assign({theme:Qv&&Qv()},l),r.o=/ *go\d+/.test(u),l.className=n1.apply(r,n)+(u?" "+u:"");let c=e;return e[0]&&(c=l.as||e,delete l.as),Xv&&c[0]&&Xv(l),X7(c,l)}return s}}var G$=e=>typeof e=="function",fh=(e,t)=>G$(e)?e(t):e,K$=(()=>{let e=0;return()=>(++e).toString()})(),Z7=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Y$=20,Rw="default",J7=(e,t)=>{let{toastLimit:r}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,r)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return J7(e,{type:e.toasts.find(o=>o.id===n.id)?1:0,toast:n});case 3:let{toastId:s}=t;return{...e,toasts:e.toasts.map(o=>o.id===s||s===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let a=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+a}))}}},Zf=[],eA={toasts:[],pausedAt:void 0,settings:{toastLimit:Y$}},Wa={},tA=(e,t=Rw)=>{Wa[t]=J7(Wa[t]||eA,e),Zf.forEach(([r,n])=>{r===t&&n(Wa[t])})},rA=e=>Object.keys(Wa).forEach(t=>tA(e,t)),Q$=e=>Object.keys(Wa).find(t=>Wa[t].toasts.some(r=>r.id===e)),s1=(e=Rw)=>t=>{tA(t,e)},X$={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},nA=(e={},t=Rw)=>{let[r,n]=v.useState(Wa[t]||eA),s=v.useRef(Wa[t]);v.useEffect(()=>(s.current!==Wa[t]&&n(Wa[t]),Zf.push([t,n]),()=>{let o=Zf.findIndex(([l])=>l===t);o>-1&&Zf.splice(o,1)}),[t]);let a=r.toasts.map(o=>{var l,u,c;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((l=e[o.type])==null?void 0:l.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((u=e[o.type])==null?void 0:u.duration)||(e==null?void 0:e.duration)||X$[o.type],style:{...e.style,...(c=e[o.type])==null?void 0:c.style,...o.style}}});return{...r,toasts:a}},Z$=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||K$()}),Kh=e=>(t,r)=>{let n=Z$(t,e,r);return s1(n.toasterId||Q$(n.id))({type:2,toast:n}),n.id},Pr=(e,t)=>Kh("blank")(e,t);Pr.error=Kh("error");Pr.success=Kh("success");Pr.loading=Kh("loading");Pr.custom=Kh("custom");Pr.dismiss=(e,t)=>{let r={type:3,toastId:e};t?s1(t)(r):rA(r)};Pr.dismissAll=e=>Pr.dismiss(void 0,e);Pr.remove=(e,t)=>
76{let r={type:4,toastId:e};t?s1(t)(r):rA(r)};Pr.removeAll=e=>Pr.remove(void 0,e);Pr.promise=(e,t,r)=>{let n=Pr.loading(t.loading,{...r,...r==null?void 0:r.loading});return typeof e=="function"&&(e=e()),e.then(s=>{let a=t.success?fh(t.success,s):void 0;return a?Pr.success(a,{id:n,...r,...r==null?void 0:r.success}):Pr.dismiss(n),s}).catch(s=>{let a=t.error?fh(t.error,s):void 0;a?Pr.error(a,{id:n,...r,...r==null?void 0:r.error}):Pr.dismiss(n)}),e};var J$=1e3,sA=(e,t="default")=>{let{toasts:r,pausedAt:n}=nA(e,t),s=v.useRef(new Map).current,a=v.useCallback((h,m=J$)=>{if(s.has(h))return;let f=setTimeout(()=>{s.delete(h),o({type:4,toastId:h})},m);s.set(h,f)},[]);v.useEffect(()=>{if(n)return;let h=Date.now(),m=r.map(f=>{if(f.duration===1/0)return;let p=(f.duration||0)+f.pauseDuration-(h-f.createdAt);if(p<0){f.visible&&Pr.dismiss(f.id);return}return setTimeout(()=>Pr.dismiss(f.id,t),p)});return()=>{m.forEach(f=>f&&clearTimeout(f))}},[r,n,t]);let o=v.useCallback(s1(t),[t]),l=v.useCallback(()=>{o({type:5,time:Date.now()})},[o]),u=v.useCallback((h,m)=>{o({type:1,toast:{id:h,height:m}})},[o]),c=v.useCallback(()=>{n&&o({type:6,time:Date.now()})},[n,o]),d=v.useCallback((h,m)=>{let{reverseOrder:f=!1,gutter:p=8,defaultPosition:g}=m||{},x=r.filter(b=>(b.position||g)===(h.position||g)&&b.height),w=x.findIndex(b=>b.id===h.id),y=x.filter((b,k)=>k<w&&b.visible).length;return x.filter(b=>b.visible).slice(...f?[y+1]:[0,y]).reduce((b,k)=>b+(k.height||0)+p,0)},[r]);return v.useEffect(()=>{r.forEach(h=>{if(h.dismissed)a(h.id,h.removeDelay);else{let m=s.get(h.id);m&&(clearTimeout(m),s.delete(h.id))}})},[r,a]),{toasts:r,handlers:{updateHeight:u,startPause:l,endPause:c,calculateOffset:d}}},ez=Li` 77from { 78 transform: scale(0) rotate(45deg); 79 opacity: 0; 80} 81to { 82 transform: scale(1) rotate(45deg); 83 opacity: 1; 84}`,tz=Li` 85from { 86 transform: scale(0); 87 opacity: 0; 88} 89to { 90 transform: scale(1); 91 opacity: 1; 92}`,rz=Li` 93from { 94 transform: scale(0) rotate(90deg); 95 opacity: 0; 96} 97to { 98 transform: scale(1) rotate(90deg); 99 opacity: 1; 100}`,aA=sl("div")` 101 width: 20px; 102 opacity: 0; 103 height: 20px; 104 border-radius: 10px; 105 background: ${e=>e.primary||"#ff4b4b"}; 106 position: relative; 107 transform: rotate(45deg); 108 109 animation: ${ez} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 110 forwards; 111 animation-delay: 100ms; 112 113 &:after, 114 &:before { 115 content: ''; 116 animation: ${tz} 0.15s ease-out forwards; 117 animation-delay: 150ms; 118 position: absolute; 119 border-radius: 3px; 120 opacity: 0; 121 background: ${e=>e.secondary||"#fff"}; 122 bottom: 9px; 123 left: 4px; 124 height: 2px; 125 width: 12px; 126 } 127 128 &:before { 129 animation: ${rz} 0.15s ease-out forwards; 130 animation-delay: 180ms; 131 transform: rotate(90deg); 132 } 133`,nz=Li` 134 from { 135 transform: rotate(0deg); 136 } 137 to { 138 transform: rotate(360deg); 139 } 140`,iA=sl("div")` 141 width: 12px; 142 height: 12px; 143 box-sizing: border-box; 144 border: 2px solid; 145 border-radius: 100%; 146 border-color: ${e=>e.secondary||"#e0e0e0"}; 147 border-right-color: ${e=>e.primary||"#616161"}; 148 animation: ${nz} 1s linear infinite; 149`,sz=Li` 150from { 151 transform: scale(0) rotate(45deg); 152 opacity: 0; 153} 154to { 155 transform: scale(1) rotate(45deg); 156 opacity: 1; 157}`,az=Li` 1580% { 159 height: 0; 160 width: 0; 161 opacity: 0; 162} 16340% { 164 height: 0; 165 width: 6px; 166 opacity: 1; 167} 168100% { 169 opacity: 1; 170 height: 10px; 171}`,oA=sl("div")` 172 width: 20px; 173 opacity: 0; 174 height: 20px; 175 border-radius: 10px; 176 background: ${e=>e.primary||"#61d345"}; 177 position: relative; 178 transform: rotate(45deg); 179 180 animation: ${sz} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 181 forwards; 182 animation-delay: 100ms; 183 &:after { 184 content: ''; 185 box-sizing: border-box; 186 animation: ${az} 0.2s ease-out forwards; 187 opacity: 0; 188 animation-delay: 200ms; 189 position: absolute; 190 border-right: 2px solid; 191 border-bottom: 2px solid; 192 border-color: ${e=>e.secondary||"#fff"}; 193 bottom: 6px; 194 left: 6px; 195 height: 10px; 196 width: 6px; 197 } 198`,iz=sl("div")` 199 position: absolute; 200`,oz=sl("div")` 201 position: relative; 202 display: flex; 203 justify-content: center; 204 align-items: center;
205 min-width: 20px; 206 min-height: 20px; 207`,lz=Li` 208from { 209 transform: scale(0.6); 210 opacity: 0.4; 211} 212to { 213 transform: scale(1); 214 opacity: 1; 215}`,cz=sl("div")` 216 position: relative; 217 transform: scale(0.6); 218 opacity: 0.4; 219 min-width: 20px; 220 animation: ${lz} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) 221 forwards; 222`,lA=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?v.createElement(cz,null,t):t:r==="blank"?null:v.createElement(oz,null,v.createElement(iA,{...n}),r!=="loading"&&v.createElement(iz,null,r==="error"?v.createElement(aA,{...n}):v.createElement(oA,{...n})))},uz=e=>` 2230% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} 224100% {transform: translate3d(0,0,0) scale(1); opacity:1;} 225`,dz=e=>` 2260% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 227100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} 228`,hz="0%{opacity:0;} 100%{opacity:1;}",mz="0%{opacity:1;} 100%{opacity:0;}",fz=sl("div")` 229 display: flex; 230 align-items: center; 231 background: #fff; 232 color: #363636; 233 line-height: 1.3; 234 will-change: transform; 235 box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); 236 max-width: 350px; 237 pointer-events: auto; 238 padding: 8px 10px; 239 border-radius: 8px; 240`,pz=sl("div")` 241 display: flex; 242 justify-content: center; 243 margin: 4px 10px; 244 color: inherit; 245 flex: 1 1 auto; 246 white-space: pre-line; 247`,gz=(e,t)=>{let r=e.includes("top")?1:-1,[n,s]=Z7()?[hz,mz]:[uz(r),dz(r)];return{animation:t?`${Li(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Li(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},cA=v.memo(({toast:e,position:t,style:r,children:n})=>{let s=e.height?gz(e.position||t||"top-center",e.visible):{opacity:0},a=v.createElement(lA,{toast:e}),o=v.createElement(pz,{...e.ariaProps},fh(e.message,e));return v.createElement(fz,{className:e.className,style:{...s,...r,...e.style}},typeof n=="function"?n({icon:a,message:o}):v.createElement(v.Fragment,null,a,o))});V$(v.createElement);var xz=({id:e,className:t,style:r,onHeightUpdate:n,children:s})=>{let a=v.useCallback(o=>{if(o){let l=()=>{let u=o.getBoundingClientRect().height;n(e,u)};l(),new MutationObserver(l).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return v.createElement("div",{ref:a,className:t,style:r},s)},bz=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Z7()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...s}},yz=n1` 248 z-index: 9999; 249 > * { 250 pointer-events: auto; 251 } 252`,Hm=16,uA=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:s,toasterId:a,containerStyle:o,containerClassName:l})=>{let{toasts:u,handlers:c}=sA(r,a);return v.createElement("div",{"data-rht-toaster":a||"",style:{position:"fixed",zIndex:9999,top:Hm,left:Hm,right:Hm,bottom:Hm,pointerEvents:"none",...o},className:l,onMouseEnter:c.startPause,onMouseLeave:c.endPause},u.map(d=>{let h=d.position||t,m=c.calculateOffset(d,{reverseOrder:e,gutter:n,defaultPosition:t}),f=bz(h,m);return v.createElement(xz,{id:d.id,key:d.id,onHeightUpdate:c.updateHeight,className:d.visible?yz:"",style:f},d.type==="custom"?fh(d.message,d):s?s(d):v.createElement(cA,{toast:d,position:h}))}))},Qe=Pr;const dA=Object.freeze(Object.defineProperty({__proto__:null,CheckmarkIcon:oA,ErrorIcon:aA,LoaderIcon:iA,ToastBar:cA,ToastIcon:lA,Toaster:uA,default:Qe,resolveValue:fh,toast:Pr,useToaster:sA,useToasterStore:nA},Symbol.toStringTag,{value:"Module"})),vz={},nk=e=>{let t;const r=new Set,n=(d,h)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const f=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(p=>p(t,f))}},s=()=>t,u={setState:n,getState:s,getInitialState:()=>c,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{(vz?"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."),r.clear()}},c=t=e(n,s,u);return u},wz=e=>e?nk(e):nk;var hA={exports:{}},mA={};/** 253 * @license React 254 * use-sync-external-store-shim/with-selector.production.js 255 * 256 * Copyright (c) Meta Platforms, Inc. and affiliates. 257 * 258 * This source code is licensed under the MIT license found in the 259 * LICENSE file in the root directory of this source tree. 260 */var a1=v,Ez=Y7;function kz(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nz=typeof Object.is=="function"?Object.is:kz,Sz=Ez.useSyncExternalStore,Tz=a1.useRef,Cz=a1.useEffect,_z=a1.useMemo,Az=a1.useDebugValue;mA.useSyncExternalStoreWithSelector=function(e,t,r,n,s){var a=Tz(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=_z(function(){function u(f){if(!c){if(c=!0,d=f,f=n(f),s!==void 0&&o.hasValue){var p=o.value;if(s(p,f))return h=p}return h=f}if(p=h,Nz(d,f))return p;var g=n(f);return s!==void 0&&s(p,g)?(d=f,p):(d=f,h=g)}var c=!1,d,h,m=r===void 0?null:r;return[function(){return u(t())},m===null?void 0:function(){return u(m())}]},[t,r,n,s]);var l=Sz(e,a[0],a[1]);return Cz(function(){o.hasValue=!0,o.value=l},[l]),Az(l),l};hA.exports=mA;var jz=hA.exports;const Iz=Bi(jz),fA={},{useDebugValue:Rz}=or,{useSyncExternalStoreWithSelector:Dz}=Iz;let sk=!1;const Mz=e=>e;function Oz(e,t=Mz,r){(fA?"production":void 0)!=="production"&&r&&!sk&&(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"),sk=!0);const n=Dz(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return Rz(n),n}const ak=e=>{(fA?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { use
260Store } from 'zustand'`.");const t=typeof e=="function"?wz(e):e,r=(n,s)=>Oz(t,n,s);return Object.assign(r,t),r},ya=e=>e?ak(e):ak,Lz={};function pA(e,t){let r;try{r=e()}catch{return}return{getItem:s=>{var a;const o=u=>u===null?null:JSON.parse(u,void 0),l=(a=r.getItem(s))!=null?a:null;return l instanceof Promise?l.then(o):o(l)},setItem:(s,a)=>r.setItem(s,JSON.stringify(a,void 0)),removeItem:s=>r.removeItem(s)}}const ph=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return ph(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return ph(n)(r)}}}},Pz=(e,t)=>(r,n,s)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:x=>x,version:0,merge:(x,w)=>({...w,...x}),...t},o=!1;const l=new Set,u=new Set;let c;try{c=a.getStorage()}catch{}if(!c)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...x)},n,s);const d=ph(a.serialize),h=()=>{const x=a.partialize({...n()});let w;const y=d({state:x,version:a.version}).then(b=>c.setItem(a.name,b)).catch(b=>{w=b});if(w)throw w;return y},m=s.setState;s.setState=(x,w)=>{m(x,w),h()};const f=e((...x)=>{r(...x),h()},n,s);let p;const g=()=>{var x;if(!c)return;o=!1,l.forEach(y=>y(n()));const w=((x=a.onRehydrateStorage)==null?void 0:x.call(a,n()))||void 0;return ph(c.getItem.bind(c))(a.name).then(y=>{if(y)return a.deserialize(y)}).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==a.version){if(a.migrate)return a.migrate(y.state,y.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return y.state}).then(y=>{var b;return p=a.merge(y,(b=n())!=null?b:f),r(p,!0),h()}).then(()=>{w==null||w(p,void 0),o=!0,u.forEach(y=>y(p))}).catch(y=>{w==null||w(void 0,y)})};return s.persist={setOptions:x=>{a={...a,...x},x.getStorage&&(c=x.getStorage())},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:x=>(l.add(x),()=>{l.delete(x)}),onFinishHydration:x=>(u.add(x),()=>{u.delete(x)})},g(),p||f},Fz=(e,t)=>(r,n,s)=>{let a={storage:pA(()=>localStorage),partialize:g=>g,version:0,merge:(g,x)=>({...x,...g}),...t},o=!1;const l=new Set,u=new Set;let c=a.storage;if(!c)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...g)},n,s);const d=()=>{const g=a.partialize({...n()});return c.setItem(a.name,{state:g,version:a.version})},h=s.setState;s.setState=(g,x)=>{h(g,x),d()};const m=e((...g)=>{r(...g),d()},n,s);s.getInitialState=()=>m;let f;const p=()=>{var g,x;if(!c)return;o=!1,l.forEach(y=>{var b;return y((b=n())!=null?b:m)});const w=((x=a.onRehydrateStorage)==null?void 0:x.call(a,(g=n())!=null?g:m))||void 0;return ph(c.getItem.bind(c))(a.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==a.version){if(a.migrate)return[!0,a.migrate(y.state,y.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var b;const[k,T]=y;if(f=a.merge(T,(b=n())!=null?b:m),r(f,!0),k)return d()}).then(()=>{w==null||w(f,void 0),f=n(),o=!0,u.forEach(y=>y(f))}).catch(y=>{w==null||w(void 0,y)})};return s.persist={setOptions:g=>{a={...a,...g},g.storage&&(c=g.storage)},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:g=>(l.add(g),()=>{l.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},a.skipHydration||p(),f||m},Bz=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Lz?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Pz(e,t)):Fz(e,t),Dw=Bz;function gA(e,t){return function(){return e.apply(t,arguments)}}const{toString:Uz}=Object.prototype,{getPrototypeOf:Mw}=Object,{iterator:i1,toStringTag:xA}=Symbol,o1=(e=>t=>{const r=Uz.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),va=e=>(e=e.toLowerCase(),t=>o1(t)===e),l1=e=>t=>typeof t===e,{isArray:od}=Array,Wu=l1("undefined");function Yh(e){return e!==null&&!Wu(e)&&e.constructor!==null&&!Wu(e.constructor)&&us(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bA=va("ArrayBuffer");function $z(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bA(e.buffer),t}const zz=l1("string"),us=l1("function"),yA=l1("number"),Qh=e=>e!==null&&typeof e=="object",Hz=e=>e===!0||e===!1,Jf=e=>{if(o1(e)!=="object")return!1;const t=Mw(e);
vendor: 4,734 bytes, line 260
260return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(xA in e)&&!(i1 in e)},qz=e=>{if(!Qh(e)||Yh(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Wz=va("Date"),Vz=va("File"),Gz=va("Blob"),Kz=va("FileList"),Yz=e=>Qh(e)&&us(e.pipe),Qz=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||us(e.append)&&((t=o1(e))==="formdata"||t==="object"&&us(e.toString)&&e.toString()==="[object FormData]"))},Xz=va("URLSearchParams"),[Zz,Jz,eH,tH]=["ReadableStream","Request","Response","Headers"].map(va),rH=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xh(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),od(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(Yh(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let l;for(n=0;n<o;n++)l=a[n],t.call(null,e[l],l,e)}}function vA(e,t){if(Yh(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const Cl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,wA=e=>!Wu(e)&&e!==Cl;function Zv(){const{caseless:e,skipUndefined:t}=wA(this)&&this||{},r={},n=(s,a)=>{const o=e&&vA(r,a)||a;Jf(r[o])&&Jf(s)?r[o]=Zv(r[o],s):Jf(s)?r[o]=Zv({},s):od(s)?r[o]=s.slice():(!t||!Wu(s))&&(r[o]=s)};for(let s=0,a=arguments.length;s<a;s++)arguments[s]&&Xh(arguments[s],n);return r}const nH=(e,t,r,{allOwnKeys:n}={})=>(Xh(t,(s,a)=>{r&&us(s)?e[a]=gA(s,r):e[a]=s},{allOwnKeys:n}),e),sH=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),aH=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},iH=(e,t,r,n)=>{let s,a,o;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)o=s[a],(!n||n(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=r!==!1&&Mw(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},oH=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},lH=e=>{if(!e)return null;if(od(e))return e;let t=e.length;if(!yA(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},cH=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Mw(Uint8Array)),uH=(e,t)=>{const n=(e&&e[i1]).call(e);let s;for(;(s=n.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},dH=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},hH=va("HTMLFormElement"),mH=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),ik=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),fH=va("RegExp"),EA=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Xh(r,(s,a)=>{let o;(o=t(s,a,e))!==!1&&(n[a]=o||s)}),Object.defineProperties(e,n)},pH=e=>{EA(e,(t,r)=>{if(us(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(us(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},gH=(e,t)=>{const r={},n=s=>{s.forEach(a=>{r[a]=!0})};return od(e)?n(e):n(String(e).split(t)),r},xH=()=>{},bH=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yH(e){return!!(e&&us(e.append)&&e[xA]==="FormData"&&e[i1])}const vH=e=>{const t=new Array(10),r=(n,s)=>{if(Qh(n)){if(t.indexOf(n)>=0)return;if(Yh(n))return n;if(!("toJSON"in n)){t[s]=n;const a=od(n)?[]:{};return Xh(n,(o,l)=>{const u=r(o,s+1);!Wu(u)&&(a[l]=u)}),t[s]=void 0,a}}return n};return r(e,0)},wH=va("AsyncFunction"),EH=e=>e&&(Qh(e)||us(e))&&us(e.then)&&us(e.catch),kA=((e,t)=>e?setImmediate:t?((r,n)=>(Cl.addEventListener("message",({source:s,data:a})=>{s===Cl&&a===r&&n.length&&n.shift()()},!1),s=>{n.push(s),Cl.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",us(Cl.postMessage)),kH=typeof queueMicrotask<"u"?queueMicrotask.bind(Cl):typeof process<"u"&&process.nextTick||kA,NH=e=>e!=null&&us(e[i1]),ge={isArray:od,isArrayBuffer:bA,isBuffer:Yh,isFormData:Qz,isArrayBufferView:$z,isString:zz,isNumber:yA,isBoolean:Hz,isObject:Qh,isPlainObject:Jf,isEmptyObject:qz,isReadableStream:Zz,isRequest:Jz,isResponse:eH,isHeaders:tH,isUndefined:Wu,isDate:Wz,isFile:Vz,isBlob:Gz,isRegExp:fH,isFunction:us,isStream:Yz,isURLSearchParams:Xz,isTypedArray:cH,isFileList:Kz,forEach:Xh,merge:Zv,extend:nH,trim:rH,stripBOM:sH,inherits:aH,toFlatObject:iH,kindOf:o1,kindOfTest:va,endsWith:oH,toArray:lH,forEachEntry:uH,matchAll:dH,isHTMLForm:hH,hasOwnProperty:ik,hasOwnProp:ik,reduceDescriptors:EA,freezeMethods:pH,toObjectSet:gH,toCamelCase:mH,no
260op:xH,toFiniteNumber:bH,findKey:vA,global:Cl,isContextDefined:wA,isSpecCompliantForm:yH,toJSONObject:vH,isAsyncFn:wH,isThenable:EH,setImmediate:kA,asap:kH,isIterable:NH};function vt(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}ge.inherits(vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ge.toJSONObject(this.config),code:this.code,status:this.status}}});const NA=vt.prototype,SA={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{SA[e]={value:e}});Object.defineProperties(vt,SA);Object.defineProperty(NA,"isAxiosError",{value:!0});vt.from=(e,t,r,n,s,a)=>{const o=Object.create(NA);ge.toFlatObject(e,o,function(d){return d!==Error.prototype},c=>c!=="isAxiosError");const l=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return vt.call(o,l,u,r,n,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};const SH=null;function Jv(e){return ge.isPlainObject(e)||ge.isArray(e)}function TA(e){return ge.endsWith(e,"[]")?e.slice(0,-2):e}function ok(e,t,r){return e?e.concat(t).map(function(s,a){return s=TA(s),!r&&a?"["+s+"]":s}).join(r?".":""):t}function TH(e){return ge.isArray(e)&&!e.some(Jv)}const CH=ge.toFlatObject(ge,{},null,function(t){return/^is[A-Z]/.test(t)});function c1(e,t,r){if(!ge.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=ge.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,x){return!ge.isUndefined(x[g])});const n=r.metaTokens,s=r.visitor||d,a=r.dots,o=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&ge.isSpecCompliantForm(t);if(!ge.isFunction(s))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(ge.isDate(p))return p.toISOString();if(ge.isBoolean(p))return p.toString();if(!u&&ge.isBlob(p))throw new vt("Blob is not supported. Use a Buffer instead.");return ge.isArrayBuffer(p)||ge.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,g,x){let w=p;if(p&&!x&&typeof p=="object"){if(ge.endsWith(g,"{}"))g=n?g:g.slice(0,-2),p=JSON.stringify(p);else if(ge.isArray(p)&&TH(p)||(ge.isFileList(p)||ge.endsWith(g,"[]"))&&(w=ge.toArray(p)))return g=TA(g),w.forEach(function(b,k){!(ge.isUndefined(b)||b===null)&&t.append(o===!0?ok([g],k,a):o===null?g:g+"[]",c(b))}),!1}return Jv(p)?!0:(t.append(ok(x,g,a),c(p)),!1)}const h=[],m=Object.assign(CH,{defaultVisitor:d,convertValue:c,isVisitable:Jv});function f(p,g){if(!ge.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(p),ge.forEach(p,function(w,y){(!(ge.isUndefined(w)||w===null)&&s.call(t,w,ge.isString(y)?y.trim():y,g,m))===!0&&f(w,g?g.concat(y):[y])}),h.pop()}}if(!ge.isObject(e))throw new TypeError("data must be an object");return f(e),t}function lk(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ow(e,t){this._pairs=[],e&&c1(e,this,t)}const CA=Ow.prototype;CA.append=function(t,r){this._pairs.push([t,r])};CA.toString=function(t){const r=t?function(n){return t.call(this,n,lk)}:lk;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function _H(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _A(e,t,r){if(!t)return e;const n=r&&r.encode||_H;ge.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let a;if(s?a=s(t,r):a=ge.isURLSearchParams(t)?t.toString():new Ow(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class ck{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ge.forEach(this.handlers,function(n){n!==null&&t(n)})}}const AA={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},AH=typeof URLSearchParams<"u"?URLSearchParams:Ow,jH=typeof FormData<"u"?FormData:null,IH=typeof Blob<"u"?Blob:null,RH={isBrowser:!0,classes:{
vendor: 7,432 bytes, lines 260-262
260URLSearchParams:AH,FormData:jH,Blob:IH},protocols:["http","https","file","blob","url","data"]},Lw=typeof window<"u"&&typeof document<"u",e2=typeof navigator=="object"&&navigator||void 0,DH=Lw&&(!e2||["ReactNative","NativeScript","NS"].indexOf(e2.product)<0),MH=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",OH=Lw&&window.location.href||"http://localhost",LH=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Lw,hasStandardBrowserEnv:DH,hasStandardBrowserWebWorkerEnv:MH,navigator:e2,origin:OH},Symbol.toStringTag,{value:"Module"})),En={...LH,...RH};function PH(e,t){return c1(e,new En.classes.URLSearchParams,{visitor:function(r,n,s,a){return En.isNode&&ge.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function FH(e){return ge.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function BH(e){const t={},r=Object.keys(e);let n;const s=r.length;let a;for(n=0;n<s;n++)a=r[n],t[a]=e[a];return t}function jA(e){function t(r,n,s,a){let o=r[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),u=a>=r.length;return o=!o&&ge.isArray(s)?s.length:o,u?(ge.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!l):((!s[o]||!ge.isObject(s[o]))&&(s[o]=[]),t(r,n,s[o],a)&&ge.isArray(s[o])&&(s[o]=BH(s[o])),!l)}if(ge.isFormData(e)&&ge.isFunction(e.entries)){const r={};return ge.forEachEntry(e,(n,s)=>{t(FH(n),s,r,0)}),r}return null}function UH(e,t,r){if(ge.isString(e))try{return(t||JSON.parse)(e),ge.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Zh={transitional:AA,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,a=ge.isObject(t);if(a&&ge.isHTMLForm(t)&&(t=new FormData(t)),ge.isFormData(t))return s?JSON.stringify(jA(t)):t;if(ge.isArrayBuffer(t)||ge.isBuffer(t)||ge.isStream(t)||ge.isFile(t)||ge.isBlob(t)||ge.isReadableStream(t))return t;if(ge.isArrayBufferView(t))return t.buffer;if(ge.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return PH(t,this.formSerializer).toString();if((l=ge.isFileList(t))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return c1(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return a||s?(r.setContentType("application/json",!1),UH(t)):t}],transformResponse:[function(t){const r=this.transitional||Zh.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(ge.isResponse(t)||ge.isReadableStream(t))return t;if(t&&ge.isString(t)&&(n&&!this.responseType||s)){const o=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(l){if(o)throw l.name==="SyntaxError"?vt.from(l,vt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:En.classes.FormData,Blob:En.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ge.forEach(["delete","get","head","post","put","patch"],e=>{Zh.headers[e]={}});const $H=ge.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zH=e=>{const t={};let r,n,s;return e&&e.split(` 261`).forEach(function(o){s=o.indexOf(":"),r=o.substring(0,s).trim().toLowerCase(),n=o.substring(s+1).trim(),!(!r||t[r]&&$H[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},uk=Symbol("internals");function Bd(e){return e&&String(e).trim().toLowerCase()}function ep(e){return e===!1||e==null?e:ge.isArray(e)?e.map(ep):String(e)}function HH(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const qH=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vx(e,t,r,n,s){if(ge.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!ge.isString(t)){if(ge.isString(n))return t.indexOf(n)!==-1;if(ge.isRegExp(n))return n.test(t)}}function WH(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function VH(e,t){const r=ge.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(s,a,o){return this[n].call(this,t,s,a,o)},configurable:!0})})}let ds=class{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function a(l,u,c){const d=Bd(u);if(!d)throw new Error("header name must be a non-empty string");const h=ge.findKey(s,d);(!h||s[h]===void 0||c===!0||c===void 0&&s[h]!==!1)&&(s[h||u]=ep(l))}const o=(l,u)=>ge.forEach(l,(c,d)=>a(c,d,u));if(ge.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(ge.isString(t)&&(t=t.trim())&&!qH(t))o(zH(t),r);else if(ge.isObject(t)&&ge.isIterable(t)){let l={},u,c;for(const d of t){if(!ge.isArray(d))throw TypeError("Object iterator must return a key-value pair");l[c=d[0]]=(u=l[c])?ge.isArray(u)?[...u,d[1]]:[u,d[1]]:d[1]}o(l,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=Bd(t),t){const n=ge.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return HH(s);if(ge.isFunction(r))return r.call(this,s,n);if(ge.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Bd(t),t){const n=ge.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Vx(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function a(o){if(o=Bd(o),o){const l=ge.findKey(n,o);l&&(!r||Vx(n,n[l],l,r))&&(delete n[l],s=!0)}}return ge.isArray(t)?t.forEach(a):a(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const a=r[n];(!t||Vx(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const r=this,n={};return ge.forEach(this,(s,a)=>{const o=ge.findKey(n,a);if(o){r[o]=ep(s),delete r[a];return}const l=t?WH(a):String(a).trim();l!==a&&delete r[a],r[l]=ep(s),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ge.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&ge.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` 262`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[uk]=this[uk]={accessors:{}}).accessors,s=this.prototype;function a(o){const l=Bd(o);n[l]||(VH(s,o),n[l]=!0)}return ge.isArray(t)?t.forEach(a):a(t),this}};ds.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ge.reduceDescriptors(ds.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});ge.freezeMethods(ds);function Gx(e,t){const r=this||Zh,n=t||r,s=ds.from(n.headers);let a=n.data;return ge.forEach(e,function(l){a=l.call(r,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function IA(e){return!!(e&&e.__CANCEL__)}function ld(e,t,r){vt.call(this,e??"canceled",vt.ERR_CANCELED,t,r),this.name="CanceledError"}
vendor: 5,286 bytes, line 262
262ge.inherits(ld,vt,{__CANCEL__:!0});function RA(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new vt("Request failed with status code "+r.status,[vt.ERR_BAD_REQUEST,vt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function GH(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function KH(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),d=n[a];o||(o=c),r[s]=u,n[s]=c;let h=a,m=0;for(;h!==s;)m+=r[h++],h=h%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),c-o<t)return;const f=d&&c-d;return f?Math.round(m*1e3/f):void 0}}function YH(e,t){let r=0,n=1e3/t,s,a;const o=(c,d=Date.now())=>{r=d,s=null,a&&(clearTimeout(a),a=null),e(...c)};return[(...c)=>{const d=Date.now(),h=d-r;h>=n?o(c,d):(s=c,a||(a=setTimeout(()=>{a=null,o(s)},n-h)))},()=>s&&o(s)]}const Jp=(e,t,r=3)=>{let n=0;const s=KH(50,250);return YH(a=>{const o=a.loaded,l=a.lengthComputable?a.total:void 0,u=o-n,c=s(u),d=o<=l;n=o;const h={loaded:o,total:l,progress:l?o/l:void 0,bytes:u,rate:c||void 0,estimated:c&&l&&d?(l-o)/c:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(h)},r)},dk=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},hk=e=>(...t)=>ge.asap(()=>e(...t)),QH=En.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,En.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(En.origin),En.navigator&&/(msie|trident)/i.test(En.navigator.userAgent)):()=>!0,XH=En.hasStandardBrowserEnv?{write(e,t,r,n,s,a,o){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];ge.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),ge.isString(n)&&l.push(`path=${n}`),ge.isString(s)&&l.push(`domain=${s}`),a===!0&&l.push("secure"),ge.isString(o)&&l.push(`SameSite=${o}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ZH(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function JH(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function DA(e,t,r){let n=!ZH(t);return e&&(n||r==!1)?JH(e,t):t}const mk=e=>e instanceof ds?{...e}:e;function Zl(e,t){t=t||{};const r={};function n(c,d,h,m){return ge.isPlainObject(c)&&ge.isPlainObject(d)?ge.merge.call({caseless:m},c,d):ge.isPlainObject(d)?ge.merge({},d):ge.isArray(d)?d.slice():d}function s(c,d,h,m){if(ge.isUndefined(d)){if(!ge.isUndefined(c))return n(void 0,c,h,m)}else return n(c,d,h,m)}function a(c,d){if(!ge.isUndefined(d))return n(void 0,d)}function o(c,d){if(ge.isUndefined(d)){if(!ge.isUndefined(c))return n(void 0,c)}else return n(void 0,d)}function l(c,d,h){if(h in t)return n(c,d);if(h in e)return n(void 0,c)}const u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(c,d,h)=>s(mk(c),mk(d),h,!0)};return ge.forEach(Object.keys({...e,...t}),function(d){const h=u[d]||s,m=h(e[d],t[d],d);ge.isUndefined(m)&&h!==l||(r[d]=m)}),r}const MA=e=>{const t=Zl({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:a,headers:o,auth:l}=t;if(t.headers=o=ds.from(o),t.url=_A(DA(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),ge.isFormData(r)){if(En.hasStandardBrowserEnv||En.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(ge.isFunction(r.getHeaders)){const u=r.getHeaders(),c=["content-type","content-length"];Object.entries(u).forEach(([d,h])=>{c.includes(d.toLowerCase())&&o.set(d,h)})}}if(En.hasStandardBrowserEnv&&(n&&ge.isFunction(n)&&(n=n(t)),n||n!==!1&&QH(t.url))){const u=s&&a&&XH.read(a);u&&o.set(s,u)}return t},eq=typeof XMLHttpRequest<"u",tq=eq&&function(e){return new Promise(function(r,n){const s=MA(e);let a=s.data;const o=ds.from(s.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:c}=s,d,h,m,f,p;function g(){f&&f(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let x=new XMLHttpRequest;x.open(s.method.toUpperCase(),s.url,!0),x.timeout=s.timeout;function w(){if(!x)return;const b=ds.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),T={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:b,config:e,request:x};RA(function(j){r(j),g()},function(j){n(j),g()},T),x=null}"onloadend"in x?x.onloadend=w:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(w)},x.onabort=function(){x&&(n(new vt("Request aborted",vt.ECONNABORTED,e,x)),x=null)},x.onerror=function(k){const T=k&&k.message?k.message:"Network Error",S=new vt(T,vt.ERR_NETWORK,e,x);
vendor: 6,096 bytes, lines 262-264
262S.event=k||null,n(S),x=null},x.ontimeout=function(){let k=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const T=s.transitional||AA;s.timeoutErrorMessage&&(k=s.timeoutErrorMessage),n(new vt(k,T.clarifyTimeoutError?vt.ETIMEDOUT:vt.ECONNABORTED,e,x)),x=null},a===void 0&&o.setContentType(null),"setRequestHeader"in x&&ge.forEach(o.toJSON(),function(k,T){x.setRequestHeader(T,k)}),ge.isUndefined(s.withCredentials)||(x.withCredentials=!!s.withCredentials),l&&l!=="json"&&(x.responseType=s.responseType),c&&([m,p]=Jp(c,!0),x.addEventListener("progress",m)),u&&x.upload&&([h,f]=Jp(u),x.upload.addEventListener("progress",h),x.upload.addEventListener("loadend",f)),(s.cancelToken||s.signal)&&(d=b=>{x&&(n(!b||b.type?new ld(null,e,x):b),x.abort(),x=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const y=GH(s.url);if(y&&En.protocols.indexOf(y)===-1){n(new vt("Unsupported protocol "+y+":",vt.ERR_BAD_REQUEST,e));return}x.send(a||null)})},rq=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const a=function(c){if(!s){s=!0,l();const d=c instanceof Error?c:this.reason;n.abort(d instanceof vt?d:new ld(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,a(new vt(`timeout ${t} of ms exceeded`,vt.ETIMEDOUT))},t);const l=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:u}=n;return u.unsubscribe=()=>ge.asap(l),u}},nq=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},sq=async function*(e,t){for await(const r of aq(e))yield*nq(r,t)},aq=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},fk=(e,t,r,n)=>{const s=sq(e,t);let a=0,o,l=u=>{o||(o=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:c,value:d}=await s.next();if(c){l(),u.close();return}let h=d.byteLength;if(r){let m=a+=h;r(m)}u.enqueue(new Uint8Array(d))}catch(c){throw l(c),c}},cancel(u){return l(u),s.return()}},{highWaterMark:2})},pk=64*1024,{isFunction:qm}=ge,iq=(({Request:e,Response:t})=>({Request:e,Response:t}))(ge.global),{ReadableStream:gk,TextEncoder:xk}=ge.global,bk=(e,...t)=>{try{return!!e(...t)}catch{return!1}},oq=e=>{e=ge.merge.call({skipUndefined:!0},iq,e);const{fetch:t,Request:r,Response:n}=e,s=t?qm(t):typeof fetch=="function",a=qm(r),o=qm(n);if(!s)return!1;const l=s&&qm(gk),u=s&&(typeof xk=="function"?(p=>g=>p.encode(g))(new xk):async p=>new Uint8Array(await new r(p).arrayBuffer())),c=a&&l&&bk(()=>{let p=!1;const g=new r(En.origin,{body:new gk,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!g}),d=o&&l&&bk(()=>ge.isReadableStream(new n("").body)),h={stream:d&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!h[p]&&(h[p]=(g,x)=>{let w=g&&g[p];if(w)return w.call(g);throw new vt(`Response type '${p}' is not supported`,vt.ERR_NOT_SUPPORT,x)})});const m=async p=>{if(p==null)return 0;if(ge.isBlob(p))return p.size;if(ge.isSpecCompliantForm(p))return(await new r(En.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(ge.isArrayBufferView(p)||ge.isArrayBuffer(p))return p.byteLength;if(ge.isURLSearchParams(p)&&(p=p+""),ge.isString(p))return(await u(p)).byteLength},f=async(p,g)=>{const x=ge.toFiniteNumber(p.getContentLength());return x??m(g)};return async p=>{let{url:g,method:x,data:w,signal:y,cancelToken:b,timeout:k,onDownloadProgress:T,onUploadProgress:S,responseType:j,headers:E,withCredentials:A="same-origin",fetchOptions:R}=MA(p),M=t||fetch;j=j?(j+"").toLowerCase():"text";let B=rq([y,b&&b.toAbortSignal()],k),W=null;const H=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let L;try{if(S&&c&&x!=="get"&&x!=="head"&&(L=await f(E,w))!==0){let K=new r(g,{method:"POST",body:w,duplex:"half"}),V;if(ge.isFormData(w)&&(V=K.headers.get("content-type"))&&E.setContentType(V),K.body){const[C,O]=dk(L,Jp(hk(S)));w=fk(K.body,pk,C,O)}}ge.isString(A)||(A=A?"include":"omit");const $=a&&"credentials"in r.prototype,ee={...R,signal:B,method:x.toUpperCase(),headers:E.normalize().toJSON(),body:w,duplex:"half",credentials:$?A:void 0};W=a&&new r(g,ee);let G=await(a?M(W,R):M(g,ee));const Q=d&&(j==="stream"||j==="response");if(d&&(T||Q&&H)){const K={};["status","statusText","headers"].forEach(q=>{K[q]=G[q]});const V=ge.toFiniteNumber(G.headers.get("content-length")),[C,O]=T&&dk(V,Jp(hk(T),!0))||[];G=new n(fk(G.body,pk,C,()=>{O&&O(),H&&H()}),K)}j=j||"text";let D=await h[ge.findKey(h,j)||"text"](G,p);return!Q&&H&&H(),await new Promise((K,V)=>{RA(K,V,{data:D,headers:ds.from(G.headers),status:G.status,statusText:G.statusText,config:p,request:W})})}catch($){throw H&&H(),$&&$.name==="TypeError"&&/Load failed|fetch/i.test($.message)?Object.assign(new vt("Network Error",vt.ERR_NETWORK,p,W),{cause:$.cause||$}):vt.from($,$&&$.code,p,W)}}},lq=new Map,OA=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,a=[n,s,r];let o=a.length,l=o,u,c,d=lq;for(;l--;)u=a[l],c=d.get(u),c===void 0&&d.set(u,c=l?new Map:oq(t)),d=c;return c};OA();const Pw={http:SH,xhr:tq,fetch:{get:OA}};ge.forEach(Pw,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const yk=e=>`- ${e}`,cq=e=>ge.isFunction(e)||e===null||e===!1;function uq(e,t){e=ge.isArray(e)?e:[e];const{length:r}=e;let n,s;const a={};for(let o=0;o<r;o++){n=e[o];let l;if(s=n,!cq(n)&&(s=Pw[(l=String(n)).toLowerCase()],s===void 0))throw new vt(`Unknown adapter '${l}'`);if(s&&(ge.isFunction(s)||(s=s.get(t))))break;a[l||"#"+o]=s}if(!s){const o=Object.entries(a).map(([u,c])=>`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=r?o.length>1?`since : 263`+o.map(yk).join(` 264`):" "+yk(o[0]):"as no adapter specified";throw new vt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return s}
vendor: 4,731 bytes, lines 264-265
264const LA={getAdapter:uq,adapters:Pw};function Kx(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ld(null,e)}function vk(e){return Kx(e),e.headers=ds.from(e.headers),e.data=Gx.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),LA.getAdapter(e.adapter||Zh.adapter,e)(e).then(function(n){return Kx(e),n.data=Gx.call(e,e.transformResponse,n),n.headers=ds.from(n.headers),n},function(n){return IA(n)||(Kx(e),n&&n.response&&(n.response.data=Gx.call(e,e.transformResponse,n.response),n.response.headers=ds.from(n.response.headers))),Promise.reject(n)})}const PA="1.13.2",u1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{u1[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const wk={};u1.transitional=function(t,r,n){function s(a,o){return"[Axios v"+PA+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,l)=>{if(t===!1)throw new vt(s(o," has been removed"+(r?" in "+r:"")),vt.ERR_DEPRECATED);return r&&!wk[o]&&(wk[o]=!0,console.warn(s(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,l):!0}};u1.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function dq(e,t,r){if(typeof e!="object")throw new vt("options must be an object",vt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const a=n[s],o=t[a];if(o){const l=e[a],u=l===void 0||o(l,a,e);if(u!==!0)throw new vt("option "+a+" must be "+u,vt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new vt("Unknown option "+a,vt.ERR_BAD_OPTION)}}const tp={assertOptions:dq,validators:u1},Ta=tp.validators;let $l=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ck,response:new ck}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=` 265`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Zl(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:a}=r;n!==void 0&&tp.assertOptions(n,{silentJSONParsing:Ta.transitional(Ta.boolean),forcedJSONParsing:Ta.transitional(Ta.boolean),clarifyTimeoutError:Ta.transitional(Ta.boolean)},!1),s!=null&&(ge.isFunction(s)?r.paramsSerializer={serialize:s}:tp.assertOptions(s,{encode:Ta.function,serialize:Ta.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),tp.assertOptions(r,{baseUrl:Ta.spelling("baseURL"),withXsrfToken:Ta.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&ge.merge(a.common,a[r.method]);a&&ge.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),r.headers=ds.concat(o,a);const l=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(u=u&&g.synchronous,l.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let d,h=0,m;if(!u){const p=[vk.bind(this),void 0];for(p.unshift(...l),p.push(...c),m=p.length,d=Promise.resolve(r);h<m;)d=d.then(p[h++],p[h++]);return d}m=l.length;let f=r;for(;h<m;){const p=l[h++],g=l[h++];try{f=p(f)}catch(x){g.call(this,x);break}}try{d=vk.call(this,f)}catch(p){return Promise.reject(p)}for(h=0,m=c.length;h<m;)d=d.then(c[h++],c[h++]);return d}getUri(t){t=Zl(this.defaults,t);const r=DA(t.baseURL,t.url,t.allowAbsoluteUrls);return _A(r,t.params,t.paramsSerializer)}};ge.forEach(["delete","get","head","options"],function(t){$l.prototype[t]=function(r,n){return this.request(Zl(n||{},{method:t,url:r,data:(n||{}).data}))}});ge.forEach(["post","put","patch"],function(t){function r(n){return function(a,o,l){return this.request(Zl(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}$l.prototype[t]=r(),$l.prototype[t+"Form"]=r(!0)});let hq=class FA{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(s=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](s);n._listeners=null}),this.promise.then=s=>{let a;const o=new Promise(l=>{n.subscribe(l),a=l}).then(s);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,l){n.reason||(n.reason=new ld(a,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
vendor: 2,416 bytes, line 265
265subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new FA(function(s){t=s}),cancel:t}}};function mq(e){return function(r){return e.apply(null,r)}}function fq(e){return ge.isObject(e)&&e.isAxiosError===!0}const t2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(t2).forEach(([e,t])=>{t2[t]=e});function BA(e){const t=new $l(e),r=gA($l.prototype.request,t);return ge.extend(r,$l.prototype,t,{allOwnKeys:!0}),ge.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return BA(Zl(e,s))},r}const Yt=BA(Zh);Yt.Axios=$l;Yt.CanceledError=ld;Yt.CancelToken=hq;Yt.isCancel=IA;Yt.VERSION=PA;Yt.toFormData=c1;Yt.AxiosError=vt;Yt.Cancel=Yt.CanceledError;Yt.all=function(t){return Promise.all(t)};Yt.spread=mq;Yt.isAxiosError=fq;Yt.mergeConfig=Zl;Yt.AxiosHeaders=ds;Yt.formToJSON=e=>
265jA(ge.isHTMLForm(e)?new FormData(e):e);Yt.getAdapter=LA.getAdapter;Yt.HttpStatusCode=t2;Yt.default=Yt;const{Axios:cye,AxiosError:uye,CanceledError:dye,isCancel:hye,CancelToken:mye,VERSION:fye,all:pye,Cancel:gye,isAxiosError:xye,spread:bye,toFormData:yye,AxiosHeaders:vye,HttpStatusCode:wye,formToJSON:Eye,getAdapter:kye,mergeConfig:Nye}=Yt,Wm={loginWeb:"/auth/login",register:"/auth/register",refresh:"/auth/refresh",profile:"/auth/profile"},U=Yt.create({baseURL:"/api/v1",headers:{"Content-Type":"application/json"}}),Ek=Yt.create({baseURL:"/api/v1",headers:{"Content-Type":"application/json"}});U.interceptors.request.use(async e=>{const{accessToken:t,refreshToken:r,isTokenExpiringSoon:n}=ut.getState();if(t&&r&&n()){const s=await Fw();e.headers.Authorization=`Bearer ${s??t}`}else t&&(e.headers.Authorization=`Bearer ${t}`);try{const s=localStorage.getItem("i18nextLng");s&&(e.headers["x-uniai-lang"]=s)}catch{}return e});U.interceptors.response.use(e=>{var s,a;const t=((s=e.config)==null?void 0:s.url)||"",r=(((a=e.config)==null?void 0:a.method)||"").toUpperCase();if(r==="POST"&&/^\/storage\/upload\/(image|document|video|audio)$/.test(t)||r==="POST"&&t==="/storage/confirm-upload"||r==="DELETE"&&/^\/storage\/(assets|files)\/[\w-]+$/.test(t))try{ja()}catch{}return e},async e=>{var r;const t=e.config;if(((r=e.response)==null?void 0:r.status)===401&&!t._retry){const{refreshToken:n,logout:s}=ut.getState();if(!n)return ut.getState().isAuthenticated&&(s(),ut.getState().openLoginModal()),Promise.reject(e);t._retry=!0;const a=await Fw();return a?(t.headers.Authorization=`Bearer ${a}`,U(t)):(s(),ut.getState().openLoginModal(),Promise.reject(e))}return Promise.reject(e)});const ma={register:e=>U.post(Wm.register,e),sendCode:e=>U.post("/auth/send-code",e),login:e=>U.post(Wm.loginWeb,e),resetPassword:e=>U.post("/auth/reset-password",e),refresh:e=>U.post(Wm.refresh,{refreshToken:e}),logout:e=>U.post("/auth/logout",{refreshToken:e}),logoutAll:()=>U.post("/auth/logout-all"),getProfile:()=>U.get(Wm.profile),updateProfile:e=>U.put("/auth/profile",e),changePassword:e=>U.post("/auth/change-password",e),getProfileWithToken:e=>Yt.get("/api/v1/auth/profile",{headers:{Authorization:`Bearer ${e}`}}),getLinkedAccounts:()=>U.get("/auth/google/linked-accounts"),unlinkGoogle:()=>U.delete("/auth/google/link"),getLoginHistory:e=>U.get("/auth/login-history",{params:e}),listSessions:()=>U.get("/auth/sessions"),revokeSession:e=>U.delete(`/auth/sessions/${e}`),mintSession:e=>U.post("/auth/sessions/mint",e)},rp={getDevice:e=>U.get("/auth/cli/device",{params:{userCode:e}}),approve:(e,t)=>U.post("/auth/cli/approve",{userCode:e,action:t})},pq={list:()=>U.get("/auth/pat"),create:e=>U.post("/auth/pat",e),revoke:e=>U.delete(`/auth/pat/${e}`)},gq={getCurrentUser:()=>U.get("/users/me"),updateUser:e=>U.put("/users/me",e),getUserStats:()=>U.get("/users/me/stats")},xq=3e4,bq=50,vl=new Map,yq="asset-list-cache-events",eg=typeof window<"u"&&typeof BroadcastChannel<"u"?new BroadcastChannel(yq):null;eg&&(eg.onmessage=e=>{var t;((t=e.data)==null?void 0:t.kind)==="invalidate"&&vl.clear()});const ja=e=>{vl.clear(),(e==null?void 0:e.broadcast)!==!1&&eg&&eg.postMessage({kind:"invalidate"})},ys={uploadImage:e=>{const t=new FormData;return t.append("file",e),U.post("/storage/upload/image",t,{headers:{"Content-Type":"multipart/form-data"}}).then(r=>(ja(),r))},uploadDocument:e=>{const t=new FormData;return t.append("file",e),U.post("/storage/upload/document",t,{headers:{"Content-Type":"multipart/form-data"}}).then(r=>(ja(),r))},uploadVideo:async e=>{if(e.size>209715200)throw new Error("Video file cannot exceed 200MB");let r;try{const a=await crypto.subtle.digest("SHA-256",await e.arrayBuffer());r=Array.from(new Uint8Array(a)).map(o=>o.toString(16).padStart(2,"0")).join("")}catch{r=void 0}const{data:n}=await U.post("/storage/upload-url",{filename:e.name,contentType:e.type||"video/mp4",category:"video",size:e.size,...r?{contentHash:r}:{}});if(n.deduplicated&&n.asset)return ja(),{data:n.asset};await fetch(n.uploadUrl,{method:"PUT",headers:{"Content-Type":e.type||"video/mp4"},body:e});const{data:s}=await U.post("/storage/confirm-upload",{assetId:n.assetId});return ja(),{data:s}},uploadAudio:e=>{const t=new FormData;return t.append("file",e),U.post("/storage/upload/audio",t,{headers:{"Content-Type":"multipart/form-data"}}).then(r=>(ja(),r))},getAssets:e=>{const t=JSON.stringify(e||{}),r=Date.now(),n=vl.get(t);return n&&r-n.ts<xq?Promise.resolve({data:n.data}):U.get("/storage/assets",{params:e}).then(s=>{if(vl.set(t,{ts:r,data:s.data}),vl.size>bq){const a=vl.keys().next().value;a&&vl.delete(a)}return s})},invalidateAssetListCache:ja,getUsage:()=>U.get("/storage/usage"),getAsset:e=>U.get(`/storage/assets/${e}`),deleteAsset:e=>U.delete(`/storage/assets/${e}`).then(t=>(ja(),t)),restoreAsset:e=>U.post(`/storage/assets/${e}/restore`).then(t=>(ja(),t)),hardDeleteAsset:e=>U.post(`/storage/assets/${e}/hard-delete`).then(t=>(ja(),t)),resolveAssetStates:e=>U.post("/storage/assets/state/batch",{assetIds:e}),getSignedUrl:(e,t)=>
265U.get(`/storage/signed/${e}`,{params:t?{shareToken:t}:void 0}),getSignedUrlBatch:(e,t)=>U.post("/storage/signed/batch",{assetIds:e,shareToken:t}),getSignedUrlByUrl:e=>U.post("/storage/signed/by-url",{url:e})},vq={getConversations:(e=1,t=20,r)=>U.get(`/chat/conversations?page=${e}&limit=${t}${r?`&search=${encodeURIComponent(r)}`:""}`),getConversation:e=>U.get(`/chat/conversations/${e}`),createConversation:e=>U.post("/chat/conversations",e),deleteConversation:e=>U.delete(`/chat/conversations/${e}`),sendMessage:(e,t)=>U.post(`/chat/conversations/${e}/messages`,t),updateTitle:(e,t)=>U.post(`/chat/conversations/${e}/title`,{title:t}),regenerateMessage:(e,t,r)=>U.post(`/chat/conversations/${e}/messages/${t}/regenerate`,r||{}),switchBranch:(e,t)=>U.post(`/chat/conversations/${e}/messages/${t}/switch-branch`),getMessageBranches:(e,t)=>U.get(`/chat/conversations/${e}/messages/${t}/branches`),getStreamUrl:e=>`/api/v1/chat/conversations/${e}/messages/stream`,editMessage:(e,t,r)=>U.patch(`/chat/conversations/${e}/messages/${t}`,r),getMessageEditHistory:(e,t)=>U.get(`/chat/conversations/${e}/messages/${t}/edit-history`),exportConversation:async(e,t={})=>{const{accessToken:r}=ut.getState(),n=new URLSearchParams;n.append("format",t.format||"markdown"),t.includeMetadata!==void 0&&n.append("includeMetadata",String(t.includeMetadata)),t.includeTimestamps!==void 0&&n.append("includeTimestamps",String(t.includeTimestamps)),t.includeAttachments!==void 0&&n.append("includeAttachments",String(t.includeAttachments)),n.append("download","true");const s=await fetch(`/api/v1/chat/conversations/${e}/export?${n}`,{method:"GET",headers:{Authorization:`Bearer ${r}`}});if(!s.ok)throw new Error(`Export failed: ${s.status}`);const a=s.headers.get("Content-Disposition");let o="conversation.md";if(a){const u=a.match(/filename\*?=(?:UTF-8'')?([^;]+)/i);u&&(o=decodeURIComponent(u[1].replace(/"/g,"")))}return{blob:await s.blob(),filename:o}},searchConversations:e=>U.get("/chat/search",{params:e}),getSearchSuggestions:(e,t)=>U.get("/chat/search/suggestions",{params:{q:e,limit:t}})},wq=async(e,t,r,n,s)=>{var o;const{accessToken:a}=ut.getState();try{const l=await fetch(`/api/v1/chat/conversations/${e}/messages/stream`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(t)});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);const u=(o=l.body)==null?void 0:o.getReader();if(!u)throw new Error("No response body");const c=new TextDecoder;let d="";for(;;){const{done:h,value:m}=await u.read();if(h)break;d+=c.decode(m,{stream:!0});const f=d.split(` 266`);d=f.pop()||"";for(const p of f)if(p.startsWith("data: "))try{const g=JSON.parse(p.slice(6));r(g)}catch{}}s==null||s()}catch(l){n==null||n(l)}},d1={getBalance:()=>U.get("/wallet"),getTransactions:e=>U.get("/wallet/transactions",{params:{transaction_type:e==null?void 0:e.transactionType,start_date:e==null?void 0:e.startDate,end_date:e==null?void 0:e.endDate,page:e==null?void 0:e.page,limit:e==null?void 0:e.limit}}),getStats:e=>U.get("/wallet/stats",{params:e}),redeemCode:e=>U.post("/wallet/redeem",{code:e})},Eq={transfer:e=>U.post("/transfer",e),preview:e=>U.post("/transfer/preview",e),lookupUser:e=>U.get("/transfer/lookup-user",{params:{email:e}}),getConfig:()=>U.get("/transfer/config"),getHistory:e=>U.get("/transfer/history",{params:e})},h1={getBalance:()=>d1.getBalance(),getCreditTier:()=>U.get("/credits/tier"),getUsageHistory:e=>U.get("/credits/usage",{params:e})},kq={getAvailableRewards:()=>U.get("/rewards"),getDailyCheckinStatus:()=>U.get("/rewards/daily-checkin"),claimDailyCheckin:()=>U.post("/rewards/daily-checkin"),claimReward:(e,t)=>U.post(`/rewards/claim/${e}`,{metadata:t}),getRewardHistory:e=>U.get("/rewards/history",{params:e})},UA={getModels:e=>U.get(`/ai/features/${e}/models`),getFeatures:()=>U.get("/ai/features")},$A={generateArticle:e=>U.post("/writing/article",e),rewrite:e=>U.post("/writing/rewrite",e),translate:e=>U.post("/writing/translate",e),summarize:e=>U.post("/writing/summarize",e),expand:e=>U.post("/writing/expand",e),checkGrammar:e=>U.post("/writing/grammar",e),generateEmail:e=>U.post("/writing/email",e),polish:e=>U.post("/writing/polish",e),continueText:e=>U.post("/writing/continue",e),articleStream:(e,t)=>Un("/writing/article/stream",e,t),replyStream:(e,t)=>Un("/writing/reply/stream",e,t),grammarStream:(e,t)=>Un("/writing/grammar/stream",e,t),polishStream:(e,t)=>Un("/writing/polish/stream",e,t),continueStream:(e,t)=>Un("/writing/continue/stream",e,t),summarizeStream:(e,t)=>Un("/writing/summarize/stream",e,t),outlineStream:(e,t)=>
266Un("/writing/outline/stream",e,t),expandSectionStream:(e,t)=>Un("/writing/expand-section/stream",e,t),analyzeWriting:e=>U.post("/writing/analyze-writing",e),drafts:{list:e=>U.get("/writing/drafts",{params:e}),get:e=>U.get(`/writing/drafts/${e}`),create:e=>U.post("/writing/drafts",e),update:(e,t)=>U.patch(`/writing/drafts/${e}`,t),delete:e=>U.delete(`/writing/drafts/${e}`),share:e=>U.post(`/writing/drafts/${e}/share`),unshare:e=>U.delete(`/writing/drafts/${e}/share`),getShared:e=>U.get(`/writing/shared/${e}`),versions:{list:(e,t)=>U.get(`/writing/drafts/${e}/versions`,{params:t}),get:(e,t)=>U.get(`/writing/drafts/${e}/versions/${t}`),create:(e,t)=>U.post(`/writing/drafts/${e}/versions`,t??{}),restore:(e,t)=>U.post(`/writing/drafts/${e}/versions/${t}/restore`),delete:(e,t)=>U.delete(`/writing/drafts/${e}/versions/${t}`)}},tags:{list:()=>U.get("/writing/tags"),create:e=>U.post("/writing/tags",e),update:(e,t)=>U.patch(`/writing/tags/${e}`,t),delete:e=>U.delete(`/writing/tags/${e}`),assign:(e,t)=>U.post(`/writing/drafts/${e}/tags`,{tagIds:t})},batch:e=>U.post("/writing/drafts/batch",e),statistics:{get:e=>U.get("/writing/statistics",{params:e}),getStreak:()=>U.get("/writing/statistics/streak")},prompts:{list:()=>U.get("/writing/prompts"),create:e=>U.post("/writing/prompts",e),update:(e,t)=>U.patch(`/writing/prompts/${e}`,t),delete:e=>U.delete(`/writing/prompts/${e}`),execute:(e,t)=>U.post(`/writing/prompts/${e}/execute`,t),executeStream:(e,t,r)=>Un(`/writing/prompts/${e}/execute/stream`,t,r)}},Nq={generate:e=>U.post("/image/generate",e),getTaskStatus:e=>U.get(`/image/task/${e}`),getStyles:()=>U.get("/image/styles"),getSizes:()=>U.get("/image/sizes"),getModels:()=>U.get("/image/models"),estimateCost:(e,t)=>
266U.get("/image/models/estimate",{params:{modelId:e,count:t}}),edit:e=>U.post("/image/edit",e,{timeout:18e4}),removeBackground:e=>U.post("/image/remove-background",e,{timeout:12e4}),upscale:e=>U.post("/image/upscale",e,{timeout:12e4}),ocr:e=>U.post("/image/ocr",e,{timeout:6e4}),translateImage:e=>U.post("/image/ocr",{imageUrl:e.imageUrl,translate:!0,translateTo:e.targetLanguage},{timeout:12e4}),analyze:e=>U.post("/image/analyze",e,{timeout:6e4}),restore:e=>U.post("/image/restore",e,{timeout:18e4}),getProcessingTaskStatus:e=>U.get(`/image/processing/task/${e}`)},zA={createConversation:()=>U.post("/video/conversations"),getConversations:(e=1,t=20)=>U.get(`/video/conversations?page=${e}&limit=${t}`),getConversation:e=>U.get(`/video/conversations/${e}`),generate:(e,t)=>U.post(`/video/conversations/${e}/generate`,t),getTaskStatus:e=>U.get(`/video/task/${e}`),getAspectRatios:()=>U.get("/video/aspect-ratios"),getDurations:()=>U.get("/video/durations"),getModes:()=>U.get("/video/modes"),getModels:e=>U.get("/video/models",{params:e?{mode:e}:void 0}),mergeClips:e=>U.post("/video/merge",e,{responseType:"blob",timeout:3e5}),generateLipSyncVideo:e=>U.post("/video/lip-sync",e,{timeout:6e5}),analyzeStoryboard:e=>U.post("/video/storyboard",e),getStoryboardStatus:e=>U.get(`/video/storyboard/${e}`),exportStoryboardClip:e=>U.post("/video/storyboard/export-clip",e,{responseType:"blob",timeout:12e4}),updateStoryboardScene:(e,t,r)=>U.patch(`/video/storyboard/${e}/scenes/${t}`,r),deleteStoryboardScene:(e,t)=>U.delete(`/video/storyboard/${e}/scenes/${t}`),deleteStoryboard:e=>U.delete(`/video/storyboard/${e}`)},Sq={getTemplates:e=>U.get("/templates",{params:e}),getTemplate:e=>U.get(`/templates/${e}`),getCategories:()=>U.get("/templates/categories"),createTemplate:e=>U.post("/templates",e),updateTemplate:(e,t)=>
266U.put(`/templates/${e}`,t),deleteTemplate:e=>U.delete(`/templates/${e}`),useTemplate:(e,t)=>U.post(`/templates/${e}/use`,{variables:t}),duplicateTemplate:e=>U.post(`/templates/${e}/duplicate`)},Tq={translate:e=>U.post("/translation/translate",e),translateDocument:e=>U.post("/translation/translate-document",e),detectLanguage:e=>U.post("/translation/detect",e),batchTranslate:e=>U.post("/translation/batch",e),getSupportedLanguages:()=>U.get("/translation/languages"),createTerminology:e=>U.post("/translation/terminologies",e),getTerminologies:()=>U.get("/translation/terminologies"),updateTerminology:(e,t)=>U.put(`/translation/terminologies/${e}`,t),deleteTerminology:e=>U.delete(`/translation/terminologies/${e}`),translateStream:async(e,t,r,n)=>{var a;const{accessToken:s}=ut.getState();try{const o=await fetch("/api/v1/translation/translate/stream",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${s}`},body:JSON.stringify(e)});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const l=(a=o.body)==null?void 0:a.getReader();if(!l)throw new Error("No response body");const u=new TextDecoder;let c="";for(;;){const{done:d,value:h}=await l.read();if(d)break;c+=u.decode(h,{stream:!0});const m=c.split(` 267`);c=m.pop()||"";for(const f of m)if(f.startsWith("data: "))try{const p=JSON.parse(f.slice(6));t(p)}catch{}}n==null||n()}catch(o){r==null||r(o)}},translateDocumentFile:(e,t)=>{const r=new FormData;return r.append("file",e),r.append("targetLanguage",t.targetLanguage),t.sourceLanguage&&r.append("sourceLanguage",t.sourceLanguage),t.style&&r.append("style",t.style),t.terminologyId&&r.append("terminologyId",t.terminologyId),t.model&&r.append("model",t.model),U.post("/translation/translate-document/upload",r,{headers:{"Content-Type":"multipart/form-data"}})},translateSubtitle:(e,t)=>{const r=new FormData;return r.append("file",e),r.append("targetLanguage",t.targetLanguage),t.sourceLanguage&&r.append("sourceLanguage",t.sourceLanguage),t.style&&r.append("style",t.style),t.keepOriginal!==void 0&&r.append("keepOriginal",String(t.keepOriginal)),t.outputFormat&&r.append("outputFormat",t.outputFormat),t.model&&r.append("model",t.model),U.post("/translation/translate-subtitle",r,{headers:{"Content-Type":"multipart/form-data"}})},parseDocument:e=>{const t=new FormData;return t.append("file",e),U.post("/translation/parse-document",t,{headers:{"Content-Type":"multipart/form-data"}})},getParseTasks:()=>U.get("/translation/parse-document/tasks"),getParseTask:e=>U.get(`/translation/parse-document/${e}`),getParseTaskContent:e=>U.get(`/translation/parse-document/${e}/content`),saveDocumentHistory:e=>U.post("/translation/document-history",e),updateDocumentHistory:(e,t)=>U.put(`/translation/document-history/${e}`,t),getHistory:e=>U.get("/translation/history",{params:e}),getHistoryItem:e=>U.get(`/translation/history/${e}`),deleteHistoryItem:e=>U.delete(`/translation/history/${e}`),clearHistory:e=>U.delete("/translation/history",{params:e?{type:e}:void 0})},Cq={webSearch:e=>U.post("/search/web",e),academicSearch:e=>U.post("/search/academic",e),codeSearch:e=>U.post("/search/code",e),aiSearch:e=>U.post("/search/ai",e),getSearchHistory:e=>U.get("/search/history",{params:e}),deleteSearchHistory:e=>U.delete(`/search/history/${e}`),clearSearchHistory:e=>U.delete("/search/history",{params:{type:e}})},_q={generatePpt:e=>U.post("/tools/ppt",e),generateExcelFormula:e=>U.post("/tools/excel-formula",e),analyzeData:e=>U.post("/tools/analyze-data",e),generateFlowchart:e=>U.post("/tools/flowchart",e),generateTravelPlan:e=>U.post("/tools/travel-plan",e),generateRecipe:e=>U.post("/tools/recipe",e),generateFitnessPlan:e=>U.post("/tools/fitness-plan",e)};async function*Un(e,t,r){var u;const{accessToken:n}=ut.getState(),s=await fetch(`/api/v1${e}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify(t),signal:r});if(!s.ok){const c=await s.json().catch(()=>({message:"Request failed"}));throw new Error(c.message||`HTTP error! status: ${s.status}`)}const a=(u=s.body)==null?void 0:u.getReader();if(!a)throw new Error("No response body");const o=new TextDecoder;let l="";for(;;){const{done:c,value:d}=await a.read();if(c)break;l+=o.decode(d,{stream:!0});const h=l.split(` 268`);l=h.pop()||"";for(const m of h)if(m.startsWith("data: ")){const f=m.slice(6);if(f==="[DONE]")return;let p;try{p=JSON.parse(f)}catch{continue}if(p.type==="content"&&p.data)yield p.data;else if(p.type==="error")throw new Error(p.error||"Stream error")}}}const Aq={summarizeTextStream:(e,t)=>Un("/writing/summarize/stream",e,t),summarizeWebpageStream:(e,t)=>Un("/tools/webpage/summarize",e,t),summarizeVideoStream:(e,t)=>Un("/tools/video/summarize",e,t),summarizeImageStream:(e,t)=>Un("/tools/image/summarize",e,t),summarizeDocumentStream:(e,t,r)=>Un(`/document/${e}/summarize`,t,r),analyzeText:e=>U.post("/writing/analyze",e)},tg={register:e=>U.post("/devices/register",e),getDevices:()=>U.get("/devices"),updateDevice:(e,t)=>U.put(`/devices/${e}`,t),removeDevice:e=>U.delete(`/devices/${e}`),removeAllDevices:(e=!0)=>U.delete("/devices",{params:{exceptCurrent:e}}),heartbeat:e=>U.post("/devices/heartbeat",{deviceId:e})},jq={upload:(e,t)=>{const r=new FormData;return r.append("file",e),t!=null&&t.title&&r.append("title",t.title),t!=null&&t.chunkSize&&r.append("chunkSize",String(t.chunkSize)),t!=null&&t.chunkOverlap&&r.append("chunkOverlap",String(t.chunkOverlap)),U.post("/document/upload",r,{headers:{"Content-Type":"multipart/form-data"}})},list:e=>U.get("/document",{params:e}),get:e=>U.get(`/document/${e}`),getChunks:e=>U.get(`/document/${e}/chunks`),delete:e=>U.delete(`/document/${e}`),ask:e=>U.post("/document/ask",e),getSupportedTypes:()=>U.get("/document/types"),getPricing:()=>U.get("/document/pricing")},Iq={textToSpeech:e=>U.post("/speech/tts",e),getTaskStatus:e=>U.get(`/speech/task/${e}`),getProviders:()=>U.get("/speech/providers"),getVoices:()=>U.get("/speech/voices"),getMiniMaxVoices:()=>U.get("/speech/voices/minimax"),getFormats:()=>U.get("/speech/formats"),speechToText:e=>U.post("/speech/stt",e),realtimeSTT:(e,t,r)=>{const n=new FormData;return n.append("audio",e),t&&t!=="auto"&&n.append("language",t),r&&n.append("model",r),U.post("/speech/stt/realtime",n,{headers:{"Content-Type":"multipart/form-data"}})},getLanguages:()=>
268U.get("/speech/languages"),getSTTModels:()=>U.get("/speech/models"),getPricing:()=>U.get("/speech/pricing")},Rq={createProfile:(e,t,r)=>{const n=new FormData;return n.append("name",e),n.append("audio",t),r&&n.append("provider",r),U.post("/speech/voices/clone",n,{headers:{"Content-Type":"multipart/form-data"}})},listProfiles:()=>U.get("/speech/voices/cloned"),deleteProfile:e=>U.delete(`/speech/voices/cloned/${e}`),generate:e=>U.post("/speech/tts/clone",e)},lo={getPlans:()=>U.get("/billing/plans"),getPublicPlans:()=>Ek.get("/billing/plans/public"),getPublicCreditPacks:()=>Ek.get("/billing/credits/packs"),getSubscription:()=>U.get("/billing/subscription"),createCheckout:e=>U.post("/billing/subscription/checkout",e),changeSubscription:e=>U.post("/billing/subscription/change",e),cancelSubscription:e=>U.post("/billing/subscription/cancel",e||{}),cancelPendingChange:()=>U.post("/billing/subscription/cancel-pending-change"),resumeSubscription:()=>U.post("/billing/subscription/resume"),getCreditPacks:()=>U.get("/billing/credits/packs"),purchaseCredits:e=>U.post("/billing/credits/purchase",e),getPaymentMethods:()=>U.get("/billing/payment-methods"),addPaymentMethod:e=>U.post("/billing/payment-methods",e),setDefaultPaymentMethod:e=>U.post(`/billing/payment-methods/${e}/default`),removePaymentMethod:e=>U.delete(`/billing/payment-methods/${e}`),createSetupIntent:()=>U.post("/billing/payment-methods/setup-intent"),getInvoices:e=>U.get("/billing/invoices",{params:{limit:e}}),getInvoice:e=>U.get(`/billing/invoices/${e}`),createBillingPortal:e=>U.post("/billing/portal",{returnUrl:e})},HA={purchaseCredits:e=>U.post("/billing/crypto/purchase",{amountUsdCents:e})},Dq={getConfig:()=>U.get("/music/config"),create:e=>U.post("/music",e),getList:e=>U.get("/music",{params:e}),get:e=>U.get(`/music/${e}`),getStatus:e=>U.get(`/music/${e}/status`),delete:e=>U.delete(`/music/${e}`),download:e=>U.get(`/music/${e}/download`,{responseType:"blob"})},Mq={getConfig:()=>U.get("/podcast/config"),create:e=>U.post("/podcast",e),getList:e=>U.get("/podcast",{params:e}),get:e=>U.get(`/podcast/${e}`),getStatus:e=>U.get(`/podcast/${e}/status`),delete:e=>U.delete(`/podcast/${e}`),confirm:(e,t)=>U.post(`/podcast/${e}/confirm`,{script:t}),download:e=>U.get(`/podcast/${e}/download`,{responseType:"blob"})},Oq={getCode:()=>U.get("/referral/code"),customizeCode:e=>U.put("/referral/code",{code:e}),validateCode:e=>U.get(`/referral/validate/${e}`),getStats:()=>U.get("/referral/stats"),getList:e=>U.get("/referral/list",{params:e}),getCommissions:e=>U.get("/referral/commissions",{params:e})},Lq={listTasks:e=>U.get("/ai-tasks",{params:e}),getTask:e=>U.get(`/ai-tasks/${e}`),deleteTask:e=>U.delete(`/ai-tasks/${e}`)},Pq={listProjects:e=>U.get("/video-agent/projects",{params:e}),createProject:e=>U.post("/video-agent/projects",e),getProject:e=>U.get(`/video-agent/projects/${e}`),updateProject:(e,t)=>U.patch(`/video-agent/projects/${e}`,t),deleteProject:e=>U.delete(`/video-agent/projects/${e}`),generateScript:async(e,t,r,n,s)=>{var o;const{accessToken:a}=ut.getState();try{const l=await fetch("/api/v1/video-agent/script/generate",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(e),signal:s});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);const u=(o=l.body)==null?void 0:o.getReader();if(!u)throw new Error("No response body");const c=new TextDecoder;let d="";for(;;){const{done:h,value:m}=await u.read();if(h)break;d+=c.decode(m,{stream:!0});const f=d.split(` 269`);d=f.pop()||"";for(const p of f)if(p.startsWith("data: ")){const g=p.slice(6);if(g==="[DONE]"){r==null||r();return}try{const x=JSON.parse(g);if(x.type==="content"&&x.data)t(x.data);else if(x.type==="done"){r==null||r();return}}catch{g.trim()&&t(g)}}}r==null||r()}catch(l){n==null||n(l)}},extractCharacters:async(e,t)=>{var n,s,a,o,l,u,c;const{accessToken:r}=ut.getState();try{const d=await fetch("/api/v1/video-agent/script/extract-characters",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},body:JSON.stringify(e)});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);const h=(n=d.body)==null?void 0:n.getReader();if(!h)throw new Error("No response body");const m=new TextDecoder;let f="";for(;;){const{done:p,value:g}=await h.read();if(p)break;f+=m.decode(g,{stream:!0});const x=f.split(` 270`);f=x.pop()||"";for(const w of x)if(w.startsWith("data: ")){const y=w.slice(6);try{const b=JSON.parse(y);if(b.type==="content"&&b.data)(s=t.onChunk)==null||s.call(t,b.data);else if(b.type==="done"&&b.data){(a=t.onComplete)==null||a.call(t,b.data);return}else if(b.type==="error"){(l=t.onError)==null||l.call(t,new Error(((o=b.data)==null?void 0:o.message)||"Unknown error"));return}}catch{}}}(u=t.onComplete)==null||u.call(t,null)}catch(d){(c=t.onError)==null||c.call(t,d)}},generateStoryboardImage:e=>U.post("/image/generate",e),generateVideoClip:(e,t)=>U.post(`/video/conversations/${e}/generate`,t),generateNarration:e=>U.post("/speech/tts",e),generateMusic:e=>U.post("/music",e)},Fq={create:e=>U.post("/feedback",e),list:e=>U.get("/feedback",{params:e}),get:e=>U.get(`/feedback/${e}`),reply:(e,t)=>U.post(`/feedback/${e}/reply`,t)},Sye=Object.freeze(Object.defineProperty({__proto__:null,aiTaskApi:Lq,authApi:ma,billingApi:lo,chatApi:vq,cliAuthApi:rp,createStreamRequest:wq,createSummaryStream:Un,creditsApi:h1,cryptoBillingApi:HA,default:U,devicesApi:tg,documentApi:jq,featureApi:UA,feedbackApi:Fq,imageApi:Nq,musicApi:Dq,patApi:pq,podcastApi:Mq,referralApi:Oq,rewardsApi:kq,searchApi:Cq,speechApi:Iq,storageApi:ys,summaryApi:Aq,templatesApi:Sq,toolsApi:_q,transferApi:Eq,translationApi:Tq,userApi:gq,videoAgentWorkflowApi:Pq,videoApi:zA,voiceCloneApi:Rq,walletApi:d1,writingApi:$A},Symbol.toStringTag,{value:"Module"})),kk="uniai_device_id";function Bq(){var t;return((t=crypto.randomUUID)==null?void 0:t.call(crypto))||`${Date.now()}-${Math.random().toString(36).slice(2)}`}function r2(){let e=localStorage.getItem(kk);return e||(e=Bq(),localStorage.setItem(kk,e)),e}function Uq(){const e=navigator.userAgent;return e.includes("Firefox")?"Firefox":e.includes("Edg")?"Edge":e.includes("Chrome")?"Chrome":e.includes("Safari")?"Safari":e.includes("Opera")||e.includes("OPR")?"Opera":"Unknown"}function $q(){const e=navigator.userAgent;return e.includes("Win")?"Windows":e.includes("Mac")?"macOS":e.includes("Linux")?"Linux":e.includes("Android")?"Android":e.includes("iPhone")||e.includes("iPad")?"iOS":"Unknown"}async function cd(){try{const e=r2(),t=Uq(),r=$q();await tg.register({deviceId:e,deviceType:"web",browser:t,os:r,userAgent:navigator.userAgent})}catch{}}async function zq(){var e,t;try{const r=r2();return await tg.heartbeat(r),!0}catch(r){if(((e=r==null?void 0:r.response)==null?void 0:e.status)!==410)return!0;try{await cd()}catch{return!0}try{const n=r2();return await tg.heartbeat(n),!0}catch(n){return((t=n==null?void 0:n.response)==null?void 0:t.status)!==410}}}const Vm=24*60*60*1e3,Nk=50,Hq="signed-url-cache-events";
270class qq{constructor(){nt(this,"cache",new Map);nt(this,"pending",new Map);nt(this,"batchQueue",new Map);nt(this,"flushScheduled",!1);nt(this,"refreshTimer",null);nt(this,"listeners",new Set);nt(this,"bc",null);typeof window<"u"&&typeof BroadcastChannel<"u"&&(this.bc=new BroadcastChannel(Hq),this.bc.onmessage=t=>{const r=t.data;(r==null?void 0:r.kind)==="invalidate"?this._invalidateLocal(r.assetId):(r==null?void 0:r.kind)==="clear"&&this._clearLocal()})}async getUrl(t,r){const n=this.cache.get(t);if(n&&n.expiresAt-Date.now()>Vm)return n.signedUrl;const s=this.pending.get(t);if(s)return s;const a=this.enqueueBatch(t,r);this.pending.set(t,a);try{return await a}finally{this.pending.delete(t)}}async preload(t,r){const n=t.filter(s=>{const a=this.cache.get(s);return!a||a.expiresAt-Date.now()<=Vm});if(n.length!==0)try{const s=await ys.getSignedUrlBatch(n,r);for(const[a,o]of Object.entries(s.data.urls))o&&this.cache.set(a,{signedUrl:o.signedUrl,expiresAt:new Date(o.expiresAt).getTime()})}catch(s){console.warn("Failed to preload signed URLs:",s)}}onRefresh(t){return this.listeners.add(t),this.startAutoRefresh(),()=>{this.listeners.delete(t),this.listeners.size===0&&this.stopAutoRefresh()}}clear(){var t;this._clearLocal(),(t=this.bc)==null||t.postMessage({kind:"clear"})}_clearLocal(){this.cache.clear(),this.pending.clear(),this.stopAutoRefresh()}invalidate(t){var r;this._invalidateLocal(t),(r=this.bc)==null||r.postMessage({kind:"invalidate",assetId:t})}_invalidateLocal(t){const r=this.cache.delete(t);this.pending.delete(t),r&&this.listeners.forEach(n=>n())}startAutoRefresh(){this.refreshTimer||(this.refreshTimer=setInterval(()=>this.refreshExpiring(),5*60*1e3))}stopAutoRefresh(){this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null)}async refreshExpiring(){const t=[],r=Date.now();for(const[n,s]of this.cache)s.expiresAt-r<=Vm&&t.push(n);if(t.length!==0)try{const n=await ys.getSignedUrlBatch(t);let s=!1;for(const[a,o]of Object.entries(n.data.urls))o&&(this.cache.set(a,{signedUrl:o.signedUrl,expiresAt:new Date(o.expiresAt).getTime()}),s=!0);s&&this.listeners.forEach(a=>a())}catch{}}async getUrlByPublicUrl(t){const r=`url:${t}`,n=this.cache.get(r);if(n&&n.expiresAt-Date.now()>Vm)return n.signedUrl;const s=this.pending.get(r);if(s)return s;const a=this.fetchUrlByPublicUrl(t,r);this.pending.set(r,a);try{return await a}finally{this.pending.delete(r)}}enqueueBatch(t,r){const n=r??"";return new Promise((s,a)=>{const o=this.batchQueue.get(n)??[];o.push({assetId:t,resolve:s,reject:a}),this.batchQueue.set(n,o),this.scheduleFlush()})}scheduleFlush(){this.flushScheduled||(this.flushScheduled=!0,queueMicrotask(()=>{this.flushScheduled=!1,this.flushBatch()}))}async flushBatch(){if(this.batchQueue.size===0)return;const t=Array.from(this.batchQueue.entries());this.batchQueue.clear(),await Promise.all(t.map(([r,n])=>this.flushBucket(r||void 0,n)))}async flushBucket(t,r){for(let n=0;n<r.length;n+=Nk){const s=r.slice(n,n+Nk),a=s.map(o=>o.assetId);try{const o=await ys.getSignedUrlBatch(a,t);for(const l of s){const u=o.data.urls[l.assetId];u?(this.cache.set(l.assetId,{signedUrl:u.signedUrl,expiresAt:new Date(u.expiresAt).getTime()}),l.resolve(u.signedUrl)):l.reject(new Error(`Asset not accessible: ${l.assetId}`))}}catch(o){for(const l of s)l.reject(o)}}}async fetchUrlByPublicUrl(t,r){const n=await ys.getSignedUrlByUrl(t);return n.data?(this.cache.set(r,{signedUrl:n.data.signedUrl,expiresAt:new Date(n.data.expiresAt).getTime()}),n.data.signedUrl):t}}const Si=new qq,Wq="auth-remember",Vq={getItem:e=>typeof window>"u"?null:sessionStorage.getItem(e)??localStorage.getItem(e),setItem:(e,t)=>{if(typeof window>"u")return;localStorage.getItem(Wq)!=="false"?(localStorage.setItem(e,t),sessionStorage.removeItem(e)):(sessionStorage.setItem(e,t),localStorage.removeItem(e))},removeItem:e=>{typeof window>"u"||(localStorage.removeItem(e),sessionStorage.removeItem(e))}},ut=ya()(Dw((e,t)=>({accessToken:null,refreshToken:null,expiresAt:null,user:null,isAuthenticated:!1,showLoginModal:!1,setAuth:(r,n,s,a)=>{const o=Date.now()+s*1e3;localStorage.setItem("token",r),e({accessToken:r,refreshToken:n,expiresAt:o,user:a,isAuthenticated:!0,showLoginModal:!1}),cd().catch(()=>{}),window.dispatchEvent(new CustomEvent("uniai-auth-changed"))},setTokens:(r,n,s)=>{const a=Date.now()+s*1e3;localStorage.setItem("token",r),e({accessToken:r,refreshToken:n,expiresAt:a})},setUser:r=>e({user:r}),openLoginModal:()=>e({showLoginModal:!0}),closeLoginModal:()=>e({showLoginModal:!1}),logout:()=>{localStorage.removeItem("token"),localStorage.removeItem("auth-remember"),sessionStorage.removeItem("auth-storage"),e({accessToken:null,refreshToken:null,expiresAt:null,user:null,isAuthenticated:!1}),Si.clear(),ys.invalidateAssetListCache(),typeof window<"u"&&window.dispatchEvent(new CustomEvent("uniai-web-logout"))},isTokenExpired:()=>{const{expiresAt:r}=t();return r?Date.now()>=r:!0},isTokenExpiringSoon:()=>{const{expiresAt:r}=t();return r?Date.now()>=r-5*60*1e3:!1}}),{name:"auth-storage",storage:pA(()=>Vq),partialize:e=>({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresAt:e.expiresAt,user:e.user,isAuthenticated:e.isAuthenticated})}));let Ud=null;async function Gq(){const{refreshToken:e}=ut.getState();if(!e)return null;try{const r=(await Yt.post("/api/v1/auth/refresh",{refreshToken:e})).data;return ut.getState().setTokens(r.accessToken,r.refreshToken,r.expires
270In),r.accessToken}catch{return null}}async function Fw(){if(Ud)return Ud;const e=async()=>{const t=ut.getState();return t.accessToken&&!t.isTokenExpiringSoon()?t.accessToken:Gq()};return Ud=(async()=>{var t;try{return typeof navigator<"u"&&((t=navigator.locks)!=null&&t.request)?await navigator.locks.request("uniai-auth-refresh",e):await e()}finally{Ud=null}})(),Ud}let _l=null;function Bw(){_l&&(clearTimeout(_l),_l=null);const{expiresAt:e,refreshToken:t,isAuthenticated:r}=ut.getState();if(!r||!t||!e)return;const n=e-5*60*1e3,s=Math.max(n-Date.now(),10*1e3);_l=setTimeout(async()=>{const a=ut.getState();!a.refreshToken||!a.isAuthenticated||(await Fw(),Bw())},s)}ut.subscribe((e,t)=>{(e.expiresAt!==t.expiresAt||e.isAuthenticated!==t.isAuthenticated)&&(e.isAuthenticated?Bw():_l&&(clearTimeout(_l),_l=null))});if(typeof window<"u"){const e=ut.persist.onFinishHydration(()=>{Bw(),ut.getState().isAuthenticated&&cd(),e()});setInterval(()=>{ut.getState().isAuthenticated&&zq().catch(()=>{})},60*1e3)}typeof window<"u"&&(window.addEventListener("uniai-auth-sync",e=>{const{authData:t}=e.detail||{};t!=null&&t.isAuthenticated&&(t!=null&&t.accessToken)&&(t!=null&&t.user)&&(ut.getState().setAuth(t.accessToken,t.refreshToken,Math.floor((t.expiresAt-Date.now())/1e3),t.user),console.log("[UniAI] Auth synced from extension"))}),window.addEventListener("uniai-auth-logout",()=>{ut.getState().logout(),console.log("[UniAI] Logout synced from extension")}),window.addEventListener("storage",e=>{if(e.key==="auth-storage")if(e.newValue)try{const r=JSON.parse(e.newValue).state;r!=null&&r.isAuthenticated&&(r!=null&&r.accessToken)&&ut.persist.rehydrate()}catch{}else{const t=ut.getState();t.isAuthenticated&&t.logout()}}));const qA=v.createContext(void 0),Sk="uniia-theme";function Kq({children:e}){const[t,r]=v.useState(()=>{if(typeof window<"u"){const l=localStorage.getItem(Sk);if(l&&["light","dark","system"].includes(l))return l}return"system"}),[n,s]=v.useState("light"),a=()=>typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";v.useEffect(()=>{const l=()=>{const u=t==="system"?a():t;s(u);const c=document.documentElement;c.classList.remove("light","dark"),c.classList.add(u),c.style.colorScheme=u};if(l(),t==="system"){const u=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>l();return u.addEventListener("change",c),()=>u.removeEventListener("change",c)}},[t]);const o=l=>{r(l),localStorage.setItem(Sk,l)};return i.jsx(qA.Provider,{value:{theme:t,resolvedTheme:n,setTheme:o},children:e})}function Uw(){const e=v.useContext(qA);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const Qa=Object.create(null);Qa.open="0";Qa.close="1";Qa.ping="2";Qa.pong="3";Qa.message="4";Qa.upgrade="5";Qa.noop="6";const np=Object.create(null);Object.keys(Qa).forEach(e=>{np[Qa[e]]=e});const n2={type:"error",data:"parser error"},WA=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",VA=typeof ArrayBuffer=="function",GA=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$w=({type:e,data:t},r,n)=>WA&&t instanceof Blob?r?n(t):Tk(t,n):VA&&(t instanceof ArrayBuffer||GA(t))?r?n(t):Tk(new Blob([t]),n):n(Qa[e]+(t||"")),Tk=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function Ck(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Yx;function Yq(e,t){if(WA&&e.data instanceof Blob)return e.data.arrayBuffer().then(Ck).then(t);if(VA&&(e.data instanceof ArrayBuffer||GA(e.data)))return t(Ck(e.data));$w(e,!1,r=>{Yx||(Yx=new TextEncoder),t(Yx.encode(r))})}const _k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x0=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<_k.length;e++)x0[_k.charCodeAt(e)]=e;const Qq=e=>{let t=e.length*.75,r=e.length,n,s=0,a,o,l,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(n=0;n<r;n+=4)a=x0[e.charCodeAt(n)],o=x0[e.charCodeAt(n+1)],l=x0[e.charCodeAt(n+2)],u=x0[e.charCodeAt(n+3)],d[s++]=a<<2|o>>4,d[s++]=(o&15)<<4|l>>2,d[s++]=(l&3)<<6|u&63;return c},Xq=typeof ArrayBuffer=="function",zw=(e,t)=>{if(typeof e!="string")return{type:"message",data:KA(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:Zq(e.substring(1),t)}:np[r]?e.length>1?{type:np[r],data:e.substring(1)}:{type:np[r]}:n2},Zq=(e,t)=>{if(Xq){const r=Qq(e);return KA(r,t)}else return{base64:!0,data:e}},KA=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},YA="�",Jq=(e,t)=>
vendor: 26,278 bytes, line 270
270{const r=e.length,n=new Array(r);let s=0;e.forEach((a,o)=>{$w(a,!1,l=>{n[o]=l,++s===r&&t(n.join(YA))})})},eW=(e,t)=>{const r=e.split(YA),n=[];for(let s=0;s<r.length;s++){const a=zw(r[s],t);if(n.push(a),a.type==="error")break}return n};function tW(){return new TransformStream({transform(e,t){Yq(e,r=>{const n=r.length;let s;if(n<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,n);else if(n<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,n)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(r)})}})}let Qx;function Gm(e){return e.reduce((t,r)=>t+r.length,0)}function Km(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let s=0;s<t;s++)r[s]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),r}function rW(e,t){Qx||(Qx=new TextDecoder);const r=[];let n=0,s=-1,a=!1;return new TransformStream({transform(o,l){for(r.push(o);;){if(n===0){if(Gm(r)<1)break;const u=Km(r,1);a=(u[0]&128)===128,s=u[0]&127,s<126?n=3:s===126?n=1:n=2}else if(n===1){if(Gm(r)<2)break;const u=Km(r,2);s=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),n=3}else if(n===2){if(Gm(r)<8)break;const u=Km(r,8),c=new DataView(u.buffer,u.byteOffset,u.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){l.enqueue(n2);break}s=d*Math.pow(2,32)+c.getUint32(4),n=3}else{if(Gm(r)<s)break;const u=Km(r,s);l.enqueue(zw(a?u:Qx.decode(u),t)),n=0}if(s===0||s>e){l.enqueue(n2);break}}}})}const QA=4;function Ur(e){if(e)return nW(e)}function nW(e){for(var t in Ur.prototype)e[t]=Ur.prototype[t];return e}Ur.prototype.on=Ur.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ur.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};Ur.prototype.off=Ur.prototype.removeListener=Ur.prototype.removeAllListeners=Ur.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,s=0;s<r.length;s++)if(n=r[s],n===t||n.fn===t){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+e],this};Ur.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,s=r.length;n<s;++n)r[n].apply(this,t)}return this};Ur.prototype.emitReserved=Ur.prototype.emit;Ur.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ur.prototype.hasListeners=function(e){return!!this.listeners(e).length};const m1=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),Bs=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),sW="arraybuffer";function XA(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}const aW=Bs.setTimeout,iW=Bs.clearTimeout;function f1(e,t){t.useNativeTimers?(e.setTimeoutFn=aW.bind(Bs),e.clearTimeoutFn=iW.bind(Bs)):(e.setTimeoutFn=Bs.setTimeout.bind(Bs),e.clearTimeoutFn=Bs.clearTimeout.bind(Bs))}const oW=1.33;function lW(e){return typeof e=="string"?cW(e):Math.ceil((e.byteLength||e.size)*oW)}function cW(e){let t=0,r=0;for(let n=0,s=e.length;n<s;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}function ZA(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function uW(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function dW(e){let t={},r=e.split("&");for(let n=0,s=r.length;n<s;n++){let a=r[n].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class hW extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}}class Hw extends Ur{constructor(t){super(),this.writable=!1,f1(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,r,n){return super.emitReserved("error",new hW(t,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=zw(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const r=uW(t);return r.length?"?"+r:""}}class mW extends Hw{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const r=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};eW(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Jq(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=ZA()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let JA=!1;try{JA=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const fW=JA;function pW(){}class gW extends mW{constructor(t){if(super(t),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,r){const n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}}let gu=class sp extends Ur{constructor(t,r,n){super(),this.createRequest=t,f1(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;const r=XA(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&n.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var s;n.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=sp.requestsCount++,sp.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=pW,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete sp.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};gu.requestsCount=0;gu.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ak);else if(typeof addEventListener=="function"){const e="onpagehide"in Bs?"pagehide":"unload";addEventListener(e,Ak,!1)}}function Ak(){for(let e in gu.requests)gu.requests.hasOwnProperty(e)&&gu.requests[e].abort()}const xW=function(){const e=e9({xdomain:!1});return e&&e.responseType!==null}();class bW extends gW{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=xW&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new gu(e9,this.uri(),t)}}function e9(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||fW))return new XMLHttpRequest}catch{}if(!t)try{return new Bs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const t9=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class yW extends Hw{get name(){return"websocket"}doOpen(){const t=this.uri(),r=this.opts.protocols,n=t9?{}:XA(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,n)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],s=r===t.length-1;$w(n,this.supportsBinary,a=>{try{this.doWrite(n,a)}catch{}s&&m1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=ZA()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const Xx=Bs.WebSocket||Bs.MozWebSocket;class vW extends yW{createSocket(t,r,n){return t9?new Xx(t,r,n):r?new Xx(t,r):new Xx(t)}doWrite(t,r){this.ws.send(r)}}class wW extends Hw{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const r=rW(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),s=tW();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const a=()=>{n.read().then(({done:l,value:u})=>{l||(this.onPacket(u),a())}).catch(l=>{})};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],s=r===t.length-1;this._writer.write(n).then(()=>{s&&m1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const EW={websocket:vW,webtransport:wW,polling:bW},kW=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,NW=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function s2(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let s=kW.exec(e||""),a={},o=14;for(;o--;)a[NW[o]]=s[o]||"";return r!=-1&&n!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=SW(a,a.path),a.queryKey=TW(a,a.query),a}function SW(e,t){const r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function TW(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,a){s&&(r[s]=a)}),r}const a2=typeof addEventListener=="function"&&typeof removeEventListener=="function",ap=[];a2&&addEventListener("offline",()=>{ap.forEach(e=>e())},!1);class Bo extends Ur{constructor(t,r){if(super(),this.binaryType=sW,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const n=s2(t);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=s2(r.host).host);f1(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const s=n.prototype.name;this.transports.push(s),this._transportsByName[s]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=dW(this.opts.query)),a2&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ap.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=QA,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Bo.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Bo.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const s=this.writeBuffer[n].data;if(s&&(r+=lW(s)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,m1(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,n){return this._sendPacket("message",t,r,n),this}send(t,r,n){return this._sendPacket("message",t,r,n),this}_sendPacket(t,r,n,s){if(typeof r=="function"&&(s=r,r=void 0),typeof n=="function"&&(s=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const a={type:t,data:r,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(Bo.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),a2&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=ap.indexOf(this._offlineEventListener);n!==-1&&ap.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}Bo.protocol=QA;class CW extends Bo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let r=this.createTransport(t),n=!1;Bo.priorWebsocketSuccess=!1;const s=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",h=>{if(!n)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Bo.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=r.name,this.emitReserved("upgradeError",m)}}))};function a(){n||(n=!0,d(),r.close(),r=null)}const o=h=>{const m=new Error("probe error: "+h);m.transport=r.name,a(),this.emitReserved("upgradeError",m)};function l(){o("transport closed")}function u(){o("socket closed")}function c(h){r&&h.name!==r.name&&a()}const d=()=>{r.removeListener("open",s),r.removeListener("error",o),r.removeListener("close",l),this.off("close",u),this.off("upgrading",c)};r.once("open",s),r.once("error",o),r.once("close",l),this.once("close",u),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const r=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&r.push(t[n]);return r}}let _W=class extends CW{constructor(t,r={}){const n=typeof t=="object"?t:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(s=>EW[s]).filter(s=>!!s)),super(t,n)}};function AW(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),n=s2(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+t,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}const jW=typeof ArrayBuffer=="function",IW=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,r9=Object.prototype.toString,RW=typeof Blob=="function"||typeof Blob<"u"&&r9.call(Blob)==="[object BlobConstructor]",DW=typeof File=="function"||typeof File<"u"&&r9.call(File)==="[object FileConstructor]";function qw(e){return jW&&(e instanceof ArrayBuffer||IW(e))||RW&&e instanceof Blob||DW&&e instanceof File}function ip(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(ip(e[r]))return!0;return!1}if(qw(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ip(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&ip(e[r]))return!0;return!1}function MW(e){const t=[],r=e.data,n=e;return n.data=i2(r,t),n.attachments=t.length,{packet:n,buffers:t}}function i2(e,t){if(!e)return e;if(qw(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=i2(e[n],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=i2(e[n],t));return r}return e}function OW(e,t){return e.data=o2(e.data,t),delete e.attachments,e}function o2(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=o2(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=o2(e[r],t));return e}const n9=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],LW=5;var Ct;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ct||(Ct={}));class PW{constructor(t){this.replacer=t}encode(t){return(t.type===Ct.EVENT||t.type===Ct.ACK)&&ip(t)?this.encodeAsBinary({type:t.type===Ct.EVENT?Ct.BINARY_EVENT:Ct.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let r=""+t.type;return(t.type===Ct.BINARY_EVENT||t.type===Ct.BINARY_ACK)&&(r+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(r+=t.nsp+","),t.id!=null&&(r+=t.id),t.data!=null&&(r+=JSON.stringify(t.data,this.replacer)),r}encodeAsBinary(t){const r=MW(t),n=this.encodeAsString(r.packet),s=r.buffers;return s.unshift(n),s}}class Ww extends Ur{constructor(t){super(),this.reviver=t}add(t){let r;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(t);const n=r.type===Ct.BINARY_EVENT;n||r.type===Ct.BINARY_ACK?(r.type=n?Ct.EVENT:Ct.ACK,this.reconstructor=new FW(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(qw(t)||t.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(t),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let r=0;const n={type:Number(t.charAt(0))};if(Ct[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Ct.BINARY_EVENT||n.type===Ct.BINARY_ACK){const a=r+1;for(;t.charAt(++r)!=="-"&&r!=t.length;);const o=t.substring(a,r);if(o!=Number(o)||t.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(o)}if(t.charAt(r+1)==="/"){const a=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););n.nsp=t.substring(a,r)}else n.nsp="/";const s=t.charAt(r+1);if(s!==""&&Number(s)==s){const a=r+1;for(;++r;){const o=t.charAt(r);if(o==null||Number(o)!=o){--r;break}if(r===t.length)break}n.id=Number(t.substring(a,r+1))}
vendor: 5,093 bytes, line 270
270if(t.charAt(++r)){const a=this.tryParse(t.substr(r));if(Ww.isPayloadValid(n.type,a))n.data=a;else throw new Error("invalid payload")}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case Ct.CONNECT:return rg(r);case Ct.DISCONNECT:return r===void 0;case Ct.CONNECT_ERROR:return typeof r=="string"||rg(r);case Ct.EVENT:case Ct.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&n9.indexOf(r[0])===-1);case Ct.ACK:case Ct.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class FW{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const r=OW(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function BW(e){return typeof e=="string"}const UW=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function $W(e){return e===void 0||UW(e)}function rg(e){return Object.prototype.toString.call(e)==="[object Object]"}function zW(e,t){switch(e){case Ct.CONNECT:return t===void 0||rg(t);case Ct.DISCONNECT:return t===void 0;case Ct.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&n9.indexOf(t[0])===-1);case Ct.ACK:return Array.isArray(t);case Ct.CONNECT_ERROR:return typeof t=="string"||rg(t);default:return!1}}function HW(e){return BW(e.nsp)&&$W(e.id)&&zW(e.type,e.data)}const qW=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ww,Encoder:PW,get PacketType(){return Ct},isPacketValid:HW,protocol:LW},Symbol.toStringTag,{value:"Module"}));function aa(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const WW=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class s9 extends Ur{constructor(t,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[aa(t,"open",this.onopen.bind(this)),aa(t,"packet",this.onpacket.bind(this)),aa(t,"error",this.onerror.bind(this)),aa(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...r){var n,s,a;if(WW.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const o={type:Ct.EVENT,data:r};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const d=this.ids++,h=r.pop();this._registerAckCallback(d,h),o.id=d}const l=(s=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||s===void 0?void 0:s.writable,u=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(u?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,r){var n;const s=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(s===void 0){this.acks[t]=r;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);r.call(this,new Error("operation has timed out"))},s),o=(...l)=>{this.io.clearTimeoutFn(a),r.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...r){return new Promise((n,s)=>{const a=(o,l)=>o?s(o):n(l);a.withError=!0,r.push(a),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...a)=>(this._queue[0],s!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(s)):(this._queue.shift(),r&&r(null,...a)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ct.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}
vendor: 7,082 bytes, line 270
270_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){const n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ct.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ct.EVENT:case Ct.BINARY_EVENT:this.onevent(t);break;case Ct.ACK:case Ct.BINARY_ACK:this.onack(t);break;case Ct.DISCONNECT:this.ondisconnect();break;case Ct.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let n=!1;return function(...s){n||(n=!0,r.packet({type:Ct.ACK,id:t,data:s}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ct.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,t.data)}}}function ud(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ud.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0};ud.prototype.reset=function(){this.attempts=0};ud.prototype.setMin=function(e){this.ms=e};ud.prototype.setMax=function(e){this.max=e};ud.prototype.setJitter=function(e){this.jitter=e};class l2 extends Ur{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,f1(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new ud({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const s=r.parser||qW;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new _W(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const s=aa(r,"open",function(){n.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=aa(r,"error",a);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),r.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(aa(t,"ping",this.onping.bind(this)),aa(t,"data",this.ondata.bind(this)),aa(t,"error",this.onerror.bind(this)),aa(t,"close",this.onclose.bind(this)),aa(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){m1(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new s9(this,t,r),this.nsps[t]=n),n}_destroy(t){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let n=0;n<r.length;n++)this.engine.write(r[n],t.options)}
270cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const $d={};function op(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=AW(e,t.path||"/socket.io"),n=r.source,s=r.id,a=r.path,o=$d[s]&&a in $d[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let u;return l?u=new l2(n,t):($d[s]||($d[s]=new l2(n,t)),u=$d[s]),r.query&&!t.query&&(t.query=r.queryKey),u.socket(r.path,t)}Object.assign(op,{Manager:l2,Socket:s9,io:op,connect:op});class VW{constructor(){nt(this,"socket",null);nt(this,"connectionId",null);nt(this,"isAuthenticated",!1);nt(this,"reconnectAttempts",0);nt(this,"maxReconnectAttempts",10);nt(this,"reconnectDelay",1e3);nt(this,"pingInterval",null);nt(this,"subscribedTasks",new Set);nt(this,"subscribedChannels",new Set);nt(this,"genericListeners",new Map);nt(this,"handlers",{taskProgress:new Set,taskCompleted:new Set,taskFailed:new Set,notification:new Set,broadcast:new Set,creditsUpdated:new Set,connected:new Set,disconnected:new Set,error:new Set,podcastProgress:new Set,podcastCompleted:new Set,podcastFailed:new Set,podcastScriptReady:new Set,assetPersisted:new Set,assetFailed:new Set})}getWebSocketUrl(){const t=window.location.protocol==="https:"?"wss:":"ws:",r=window.location.host;return`${t}//${r}`}connect(){var n;if((n=this.socket)!=null&&n.connected){console.log("[WebSocket] Already connected");return}const{accessToken:t}=ut.getState(),r=this.getWebSocketUrl();console.log("[WebSocket] Connecting to",r),this.socket=op(r,{path:"/socket.io",transports:["websocket","polling"],query:t?{token:t}:void 0,auth:t?{token:t}:void 0,reconnection:!0,reconnectionAttempts:this.maxReconnectAttempts,reconnectionDelay:this.reconnectDelay,reconnectionDelayMax:1e4}),this.setupEventListeners();for(const[s,a]of this.genericListeners)for(const o of a)this.socket.on(s,o)}disconnect(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null),this.socket&&(this.socket.disconnect(),this.socket=null),this.connectionId=null,this.isAuthenticated=!1,this.subscribedTasks.clear(),this.subscribedChannels.clear(),this.reconnectAttempts=0}reconnect(){this.disconnect(),setTimeout(()=>this.connect(),100)}setupEventListeners(){this.socket&&(this.socket.on("connect",()=>{console.log("[WebSocket] Connected"),this.reconnectAttempts=0}),this.socket.on("disconnect",t=>{console.log("[WebSocket] Disconnected:",t),this.handlers.disconnected.forEach(r=>r())}),this.socket.on("connect_error",t=>{console.error("[WebSocket] Connection error:",t),this.reconnectAttempts++}),this.socket.on("connected",t=>{console.log("[WebSocket] Received connected event:",t),this.connectionId=t.connectionId,this.isAuthenticated=t.authenticated,this.handlers.connected.forEach(r=>r(t)),this.startHeartbeat(),this.resubscribe()}),this.socket.on("authenticated",t=>{console.log("[WebSocket] Authenticated:",t),this.isAuthenticated=!0}),this.socket.on("auth_error",t=>{console.error("[WebSocket] Auth error:",t),this.handlers.error.forEach(r=>r(t))}),this.socket.on("pong",()=>{}),this.socket.on("error",t=>{console.error("[WebSocket] Error:",t),this.handlers.error.forEach(r=>r(t))}),this.socket.on("task:progress",t=>{const r=t.data||t;console.log("[WebSocket] Task progress:",r),this.handlers.taskProgress.forEach(n=>n(r))}),this.socket.on("task:completed",t=>{const r=t.data||t;console.log("[WebSocket] Task completed:",r),this.handlers.taskCompleted.forEach(n=>n(r))}),this.socket.on("task:failed",t=>{const r=t.data||t;console.log("[WebSocket] Task failed:",r),this.handlers.taskFailed.forEach(n=>n(r))}),this.socket.on("podcast:progress",t=>{const r=t.data||t;console.log("[WebSocket] Podcast progress:",r),this.handlers.podcastProgress.forEach(n=>n(r))}),this.socket.on("podcast:completed",t=>{const r=t.data||t;console.log("[WebSocket] Podcast completed:",r),this.handlers.podcastCompleted.forEach(n=>n(r))}),this.socket.on("podcast:failed",t=>{const r=t.data||t;console.log("[WebSocket] Podcast failed:",r),this.handlers.podcastFailed.forEach(n=>n(r))}),this.socket.on("podcast:script_ready",t=>{const r=t.data||t;console.log("[WebSocket] Podcast script ready:",r),this.handlers.podcastScriptReady.forEach(n=>n(r))}),this.socket.on("asset:persisted",t=>{const r=t.data||t;console.log("[WebSocket] Asset persisted:",r),this.handlers.assetPersisted.forEach(n=>n(r))}),this.socket.on("asset:failed",t=>{const r=t.data||t;console.log("[WebSocket] Asset failed:",r),this.handlers.assetFailed.forEach(n=>n(r))}),this.socket.on("notification",t=>{const r=t.data||t;console.log("[WebSocket] Notification:",r),this.handlers.notification.forEach(n=>n(r))}),this.socket.on("broadcast",t=>{const r=t.data||t;console.log("[WebSocket] Broadcast:",r),this.handlers.broadcast.forEach(n=>n(r))}),this.socket.on("credits:updated",t=>{const r=t.data||t;console.log("[WebSocket] Credits updated:",r),this.handlers.creditsUpdated.forEach(n=>n(r))}),this.socket.on("subscribed",t=>{console.log("[WebSocket] Subscribed to channel:",t.channel)}),this.socket.on("unsubscribed",t=>{console.log("[WebSocket] Unsubscribed from channel:",t.channel)}))}startHeartbeat(){this.pingInterval&&clearInterval(this.pingInterval),this.pingInterval=setInterval(()=>{var t;(t=this.socket)!=null&&t.connected&&this.socket.emit("ping")},3e4)}resubscribe(){this.subscribedTasks.forEach(t=>{var r;(r=this.socket)==null||r.emit("task:subscribe",{taskId:t})}
270),this.subscribedChannels.forEach(t=>{var r;(r=this.socket)==null||r.emit("subscribe",{channel:t})})}authenticate(t){var r;if(!((r=this.socket)!=null&&r.connected)){console.warn("[WebSocket] Not connected, cannot authenticate");return}this.socket.emit("auth",{token:t})}subscribeToTask(t){var r;this.subscribedTasks.add(t),(r=this.socket)!=null&&r.connected&&this.socket.emit("task:subscribe",{taskId:t})}unsubscribeFromTask(t){var r;this.subscribedTasks.delete(t),(r=this.socket)!=null&&r.connected&&this.socket.emit("task:unsubscribe",{taskId:t})}subscribeToChannel(t){var r;this.subscribedChannels.add(t),(r=this.socket)!=null&&r.connected&&this.socket.emit("subscribe",{channel:t})}unsubscribeFromChannel(t){var r;this.subscribedChannels.delete(t),(r=this.socket)!=null&&r.connected&&this.socket.emit("unsubscribe",{channel:t})}onTaskProgress(t){return this.handlers.taskProgress.add(t),()=>this.handlers.taskProgress.delete(t)}onTaskCompleted(t){return this.handlers.taskCompleted.add(t),()=>this.handlers.taskCompleted.delete(t)}onTaskFailed(t){return this.handlers.taskFailed.add(t),()=>this.handlers.taskFailed.delete(t)}onNotification(t){return this.handlers.notification.add(t),()=>this.handlers.notification.delete(t)}onBroadcast(t){return this.handlers.broadcast.add(t),()=>this.handlers.broadcast.delete(t)}onCreditsUpdated(t){return this.handlers.creditsUpdated.add(t),()=>this.handlers.creditsUpdated.delete(t)}onConnected(t){return this.handlers.connected.add(t),()=>this.handlers.connected.delete(t)}onDisconnected(t){return this.handlers.disconnected.add(t),()=>this.handlers.disconnected.delete(t)}onError(t){return this.handlers.error.add(t),()=>this.handlers.error.delete(t)}onPodcastProgress(t){return this.handlers.podcastProgress.add(t),()=>this.handlers.podcastProgress.delete(t)}onPodcastCompleted(t){return this.handlers.podcastCompleted.add(t),()=>this.handlers.podcastCompleted.delete(t)}onPodcastFailed(t){return this.handlers.podcastFailed.add(t),()=>this.handlers.podcastFailed.delete(t)}onPodcastScriptReady(t){return this.handlers.podcastScriptReady.add(t),()=>this.handlers.podcastScriptReady.delete(t)}onAssetPersisted(t){return this.handlers.assetPersisted.add(t),()=>this.handlers.assetPersisted.delete(t)}onAssetFailed(t){return this.handlers.assetFailed.add(t),()=>this.handlers.assetFailed.delete(t)}on(t,r){let n=this.genericListeners.get(t);return n||(n=new Set,this.genericListeners.set(t,n)),n.add(r),this.socket&&this.socket.on(t,r),()=>this.off(t,r)}off(t,r){var n;(n=this.genericListeners.get(t))==null||n.delete(r),this.socket&&this.socket.off(t,r)}emit(t,r){var n;(n=this.socket)!=null&&n.connected&&this.socket.emit(t,r)}get connected(){var t;return((t=this.socket)==null?void 0:t.connected)??!1}get authenticated(){return this.isAuthenticated}get id(){return this.connectionId}}const Tt=new VW,gh=ya((e,t)=>((()=>{Tt.onConnected(n=>{t()._setConnected(n)}),Tt.onDisconnected(()=>{t()._setDisconnected()}),Tt.onTaskProgress(n=>{t()._updateTaskProgress(n)}),Tt.onTaskCompleted(n=>{t()._setTaskCompleted(n)}),Tt.onTaskFailed(n=>{t()._setTaskFailed(n)}),Tt.onNotification(n=>{t()._addNotification(n)}),Tt.onBroadcast(n=>{t()._addBroadcast(n)}),Tt.onCreditsUpdated(n=>{t()._updateCredits(n)}),Tt.onError(n=>{console.error("[WebSocketStore] Error:",n)})})(),{connected:!1,authenticated:!1,connectionId:null,tasks:new Map,notifications:[],broadcasts:[],credits:null,connect:()=>{Tt.connect()},disconnect:()=>{Tt.disconnect(),e({connected:!1,authenticated:!1,connectionId:null})},reconnect:()=>{Tt.reconnect()},subscribeToTask:n=>{Tt.subscribeToTask(n),e(s=>{const a=new Map(s.tasks);return a.has(n)||a.set(n,{taskId:n,type:"image_gen",status:"pending",progress:0}),{tasks:a}})},unsubscribeFromTask:n=>{Tt.unsubscribeFromTask(n)},clearNotifications:()=>{e({notifications:[]})},dismissNotification:n=>{e(s=>({notifications:s.notifications.filter(a=>a.id!==n)}))},clearBroadcasts:()=>{e({broadcasts:[]})},onAssetPersisted:n=>Tt.onAssetPersisted(n),onAssetFailed:n=>Tt.onAssetFailed(n),_setConnected:n=>{e({connected:!0,authenticated:n.authenticated,connectionId:n.connectionId})},_setDisconnected:()=>{e({connected:!1,authenticated:!1})},_updateTaskProgress:n=>{e(s=>{const a=new Map(s.tasks),o=a.get(n.taskId);return a.set(n.taskId,{...o,taskId:n.taskId,type:n.type,status:n.status,progress:n.progress,message:n.message}),{tasks:a}})},_setTaskCompleted:n=>
270{e(s=>{const a=new Map(s.tasks);return a.set(n.taskId,{taskId:n.taskId,type:n.type,status:"completed",progress:100,result:n.result,creditsUsed:n.creditsUsed}),{tasks:a}})},_setTaskFailed:n=>{e(s=>{const a=new Map(s.tasks);return a.set(n.taskId,{taskId:n.taskId,type:n.type,status:"failed",progress:0,error:n.error}),{tasks:a}})},_addNotification:n=>{e(s=>({notifications:[...s.notifications,n]}))},_addBroadcast:n=>{e(s=>({broadcasts:[...s.broadcasts,n]}))},_updateCredits:n=>{e({credits:{credits:n.credits,change:n.change}})}})),GW=v.createContext(null);function KW({children:e}){const{t}=We(),{isAuthenticated:r,accessToken:n}=ut(),{connect:s,disconnect:a,reconnect:o,connected:l,authenticated:u,connectionId:c,onAssetFailed:d,onAssetPersisted:h}=gh();v.useEffect(()=>(r&&n?(console.log("[WebSocketProvider] User authenticated, connecting..."),s()):(console.log("[WebSocketProvider] User not authenticated, disconnecting..."),a()),()=>{}),[r,n,s,a]),v.useEffect(()=>{l&&n&&(console.log("[WebSocketProvider] Token changed, reconnecting..."),o())},[n]),v.useEffect(()=>{const f=()=>{document.visibilityState==="visible"&&r&&!l&&(console.log("[WebSocketProvider] Tab became visible, reconnecting..."),s())};return document.addEventListener("visibilitychange",f),()=>{document.removeEventListener("visibilitychange",f)}},[r,l,s]),v.useEffect(()=>h(()=>{ys.invalidateAssetListCache()}),[h]),v.useEffect(()=>d(p=>{console.warn(`[X3] Asset ${p.assetId} persistence failed${p.taskId?` (task=${p.taskId})`:""}:`,p.error),Qe.error(p.refunded===!1?t("art.assetFailed.toastNoRefund","å°é¢çæå¤±è´¥ï¼ä¸å½±åè§é¢æ¬èº«"):t("art.assetFailed.toast","èµæºå¤ç失败ï¼å·²èªå¨éè¿ç§¯å"),{duration:5e3,id:`asset-failed-${p.assetId}`})}),[d,t]);const m={connected:l,authenticated:u,connectionId:c,connect:s,disconnect:a,reconnect:o};return i.jsx(GW.Provider,{value:m,children:e})}const{slice:YW,forEach:QW}=[];function XW(e){return QW.call(YW.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}
270function ZW(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(e))}const jk=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,JW=function(e,t){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(t);let a=`${e}=${s}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!jk.test(n.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${n.domain}`}if(n.path){if(!jk.test(n.path))throw new TypeError("option path is invalid");a+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(a+="; Partitioned"),a},Ik={create(e,t,r,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+r*60*1e3)),n&&(s.domain=n),document.cookie=JW(e,t,s)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let s=r[n];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var eV={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Ik.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:r,cookieMinutes:n,cookieDomain:s,cookieOptions:a}=t;r&&typeof document<"u"&&Ik.create(r,e,n,s,a)}},tV={name:"querystring",lookup(e){var n;let{lookupQuerystring:t}=e,r;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const o=s.substring(1).split("&");for(let l=0;l<o.length;l++){const u=o[l].indexOf("=");u>0&&o[l].substring(0,u)===t&&(r=o[l].substring(u+1))}}return r}},rV={name:"hash",lookup(e){var s;let{lookupHash:t,lookupFromHashIndex:r}=e,n;if(typeof window<"u"){const{hash:a}=window.location;if(a&&a.length>2){const o=a.substring(1);if(t){const l=o.split("&");for(let u=0;u<l.length;u++){const c=l[u].indexOf("=");c>0&&l[u].substring(0,c)===t&&(n=l[u].substring(c+1))}}if(n)return n;if(!n&&r>-1){const l=a.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?(s=l[typeof r=="number"?r:0])==null?void 0:s.replace("/",""):void 0}}}return n}};let Tc=null;const Rk=()=>{if(Tc!==null)return Tc;try{if(Tc=typeof window<"u"&&window.localStorage!==null,!Tc)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Tc=!1}return Tc};var nV={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Rk())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&Rk()&&window.localStorage.setItem(r,e)}};let Cc=null;const Dk=()=>{if(Cc!==null)return Cc;try{if(Cc=typeof window<"u"&&window.sessionStorage!==null,!Cc)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Cc=!1}return Cc};var sV={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Dk())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&Dk()&&window.sessionStorage.setItem(r,e)}},aV={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:s}=navigator;if(r)for(let a=0;a<r.length;a++)t.push(r[a]);
270n&&t.push(n),s&&t.push(s)}return t.length>0?t:void 0}},iV={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},oV={name:"path",lookup(e){var s;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(s=r[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}},lV={name:"subdomain",lookup(e){var s,a;let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&((a=(s=window.location)==null?void 0:s.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};let a9=!1;try{document.cookie,a9=!0}catch{}const i9=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];a9||i9.splice(1,1);const cV=()=>({order:i9,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class o9{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=XW(r,this.options||{},cV()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(eV),this.addDetector(tV),this.addDetector(nV),this.addDetector(sV),this.addDetector(aV),this.addDetector(iV),this.addDetector(oV),this.addDetector(lV),this.addDetector(rV)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return t.forEach(n=>{if(this.detectors[n]){let s=this.detectors[n].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(r=r.concat(s))}}),r=r.filter(n=>n!=null&&!ZW(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}o9.type="languageDetector";const Nn=[{code:"en",name:"English",nativeName:"English"},{code:"fr",name:"French",nativeName:"Français"},{code:"de",name:"German",nativeName:"Deutsch"},{code:"it",name:"Italian",nativeName:"Italiano"},{code:"ja",name:"Japanese",nativeName:"æ¥æ¬èª"},{code:"es",name:"Spanish",nativeName:"Español"},{code:"ko",name:"Korean",nativeName:"íêµì´"},{code:"zh-CN",name:"Chinese (Simplified)",nativeName:"ç®ä½ä¸æ"},{code:"zh-Hant",name:"Chinese (Traditional)",nativeName:"ç¹é«ä¸æ"},{code:"ru",name:"Russian",nativeName:"Ð ÑÑÑкий"},{code:"id",name:"Indonesian",nativeName:"Bahasa Indonesia"},{code:"pt-BR",name:"Portuguese (Brazil)",nativeName:"Português (Brasil)"}],ws="en",uV=Nn.map(e=>e.code).sort((e,t)=>t.length-e.length).map(e=>e.replace(/-/g,"\\-")).join("|"),dV=new RegExp(`^/(${uV})`),l9=e=>e.replace(dV,"")||"/",Vw=(e,t)=>{const r=l9(e);return`/${t}${r==="/"?"":r}`},Mk=Nn.map(e=>e.code),hV=e=>{if(!e)return e??"";const t=e.trim().toLowerCase().replace(/_/g,"-"),r=Mk.find(s=>s.toLowerCase()===t);if(r)return r;if(t==="zh"||/^zh-(cn|hans|sg)\b/.test(t))return"zh-CN";if(/^zh-(tw|hk|mo|hant)\b/.test(t))return"zh-Hant";if(t==="pt"||t.startsWith("pt-"))return"pt-BR";const n=t.split("-")[0];return Mk.includes(n)?n:e};Rt.use(o9).use(S$).init({resources:{en:{translation:GO},"zh-CN":{translation:KO},fr:{translation:YO},de:{translation:QO},it:{translation:XO},ja:{translation:ZO},ko:{translation:JO},es:{translation:eL},"zh-Hant":{translation:tL},ru:{translation:rL},id:{translation:nL},"pt-BR":{translation:sL}},fallbackLng:ws,supportedLngs:Nn.map(e=>e.code),interpolation:{escapeValue:!1},detection:{order:["path","localStorage","navigator"],lookupFromPathIndex:0,caches:["localStorage"],convertDetectedLanguage:hV}});/** 271 * @license lucide-react v0.309.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */var mV={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"};/** 276 * @license lucide-react v0.309.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const fV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),fe=(e,t)=>
vendor: 10,576 bytes, lines 280-434
280{const r=v.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:l="",children:u,...c},d)=>v.createElement("svg",{ref:d,...mV,width:s,height:s,stroke:n,strokeWidth:o?Number(a)*24/Number(s):a,className:["lucide",`lucide-${fV(e)}`,l].join(" "),...c},[...t.map(([h,m])=>v.createElement(h,m)),...Array.isArray(u)?u:[u]]));return r.displayName=`${e}`,r};/** 281 * @license lucide-react v0.309.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const p1=fe("AlertCircle",[["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"}]]);/** 286 * @license lucide-react v0.309.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const pV=fe("AlertTriangle",[["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-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 291 * @license lucide-react v0.309.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const gV=fe("Aperture",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"14.31",x2:"20.05",y1:"8",y2:"17.94",key:"jdes2e"}],["line",{x1:"9.69",x2:"21.17",y1:"8",y2:"8",key:"1gubuk"}],["line",{x1:"7.38",x2:"13.12",y1:"12",y2:"2.06",key:"1m4d1n"}],["line",{x1:"9.69",x2:"3.95",y1:"16",y2:"6.06",key:"1wye2p"}],["line",{x1:"14.31",x2:"2.83",y1:"16",y2:"16",key:"1l9f4x"}],["line",{x1:"16.62",x2:"10.88",y1:"12",y2:"21.94",key:"1jjvfs"}]]);/** 296 * @license lucide-react v0.309.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const g1=fe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 301 * @license lucide-react v0.309.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const fr=fe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 306 * @license lucide-react v0.309.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const xV=fe("ArrowUpLeft",[["path",{d:"M7 17V7h10",key:"11bw93"}],["path",{d:"M17 17 7 7",key:"2786uv"}]]);/** 311 * @license lucide-react v0.309.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const bV=fe("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** 316 * @license lucide-react v0.309.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const c9=fe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 321 * @license lucide-react v0.309.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const ng=fe("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 326 * @license lucide-react v0.309.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const Gw=fe("BookMarked",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}],["polyline",{points:"10 2 10 10 13 7 16 10 16 2",key:"13o6vz"}]]);/** 331 * @license lucide-react v0.309.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const sg=fe("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** 336 * @license lucide-react v0.309.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const Kw=fe("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** 341 * @license lucide-react v0.309.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const yV=fe("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** 346 * @license lucide-react v0.309.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const Yw=fe("Briefcase",[["rect",{width:"20",height:"14",x:"2",y:"7",rx:"2",ry:"2",key:"eto64e"}],["path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"zwj3tp"}]]);/** 351 * @license lucide-react v0.309.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const xh=fe("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/** 356 * @license lucide-react v0.309.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const Jh=fe("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 361 * @license lucide-react v0.309.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const u9=fe("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 366 * @license lucide-react v0.309.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const vV=fe("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 371 * @license lucide-react v0.309.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const wV=fe("CheckSquare",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/** 376 * @license lucide-react v0.309.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const Fr=fe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 381 * @license lucide-react v0.309.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const dn=fe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 386 * @license lucide-react v0.309.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const x1=fe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 391 * @license lucide-react v0.309.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const Gs=fe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 396 * @license lucide-react v0.309.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const d9=fe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 401 * @license lucide-react v0.309.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const EV=fe("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** 406 * @license lucide-react v0.309.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const kV=fe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 411 * @license lucide-react v0.309.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const NV=fe("Clapperboard",[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]]);/** 416 * @license lucide-react v0.309.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const bh=fe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 421 * @license lucide-react v0.309.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const SV=fe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** 426 * @license lucide-react v0.309.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const xu=fe("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** 431 * @license lucide-react v0.309.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree.
435 */const b1=fe("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"}]]);/** 436 * @license lucide-react v0.309.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const TV=fe("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/** 441 * @license lucide-react v0.309.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const Qw=fe("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 446 * @license lucide-react v0.309.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const CV=fe("Crop",[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]]);/** 451 * @license lucide-react v0.309.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const _c=fe("Crown",[["path",{d:"m2 4 3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14",key:"zkxr6b"}]]);/** 456 * @license lucide-react v0.309.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const ag=fe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 461 * @license lucide-react v0.309.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const Xw=fe("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]);/** 466 * @license lucide-react v0.309.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const Zw=fe("Expand",[["path",{d:"m21 21-6-6m6 6v-4.8m0 4.8h-4.8",key:"1c15vz"}],["path",{d:"M3 16.2V21m0 0h4.8M3 21l6-6",key:"1fsnz2"}],["path",{d:"M21 7.8V3m0 0h-4.8M21 3l-6 6",key:"hawz9i"}],["path",{d:"M3 7.8V3m0 0h4.8M3 3l6 6",key:"u9ee12"}]]);/** 471 * @license lucide-react v0.309.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const ig=fe("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/** 476 * @license lucide-react v0.309.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const Jw=fe("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** 481 * @license lucide-react v0.309.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const No=fe("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 486 * @license lucide-react v0.309.0 - ISC 487 * 488 * This source code is licensed under the ISC license. 489 * See the LICENSE file in the root directory of this source tree. 490 */const _V=fe("FileBarChart",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M16 18v-6",key:"15y0np"}]]);/** 491 * @license lucide-react v0.309.0 - ISC 492 * 493 * This source code is licensed under the ISC license. 494 * See the LICENSE file in the root directory of this source tree. 495 */const e3=fe("FileCheck",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/** 496 * @license lucide-react v0.309.0 - ISC 497 * 498 * This source code is licensed under the ISC license. 499 * See the LICENSE file in the root directory of this source tree. 500 */const h9=fe("FileCode",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]);/** 501 * @license lucide-react v0.309.0 - ISC 502 * 503 * This source code is licensed under the ISC license. 504 * See the LICENSE file in the root directory of this source tree. 505 */const m9=fe("FileImage",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["circle",{cx:"10",cy:"13",r:"2",key:"6v46hv"}],["path",{d:"m20 17-1.09-1.09a2 2 0 0 0-2.82 0L10 22",key:"17vly1"}]]);/** 506 * @license lucide-react v0.309.0 - ISC 507 * 508 * This source code is licensed under the ISC license. 509 * See the LICENSE file in the root directory of this source tree. 510 */const t3=fe("FileSpreadsheet",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M14 17h2",key:"10kma7"}]]);/** 511 * @license lucide-react v0.309.0 - ISC 512 * 513 * This source code is licensed under the ISC license. 514 * See the LICENSE file in the root directory of this source tree. 515 */const Qr=fe("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/** 516 * @license lucide-react v0.309.0 - ISC 517 * 518 * This source code is licensed under the ISC license. 519 * See the LICENSE file in the root directory of this source tree. 520 */const f9=fe("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]);/** 521 * @license lucide-react v0.309.0 - ISC 522 * 523 * This source code is licensed under the ISC license. 524 * See the LICENSE file in the root directory of this source tree. 525 */const Wo=fe("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/** 526 * @license lucide-react v0.309.0 - ISC 527 * 528 * This source code is licensed under the ISC license. 529 * See the LICENSE file in the root directory of this source tree. 530 */const em=fe("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"}]]);/** 531 * @license lucide-react v0.309.0 - ISC 532 * 533 * This source code is licensed under the ISC license. 534 * See the LICENSE file in the root directory of this source tree. 535 */const AV=fe("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}
535]]);/** 536 * @license lucide-react v0.309.0 - ISC 537 * 538 * This source code is licensed under the ISC license. 539 * See the LICENSE file in the root directory of this source tree. 540 */const p9=fe("Gem",[["path",{d:"M6 3h12l4 6-10 13L2 9Z",key:"1pcd5k"}],["path",{d:"M11 3 8 9l4 13 4-13-3-6",key:"1fcu3u"}],["path",{d:"M2 9h20",key:"16fsjt"}]]);/** 541 * @license lucide-react v0.309.0 - ISC 542 * 543 * This source code is licensed under the ISC license. 544 * See the LICENSE file in the root directory of this source tree. 545 */const g9=fe("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 546 * @license lucide-react v0.309.0 - ISC 547 * 548 * This source code is licensed under the ISC license. 549 * See the LICENSE file in the root directory of this source tree. 550 */const jV=fe("GitCompare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);/** 551 * @license lucide-react v0.309.0 - ISC 552 * 553 * This source code is licensed under the ISC license. 554 * See the LICENSE file in the root directory of this source tree. 555 */const x9=fe("Globe2",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3v0a2 2 0 0 1 2 2v0c0 1.1.9 2 2 2v0a2 2 0 0 0 2-2v0c0-1.1.9-2 2-2h3.17",key:"1fi5u6"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2v0a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"xsiumc"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 556 * @license lucide-react v0.309.0 - ISC 557 * 558 * This source code is licensed under the ISC license. 559 * See the LICENSE file in the root directory of this source tree. 560 */const Tn=fe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 561 * @license lucide-react v0.309.0 - ISC 562 * 563 * This source code is licensed under the ISC license. 564 * See the LICENSE file in the root directory of this source tree. 565 */const b9=fe("GraduationCap",[["path",{d:"M22 10v6M2 10l10-5 10 5-10 5z",key:"1ef52a"}],["path",{d:"M6 12v5c3 3 9 3 12 0v-5",key:"1f75yj"}]]);/** 566 * @license lucide-react v0.309.0 - ISC 567 * 568 * This source code is licensed under the ISC license. 569 * See the LICENSE file in the root directory of this source tree. 570 */const IV=fe("Grid3x3",[["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"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/** 571 * @license lucide-react v0.309.0 - ISC 572 * 573 * This source code is licensed under the ISC license. 574 * See the LICENSE file in the root directory of this source tree. 575 */const RV=fe("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/** 576 * @license lucide-react v0.309.0 - ISC 577 * 578 * This source code is licensed under the ISC license. 579 * See the LICENSE file in the root directory of this source tree. 580 */const DV=fe("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** 581 * @license lucide-react v0.309.0 - ISC 582 * 583 * This source code is licensed under the ISC license. 584 * See the LICENSE file in the root directory of this source tree. 585 */const MV=fe("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 586 * @license lucide-react v0.309.0 - ISC 587 * 588 * This source code is licensed under the ISC license. 589 * See the LICENSE file in the root directory of this source tree. 590 */const OV=fe("HelpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 591 * @license lucide-react v0.309.0 - ISC 592 * 593 * This source code is licensed under the ISC license. 594 * See the LICENSE file in the root directory of this source tree. 595 */const LV=fe("ImagePlus",[["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"31hg93"}],["line",{x1:"16",x2:"22",y1:"5",y2:"5",key:"ez7e4s"}],["line",{x1:"19",x2:"19",y1:"2",y2:"8",key:"1gkr8c"}],["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"}]]);/** 596 * @license lucide-react v0.309.0 - ISC 597 * 598 * This source code is licensed under the ISC license. 599 * See the LICENSE file in the root directory of this source tree. 600 */const Ss=fe("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"}]]);/** 601 * @license lucide-react v0.309.0 - ISC 602 * 603 * This source code is licensed under the ISC license. 604 * See the LICENSE file in the root directory of this source tree. 605 */const c2=fe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 606 * @license lucide-react v0.309.0 - ISC 607 * 608 * This source code is licensed under the ISC license. 609 * See the LICENSE file in the root directory of this source tree. 610 */const PV=fe("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",key:"1kog09"}]]);/** 611 * @license lucide-react v0.309.0 - ISC 612 * 613 * This source code is licensed under the ISC license. 614 * See the LICENSE file in the root directory of this source tree. 615 */const lp=fe("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/** 616 * @license lucide-react v0.309.0 - ISC 617 * 618 * This source code is licensed under the ISC license. 619 * See the LICENSE file in the root directory of this source tree. 620 */const r3=fe("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** 621 * @license lucide-react v0.309.0 - ISC 622 * 623 * This source code is licensed under the ISC license. 624 * See the LICENSE file in the root directory of this source tree. 625 */const n3=fe("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/** 626 * @license lucide-react v0.309.0 - ISC 627 * 628 * This source code is licensed under the ISC license. 629 * See the LICENSE file in the root directory of this source tree. 630 */const y9=fe("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/** 631 * @license lucide-react v0.309.0 - ISC 632 * 633 * This source code is licensed under the ISC license. 634 * See the LICENSE file in the root directory of this source tree. 635 */const Rn=fe("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/** 636 * @license lucide-react v0.309.0 - ISC 637 * 638 * This source code is licensed under the ISC license. 639 * See the LICENSE file in the root directory of this source tree. 640 */const FV=fe("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"}]]);/** 641 * @license lucide-react v0.309.0 - ISC 642 * 643 * This source code is licensed under the ISC license. 644 * See the LICENSE file in the root directory of this source tree.
645 */const BV=fe("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** 646 * @license lucide-react v0.309.0 - ISC 647 * 648 * This source code is licensed under the ISC license. 649 * See the LICENSE file in the root directory of this source tree. 650 */const UV=fe("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/** 651 * @license lucide-react v0.309.0 - ISC 652 * 653 * This source code is licensed under the ISC license. 654 * See the LICENSE file in the root directory of this source tree. 655 */const $V=fe("ListOrdered",[["line",{x1:"10",x2:"21",y1:"6",y2:"6",key:"76qw6h"}],["line",{x1:"10",x2:"21",y1:"12",y2:"12",key:"16nom4"}],["line",{x1:"10",x2:"21",y1:"18",y2:"18",key:"u3jurt"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** 656 * @license lucide-react v0.309.0 - ISC 657 * 658 * This source code is licensed under the ISC license. 659 * See the LICENSE file in the root directory of this source tree. 660 */const zV=fe("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/** 661 * @license lucide-react v0.309.0 - ISC 662 * 663 * This source code is licensed under the ISC license. 664 * See the LICENSE file in the root directory of this source tree. 665 */const kn=fe("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 666 * @license lucide-react v0.309.0 - ISC 667 * 668 * This source code is licensed under the ISC license. 669 * See the LICENSE file in the root directory of this source tree. 670 */const Ts=fe("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"}]]);/** 671 * @license lucide-react v0.309.0 - ISC 672 * 673 * This source code is licensed under the ISC license. 674 * See the LICENSE file in the root directory of this source tree. 675 */const HV=fe("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 676 * @license lucide-react v0.309.0 - ISC 677 * 678 * This source code is licensed under the ISC license. 679 * See the LICENSE file in the root directory of this source tree. 680 */const v9=fe("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 681 * @license lucide-react v0.309.0 - ISC 682 * 683 * This source code is licensed under the ISC license. 684 * See the LICENSE file in the root directory of this source tree. 685 */const dd=fe("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"}]]);/** 686 * @license lucide-react v0.309.0 - ISC 687 * 688 * This source code is licensed under the ISC license. 689 * See the LICENSE file in the root directory of this source tree. 690 */const w9=fe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** 691 * @license lucide-react v0.309.0 - ISC 692 * 693 * This source code is licensed under the ISC license. 694 * See the LICENSE file in the root directory of this source tree. 695 */const u2=fe("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** 696 * @license lucide-react v0.309.0 - ISC 697 * 698 * This source code is licensed under the ISC license. 699 * See the LICENSE file in the root directory of this source tree. 700 */const s3=fe("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"}]]);/** 701 * @license lucide-react v0.309.0 - ISC 702 * 703 * This source code is licensed under the ISC license. 704 * See the LICENSE file in the root directory of this source tree. 705 */const E9=fe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 706 * @license lucide-react v0.309.0 - ISC 707 * 708 * This source code is licensed under the ISC license. 709 * See the LICENSE file in the root directory of this source tree. 710 */const k9=fe("MessageSquarePlus",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]);/** 711 * @license lucide-react v0.309.0 - ISC 712 * 713 * This source code is licensed under the ISC license. 714 * See the LICENSE file in the root directory of this source tree. 715 */const Vu=fe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 716 * @license lucide-react v0.309.0 - ISC 717 * 718 * This source code is licensed under the ISC license. 719 * See the LICENSE file in the root directory of this source tree. 720 */const y1=fe("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** 721 * @license lucide-react v0.309.0 - ISC 722 * 723 * This source code is licensed under the ISC license. 724 * See the LICENSE file in the root directory of this source tree. 725 */const qV=fe("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** 726 * @license lucide-react v0.309.0 - ISC 727 * 728 * This source code is licensed under the ISC license. 729 * See the LICENSE file in the root directory of this source tree. 730 */const N9=fe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 731 * @license lucide-react v0.309.0 - ISC 732 * 733 * This source code is licensed under the ISC license. 734 * See the LICENSE file in the root directory of this source tree. 735 */const WV=fe("MonitorSmartphone",[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]);/** 736 * @license lucide-react v0.309.0 - ISC 737 * 738 * This source code is licensed under the ISC license. 739 * See the LICENSE file in the root directory of this source tree. 740 */const v1=fe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** 741 * @license lucide-react v0.309.0 - ISC 742 * 743 * This source code is licensed under the ISC license. 744 * See the LICENSE file in the root directory of this source tree. 745 */const bu=fe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** 746 * @license lucide-react v0.309.0 - ISC 747 * 748 * This source code is licensed under the ISC license. 749 * See the LICENSE file in the root directory of this source tree. 750 */const Jl=fe("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** 751 * @license lucide-react v0.309.0 - ISC 752 * 753 * This source code is licensed under the ISC license. 754 * See the LICENSE file in the root directory of this source tree. 755 */const VV=fe("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/** 756 * @license lucide-react v0.309.0 - ISC 757 * 758 * This source code is licensed under the ISC license. 759 * See the LICENSE file in the root directory of this source tree. 760 */const Zx=fe("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** 761 * @license lucide-react v0.309.0 - ISC 762 * 763 * This source code is licensed under the ISC license. 764 * See the LICENSE file in the root directory of this source tree. 765 */const S9=fe("Paintbrush",[["path",{d:"M18.37 2.63 14 7l-1.59-1.59a2 2 0 0 0-2.82 0L8 7l9 9 1.59-1.59a2 2 0 0 0 0-2.82L17 10l4.37-4.37a2.12 2.12 0 1 0-3-3Z",key:"m6k5sh"}],["path",{d:"M9 8c-2 3-4 3.5-7 4l8 10c2-1 6-5 6-7",key:"arzq70"}],["path",{d:"M14.5 17.5 4.5 15",key:"s7fvrz"}]]);/** 766 * @license lucide-react v0.309.0 - ISC 767 * 768 * This source code is licensed under the ISC license. 769 * See the LICENSE file in the root directory of this source tree. 770 */const w1=fe("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",key:"1xcu5"}],["circle",{cx:"17.5",cy:"10.5",r:".5",key:"736e4u"}],["circle",{cx:"8.5",cy:"7.5",r:".5",key:"clrty"}],["circle",{cx:"6.5",cy:"12.5",r:".5",key:"1s4xz9"}],["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"}]]);/** 771 * @license lucide-react v0.309.0 - ISC 772 * 773 * This source code is licensed under the ISC license. 774 * See the LICENSE file in the root directory of this source tree. 775 */const a3=fe("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/** 776 * @license lucide-react v0.309.0 - ISC 777 * 778 * This source code is licensed under the ISC license. 779 * See the LICENSE file in the root directory of this source tree. 780 */const T9=fe("PartyPopper",[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12v0c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"bpx1uq"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11v0c-.11.7-.72 1.22-1.43 1.22H17",key:"1pd0s
7807"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98v0C9.52 4.9 9 5.52 9 6.23V7",key:"zq5xbz"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]]);/** 781 * @license lucide-react v0.309.0 - ISC 782 * 783 * This source code is licensed under the ISC license. 784 * See the LICENSE file in the root directory of this source tree. 785 */const GV=fe("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/** 786 * @license lucide-react v0.309.0 - ISC 787 * 788 * This source code is licensed under the ISC license. 789 * See the LICENSE file in the root directory of this source tree. 790 */const Ok=fe("PenTool",[["path",{d:"m12 19 7-7 3 3-7 7-3-3z",key:"rklqx2"}],["path",{d:"m18 13-1.5-7.5L2 2l3.5 14.5L13 18l5-5z",key:"1et58u"}],["path",{d:"m2 2 7.586 7.586",key:"etlp93"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]);/** 791 * @license lucide-react v0.309.0 - ISC 792 * 793 * This source code is licensed under the ISC license. 794 * See the LICENSE file in the root directory of this source tree. 795 */const C9=fe("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 796 * @license lucide-react v0.309.0 - ISC 797 * 798 * This source code is licensed under the ISC license. 799 * See the LICENSE file in the root directory of this source tree. 800 */const KV=fe("Pin",[["line",{x1:"12",x2:"12",y1:"17",y2:"22",key:"1jrz49"}],["path",{d:"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z",key:"13yl11"}]]);/** 801 * @license lucide-react v0.309.0 - ISC 802 * 803 * This source code is licensed under the ISC license. 804 * See the LICENSE file in the root directory of this source tree. 805 */const i3=fe("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/** 806 * @license lucide-react v0.309.0 - ISC 807 * 808 * This source code is licensed under the ISC license. 809 * See the LICENSE file in the root directory of this source tree. 810 */const ec=fe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 811 * @license lucide-react v0.309.0 - ISC 812 * 813 * This source code is licensed under the ISC license. 814 * See the LICENSE file in the root directory of this source tree. 815 */const YV=fe("Podcast",[["circle",{cx:"12",cy:"11",r:"1",key:"1gvufo"}],["path",{d:"M11 17a1 1 0 0 1 2 0c0 .5-.34 3-.5 4.5a.5.5 0 0 1-1 0c-.16-1.5-.5-4-.5-4.5Z",key:"1n5fvv"}],["path",{d:"M8 14a5 5 0 1 1 8 0",key:"fc81rn"}],["path",{d:"M17 18.5a9 9 0 1 0-10 0",key:"jqtxkf"}]]);/** 816 * @license lucide-react v0.309.0 - ISC 817 * 818 * This source code is licensed under the ISC license. 819 * See the LICENSE file in the root directory of this source tree. 820 */const bl=fe("Presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]);/** 821 * @license lucide-react v0.309.0 - ISC 822 * 823 * This source code is licensed under the ISC license. 824 * See the LICENSE file in the root directory of this source tree. 825 */const QV=fe("Printer",[["polyline",{points:"6 9 6 2 18 2 18 9",key:"1306q4"}],["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["rect",{width:"12",height:"8",x:"6",y:"14",key:"5ipwut"}]]);/** 826 * @license lucide-react v0.309.0 - ISC 827 * 828 * This source code is licensed under the ISC license. 829 * See the LICENSE file in the root directory of this source tree. 830 */const XV=fe("Projector",[["path",{d:"M5 7 3 5",key:"1yys58"}],["path",{d:"M9 6V3",key:"1ptz9u"}],["path",{d:"m13 7 2-2",key:"1w3vmq"}],["circle",{cx:"9",cy:"13",r:"3",key:"1mma13"}],["path",{d:"M11.83 12H20a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h2.17",key:"2frwzc"}],["path",{d:"M16 16h2",key:"dnq2od"}]]);/** 831 * @license lucide-react v0.309.0 - ISC 832 * 833 * This source code is licensed under the ISC license. 834 * See the LICENSE file in the root directory of this source tree. 835 */const _9=fe("Puzzle",[["path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z",key:"i0oyt7"}]]);/** 836 * @license lucide-react v0.309.0 - ISC 837 * 838 * This source code is licensed under the ISC license. 839 * See the LICENSE file in the root directory of this source tree. 840 */const ZV=fe("Quote",[["path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z",ke
840y:"4rm80e"}],["path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z",key:"10za9r"}]]);/** 841 * @license lucide-react v0.309.0 - ISC 842 * 843 * This source code is licensed under the ISC license. 844 * See the LICENSE file in the root directory of this source tree. 845 */const JV=fe("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"}]]);/** 846 * @license lucide-react v0.309.0 - ISC 847 * 848 * This source code is licensed under the ISC license. 849 * See the LICENSE file in the root directory of this source tree. 850 */const Jx=fe("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** 851 * @license lucide-react v0.309.0 - ISC 852 * 853 * This source code is licensed under the ISC license. 854 * See the LICENSE file in the root directory of this source tree. 855 */const eG=fe("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/** 856 * @license lucide-react v0.309.0 - ISC 857 * 858 * This source code is licensed under the ISC license. 859 * See the LICENSE file in the root directory of this source tree. 860 */const A9=fe("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/** 861 * @license lucide-react v0.309.0 - ISC 862 * 863 * This source code is licensed under the ISC license. 864 * See the LICENSE file in the root directory of this source tree. 865 */const tG=fe("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 866 * @license lucide-react v0.309.0 - ISC 867 * 868 * This source code is licensed under the ISC license. 869 * See the LICENSE file in the root directory of this source tree. 870 */const rG=fe("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/** 871 * @license lucide-react v0.309.0 - ISC 872 * 873 * This source code is licensed under the ISC license. 874 * See the LICENSE file in the root directory of this source tree. 875 */const nG=fe("ScanText",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}]]);/** 876 * @license lucide-react v0.309.0 - ISC 877 * 878 * This source code is licensed under the ISC license. 879 * See the LICENSE file in the root directory of this source tree. 880 */const yh=fe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 881 * @license lucide-react v0.309.0 - ISC 882 * 883 * This source code is licensed under the ISC license. 884 * See the LICENSE file in the root directory of this source tree. 885 */const Gu=fe("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** 886 * @license lucide-react v0.309.0 - ISC 887 * 888 * This source code is licensed under the ISC license. 889 * See the LICENSE file in the root directory of this source tree. 890 */const sG=fe("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** 891 * @license lucide-react v0.309.0 - ISC 892 * 893 * This source code is licensed under the ISC license. 894 * See the LICENSE file in the root directory of this source tree. 895 */const og=fe("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"}]]);/** 896 * @license lucide-react v0.309.0 - ISC 897 * 898 * This source code is licensed under the ISC license. 899 * See the LICENSE file in the root directory of this source tree. 900 */const j9=fe("ShieldCheck",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 901 * @license lucide-react v0.309.0 - ISC 902 * 903 * This source code is licensed under the ISC license. 904 * See the LICENSE file in the root directory of this source tree. 905 */const aG=fe("Shield",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}]]);/** 906 * @license lucide-react v0.309.0 - ISC 907 * 908 * This source code is licensed under the ISC license. 909 * See the LICENSE file in the root directory of this source tree. 910 */const iG=fe("Shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]]);/** 911 * @license lucide-react v0.309.0 - ISC 912 * 913 * This source code is licensed under the ISC license. 914 * See the LICENSE file in the root directory of this source tree. 915 */const o3=fe("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** 916 * @license lucide-react v0.309.0 - ISC 917 * 918 * This source code is licensed under the ISC license. 919 * See the LICENSE file in the root directory of this source tree. 920 */const oG=fe("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}
920],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** 921 * @license lucide-react v0.309.0 - ISC 922 * 923 * This source code is licensed under the ISC license. 924 * See the LICENSE file in the root directory of this source tree. 925 */const lG=fe("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/** 926 * @license lucide-react v0.309.0 - ISC 927 * 928 * This source code is licensed under the ISC license. 929 * See the LICENSE file in the root directory of this source tree. 930 */const cG=fe("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 931 * @license lucide-react v0.309.0 - ISC 932 * 933 * This source code is licensed under the ISC license. 934 * See the LICENSE file in the root directory of this source tree. 935 */const wn=fe("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/** 936 * @license lucide-react v0.309.0 - ISC 937 * 938 * This source code is licensed under the ISC license. 939 * See the LICENSE file in the root directory of this source tree. 940 */const I9=fe("SpellCheck",[["path",{d:"m6 16 6-12 6 12",key:"1b4byz"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"m16 20 2 2 4-4",key:"13tcca"}]]);/** 941 * @license lucide-react v0.309.0 - ISC 942 * 943 * This source code is licensed under the ISC license. 944 * See the LICENSE file in the root directory of this source tree. 945 */const uG=fe("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.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]]);/** 946 * @license lucide-react v0.309.0 - ISC 947 * 948 * This source code is licensed under the ISC license. 949 * See the LICENSE file in the root directory of this source tree. 950 */const dG=fe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** 951 * @license lucide-react v0.309.0 - ISC 952 * 953 * This source code is licensed under the ISC license. 954 * See the LICENSE file in the root directory of this source tree. 955 */const hG=fe("StickyNote",[["path",{d:"M15.5 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2V8.5L15.5 3Z",key:"1wis1t"}],["path",{d:"M15 3v6h6",key:"edgan2"}]]);/** 956 * @license lucide-react v0.309.0 - ISC 957 * 958 * This source code is licensed under the ISC license. 959 * See the LICENSE file in the root directory of this source tree. 960 */const mG=fe("StopCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{width:"6",height:"6",x:"9",y:"9",key:"1wrtvo"}]]);/** 961 * @license lucide-react v0.309.0 - ISC 962 * 963 * This source code is licensed under the ISC license. 964 * See the LICENSE file in the root directory of this source tree. 965 */const R9=fe("Subtitles",[["path",{d:"M7 13h4",key:"1m1xj0"}],["path",{d:"M15 13h2",key:"vgjay3"}],["path",{d:"M7 9h2",key:"1q072n"}],["path",{d:"M13 9h4",key:"o7fxw0"}],["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2Z",key:"5somay"}]]);/** 966 * @license lucide-react v0.309.0 - ISC 967 * 968 * This source code is licensed under the ISC license. 969 * See the LICENSE file in the root directory of this source tree. 970 */const yu=fe("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"}]]);/** 971 * @license lucide-react v0.309.0 - ISC 972 * 973 * This source code is licensed under the ISC license. 974 * See the LICENSE file in the root directory of this source tree. 975 */const d2=fe("Table2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]]);/** 976 * @license lucide-react v0.309.0 - ISC 977 * 978 * This source code is licensed under the ISC license. 979 * See the LICENSE file in the root directory of this source tree. 980 */const fG=fe("Tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);/** 981 * @license lucide-react v0.309.0 - ISC 982 * 983 * This source code is licensed under the ISC license. 984 * See the LICENSE file in the root directory of this source tree. 985 */const pG=fe("Tag",[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]]);/** 986 * @license lucide-react v0.309.0 - ISC 987 * 988 * This source code is licensed under the ISC license. 989 * See the LICENSE file in the root directory of this source tree. 990 */const Lk=fe("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 991 * @license lucide-react v0.309.0 - ISC 992 * 993 * This source code is licensed under the ISC license. 994 * See the LICENSE file in the root directory of this source tree. 995 */const D9=fe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** 996 * @license lucide-react v0.309.0 - ISC 997 * 998 * This source code is licensed under the ISC license. 999 * See the LICENSE file in the root directory of this source tree.
1000 */const gG=fe("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z",key:"s6e0r"}]]);/** 1001 * @license lucide-react v0.309.0 - ISC 1002 * 1003 * This source code is licensed under the ISC license. 1004 * See the LICENSE file in the root directory of this source tree. 1005 */const xG=fe("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z",key:"y3tblf"}]]);/** 1006 * @license lucide-react v0.309.0 - ISC 1007 * 1008 * This source code is licensed under the ISC license. 1009 * See the LICENSE file in the root directory of this source tree. 1010 */const tm=fe("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"}]]);/** 1011 * @license lucide-react v0.309.0 - ISC 1012 * 1013 * This source code is licensed under the ISC license. 1014 * See the LICENSE file in the root directory of this source tree.
1015 */const bG=fe("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"}]]);/** 1016 * @license lucide-react v0.309.0 - ISC 1017 * 1018 * This source code is licensed under the ISC license. 1019 * See the LICENSE file in the root directory of this source tree. 1020 */const M9=fe("Tv",[["rect",{width:"20",height:"15",x:"2",y:"7",rx:"2",ry:"2",key:"10ag99"}],["polyline",{points:"17 2 12 7 7 2",key:"11pgbg"}]]);/** 1021 * @license lucide-react v0.309.0 - ISC 1022 * 1023 * This source code is licensed under the ISC license. 1024 * See the LICENSE file in the root directory of this source tree. 1025 */const yG=fe("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/** 1026 * @license lucide-react v0.309.0 - ISC 1027 * 1028 * This source code is licensed under the ISC license. 1029 * See the LICENSE file in the root directory of this source tree. 1030 */const O9=fe("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"}]]);/** 1031 * @license lucide-react v0.309.0 - ISC 1032 * 1033 * This source code is licensed under the ISC license. 1034 * See the LICENSE file in the root directory of this source tree. 1035 */const zl=fe("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"}]]);/** 1036 * @license lucide-react v0.309.0 - ISC 1037 * 1038 * This source code is licensed under the ISC license. 1039 * See the LICENSE file in the root directory of this source tree. 1040 */const L9=fe("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);/** 1041 * @license lucide-react v0.309.0 - ISC 1042 * 1043 * This source code is licensed under the ISC license. 1044 * See the LICENSE file in the root directory of this source tree. 1045 */const E1=fe("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"}]]);/** 1046 * @license lucide-react v0.309.0 - ISC 1047 * 1048 * This source code is licensed under the ISC license. 1049 * See the LICENSE file in the root directory of this source tree. 1050 */const rm=fe("Video",[["path",{d:"m22 8-6 4 6 4V8Z",key:"50v9me"}],["rect",{width:"14",height:"12",x:"2",y:"6",rx:"2",ry:"2",key:"1rqjg6"}]]);/** 1051 * @license lucide-react v0.309.0 - ISC 1052 * 1053 * This source code is licensed under the ISC license. 1054 * See the LICENSE file in the root directory of this source tree. 1055 */const Ku=fe("Volume2",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",key:"ltjumu"}],["path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",key:"1kegas"}]]);/** 1056 * @license lucide-react v0.309.0 - ISC 1057 * 1058 * This source code is licensed under the ISC license. 1059 * See the LICENSE file in the root directory of this source tree. 1060 */const vG=fe("VolumeX",[["polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",key:"16drj5"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/** 1061 * @license lucide-react v0.309.0 - ISC 1062 * 1063 * This source code is licensed under the ISC license. 1064 * See the LICENSE file in the root directory of this source tree. 1065 */const eb=fe("Wand2",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72Z",key:"1bcowg"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/** 1066 * @license lucide-react v0.309.0 - ISC 1067 * 1068 * This source code is licensed under the ISC license. 1069 * See the LICENSE file in the root directory of this source tree. 1070 */const wG=fe("Wifi",[["path",{d:"M5 13a10 10 0 0 1 14 0",key:"6v8j51"}],["path",{d:"M8.5 16.5a5 5 0 0 1 7 0",key:"sej527"}
1070],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["line",{x1:"12",x2:"12.01",y1:"20",y2:"20",key:"of4bc4"}]]);/** 1071 * @license lucide-react v0.309.0 - ISC 1072 * 1073 * This source code is licensed under the ISC license. 1074 * See the LICENSE file in the root directory of this source tree. 1075 */const EG=fe("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** 1076 * @license lucide-react v0.309.0 - ISC 1077 * 1078 * This source code is licensed under the ISC license. 1079 * See the LICENSE file in the root directory of this source tree. 1080 */const cr=fe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 1081 * @license lucide-react v0.309.0 - ISC 1082 * 1083 * This source code is licensed under the ISC license. 1084 * See the LICENSE file in the root directory of this source tree. 1085 */const kG=fe("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/** 1086 * @license lucide-react v0.309.0 - ISC 1087 * 1088 * This source code is licensed under the ISC license. 1089 * See the LICENSE file in the root directory of this source tree. 1090 */const Ti=fe("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);function h2(e){return e===0?"0":Math.round(e).toLocaleString("en-US")}const oi=ya((e,t)=>({selectedArtifact:null,selectedMessageId:null,selectedSessionId:null,
1090showPreview:!1,previewMode:{type:"artifact"},selectArtifact:(r,n=null,s=null)=>{r&&r.type==="website"?e({selectedArtifact:r,selectedMessageId:n,selectedSessionId:s,showPreview:!0,previewMode:{type:"website-preview",data:r}}):e({selectedArtifact:r,selectedMessageId:n,selectedSessionId:s,showPreview:r!==null,previewMode:{type:"artifact"}})},togglePreview:()=>e(r=>({showPreview:!r.showPreview})),setShowPreview:r=>e({showPreview:r}),updateArtifact:r=>e(n=>{var o,l,u,c,d,h;const s={},a=["generated","deployed","previewing"];if(((o=n.selectedArtifact)==null?void 0:o.id)===r.id&&r.type==="website"){const m=n.selectedArtifact.status,f=r.status;if(a.includes(m)&&!a.includes(f))return console.log("[artifactStore.updateArtifact] Preventing status regression:",m,"->",f),{}}if(((l=n.selectedArtifact)==null?void 0:l.id)===r.id&&(s.selectedArtifact=r),n.previewMode.type==="website-preview"&&((u=n.previewMode.data)==null?void 0:u.id)===r.id&&(s.previewMode={type:"website-preview",data:r}),r.type==="website"){const m=r;console.log("[artifactStore.updateArtifact] website artifact update:",{artifactId:r.id,selectedArtifactId:(c=n.selectedArtifact)==null?void 0:c.id,previewModeType:n.previewMode.type,previewModeDataId:n.previewMode.type==="website-preview"?(d=n.previewMode.data)==null?void 0:d.id:null,filesCount:((h=m.files)==null?void 0:h.length)||0,progress:m.progress,willUpdate:Object.keys(s).length>0})}return s}),showResourceSelector:(r,n=!1)=>e({showPreview:!0,previewMode:{type:"resource-selector",data:r,readOnly:n}}),showOutlineEditor:(r,n=!1)=>e({showPreview:!0,previewMode:{type:"outline-editor",data:r,readOnly:n}}),showWebsiteArchitectureConfirm:(r,n=!1)=>e({showPreview:!0,previewMode:{type:"website-architecture-confirm",data:r,readOnly:n}}),showWebsitePreview:r=>e({showPreview:!0,previewMode:{type:"website-preview",data:r},selectedArtifact:r}),closeConfirmation:()=>e({showPreview:!1,previewMode:{type:"artifact"}}),getSelectedSessionId:()=>t().selectedSessionId})),Lr=Yt.create({baseURL:"/api/v1/agent-v2",timeout:3e4});Lr.interceptors.request.use(e=>{const{accessToken:t}=ut.getState();return t&&(e.headers.Authorization=`Bearer ${t}`),e});let tb=!1,m2=[];const Pk=(e,t=null)=>{m2.forEach(r=>{e?r.reject(e):t&&r.resolve(t)}),m2=[]};Lr.interceptors.response.use(e=>e,async e=>{var r;const t=e.config;if(((r=e.response)==null?void 0:r.status)===401&&!t._retry){const{refreshToken:n,logout:s,openLoginModal:a,setTokens:o}=ut.getState();if(!n)return ut.getState().isAuthenticated&&(s(),a()),Promise.reject(e);if(tb)return new Promise((l,u)=>{m2.push({resolve:l,reject:u})}).then(l=>(t.headers.Authorization=`Bearer ${l}`,Lr(t)));t._retry=!0,tb=!0;try{const u=(await Yt.post("/api/v1/auth/refresh",{refreshToken:n})).data;return o(u.accessToken,u.refreshToken,u.expiresIn),Pk(null,u.accessToken),t.headers.Authorization=`Bearer ${u.accessToken}`,Lr(t)}catch(l){return Pk(l,null),s(),a(),Promise.reject(l)}finally{tb=!1}}return Promise.reject(e)});function $i(){const{accessToken:e}=ut.getState(),t={"Content-Type":"application/json"};return e&&(t.Authorization=`Bearer ${e}`),t}const b0={list:e=>Lr.get("/sessions",{params:e?{type:e}:void 0}).then(t=>t.data),get:e=>Lr.get(`/sessions/${e}`).then(t=>t.data),create:e=>Lr.post("/sessions",e?{type:e}:void 0).then(t=>t.data),delete:e=>Lr.delete(`/sessions/${e}`),rename:(e,t)=>Lr.patch(`/sessions/${e}/title`,{title:t}).then(r=>r.data),estimateCredits:()=>Lr.get("/estimate-credits").then(e=>e.data),getMessages:e=>Lr.get(`/sessions/${e}/messages`).then(t=>t.data),getStatus:e=>Lr.get(`/sessions/${e}/status`).then(t=>t.data),stop:e=>Lr.post(`/sessions/${e}/stop`).then(t=>t.data)},P9={upload:async e=>{const t=new FormData;return t.append("file",e),(await Lr.post("/upload",t,{headers:{"Content-Type":"multipart/form-data"}})).data}},Cye={export:async(e,t,r)=>{const n={id:e.id,title:e.title,description:e.description,type:e.type,documentType:e.documentType,sections:Array.isArray(e.sections)?e.sections.map(a=>({id:a.id,level:a.level,title:a.title,content:a.content})):[],html:e.html,css:e.css,language:e.language,wordCount:e.wordCount,createdAt:e.createdAt},s=await fetch("/api/v1/agent-v2/documents/export",{method:"POST",headers:$i(),body:JSON.stringify({artifact:n,format:t,paperSize:(r==null?void 0:r.paperSize)||"A4",includeTableOfContents:(r==null?void 0:r.includeTableOfContents)??!0})});if(!s.ok){const a=await s.json().catch(()=>({error:"Export failed"}));throw new Error(a.error||"Export failed")}return s.blob()},getFormats:()=>Lr.get("/documents/export-formats").then(e=>e.data)},rb={updateContent:async(e,t,r)=>
1090{try{return(await Lr.patch(`/sessions/${e}/messages/${t}`,{content:r})).data}catch(n){return console.error("Failed to update message content:",n),{success:!1,error:String(n)}}}},_ye={update:async(e,t,r)=>(await Lr.post(`/messages/${e}/artifacts/${t}`,{artifact:r})).data,updateDocument:async(e,t,r)=>(await Lr.post(`/messages/${e}/artifacts/${t}`,{artifact:{sections:r}})).data,updatePresentation:async(e,t,r)=>(await Lr.post(`/presentations/${t}/slides`,{messageId:e,slides:r})).data,updateSpreadsheet:async(e,t,r)=>(await Lr.post(`/messages/${e}/artifacts/${t}`,{artifact:{sheets:r}})).data};function Aye(e,t,r,n,s,a,o){const l=new AbortController,u=o&&("mode"in o||"model"in o||"webSearch"in o||"memoSearch"in o)?o:{templateConfig:o};return(async()=>{var d;try{const h=await fetch(`/api/v1/agent-v2/sessions/${e}/messages`,{method:"POST",headers:$i(),body:JSON.stringify({content:t,files:r,templateConfig:u.templateConfig,mode:u.mode,model:u.model,webSearch:u.webSearch,memoSearch:u.memoSearch,uiLanguage:u.uiLanguage}),signal:l.signal});if(!h.ok){let g=`HTTP error! status: ${h.status}`;try{const x=await h.json();x!=null&&x.message&&(g=x.message)}catch{}throw new Error(g)}const m=(d=h.body)==null?void 0:d.getReader();if(!m)throw new Error("No response body");const f=new TextDecoder;let p="";for(;;){const{done:g,value:x}=await m.read();if(g){a();break}p+=f.decode(x,{stream:!0});const w=p.split(` 1091`);p=w.pop()||"";for(const y of w)if(y.startsWith("data: ")){const b=y.slice(6);if(b==="[DONE]"){a();return}try{const k=JSON.parse(b);n(k)}catch{console.warn("Failed to parse event:",b)}}}}catch(h){h.name!=="AbortError"&&s(h)}})(),()=>{l.abort()}}async function jye(e){try{const t=await fetch(`/api/v1/agent-v2/sessions/${e}/ppt/state`,{headers:$i()});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}catch(t){return{success:!1,hasState:!1,error:t instanceof Error?t.message:"Unknown error"}}}function Iye(e,t,r,n,s,a,o){const l=new AbortController;return(async()=>{var c;try{const d=await fetch(`/api/v1/agent-v2/sessions/${e}/ppt/confirm-resources`,{method:"POST",headers:$i(),body:JSON.stringify({selectedChartIds:t.join(","),selectedImageIds:r.join(","),uiLanguage:o}),signal:l.signal});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);const h=(c=d.body)==null?void 0:c.getReader();if(!h)throw new Error("No response body");const m=new TextDecoder;let f="";for(;;){const{done:p,value:g}=await h.read();if(p){a();break}f+=m.decode(g,{stream:!0});const x=f.split(` 1092`);f=x.pop()||"";for(const w of x)if(w.startsWith("data: ")){const y=w.slice(6);if(y==="[DONE]"){a();return}try{const b=JSON.parse(y);n(b)}catch{console.warn("Failed to parse event:",y)}}}}catch(d){d.name!=="AbortError"&&s(d)}})(),()=>{l.abort()}}function Rye(e,t,r,n,s,a,o,l){const u=new AbortController;return(async()=>{var d;try{const h=await fetch(`/api/v1/agent-v2/sessions/${e}/ppt/confirm-outline`,{method:"POST",headers:$i(),body:JSON.stringify({outlineAction:r,confirmedOutline:r==="confirm"?JSON.stringify(t):void 0,regenerateInstructions:o,uiLanguage:l}),signal:u.signal});if(!h.ok)throw new Error(`HTTP error! status: ${h.status}`);const m=(d=h.body)==null?void 0:d.getReader();if(!m)throw new Error("No response body");const f=new TextDecoder;let p="";for(;;){const{done:g,value:x}=await m.read();if(g){a();break}p+=f.decode(x,{stream:!0});const w=p.split(` 1093`);p=w.pop()||"";for(const y of w)if(y.startsWith("data: ")){const b=y.slice(6);if(b==="[DONE]"){a();return}try{const k=JSON.parse(b);n(k)}catch{console.warn("Failed to parse event:",b)}}}}catch(h){h.name!=="AbortError"&&s(h)}})(),()=>{u.abort()}}function Dye(e,t,r,n,s,a){const o=new AbortController;return console.log("[confirmWebsiteArchitecture] Starting with sessionId:",e,"action:",t),(async()=>{var u;try{const c=await fetch(`/api/v1/agent-v2/sessions/${e}/website/confirm-architecture`,{method:"POST",headers:$i(),body:JSON.stringify({confirmed:t==="confirm",modifications:r}),signal:o.signal});if(console.log("[confirmWebsiteArchitecture] Response status:",c.status),!c.ok)throw new Error(`HTTP error! status: ${c.status}`);
1093const d=(u=c.body)==null?void 0:u.getReader();if(!d)throw new Error("No response body");const h=new TextDecoder;let m="",f=0;for(;;){const{done:p,value:g}=await d.read();if(p){console.log("[confirmWebsiteArchitecture] Stream done, total events:",f),a();break}m+=h.decode(g,{stream:!0});const x=m.split(` 1094`);m=x.pop()||"";for(const w of x)if(w.startsWith("data: ")){const y=w.slice(6);if(y==="[DONE]"){console.log("[confirmWebsiteArchitecture] Received [DONE], total events:",f),a();return}try{const b=JSON.parse(y);f++,console.log(`[confirmWebsiteArchitecture] Event #${f}:`,b.type,JSON.stringify(b.data).substring(0,100)),n(b)}catch{console.warn("Failed to parse event:",y)}}}}catch(c){console.error("[confirmWebsiteArchitecture] Error:",c),c.name!=="AbortError"&&s(c)}})(),()=>{o.abort()}}function Mye(e,t,r,n,s){const a=new AbortController;return console.log("[startWebsitePreview] Starting with sessionId:",e,"files count:",s==null?void 0:s.length),(async()=>{var l;try{const u=await fetch(`/api/v1/agent-v2/sessions/${e}/website/preview`,{method:"POST",headers:$i(),body:JSON.stringify({files:s}),signal:a.signal});if(console.log("[startWebsitePreview] Response status:",u.status),!u.ok)throw new Error(`HTTP error! status: ${u.status}`);const c=(l=u.body)==null?void 0:l.getReader();if(!c)throw new Error("No response body");const d=new TextDecoder;let h="",m=0;for(;;){const{done:f,value:p}=await c.read();if(f){console.log("[startWebsitePreview] Stream done, total events:",m),n();break}h+=d.decode(p,{stream:!0});const g=h.split(` 1095`);h=g.pop()||"";for(const x of g)if(x.startsWith("data: ")){const w=x.slice(6);if(w==="[DONE]"){console.log("[startWebsitePreview] Received [DONE], total events:",m),n();return}try{const y=JSON.parse(w);m++,console.log(`[startWebsitePreview] Event #${m}:`,y.type,JSON.stringify(y.data).substring(0,100)),t(y)}catch{console.warn("Failed to parse event:",w)}}}}catch(u){console.error("[startWebsitePreview] Error:",u),u.name!=="AbortError"&&r(u)}})(),()=>{a.abort()}}async function Oye(e){try{const t=await fetch(`/api/v1/agent-v2/sessions/${e}/website/state`,{headers:$i()});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}catch(t){return{success:!1,hasState:!1,error:t instanceof Error?t.message:"Unknown error"}}}const Lye={exportAsZip:async(e,t)=>{var r,n,s,a,o;try{const l=await fetch(`/api/v1/agent-v2/sessions/${e}/website/deploy`,{method:"POST",headers:$i(),body:JSON.stringify({deployTarget:"export",files:t})});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);const u=(r=l.body)==null?void 0:r.getReader();if(!u)throw new Error("No response body");const c=new TextDecoder;let d="",h={success:!1};for(;;){const{done:m,value:f}=await u.read();if(m)break;d+=c.decode(f,{stream:!0});const p=d.split(` 1096`);d=p.pop()||"";for(const g of p)if(g.startsWith("data: ")){const x=g.slice(6);if(x==="[DONE]")return h;try{const w=JSON.parse(x);w.type==="artifact_update"&&((s=(n=w.data)==null?void 0:n.payload)!=null&&s.zipUrl)&&(h={success:!0,zipUrl:w.data.payload.zipUrl}),w.type==="content"&&((o=(a=w.data)==null?void 0:a.text)!=null&&o.includes("å¯¼åºæå"))&&(h.success=!0)}catch{console.warn("Failed to parse event:",x)}}}return h}catch(l){return console.error("Website export failed:",l),{success:!1,error:l instanceof Error?l.message:"Unknown error"}}},downloadAsZipLocal:async(e,t)=>{const r=(await Je(async()=>{const{default:u}=await import("./jszip.min-CCODYnd_.js").then(c=>c.j);return{default:u}},__vite__mapDeps([0,1]))).default,n=new r;for(const u of t){const c=u.path.startsWith("/")?u.path.slice(1):u.path;n.file(c,u.content)}const s=`# ${e} 1097
1098This project was generated with Website Builder. 1099 1100## Getting Started 1101 11021. Open \`index.html\` in your browser to view the website. 1103 11042. To make changes, edit the HTML/CSS/JS files directly. 1105 1106## Project Structure 1107 1108\`\`\` 1109${t.map(u=>u.path.startsWith("/")?u.path.slice(1):u.path).join(` 1110`)} 1111\`\`\` 1112 1113## Tech Stack 1114 1115- HTML5 1116- Tailwind CSS (CDN) 1117- Vanilla JavaScript 1118 1119## License 1120 1121This project is private and proprietary. 1122`;n.file("README.md",s);const a=await n.generateAsync({type:"blob"}),o=URL.createObjectURL(a),l=document.createElement("a");l.href=o,l.download=`${e.replace(/[^a-zA-Z0-9-_]/g,"-").toLowerCase()}.zip`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(o)}},Vr={isStreaming:!1,currentContent:"",currentPlan:null,currentArtifacts:[],thinkingText:"",reasoningText:"",sessionId:null},$t=ya((e,t)=>({cachedResourceData:{},cachedOutlineData:{},cachedWebsiteArchitectureData:{},sessions:[],currentSessionId:null,messages:[],isLoadingMessages:!1,streaming:Vr,activeStreamingSessionId:null,activeStreamingSessions:{},sessionStreamingCache:{},sessionMessagesCache:{},sessionPendingConfirmationCache:{},pendingConfirmation:null,_creditErrorFlag:0,activeTab:localStorage.getItem("chat_active_tab")||"chat",selectedChatModel:localStorage.getItem("chat_selected_model")||null,webSearchEnabled:localStorage.getItem("chat_web_search")==="true",memoSearchEnabled:localStorage.getItem("chat_memo_search")==="true",setActiveTab:r=>{localStorage.setItem("chat_active_tab",r),e({activeTab:r})},setSelectedChatModel:r=>{localStorage.setItem("chat_selected_model",r),e({selectedChatModel:r})},toggleWebSearch:()=>e(r=>{const n=!r.webSearchEnabled;return localStorage.setItem("chat_web_search",String(n)),{webSearchEnabled:n}}),toggleMemoSearch:()=>e(r=>{const n=!r.memoSearchEnabled;return localStorage.setItem("chat_memo_search",String(n)),{memoSearchEnabled:n}}),setSessions:r=>e({sessions:r}),addSession:r=>e(n=>({sessions:[r,...n.sessions]})),setCurrentSession:r=>e({currentSessionId:r}),setMessages:r=>e({messages:r}),addMessage:r=>e(n=>({messages:[...n.messages,r]})),updateMessage:(r,n)=>e(s=>({messages:s.messages.map(a=>a.id===r?{...a,...n}:a)})),removeMessages:r=>e(n=>({messages:n.messages.filter(s=>!r.includes(s.id))})),setLoadingMessages:r=>e({isLoadingMessages:r}),startStreaming:r=>e(n=>{const s=r||n.currentSessionId;return{streaming:{...Vr,isStreaming:!0,sessionId:s},activeStreamingSessionId:s,activeStreamingSessions:s?{...n.activeStreamingSessions,[s]:!0}:n.activeStreamingSessions}}),startStreamingPhase:(r="",n)=>e(s=>({streaming:{...Vr,isStreaming:!0,currentContent:r,sessionId:n||s.streaming.sessionId||s.activeStreamingSessionId}})),stopStreaming:()=>e(r=>({streaming:{...r.streaming,isStreaming:!1}})),appendContent:(r,n)=>e(s=>{var b;const a=n||s.activeStreamingSessionId,o=s.currentSessionId;if(!a&&!o)return console.warn("[appendContent] Missing session context, skipping append"),s;const l=s.streaming.sessionId&&a&&s.streaming.sessionId!==a,u=a&&o&&a!==o||l,c=a?(b=s.sessionStreamingCache[a])==null?void 0:b.currentContent:null,d=(s.streaming.currentContent||"").length,h=(c||"").length,m=!u&&d===0&&h>0;let f;if(u||m){const k=s.sessionStreamingCache[a];f=(k==null?void 0:k.currentContent)||""}else f=s.streaming.currentContent;if(r.length>50&&f.includes(r))return console.warn("Skipping duplicate content block:",r.substring(0,50)+"..."),s;if(f.endsWith(r)&&r.length>20)return console.warn("Skipping duplicate trailing content"),s;let p=r;const g="![ppt-resource-selector]()",x="![ppt-outline-editor]()",w="![website-architecture-confirm]()";if(f.includes(g)&&p.includes(g)&&(console.warn("Removing duplicate resource selector button from appended content"),p=p.replace(/\n*!\[ppt-resource-selector\]\(\)/g,"")),f.includes(x)&&p.includes(x)&&(console.warn("Removing duplicate outline editor button from appended content"),p=p.replace(/\n*!\[ppt-outline-editor\]\(\)/g,"")),f.includes(w)&&p.includes(w)&&(console.warn("Removing duplicate website architecture confirm button from appended content"),p=p.replace(/\n*!\[website-architecture-confirm\]\(\)/g,"")),!p.trim())return s;const y=f+p;if((u||m)&&a){const k=s.sessionStreamingCache[a]||{...Vr};return{sessionStreamingCache:{...s.sessionStreamingCache,[a]:{...k,currentContent:y}}}}return{streaming:{...s.streaming,currentContent:y}}}),setThinking:(r,n)=>e(s=>{var f;const a=n||s.activeStreamingSessionId,o=s.currentSessionId,l=s.streaming.sessionId&&a&&s.streaming.sessionId!==a,u=a&&o&&a!==o||l,c=a?(f=s.sessionStreamingCache[a])==null?void 0:f.currentContent:null,d=(s.streaming.currentContent||"").length,h=(c||"").length,m=!u&&d===0&&h>0;if((u||m)&&a){const p=s.sessionStreamingCache[a]||{...Vr};return{sessionStreamingCache:{...s.sessionStreamingCache,[a]:{...p,thinkingText:r}}}}return{streaming:{...s.streaming,thinkingText:r}}}),setPlan:(r,n)=>e(s=>{var f;const a=n||s.activeStreamingSessionId,o=s.currentSessionId,l=s.streaming.sessionId&&a&&s.streaming.sessionId!==a,u=a&&o&&a!==o||l,c=a?(f=s.sessionStreamingCache[a])==null?void 0:f.currentContent:null,d=(s.streaming.currentContent||"").length,h=(c||"").length,m=!u&&d===0&&h>0;if((u||m)&&a){const p=s.sessionStreamingCache[a]||{...Vr};return{sessionStreamingCache:{...s.sessionStreamingCache,[a]:{...p,currentPlan:r}}}}return{streaming:{...s.streaming,currentPlan:r}}}),updatePlanStep:(r,n,s)=>e(a=>{var p;const o=s||a.activeStreamingSessionId,l=a.currentSessionId,u=a.streaming.sessionId&&o&&a.streaming.sessionId!==o,c=o&&l&&o!==l||u,d=o?(p=a.sessionStreamingCache[o])==null?void 0:p.currentContent:null,h=(a.streaming.currentContent||"").length,m=(d||"").length,f=!c&&h===0&&m>0;if((c||f)&&o){const g=a.sessionStreamingCache[o]||{...Vr};return g.currentPlan?{sessionStreamingCache:{...a.sessionStreamingCache,[o]:{...g,currentPlan:{...g.currentPlan,steps:g.currentPlan.steps.map(x=>x.id===r?{...x,...n}:x)}}}}:a}return a.streaming.currentPlan?{streaming:{...a.streaming,currentPlan:{...a.streaming.currentPlan,steps:a.streaming.currentPlan.steps.map(g=>g.id===r?{...g,...n}:g)}}}:a}),addArtifact:(r,n)=>e(s=>{var f;const a=n||s.activeStreamingSessionId,o=s.currentSessionId,l=s.streaming.sessionId&&a&&s.streaming.sessionId!==a,u=a&&o&&a!==o||l,c=a?(f=s.sessionStreamingCache[a])==null?void 0:f.currentContent:null,d=(s.streaming.currentContent||"").length,h=(c||"").length,m=!u&&d===0&&h>0;if((u||m)&&a){const p=s.sessionStreamingCache[a]||{...Vr};return{sessionStreamingCache:{...s.sessionStreamingCache,[a]:{...p,currentArtifacts:[...p.currentArtifacts||[],r]}}}}return{streaming:{...s.streaming,currentArtifacts:[...s.streaming.currentArtifacts,r]}}}),updateArtifact:(r,n,s)=>e(a=>{var p;const o=s||a.activeStreamingSessionId,l=a.currentSessionId,u=a.streaming.sessionId&&o&&a.streaming.sessionId!==o,c=o&&l&&o!==l||u,d=o?(p=a.sessionStreamingCache[o])==null?void 0:p.currentContent:null,h=(a.streaming.currentContent||"").length,m=(d||"").length,f=!c&&h===0&&m>0;if((c||f)&&o){const g=a.sessionStreamingCache[o]||{...Vr};return{sessionStreamingCache:{...a.sessionStreamingCache,[o]:{...g,currentArtifacts:(g.currentArtifacts||[]).map(x=>x.id===r?{...x,...n}:x)}}}}return{streaming:{...a.streaming,currentArtifacts:a.streaming.currentArtifacts.map(g=>g.id===r?{...g,...n}:g)}}}),handleArtifactUpdate:(r,n)=>{const{artifactId:s,updateType:a,payload:o}=r;e(l=>{var j,E,A,R;const u=n||l.activeStreamingSessionId,c=l.currentSessionId,d=l.streaming.sessionId&&u&&l.streaming.sessionId!==u,h=u&&c&&u!==c||d,m=u?(j=l.sessionStreamingCache[u])==null?void 0:j.currentContent:null,f=(l.streaming.currentContent||"").length,p=(m||"").length,g=!h&&f===0&&p>0,x=(h||g)&&u,y=[...x?((E=l.sessionStreamingCache[u])==null?void 0:E.
1122currentArtifacts)||[]:l.streaming.currentArtifacts],b=y.findIndex(M=>M.id===s),k=M=>{if(x&&u){const B=l.sessionStreamingCache[u]||{...Vr};return{sessionStreamingCache:{...l.sessionStreamingCache,[u]:{...B,currentArtifacts:M}}}}return{streaming:{...l.streaming,currentArtifacts:M}}};if(b===-1){const M=["initializing","collecting","preparing","awaiting_resources","analyzing","designing","awaiting_confirm"],B=o.status&&M.includes(o.status);if(["outline_started","outline_completed","slide_added","file_added"].includes(a)||a==="status"&&!B&&["outline","generating","generated"].includes(o.status||"")){const H=r.artifactType,L=a==="file_added"||a==="status"&&H==="website"&&o.status&&["generating","generated"].includes(o.status);if(H==="document")return console.log("[handleArtifactUpdate] Document type update, skipping temp artifact creation"),l;if(L){const G={id:s,type:"website",title:"Website Project",websiteType:"landing",status:o.status||"generating",progress:o.progress||0,currentStep:o.currentStep,files:o.file?[o.file]:[],createdAt:new Date().toISOString()};return console.log("[handleArtifactUpdate] Creating new website artifact, updateType:",a,"status:",o.status),setTimeout(()=>{oi.getState().updateArtifact(G)},0),k([...y,G])}const ee={id:s,type:"presentation",title:"Presentation",presentationType:"slides",slides:o.slide?[o.slide]:[],totalSlides:o.totalSlides||0,completedSlides:((A=o.slide)==null?void 0:A.status)==="completed"?1:0,status:o.status||(a==="outline_started"?"outline":"initializing"),progress:o.progress||0,currentStep:o.currentStep,outline:o.outline,createdAt:new Date().toISOString()};return k([...y,ee])}return l}const T=y[b];if(T.type==="website"){const M=T;switch(a){case"file_added":if(o.file){const W=[...M.files||[],o.file];y[b]={...M,files:W,progress:o.progress||M.progress,currentStep:o.currentStep||`Generated ${o.processedFiles||W.length}/${o.totalFiles||"?"} files`},console.log("[handleArtifactUpdate] Website file added:",o.file.path,"total:",W.length)}break;case"file_updated":if(o.file){const W=o.file,H=[...M.files||[]],L=H.findIndex($=>$.path===W.path);L!==-1&&(H[L]=W),y[b]={...M,files:H,progress:o.progress||M.progress,currentStep:o.currentStep}}break;case"preview_ready":y[b]={...M,status:"previewing",progress:o.progress||M.progress,previewUrl:o.previewUrl};break;case"deployed":y[b]={...M,status:"deployed",progress:100,deployedUrl:o.deployedUrl};break;case"status":y[b]={...M,status:o.status||M.status,progress:o.progress||M.progress,currentStep:o.currentStep||M.currentStep};break;case"progress":y[b]={...M,progress:o.progress||M.progress,currentStep:o.currentStep||M.currentStep};break}const B=y[b];return setTimeout(()=>{oi.getState().updateArtifact(B)},0),k(y)}if(T.type!=="presentation")return l;const S=T;switch(a){case"outline_started":y[b]={...S,status:"outline",progress:o.progress||S.progress,currentStep:o.currentStep};break;case"outline_completed":y[b]={...S,status:"generating",progress:o.progress||S.progress,currentStep:o.currentStep,outline:o.outline,totalSlides:o.totalSlides||((R=o.outline)==null?void 0:R.length)||0};break;case"slide_added":if(o.slide){const M=[...S.slides||[],o.slide];y[b]={...S,slides:M,totalSlides:o.totalSlides||M.length,completedSlides:M.filter(B=>B.status==="completed").length,progress:o.progress||S.progress,currentStep:o.currentStep}}break;case"slide_updated":if(o.slide&&o.slideIndex!==void 0){const M=[...S.slides||[]];M[o.slideIndex]=o.slide,y[b]={...S,slides:M,completedSlides:M.filter(B=>B.status==="completed").length,progress:o.progress||S.progress,currentStep:o.currentStep}}break;case"progress":y[b]={...S,progress:o.progress||S.progress,currentStep:o.currentStep||S.currentStep};break;case"status":y[b]={...S,status:o.status||S.status,progress:o.progress||S.progress,currentStep:o.currentStep||S.currentStep};break}return k(y)})},clearStreamingState:()=>e(r=>{var a,o,l;const n=r.pendingConfirmation;if(n&&n.sessionId===r.currentSessionId)return console.log("[clearStreamingState] Preserving content for multi-phase flow, pending:",n.type,"content length:",(a=r.streaming.currentContent)==null?void 0:a.length),{streaming:{...Vr,currentContent:r.streaming.currentContent,currentArtifacts:r.streaming.currentArtifacts,sessionId:r.streaming.sessionId}};const s=r.activeStreamingSessionId;if(s&&(r.streaming.currentContent||r.streaming.currentArtifacts.length>0)){const u=r.sessionStreamingCache[s];if(u){const c=r.streaming.currentContent.length>(((o=u.currentContent)==null?void 0:o.length)||0)?r.streaming.currentContent:u.currentContent,d=r.streaming.currentArtifacts.length>(((l=u.currentArtifacts)==null?void 0:l.length)||0)?r.streaming.currentArtifacts:u.currentArtifacts,h=r.streaming.currentPlan||u.currentPlan;return console.log("[clearStreamingState] Merging content to cache before clear, activeSession:",s,"mergedContent length:",c==null?void 0:c.length),{streaming:Vr,sessionStreamingCache:{...r.sessionStreamingCache,[s]:{...u,currentContent:c,currentArtifacts:d,currentPlan:h}}}}}return{streaming:Vr}}),saveStreamingStateToCache:r=>e(n=>{var a,o;const s=((a=n.pendingConfirmation)==null?void 0:a.sessionId)===r;if(n.streaming.isStreaming||n.streaming.currentContent||s){console.log("[saveStreamingStateToCache] Saving streaming state for session:",r,"content length:",(o=n.streaming.currentContent)==null?void 0:o.length,"messages count:",n.messages.length,"hasPendingConfirmation:",s);const l={sessionStreamingCache:{...n.sessionStreamingCache,[r]:{...n.streaming}},sessionMessagesCache:{...n.sessionMessagesCache,[r]:[...n.messages]}};return s&&n.pendingConfirmation&&(l.sessionPendingConfirmationCache={...n.sessionPendingConfirmationCache,[r]:{...n.pendingConfirmation}}),l}return n}),restoreStreamingStateFromCache:r=>e(n=>{var u;const s=n.sessionStreamingCache[r],a=n.sessionMessagesCache[r],o=n.sessionPendingConfirmationCache[r];console.log("[restoreStreamingStateFromCache] sessionId:",r,"cachedState:",!!s,"cac
1122hedMessages:",a==null?void 0:a.length,"currentMessages:",n.messages.length,"cachedPendingConfirmation:",!!o);let l=n.messages;if(a&&a.length>0){const c=n.messages.length>0&&n.messages.every(d=>(d.sessionId||d.conversationId)===r);(!c||n.messages.length<a.length)&&(console.log("[restoreStreamingStateFromCache] Using cached messages, count:",a.length,"reason:",c?"more messages in cache":"session mismatch"),l=a)}if(s&&(s.isStreaming||s.currentContent)){if(console.log("[restoreStreamingStateFromCache] Restoring streaming state for session:",r,"content length:",(u=s.currentContent)==null?void 0:u.length,"isStreaming:",s.isStreaming),!s.isStreaming){const d=[...l].reverse().find(g=>g.role==="assistant");let h=l;s.currentContent&&d&&(!d.content||d.content.length<s.currentContent.length)&&(h=l.map(g=>g.id===d.id?{...g,content:s.currentContent,artifacts:s.currentArtifacts.length>0?s.currentArtifacts:g.artifacts,plan:s.currentPlan||g.plan}:g));const m={...n.sessionStreamingCache};delete m[r];const f={...n.sessionMessagesCache};delete f[r];const p={messages:h,streaming:{...Vr},sessionStreamingCache:m,sessionMessagesCache:f};return o&&(console.log("[restoreStreamingStateFromCache] Restoring pendingConfirmation for completed stream:",o.type),p.pendingConfirmation=o),p}const c={messages:l,streaming:{...s,sessionId:r},activeStreamingSessionId:r};return o&&(console.log("[restoreStreamingStateFromCache] Restoring pendingConfirmation for active stream:",o.type),c.pendingConfirmation=o),c}if(a&&a.length>n.messages.length){const c={messages:a};return o&&(console.log("[restoreStreamingStateFromCache] Restoring pendingConfirmation (messages only):",o.type),c.pendingConfirmation=o),c}return o?(console.log("[restoreStreamingStateFromCache] Restoring pendingConfirmation only:",o.type),{pendingConfirmation:o}):n}),clearStreamingStateCache:r=>e(n=>{const s={...n.sessionStreamingCache};return delete s[r],{sessionStreamingCache:s}}),addActiveStreamingSession:r=>e(n=>({activeStreamingSessions:{...n.activeStreamingSessions,[r]:!0}})),removeActiveStreamingSession:r=>e(n=>{const s={...n.activeStreamingSessions};return delete s[r],{activeStreamingSessions:s}}),isSessionStreaming:r=>{var s;const n=t();return n.activeStreamingSessions[r]||n.streaming.isStreaming&&n.streaming.sessionId===r||((s=n.sessionStreamingCache[r])==null?void 0:s.isStreaming)===!0},setPendingConfirmation:r=>e({pendingConfirmation:r}),updatePendingConfirmation:r=>e(n=>({pendingConfirmation:n.pendingConfirmation?{...n.pendingConfirmation,...r}:null})),clearPendingConfirmation:()=>e({pendingConfirmation:null}),clearPendingConfirmationForSession:r=>e(n=>{var s;return{pendingConfirmation:((s=n.pendingConfirmation)==null?void 0:s.sessionId)===r?null:n.pendingConfirmation}}),setCachedResourceData:(r,n)=>e(s=>({cachedResourceData:{...s.cachedResourceData,[r]:n}})),getCachedResourceData:r=>t().cachedResourceData[r]||null,setCachedOutlineData:(r,n)=>e(s=>({cachedOutlineData:{...s.cachedOutlineData,[r]:n}})),getCachedOutlineData:r=>t().cachedOutlineData[r]||null,setCachedWebsiteArchitectureData:(r,n)=>e(s=>({cachedWebsiteArchitectureData:{...s.cachedWebsiteArchitectureData,[r]:n}})),getCachedWebsiteArchitectureData:r=>t().cachedWebsiteArchitectureData[r]||null,handleAgentEvent:(r,n)=>{var m,f,p;const{appendContent:s,setThinking:a,setPlan:o,updatePlanStep:l,addArtifact:u,handleArtifactUpdate:c,stopStreaming:d,setPendingConfirmation:h}=t();switch(r.type){case"title_updated":e(g=>({sessions:g.sessions.map(x=>x.id===(n||g.currentSessionId)?{...x,title:r.data.title}:x)}));break;case"thinking":a(r.data.thought,n);break;case"plan_created":o(r.data.plan,n);break;case"step_start":l(r.data.step.id,{status:"running"},n);break;case"step_done":l(r.data.step.id,{status:r.data.result.success?"completed":"failed",result:r.data.result},n);break;case"artifact":{const g=t(),x=n||g.activeStreamingSessionId,w=g.currentSessionId,y=x&&w&&x!==w;if((y&&x?((m=g.sessionStreamingCache[x])==null?void 0:m.currentArtifacts)||[]:g.streaming.currentArtifacts).findIndex(T=>T.id===r.data.id)!==-1?(console.log("[handleAgentEvent] Updating existing artifact:",r.data.id,"type:",r.data.type,"isOtherSession:",y),e(y&&x?T=>{const S=T.sessionStreamingCache[x]||{...Vr},j=(S.currentArtifacts||[]).map(E=>E.id===r.data.id?r.data.type==="website"?{...E,...r.data,status:"generated",progress:100}:{...E,...r.data}:E);return{sessionStreamingCache:{...T.sessionStreamingCache,[x]:{...S,currentArtifacts:j}}}}:T=>
1122({streaming:{...T.streaming,currentArtifacts:T.streaming.currentArtifacts.map(S=>S.id===r.data.id?r.data.type==="website"?{...S,...r.data,status:"generated",progress:100}:{...S,...r.data}:S)}}))):u(r.data,n),r.data.type==="website"&&r.data.files&&r.data.files.length>0){console.log("[handleAgentEvent] Website artifact received with files:",r.data.files.length,"isCurrentSession:",y===!1);const T={...r.data,status:"generated",progress:100};oi.getState().updateArtifact(T),y||oi.getState().showWebsitePreview(T)}break}case"artifact_update":c(r.data,n);{const g=t(),w=(n||g.activeStreamingSessionId)===g.currentSessionId;(r.data.updateType==="file_added"||r.data.updateType==="status"&&r.data.artifactType==="website"&&((f=r.data.payload)==null?void 0:f.status)==="generating")&&w&&setTimeout(()=>{var S,j,E;const T=t().streaming.currentArtifacts.find(A=>A.id===r.data.artifactId&&A.type==="website");if(T)console.log("[handleAgentEvent] Opening website preview for artifact:",r.data.artifactId),oi.getState().showWebsitePreview(T);else{console.log("[handleAgentEvent] Creating temp website artifact for preview");const A={id:r.data.artifactId,type:"website",title:"Website Project",websiteType:"landing",status:"generating",progress:((S=r.data.payload)==null?void 0:S.progress)||10,currentStep:((j=r.data.payload)==null?void 0:j.currentStep)||"Generating code...",files:(E=r.data.payload)!=null&&E.file?[r.data.payload.file]:[],createdAt:new Date().toISOString()};oi.getState().showWebsitePreview(A)}},0)}break;case"await_resource_confirm":{const g=t(),x=n||g.currentSessionId,w=x===g.currentSessionId;if(x){const y=g.sessionStreamingCache[x],b=w?g.streaming.currentContent||"":(y==null?void 0:y.currentContent)||"",k=w?g.streaming.currentArtifacts:(y==null?void 0:y.currentArtifacts)||[],T=b.includes("![ppt-resource-selector]()")?b:b+` 1123 1124![ppt-resource-selector]()`;if(w){const j=[...g.messages].reverse().find(E=>E.role==="assistant");e(E=>({streaming:{...E.streaming,currentContent:T},messages:j?E.messages.map(A=>A.id===j.id?{...A,content:T,artifacts:k.length>0?k:A.artifacts}:A):E.messages})),j&&rb.updateContent(x,j.id,T).catch(E=>console.error("Failed to persist message content:",E)),oi.getState().showResourceSelector(r.data),h({type:"resource",sessionId:x,status:"pending",data:r.data,preservedContent:T})}else e(S=>{const j=S.sessionStreamingCache[x]||{...Vr};return{sessionStreamingCache:{...S.sessionStreamingCache,[x]:{...j,currentContent:T}}}});t().setCachedResourceData(x,r.data)}}break;case"await_outline_confirm":{const g=t(),x=n||g.currentSessionId,w=x===g.currentSessionId;if(x){const y=g.sessionStreamingCache[x],b=w?g.streaming.currentContent||"":(y==null?void 0:y.currentContent)||"",k=w?g.streaming.currentArtifacts:(y==null?void 0:y.currentArtifacts)||[],T=b.includes("![ppt-outline-editor]()")?b:b+` 1125 1126![ppt-outline-editor]()`;if(w){const j=[...g.messages].reverse().find(E=>E.role==="assistant");e(E=>({streaming:{...E.streaming,currentContent:T},messages:j?E.messages.map(A=>A.id===j.id?{...A,content:T,artifacts:k.length>0?k:A.artifacts}:A):E.messages})),j&&rb.updateContent(x,j.id,T).catch(E=>console.error("Failed to persist message content:",E)),oi.getState().showOutlineEditor(r.data),h({type:"outline",sessionId:x,status:"pending",data:r.data,preservedContent:T})}else e(S=>{const j=S.sessionStreamingCache[x]||{...Vr};return{sessionStreamingCache:{...S.sessionStreamingCache,[x]:{...j,currentContent:T}}}});t().setCachedOutlineData(x,r.data)}}break;case"await_architecture_confirm":{const g=t(),x=n||g.currentSessionId,w=x===g.currentSessionId;if(x){const y=g.sessionStreamingCache[x],b=w?g.streaming.currentContent||"":(y==null?void 0:y.currentContent)||"",k=w?g.streaming.currentArtifacts:(y==null?void 0:y.currentArtifacts)||[],T=b.includes("![website-architecture-confirm]()")?b:b+` 1127 1128![website-architecture-confirm]()`;if(w){const j=[...g.messages].reverse().find(E=>E.role==="assistant");e(E=>({streaming:{...E.streaming,currentContent:T},messages:j?E.messages.map(A=>A.id===j.id?{...A,content:T,artifacts:k.length>0?k:A.artifacts}:A):E.messages}
1128)),j&&rb.updateContent(x,j.id,T).catch(E=>console.error("Failed to persist message content:",E)),oi.getState().showWebsiteArchitectureConfirm(r.data),h({type:"website_architecture",sessionId:x,status:"pending",data:r.data,preservedContent:T})}else e(S=>{const j=S.sessionStreamingCache[x]||{...Vr};return{sessionStreamingCache:{...S.sessionStreamingCache,[x]:{...j,currentContent:T}}}});t().setCachedWebsiteArchitectureData(x,r.data)}}break;case"reasoning":e(g=>{const x=n||g.activeStreamingSessionId;if(x&&g.currentSessionId&&x!==g.currentSessionId&&x){const y=g.sessionStreamingCache[x]||{...Vr};return{sessionStreamingCache:{...g.sessionStreamingCache,[x]:{...y,reasoningText:(y.reasoningText||"")+r.data.text}}}}return{streaming:{...g.streaming,reasoningText:g.streaming.reasoningText+r.data.text}}});break;case"content":a("",n),s(r.data.text,n);break;case"usage":{const g=t(),x=n||g.activeStreamingSessionId,w=x===g.currentSessionId,y=(b,k)=>{const T=k.promptTokens||k.inputTokens||0,S=k.completionTokens||k.outputTokens||0,j=k.creditsUsed||k.credits||0;return b?{promptTokens:(b.promptTokens||0)+T,completionTokens:(b.completionTokens||0)+S,totalTokens:(b.promptTokens||0)+T+(b.completionTokens||0)+S,creditsUsed:(b.creditsUsed||0)+j,...k.phases||b.phases?{phases:[...b.phases||[],...k.phases||[]]}:{},...k.creditsDetail?{creditsDetail:[...b.creditsDetail||[],...k.creditsDetail]}:b.creditsDetail?{creditsDetail:b.creditsDetail}:{}}:{promptTokens:T,completionTokens:S,totalTokens:T+S,creditsUsed:j,...k.phases&&{phases:k.phases},...k.creditsDetail&&{creditsDetail:k.creditsDetail}}};if(w){const b=[...g.messages].reverse().find(k=>k.role==="assistant");b&&e(k=>({messages:k.messages.map(T=>T.id===b.id?{...T,usage:y(T.usage,r.data)}:T)}))}else if(x){const b=g.sessionMessagesCache[x];if(b){const k=[...b].reverse().find(T=>T.role==="assistant");k&&e(T=>({sessionMessagesCache:{...T.sessionMessagesCache,[x]:b.map(S=>S.id===k.id?{...S,usage:y(S.usage,r.data)}:S)}}))}}}break;case"done":break;case"error":{const g=t(),x=n||g.activeStreamingSessionId;x===g.currentSessionId?d():x&&e(k=>{const T=k.sessionStreamingCache[x];return T?{sessionStreamingCache:{...k.sessionStreamingCache,[x]:{...T,isStreaming:!1}}}:{}}),e(k=>{const T={...k.activeStreamingSessions};return n&&delete T[n],{activeStreamingSessionId:k.activeStreamingSessionId===x?null:k.activeStreamingSessionId,activeStreamingSessions:T}}),console.error("Agent error:",r.data.message);const y=(p=r.data)==null?void 0:p.code;(y===40201||y===40301||y===40302)&&e({_creditErrorFlag:Date.now()});const b=y===42901?Rt.t("chatUI.modelBusy"):r.data.message||"An unknown error occurred";s(` 1129 1130**Error:** ${b}`,n)}break}}}));function NG(){const e=Er(),t=ut(w=>w.isAuthenticated),[r,n]=v.useState(!0),{sessions:s,currentSessionId:a,setSessions:o,addSession:l,setCurrentSession:u,setMessages:c}=$t(),d=v.useCallback(async()=>{if(!t){n(!1);return}n(!0);try{const w=await b0.list();o(w)}catch(w){console.error("Failed to load sessions:",w)}finally{n(!1)}},[o,t]),h=v.useCallback(async()=>{try{const w=$t.getState().activeTab,y=await b0.create(w);return l(y),y}catch(w){return console.error("Failed to create session:",w),null}},[l]),m=v.useCallback(w=>{const y=window.location.pathname.match(/^\/([^/]+)\/app\/chat/),b=y?y[1]:"en";e(`/${b}/app/chat/${w}`)},[e]),[f,p]=v.useState(null),g=v.useCallback(async(w,y)=>{try{await b0.rename(w,y),o(s.map(b=>b.id===w?{...b,title:y}:b))}catch(b){console.error("Failed to rename session:",b)}},[s,o]),x=v.useCallback(async w=>{var y;p(w);try{await b0.delete(w),o(s.filter(k=>k.id!==w));const b=$t.getState();if(b.sessionStreamingCache[w]&&$t.setState(k=>{const T={...k.sessionStreamingCache};return delete T[w],{sessionStreamingCache:T}}),b.sessionMessagesCache[w]&&$t.setState(k=>{const T={...k.sessionMessagesCache};return delete T[w],{sessionMessagesCache:T}}),b.cachedResourceData[w]&&$t.setState(k=>{const T={...k.cachedResourceData};return delete T[w],{cachedResourceData:T}}),b.cachedOutlineData[w]&&$t.setState(k=>{const T={...k.cachedOutlineData};return delete T[w],{cachedOutlineData:T}}),b.cachedWebsiteArchitectureData[w]&&$t.setState(k=>{const T={...k.cachedWebsiteArchitectureData};return delete T[w],{cachedWebsiteArchitectureData:T}}),((y=b.pendingConfirmation)==null?void 0:y.sessionId)===w&&$t.getState().clearPendingConfirmation(),a===w){const k=s.filter(T=>T.id!==w);if(k.length>0)m(k[0].id);else{u(null),c([]);const T=window.location.pathname.match(/^\/([^/]+)\/app\/chat/),S=T?T[1]:"en";e(`/${S}
1130/app/chat`)}}}catch(b){console.error("Failed to delete session:",b)}finally{p(null)}},[s,a,o,u,c,m,e]);return v.useEffect(()=>{d()},[d]),{sessions:s,currentSessionId:a,isLoading:r,loadSessions:d,createSession:h,selectSession:m,deleteSession:x,deletingSessionId:f,renameSession:g}}function F9(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=F9(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function B9(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=F9(e))&&(n&&(n+=" "),n+=t);return n}const l3="-",SG=e=>{const t=CG(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(l3);return l[0]===""&&l.length!==1&&l.shift(),U9(l,t)||TG(o)},getConflictingClassGroupIds:(o,l)=>{const u=r[o]||[];return l&&n[o]?[...u,...n[o]]:u}}},U9=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?U9(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(l3);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},Fk=/^\[(.+)\]$/,TG=e=>{if(Fk.test(e)){const t=Fk.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},CG=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return AG(Object.entries(e.classGroups),r).forEach(([a,o])=>{f2(o,n,a,t)}),n},f2=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:Bk(t,s);a.classGroupId=r;return}if(typeof s=="function"){if(_G(s)){f2(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([a,o])=>{f2(o,Bk(t,a),r,n)})})},Bk=(e,t)=>{let r=e;return t.split(l3).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},_G=e=>e.isThemeGetter,AG=(e,t)=>t?e.map(([r,n])=>{const s=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[r,s]}):e,jG=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return s(a,o),o},set(a,o){r.has(a)?r.set(a,o):s(a,o)}}},$9="!",IG=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],a=t.length,o=l=>{const u=[];let c=0,d=0,h;for(let x=0;x<l.length;x++){let w=l[x];if(c===0){if(w===s&&(n||l.slice(x,x+a)===t)){u.push(l.slice(d,x)),d=x+a;continue}if(w==="/"){h=x;continue}}w==="["?c++:w==="]"&&c--}const m=u.length===0?l:l.substring(d),f=m.startsWith($9),p=f?m.substring(1):m,g=h&&h>d?h-d:void 0;return{modifiers:u,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:g}};return r?l=>r({className:l,parseClassName:o}):o},RG=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},DG=e=>({cache:jG(e.cacheSize),parseClassName:IG(e),...SG(e)}),MG=/\s+/,OG=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,a=[],o=e.trim().split(MG);let l="";for(let u=o.length-1;u>=0;u-=1){const c=o[u],{modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:f}=r(c);let p=!!f,g=n(p?m.substring(0,f):m);if(!g){if(!p){l=c+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=c+(l.length>0?" "+l:l);continue}p=!1}const x=RG(d).join(":"),w=h?x+$9:x,y=w+g;if(a.includes(y))continue;a.push(y);const b=s(g,p);for(let k=0;k<b.length;++k){const T=b[k];a.push(w+T)}l=c+(l.length>0?" "+l:l)}return l};function LG(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=z9(t))&&(n&&(n+=" "),n+=r);return n}const z9=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=z9(e[n]))&&(r&&(r+=" "),r+=t);return r};function PG(e,...t){let r,n,s,a=o;function o(u){const c=t.reduce((d,h)=>h(d),e());return r=DG(c),n=r.cache.get,s=r.cache.set,a=l,l(u)}function l(u){const c=n(u);if(c)return c;const d=OG(u,r);return s(u,d),d}return function(){return a(LG.apply(null,arguments))}}const ar=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},H9=/^\[(?:([a-z-]+):)?(.+)\]$/i,FG=/^\d+\/\d+$/,BG=new Set(["px","full","screen"]),UG=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$G=/\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$/,zG=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,HG=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qG=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,li=e=>vu(e)||BG.has(e)||FG.test(e),Qi=e=>hd(e,"length",ZG),vu=e=>!!e&&!Number.isNaN(Number(e)),nb=e=>hd(e,"number",vu),zd=e=>!!e&&Number.isInteger(Number(e)),WG=e=>e.endsWith("%")&&vu(e.slice(0,-1)),wt=e=>H9.test(e),Xi=e=>UG.test(e),VG=new Set(["length","size","percentage"]),GG=e=>hd(e,VG,q9),KG=e=>hd(e,"position",q9),YG=new Set(["image","url"]),QG=e=>hd(e,YG,eK),XG=e=>hd(e,"",JG),Hd=()=>!0,hd=(e,t,r)=>{const n=H9.exec(e);
vendor: 7,737 bytes, line 1130
1130return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},ZG=e=>$G.test(e)&&!zG.test(e),q9=()=>!1,JG=e=>HG.test(e),eK=e=>qG.test(e),tK=()=>{const e=ar("colors"),t=ar("spacing"),r=ar("blur"),n=ar("brightness"),s=ar("borderColor"),a=ar("borderRadius"),o=ar("borderSpacing"),l=ar("borderWidth"),u=ar("contrast"),c=ar("grayscale"),d=ar("hueRotate"),h=ar("invert"),m=ar("gap"),f=ar("gradientColorStops"),p=ar("gradientColorStopPositions"),g=ar("inset"),x=ar("margin"),w=ar("opacity"),y=ar("padding"),b=ar("saturate"),k=ar("scale"),T=ar("sepia"),S=ar("skew"),j=ar("space"),E=ar("translate"),A=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",wt,t],B=()=>[wt,t],W=()=>["",li,Qi],H=()=>["auto",vu,wt],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",wt],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[vu,wt];return{cacheSize:500,separator:":",theme:{colors:[Hd],spacing:[li,Qi],blur:["none","",Xi,wt],brightness:K(),borderColor:[e],borderRadius:["none","","full",Xi,wt],borderSpacing:B(),borderWidth:W(),contrast:K(),grayscale:Q(),hueRotate:K(),invert:Q(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[WG,Qi],inset:M(),margin:M(),opacity:K(),padding:B(),saturate:K(),scale:K(),sepia:Q(),skew:K(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",wt]}],container:["container"],columns:[{columns:[Xi]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...L(),wt]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],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",zd,wt]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",wt]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",zd,wt]}],"grid-cols":[{"grid-cols":[Hd]}],"col-start-end":[{col:["auto",{span:["full",zd,wt]},wt]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Hd]}],"row-start-end":[{row:["auto",{span:[zd,wt]},wt]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",wt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",wt]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],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":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",wt,t]}],"min-w":[{"min-w":[wt,t,"min","max","fit"]}],"max-w":[{"max-w":[wt,t,"none","full","min","max","fit","prose",{screen:[Xi]},Xi]}],h:[{h:[wt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[wt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[wt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[wt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xi,Qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",nb]}],"font-family":[{font:[Hd]}],"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",wt]}],"line-clamp":[{"line-clamp":["none",vu,nb]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",li,wt]}],"list-image":[{"list-image":["none",wt]}],"list-style-type":[{list:["none","disc","decimal",wt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",li,Qi]}],"underline-offset":[{"underline-offset":["auto",li,wt]}],"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:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",wt]}],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",wt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),KG]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",GG]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},QG]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}
vendor: 5,182 bytes, line 1130
1130],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...$(),"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":[w]}],"divide-style":[{divide:$()}],"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:["",...$()]}],"outline-offset":[{"outline-offset":[li,wt]}],"outline-w":[{outline:[li,Qi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[li,Qi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xi,XG]}],"shadow-color":[{shadow:[Hd]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Xi,wt]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[b]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"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",wt]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",wt]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",wt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[zd,wt]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",wt]}],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",wt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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"]}
1130],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",wt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[li,Qi,nb]}],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"]}}},W9=PG(tK);function it(...e){return W9(B9(e))}const rK={primary:"bg-[var(--theme)] text-white hover:bg-[var(--theme-hover)] hover:-translate-y-px shadow-[0_4px_14px_rgba(99,102,241,0.25)]",secondary:"bg-[var(--bg-secondary)] text-[var(--text-primary)] border border-ui-border hover:bg-[var(--bg-tertiary)] hover:border-[var(--border-strong)]",ghost:"bg-transparent text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)]",outline:"bg-[var(--bg-primary)] text-[var(--text-primary)] border border-ui-border hover:border-[var(--border-strong)] hover:bg-[var(--bg-hover)]",danger:"bg-ui-status-error text-white hover:opacity-90"},nK={sm:"px-3 py-1.5 text-xs rounded-md gap-1.5",md:"px-5 py-2.5 text-sm rounded-lg gap-2",lg:"px-7 py-3.5 text-base rounded-xl gap-2"},tc=v.forwardRef(({variant:e="primary",size:t="md",fullWidth:r,className:n="",disabled:s,children:a,...o},l)=>i.jsx("button",{ref:l,disabled:s,className:["inline-flex items-center justify-center font-semibold transition-all duration-200 cursor-pointer","disabled:opacity-50 disabled:cursor-not-allowed disabled:transform-none",rK[e],nK[t],r?"w-full":"",n].filter(Boolean).join(" "),...o,children:a}));tc.displayName="Button";function sK({open:e,onConfirm:t,onCancel:r,title:n,message:s,confirmLabel:a,cancelLabel:o,variant:l="default",loading:u=!1}){const{t:c}=We(),d=v.useRef(null);return v.useEffect(()=>(e?(document.body.style.overflow="hidden",setTimeout(()=>{var h;
1130return(h=d.current)==null?void 0:h.focus()},50)):document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),v.useEffect(()=>{if(!e)return;const h=m=>{m.key==="Escape"&&r()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[e,r]),e?i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:h=>{h.target===h.currentTarget&&r()},children:[i.jsx("div",{className:"absolute inset-0 bg-black/40"}),i.jsxs("div",{className:"relative bg-[var(--bg-primary)] border border-ui-border rounded-2xl shadow-xl w-full max-w-sm overflow-hidden",children:[n&&i.jsx("div",{className:"px-5 pt-5 pb-1",children:i.jsx("h3",{className:"text-base font-semibold text-[var(--text-primary)]",children:n})}),i.jsx("div",{className:"px-5 py-4",children:i.jsx("p",{className:"text-sm text-[var(--text-secondary)] leading-relaxed",children:s})}),i.jsxs("div",{className:"flex justify-end gap-2 px-5 pb-5",children:[i.jsx(tc,{variant:"secondary",size:"sm",onClick:r,disabled:u,children:o||c("common.cancel")}),i.jsx(tc,{ref:d,variant:l==="danger"?"danger":"primary",size:"sm",onClick:t,disabled:u,children:a||c("common.confirm")})]})]})]}):null}function aK(){const[e,t]=v.useState({open:!1,message:""}),r=v.useRef(),n=v.useCallback(l=>new Promise(u=>{r.current=u,t({...l,open:!0})}),[]),s=v.useCallback(()=>{var l;t(u=>({...u,open:!1})),(l=r.current)==null||l.call(r,!0)},[]),a=v.useCallback(()=>{var l;t(u=>({...u,open:!1})),(l=r.current)==null||l.call(r,!1)},[]),o=i.jsx(sK,{open:e.open,onConfirm:s,onCancel:a,title:e.title,message:e.message,confirmLabel:e.confirmLabel,cancelLabel:e.cancelLabel,variant:e.variant});return{confirm:n,ConfirmDialogElement:o}}function iK(){var n,s;const{user:e}=ut(),{data:t}=ga({queryKey:["subscription"],queryFn:()=>lo.getSubscription(),staleTime:5*60*1e3,enabled:!!e});return((s=(n=t==null?void 0:t.data)==null?void 0:n.subscription)==null?void 0:s.plan)||"free"}function Uk({size:e="sm"}){const t=iK();if(t==="free")return null;const r={pro:"bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300",max:"bg-orange-100 text-orange-700 dark:bg-orange-900/40 dark:text-orange-300"},n=e==="md"?"px-2.5 py-0.5 text-xs":"px-1.5 py-0.5 text-[10px]";return i.jsx("span",{className:`inline-flex items-center font-semibold uppercase rounded-full leading-none ${n} ${r[t]||""}`,children:t})}const $k="uniai-desktop-embed",V9="uniai-embed-mode";function oK(){const e=new URLSearchParams(window.location.search),t=e.get("embed");if(t==="desktop"||t==="agent"){sessionStorage.setItem($k,"1"),sessionStorage.setItem(V9,t);const r=e.get("_dt"),n=e.get("_rt");if(r){localStorage.setItem("token",r);const l=Date.now()+(n?10*60*1e3:3600*1e3);try{const u=localStorage.getItem("auth-storage");if(u){const c=JSON.parse(u);c.state=c.state||{},c.state.accessToken=r,c.state.refreshToken=n||null,c.state.isAuthenticated=!0,c.state.expiresAt=l,localStorage.setItem("auth-storage",JSON.stringify(c))}else localStorage.setItem("auth-storage",JSON.stringify({state:{accessToken:r,refreshToken:n||null,expiresAt:l,user:null,isAuthenticated:!0},version:0}));ut.setState({accessToken:r,refreshToken:n||null,expiresAt:l,isAuthenticated:!0})}catch{}}const s=e.get("theme");(s==="dark"||s==="light")&&zk(s),window.addEventListener("message",l=>{var u;if(((u=l.data)==null?void 0:u.type)==="uniai-desktop-theme"){const c=l.data.theme;(c==="dark"||c==="light")&&zk(c)}});const a=new URLSearchParams(window.location.search);a.delete("_dt"),a.delete("_rt");const o=`${window.location.pathname}?${a.toString()}${window.location.hash}`;return window.history.replaceState(null,"",o),!0}return sessionStorage.getItem($k)==="1"}function zk(e){const t=document.documentElement;t.classList.remove("light","dark"),t.classList.add(e),t.style.colorScheme=e,localStorage.setItem("uniia-theme",e)}const Ai=oK(),Hk=Ai&&sessionStorage.getItem(V9)==="agent";function lK(){return Ai}function Yu(e,t,r,n){const[s,a]=v.useState(()=>{if(r)return r}),o=(n==null?void 0:n.stable)??!1,l=v.useCallback(()=>{if(r&&dK(r)){a(r);return}if(r&&!xa(r)){a(r);return}if(e){Si.getUrl(e,t).then(a).catch(()=>{r&&a(r)});return}if(r&&xa(r)){Si.getUrlByPublicUrl(r).then(a).catch(()=>a(r));return}a(void 0)},[e,t,r]),u=v.useRef(null);return v.useEffect(()=>{const c=`${e||""}|${r||""}`;return o&&s&&u.current===c||(u.current=c,l(),o)?void 0:Si.onRefresh(l)},[l,o,s,e,r]),v.useEffect(()=>!e||o?void 0:Tt.onAssetPersisted(d=>{d.assetId===e&&Si.invalidate(e)}),[e,o]),s}function xa(e){return e.includes(".r2.dev/")||e.includes(".r2.cloudflarestorage.com/")||e.includes("uniai-pri.uniai.one/")}const cK=Ai;function Hr(e){if(!(!e||!xa(e)))return cK?void 0:"anonymous"}function uK(){const[e,t]=v.useState(!1),r=v.useCallback(s=>e?void 0:Hr(s),[e]),n=v.useCallback(s=>{const a=s.currentTarget;return!e&&a.crossOrigin?(console.warn("[media] video failed with crossOrigin â retrying without CORS (capture degrades)"),t(!0),!0):!1},[e]);return{applyCrossOrigin:r,onCorsError:n,videoKey:e?"nocors":"cors",corsDropped:e}}function Pye(e){const[t,r]=v.useState(void 0),[n,s]=v.useState(0),a=v.useRef(!1);v.useEffect(()=>{a.current=!1,r(void 0)},[e]);const o=v.useCallback(()=>{e&&(Si.invalidate(e),Si.getUrl(e).then(c=>{r(c),s(d=>d+1)}).catch(()=>s(c=>c+1)))},[e]),l=v.useCallback(()=>
1130!e||a.current?!1:(a.current=!0,console.warn("[media] load failed â re-signing asset URL once",e),o(),!0),[e,o]),u=v.useCallback(()=>{a.current=!0,e?o():s(c=>c+1)},[e,o]);return{onMediaError:l,retry:u,resignedUrl:t,mediaKey:`r${n}`}}function dK(e){if(!xa(e)||!e.includes("X-Amz-Signature="))return!1;const t=e.match(/[?&]X-Amz-Date=(\d{8}T\d{6}Z)/),r=e.match(/[?&]X-Amz-Expires=(\d+)/);if(!t||!r)return!1;const n=t[1],s=`${n.slice(0,4)}-${n.slice(4,6)}-${n.slice(6,8)}T${n.slice(9,11)}:${n.slice(11,13)}:${n.slice(13,15)}Z`,a=Date.parse(s);if(Number.isNaN(a))return!1;const o=parseInt(r[1],10);if(!Number.isFinite(o)||o<=0)return!1;const l=a+o*1e3,u=60*60*1e3;return l-Date.now()>u}const qk=200,vh=new Map,wh=new Map;let p2=[];const au=new Map;let sb=!1;function hK(){sb||(sb=!0,queueMicrotask(()=>{sb=!1;const e=[...new Set(p2)];if(p2=[],e.length!==0)for(let t=0;t<e.length;t+=qk){const r=e.slice(t,t+qk);ys.resolveAssetStates(r).then(({data:n})=>{const s=new Map(n.states.map(a=>[a.id,a]));for(const a of r){const o=s.get(a),l=o?{assetState:o.assetState,recycleBinDaysLeft:o.recycleBinDaysLeft}:{assetState:"hard_deleted"};vh.set(a,l),wh.delete(a);for(const u of au.get(a)||[])u.resolve(l);au.delete(a)}}).catch(n=>{for(const s of r){wh.delete(s);for(const a of au.get(s)||[])a.reject(n);au.delete(s)}})}}))}function mK(e){const t=vh.get(e);if(t)return Promise.resolve(t);const r=wh.get(e);if(r)return r;const n=new Promise((s,a)=>{const o=au.get(e)||[];o.push({resolve:s,reject:a}),au.set(e,o),p2.push(e),hK()});return wh.set(e,n),n}function fK(e){vh.delete(e),wh.delete(e)}function G9(e){const[t,r]=v.useState(()=>e?vh.get(e)??null:null),[n,s]=v.useState(0);v.useEffect(()=>{if(!e){r(null);return}let o=!0;const l=vh.get(e);if(l){r(l);return}return mK(e).then(u=>{o&&r(u)}).catch(()=>{}),()=>{o=!1}},[e,n]);const a=v.useCallback(()=>{e&&fK(e),r(null),s(o=>o+1)},[e]);return{state:t?t.assetState:"unknown",recycleBinDaysLeft:t==null?void 0:t.recycleBinDaysLeft,reload:a}}function K9({data:e,contentWidth:t,contentHeight:r,className:n="",assetId:s,onRestored:a}){const{t:o}=We(),{lang:l="zh-CN"}=Ut(),[u,c]=v.useState(!1),[d,h]=v.useState(!1),m={...t!==void 0?{width:t}:{},...r!==void 0?{height:r}:{}},f=async p=>{if(p.stopPropagation(),p.preventDefault(),!(u||!s)){c(!0),h(!1);try{await ys.restoreAsset(s),await(a==null?void 0:a())}catch{h(!0),c(!1)}}};if(e.assetState==="in_recycle_bin"){const p=typeof e.recycleBinDaysLeft=="number"?e.recycleBinDaysLeft:0;return i.jsxs("div",{className:`relative flex flex-col items-center justify-center text-center px-3 ${n}`,style:{background:"rgba(251, 191, 36, 0.08)",color:"#a16207",...m},children:[i.jsx(bh,{className:"w-7 h-7 mb-2",style:{color:"#d97706"}}),i.jsx("div",{className:"text-xs font-medium",style:{color:"#92400e"},children:o("art.orphan.inRecycleBin","å¨åæ¶ç«")}),i.jsx("div",{className:"text-[10px] mt-0.5 mb-2 opacity-80",children:o("art.orphan.inRecycleBinSub","å© {{n}} 天忰¸ä¹
å é¤",{n:p})}),s?i.jsx("button",{type:"button",disabled:u,onClick:f,onMouseDown:g=>g.stopPropagation(),onPointerDown:g=>g.stopPropagation(),className:"pointer-events-auto relative z-10 text-[10px] px-2 py-0.5 rounded border border-current/40 underline-offset-2 hover:underline disabled:opacity-60 disabled:cursor-not-allowed cursor-pointer",style:{color:"#a16207"},children:u?o("art.orphan.restoring","æ¢å¤ä¸â¦"):o("art.orphan.goToRecycleBin","ç¹å»æ¢å¤")}):i.jsx(Ke,{to:`/${l}/app/assets/recycle-bin`,className:"pointer-events-auto relative z-10 text-[10px] underline opacity-80 hover:opacity-100",style:{color:"#a16207"},onClick:g=>g.stopPropagation(),onMouseDown:g=>g.stopPropagation(),onPointerDown:g=>g.stopPropagation(),children:o("art.orphan.goToRecycleBin","ç¹å»æ¢å¤")}),d&&i.jsx("div",{className:"text-[10px] mt-1",style:{color:"#b91c1c"},children:o("art.orphan.restoreFailed","æ¢å¤å¤±è´¥ï¼å¯è½å·²è¶
è¿ 7 天ä¿çæï¼")})]})}return e.assetState==="hard_deleted"?i.jsxs("div",{className:`relative flex flex-col items-center justify-center text-center px-3 ${n}`,style:{background:"var(--bg-tertiary)",color:"var(--text-muted)",...m},children:[i.jsx(Ts,{className:"w-7 h-7 mb-2 opacity-60"}),i.jsx("div",{className:"text-xs font-medium",children:o("art.orphan.hardDeleted","已永ä¹
å é¤")}),i.jsx("div",{className:"text-[10px] opacity-70 mt-0.5",children:o("art.orphan.hardDeletedSub","è¶
è¿ 7 天ä¿çæï¼æ æ³æ¢å¤")})]}):i.jsxs("div",{className:`relative flex flex-col items-center justify-center bg-[var(--bg-tertiary)] text-[var(--text-muted)] ${n}`,style:m,children:[i.jsx(p1,{className:"w-8 h-8 mb-2"}),i.jsx("div",{className:"text-xs font-medium",children:o("art.orphan.title","èµæºå¤±æ")}),i.jsx("div",{className:"text-[10px] opacity-70 mt-0.5",children:o("art.orphan.desc","è¿å¼ å¾ç/è§é¢/é³é¢æ æ³å è½½")})]})}function pK(e){if(!xa(e)||!e.includes("X-Amz-Signature="))return!1;const t=e.match(/[?&]X-Amz-Date=(\d{8}T\d{6}Z)/),r=e.match(/[?&]X-Amz-Expires=(\d+)/);if(!t||!r)return!1;const n=t[1],s=`${n.slice(0,4)}-${n.slice(4,6)}-${n.slice(6,8)}T${n.slice(9,11)}:${n.slice(11,13)}:${n.slice(13,15)}Z`,a=Date.parse(s);if(Number.isNaN(a))return!1;const o=parseInt(r[1],10);return!Number.isFinite(o)||o<=0?!1:a+o*1e3<=Date.now()}const gK="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",c3=v.forwardRef(({assetId:e,url:t,alt:r="",crossOrigin:n,className:s,allowDeletedState:a,...o},l)=>{const u=Yu(e,void 0,t||void 0),{state:c,recycleBinDaysLeft:d,reload:h}=G9(e||void 0);if(!a&&e&&(c==="in_recycle_bin"||c==="hard_deleted"))return i.jsx(K9,{data:{assetState:c,recycleBinDaysLeft:d},assetId:e,className:s,onRestored:async()=>{Si.invalidate(e),h()}});const m=u||t||"",f=m&&!pK(m),p=f?m:gK,g=n??(f?Hr(p):void 0);return i.jsx("img",{ref:l,src:p,alt:r,crossOrigin:g,className:s,...o})});c3.displayName="SignedImage";function lg({url:e,...t}){return i.jsx(c3,{url:e,...t})}function Y9(e){return e<768?{isMobile:!0,isTablet:!1,isDesktop:!1,breakpoint:"mobile"}:e<1024?{isMobile:!1,isTablet:!0,isDesktop:!1,breakpoint:"tablet"}:{isMobile:!1,isTablet:!1,isDesktop:!0,breakpoint:"desktop"}}let g2=Y9(typeof window<"u"?window.innerWidth:1024);const x2=new Set;typeof window<"u"&&window.addEventListener("resize",()=>{const e=Y9(window.innerWidth);e.breakpoint!==g2.breakpoint&&(g2=e,x2.forEach(t=>t()))});function xK(e){return x2.add(e),()=>x2.delete(e)}function Wk(){return g2}function Q9(){return v.useSyncExternalStore(xK,Wk,Wk)}function u3(){return Q9().isMobile}const X9=v.createContext(void 0);function bK({children:e}){const{isMobile:t}=Q9(),[r,n]=v.useState(t);return v.useEffect(()=>{t&&n(!0)},[t]),i.jsx(X9.Provider,{value:{collapsed:r,setCollapsed:n,isMobile:t},children:e})}function Z9(){const e=v.useContext(X9);
1130if(e===void 0)throw new Error("useSidebar must be used within a SidebarProvider");return e}const b2=[{code:"zh-CN",label:"ç®ä½ä¸æ",labelEn:"Simplified Chinese"},{code:"zh-TW",label:"ç¹é«ä¸æ",labelEn:"Traditional Chinese"},{code:"en-US",label:"English",labelEn:"English"},{code:"ja-JP",label:"æ¥æ¬èª",labelEn:"Japanese"},{code:"ko-KR",label:"íêµì´",labelEn:"Korean"},{code:"es-ES",label:"Español",labelEn:"Spanish"},{code:"fr-FR",label:"Français",labelEn:"French"},{code:"de-DE",label:"Deutsch",labelEn:"German"},{code:"pt-BR",label:"Português (Brasil)",labelEn:"Portuguese (Brazil)"},{code:"pt-PT",label:"Português (Portugal)",labelEn:"Portuguese (Portugal)"},{code:"ru-RU",label:"Ð ÑÑÑкий",labelEn:"Russian"},{code:"ar-SA",label:"Ø§ÙØ¹Ø±Ø¨ÙØ©",labelEn:"Arabic"},{code:"hi-IN",label:"हिनà¥à¤¦à¥",labelEn:"Hindi"},{code:"th-TH",label:"à¹à¸à¸¢",labelEn:"Thai"},{code:"vi-VN",label:"Tiếng Viá»t",labelEn:"Vietnamese"},{code:"id-ID",label:"Bahasa Indonesia",labelEn:"Indonesian"},{code:"ms-MY",label:"Bahasa Melayu",labelEn:"Malay"},{code:"it-IT",label:"Italiano",labelEn:"Italian"},{code:"nl-NL",label:"Nederlands",labelEn:"Dutch"},{code:"pl-PL",label:"Polski",labelEn:"Polish"},{code:"tr-TR",label:"Türkçe",labelEn:"Turkish"},{code:"uk-UA",label:"УкÑаÑнÑÑка",labelEn:"Ukrainian"},{code:"sv-SE",label:"Svenska",labelEn:"Swedish"},{code:"da-DK",label:"Dansk",labelEn:"Danish"},{code:"fi-FI",label:"Suomi",labelEn:"Finnish"},{code:"nb-NO",label:"Norsk",labelEn:"Norwegian"},{code:"el-GR",label:"Îλληνικά",labelEn:"Greek"},{code:"cs-CZ",label:"ÄeÅ¡tina",labelEn:"Czech"},{code:"ro-RO",label:"RomânÄ",labelEn:"Romanian"},{code:"hu-HU",label:"Magyar",labelEn:"Hungarian"},{code:"he-IL",label:"×¢×ר×ת",labelEn:"Hebrew"},{code:"bn-BD",label:"বাà¦à¦²à¦¾",labelEn:"Bengali"},{code:"tl-PH",label:"Filipino",labelEn:"Filipino"}],Fye=b2.filter(e=>["zh-CN","en-US","ja-JP","ko-KR","fr-FR","de-DE","es-ES"].includes(e.code));function Bye(e,t){return e.label===e.labelEn?e.label:t?e.code===t||e.code.startsWith(t)?e.label:t.startsWith("en")?`${e.labelEn}(${e.label})`:`${e.label}(${e.labelEn})`:`${e.label}(${e.labelEn})`}function cg(e,t){return e.code===t||e.nativeName===e.name?e.nativeName:t.startsWith("en")?`${e.name}(${e.nativeName})`:`${e.nativeName}(${e.name})`}function Uye(e){if(e==="zh-TW")return String.fromCodePoint(127464,127475);const t=e.split("-")[1];if(!t||t.length!==2)return"ð";const r=t.toUpperCase().split("").map(n=>127462+n.charCodeAt(0)-65);return String.fromCodePoint(...r)}function $ye(e){const t=b2.find(n=>n.code===e);if(t)return t.code;const r=b2.find(n=>n.code.startsWith(e));return r?r.code:"zh-CN"}const M0={chat:{key:"chat",labelKey:"nav.chatMenu",icon:Vu,items:[{path:"chat",icon:Vu,nameKey:"nav.textChat",descKey:"nav.textChatDesc"}]},translate:{key:"translate",labelKey:"nav.translate",icon:lp,items:[{path:"translate/text",icon:lp,nameKey:"nav.translateText",descKey:"nav.translateTextDesc"},{path:"translate/document",icon:e3,nameKey:"nav.translateDoc",descKey:"nav.translateDocDesc"},{path:"translate/subtitle",icon:R9,nameKey:"nav.translateSubtitle",descKey:"nav.translateSubtitleDesc"}]},text:{key:"text",labelKey:"nav.text",icon:Ok,items:[{path:"writing",icon:Ok,nameKey:"nav.textWriting",descKey:"nav.textWritingDesc",hideOnMobile:!0},{path:"reply",icon:eG,nameKey:"nav.textReply",descKey:"nav.textReplyDesc"},{path:"grammar",icon:I9,nameKey:"nav.textGrammar",descKey:"nav.textGrammarDesc"},{path:"summary",icon:Qr,nameKey:"nav.textSummary",descKey:"nav.textSummaryDesc"}]},create:{key:"create",labelKey:"nav.create",icon:eb,homePath:"create",items:[{path:"create",icon:eb,nameKey:"nav.create",descKey:"nav.createDesc"}]},image:{key:"image",labelKey:"nav.imageMenu",icon:LV,homePath:"image/edit",items:[{path:"image/edit",icon:Ss,nameKey:"nav.imageEdit",descKey:"nav.imageEditDesc"},{path:"image/remove-bg",icon:Xw,nameKey:"nav.imageRemoveBg",descKey:"nav.imageRemoveBgDesc"},{path:"image/upscale",icon:Zw,nameKey:"nav.imageUpscale",descKey:"nav.imageUpscaleDesc"},{path:"image/ocr",icon:nG,nameKey:"nav.imageOCR",descKey:"nav.imageOCRDesc"},{path:"image/analysis",icon:No,nameKey:"nav.imageAnalysis",descKey:"nav.imageAnalysisDesc"},{path:"image/restore",icon:eb,nameKey:"nav.imageRestore",descKey:"nav.imageRestoreDesc"},{path:"image/translate",icon:lp,nameKey:"nav.imageTranslate",descKey:"nav.imageTranslateDesc"}]},audio:{key:"audio",labelKey:"nav.audio",icon:Ku,items:[{path:"audio/tts",icon:Ku,nameKey:"nav.audioTTS",descKey:"nav.audioTTSDesc"},{path:"audio/stt",icon:y1,nameKey:"nav.audioSTT",descKey:"nav.audioSTTDesc"},{path:"audio/podcast",icon:DV,nameKey:"nav.audioPodcast",descKey:"nav.audioPodcastDesc"}]},agents:{key:"agents",labelKey:"nav.agents",icon:ng,hideOnMobile:!0,items:[{path:"agent/research",icon:yh,nameKey:"nav.agentResearch",descKey:"nav.agentResearchDesc"},{path:"agent/marketing",icon:bG,nameKey:"nav.agentMarketing",descKey:"nav.agentMarketingDesc"},{path:"agent/data",icon:ng,nameKey:"nav.agentData",descKey:"nav.agentDataDesc"}]},document:{key:"document",labelKey:"nav.document",icon:sg,hideOnMobile:!0,items:[{path:"document",icon:sg,nameKey:"nav.document",descKey:"nav.documentDesc"}]},account:{key:"account",labelKey:"nav.account",icon:zl,homePath:"profile",items:[{path:"profile",icon:zl,nameKey:"nav.accountProfile",descKey:"nav.accountProfileDesc"},{path:"settings/teams",icon:L9,nameKey:"nav.teamManagement",descKey:"nav.teamManagementDesc"}
1130,{path:"assets",icon:em,nameKey:"nav.accountAssets",descKey:"nav.accountAssetsDesc"},{path:"referral",icon:g9,nameKey:"nav.accountReferral",descKey:"nav.accountReferralDesc"},{path:"billing",icon:Qw,nameKey:"nav.accountBilling",descKey:"nav.accountBillingDesc"},{path:"feedback",icon:k9,nameKey:"nav.accountFeedback",descKey:"nav.accountFeedbackDesc"}]}},yK={home:"home",chat:"chat",writing:"text",reply:"text",grammar:"text",summary:"text",code:"text",translate:"translate",image:"image",create:"create",audio:"audio",video:"video",agent:"agents",document:"document",profile:"account",settings:"account",assets:"account",referral:"account",billing:"account",feedback:"account",transfer:"account"};function vK(e){const t=e.match(/\/app\/([^/]+)/);return t&&yK[t[1]]||null}const wK=()=>i.jsx("img",{src:"/logos/uniai.png",alt:"UniAI",className:"w-9 h-9 rounded-[10px]"});function EK(){var _e,Ne;const{t:e,i18n:t}=We(),{lang:r}=Ut(),n=Xn(),s=Er(),{user:a,isAuthenticated:o,logout:l}=ut(),{theme:u,setTheme:c}=Uw(),{collapsed:d,setCollapsed:h,isMobile:m}=Z9(),[f,p]=v.useState(!1),[g,x]=v.useState(!1),[w,y]=v.useState(!1),[b,k]=v.useState(!1),T=v.useRef(null),S=v.useRef(null),j=v.useRef(null),E=v.useRef(null),A=v.useRef(null),R=r||t.language||"en",M=vK(n.pathname),B=M&&M0[M]||null,{sessions:W,currentSessionId:H,isLoading:L,deleteSession:$,deletingSessionId:ee,renameSession:G}=NG(),[Q,D]=v.useState(null),[K,V]=v.useState(""),C=v.useRef(null),{confirm:O,ConfirmDialogElement:q}=aK(),ne=async de=>{if(await O({message:e("appCommon.confirmDeleteSession"),variant:"danger"}))try{await $(de),Qe.success(e("appCommon.deleteSessionSuccess"))}catch{Qe.error(e("appCommon.deleteSessionFailed"))}},{data:he}=ga({queryKey:["credits"],queryFn:()=>h1.getBalance(),enabled:o}),xe=((_e=he==null?void 0:he.data)==null?void 0:_e.credits)||0;v.useEffect(()=>{if(m)return;const de=be=>{T.current&&!T.current.contains(be.target)&&p(!1),S.current&&!S.current.contains(be.target)&&x(!1),j.current&&!j.current.contains(be.target)&&y(!1)};return document.addEventListener("mousedown",de),()=>document.removeEventListener("mousedown",de)},[m]),v.useEffect(()=>()=>{E.current&&clearTimeout(E.current),A.current&&clearTimeout(A.current)},[]);const Oe=de=>{t.changeLanguage(de);const be=Vw(n.pathname,de);s(be),y(!1)},Se=()=>{E.current&&(clearTimeout(E.current),E.current=null)},we=()=>{A.current&&(clearTimeout(A.current),A.current=null)},Be=de=>{A.current=setTimeout(()=>{de(!1)},300)},ve=()=>{Se(),!m&&d&&!b&&h(!1)},Ye=()=>{!m&&!d&&!b&&(E.current=setTimeout(()=>{h(!0),p(!1),x(!1),y(!1)},1e3))},Ae=()=>{Se(),d?(h(!1),k(!0)):b?(h(!0),k(!1)):k(!0)},Ee=()=>{l(),s(`/${R}/login`)},Ce=(de,be)=>{const ie=`/app/${de}`;return be?n.pathname.endsWith(ie)||n.pathname.endsWith(`${ie}/`):n.pathname.includes(ie)},X=Nn.find(de=>de.code===t.language)||Nn[0],pe=[{id:"light",icon:yu,label:e("settings.themes.light")},{id:"dark",icon:bu,label:e("settings.themes.dark")},{id:"system",icon:v1,label:e("settings.themes.system")}];return i.jsxs("div",{className:`app-sidebar ${d?"app-sidebar-collapsed":""}`,style:m&&d?{width:0,minWidth:0}:{width:d?"64px":"256px",minWidth:d?"64px":"256px"},onMouseEnter:ve,onMouseLeave:Ye,children:[!Ai&&i.jsxs("div",{className:"sidebar-header",children:[i.jsxs(Ke,{to:`/${R}`,className:"sidebar-logo",children:[i.jsx("div",{className:"sidebar-logo-icon",children:i.jsx(wK,{})}),!d&&i.jsx("span",{className:"sidebar-logo-text",children:"UniAI"})]}),i.jsx("button",{type:"button",className:`sidebar-collapse-btn ${b?"pinned":""}`,onClick:Ae,title:d?e("common.expand"):b?e("common.collapse"):e("common.pin")||"Pin",children:d?i.jsx(Gs,{className:"w-4 h-4"}):b?i.jsx(x1,{className:"w-4 h-4"}):i.jsx(KV,{className:"w-4 h-4"})})]}),!Ai&&i.jsxs("div",{className:"sidebar-module-section",ref:T,onMouseEnter:()=>{Se(),we(),!m&&p(!0)},onMouseLeave:()=>!m&&Be(p),children:[i.jsxs("button",{type:"button",className:"sidebar-module-btn",onClick:()=>m&&p(!f),title:e("nav.products"),children:[i.jsx("div",{className:"sidebar-module-icon",children:i.jsx(IV,{className:"w-5 h-5"})}),!d&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"sidebar-module-text",children:e(B?B.labelKey:"nav.products")}),i.jsx(Gs,{className:`w-4 h-4 transition-transform ${f?"rotate-90":""}`})]})]}),f&&!m&&i.jsxs("div",{className:"sidebar-popover module-popover",children:[i.jsx("div",{className:"popover-header",children:e("nav.products")}),i.jsx("div",{className:"popover-grid",children:Object.entries(M0).filter(([de])=>de!=="agents"&&de!=="document").map(([de,be])=>{const ie=be.icon,De=M===de;return i.jsxs("button",{type:"button",className:`popover-grid-item ${De?"active":""}`,onClick:()=>{const F=be.homePath||be.items[0].path;s(`/${R}/app/${F}`),p(!1)},children:[i.jsx("div",{className:"popover-grid-icon",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:i.jsx(ie,{className:"w-5 h-5"})}),i.jsx("span",{className:"popover-grid-label",children:e(be.labelKey)})]},de)})})]}),f&&m&&i.jsx("div",{className:"pt-2 border-t border-[var(--border-default)]",children:i.jsx("div",{className:"grid grid-cols-4 gap-1",children:Object.entries(M0).filter(([de,be])=>!be.hideOnMobile&&de!=="agents"&&de!=="document").map(([de,be])=>{const ie=be.icon,De=M===de;return i.jsxs("button",{type:"button",className:`flex flex-col items-center gap-1 py-2 rounded-lg text-xs transition-colors ${De?"bg-[var(--accent-light)] text-[var(--accent-primary)]":"text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]"}`,onClick:()=>{const F=be.items.find(ue=>!ue.hideOnMobile),se=be.homePath||(F==null?void 0:F.path)||be.items[0].path;s(`/${R}/app/${se}`),p(!1),h(!0)},children:[i.jsx(ie,{className:"w-5 h-5"}),i.jsx("span",{children:e(be.labelKey)})]},de)})})})]}),i.jsxs("div",{className:"sidebar-content",children:[B&&B.items.length>1&&i.jsxs("div",{className:"sidebar-section sidebar-nav",children:[!d&&i.jsx("div",{className:"sidebar-section-title",children:e(B.labelKey)}),i.jsx("nav",{className:"sidebar-nav-list",children:B.items.filter(de=>!(m&&de.hideOnMobile)).filter(()=>B.items.length>1).map(de=>{const be=de.icon,ie=Ce(de.path,de.isHome);return i.jsxs(Ke,{to:`/${R}/app/${de.path}`,className:`sidebar-nav-item ${ie?"active":""}`,title:d?e(de.nameKey):void 0,onClick:()=>m&&h(!0),children:[i.jsx("div",{className:"sidebar-nav-icon",style:{background:"var(--bg-tertiary)",color:"var(--text-secondary)"},children:i.jsx(be,{className:"w-4 h-4"})}),!d&&i.jsx("span",{className:"sidebar-nav-text",children:e(de.nameKey)})]},de.path)})})]}),M==="chat"&&i.jsxs("div",{className:"sidebar-section sidebar-conversations",children:[i.jsxs("button",{type:"button",onClick:()=>{s(`/${R}/app/chat`),m&&h(!0)},className:"sidebar-new-chat-btn",title:d?e("chat.newChat"):void 0,children:[i.jsx(ec,{className:"w-4 h-4"}),!d&&i.jsx("span",{children:e("chat.newChat")})]}),i.jsx("div",{className:"sidebar-conversations-list",children:L?i.jsx("div",{className:"sidebar-nav-list",children:d?Array.from({length:5}).map((de,be)=>i.jsx("div",{className:"sidebar-nav-item animate-pulse justify-center",children:i.jsx("div",{className:"w-4 h-4 bg-muted-foreground
1130/15 rounded"})},be)):Array.from({length:5}).map((de,be)=>i.jsxs("div",{className:"sidebar-nav-item animate-pulse",children:[i.jsx("div",{className:"w-4 h-4 bg-muted-foreground/15 rounded flex-shrink-0"}),i.jsxs("div",{className:"flex-1 min-w-0 space-y-1.5",children:[i.jsx("div",{className:"h-3.5 bg-muted-foreground/15 rounded w-4/5"}),i.jsx("div",{className:"h-2.5 bg-muted-foreground/10 rounded w-1/2"})]})]},be))}):W.length===0?i.jsx("div",{className:"sidebar-empty",children:!d&&i.jsxs("div",{className:"text-center text-muted-foreground py-4",children:[i.jsx(Vu,{className:"w-6 h-6 mx-auto mb-2 opacity-50"}),i.jsx("p",{className:"text-xs",children:e("chat.noConversations")})]})}):i.jsx("nav",{className:"sidebar-nav-list",children:W.map(de=>i.jsx("div",{className:it("sidebar-conversation-item group",H===de.id&&"active"),children:i.jsxs("div",{role:"button",tabIndex:0,onClick:()=>{s(`/${R}/app/chat/${de.id}`),m&&h(!0)},onKeyDown:be=>{(be.key==="Enter"||be.key===" ")&&(be.preventDefault(),s(`/${R}/app/chat/${de.id}`),m&&h(!0))},className:it("sidebar-nav-item w-full text-left cursor-pointer",H===de.id&&"active"),title:d?de.title||e("chat.newChat"):void 0,children:[i.jsx(Vu,{className:"w-4 h-4 flex-shrink-0"}),!d&&i.jsx(i.Fragment,{children:Q===de.id?i.jsxs(i.Fragment,{children:[i.jsx("input",{ref:C,value:K,maxLength:200,onChange:be=>V(be.target.value),onKeyDown:be=>{be.key==="Enter"&&!be.nativeEvent.isComposing?(be.preventDefault(),K.trim()&&G(de.id,K.trim()),D(null)):be.key==="Escape"&&D(null)},onClick:be=>be.stopPropagation(),className:"flex-1 min-w-0 bg-transparent border border-border rounded px-1 py-0.5 text-sm outline-none focus:border-primary",autoFocus:!0}),i.jsx("button",{type:"button",onClick:be=>{be.stopPropagation(),K.trim()&&G(de.id,K.trim()),D(null)},className:"sidebar-action-btn p-1",children:i.jsx(Fr,{className:"w-3 h-3"})}),i.jsx("button",{type:"button",onClick:be=>{be.stopPropagation(),D(null)},className:"sidebar-action-btn p-1",children:i.jsx(cr,{className:"w-3 h-3"})})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex-1 min-w-0",children:i.jsx("span",{className:"sidebar-nav-text truncate block",children:de.title||e("chat.newChat")})}),i.jsx("button",{type:"button",onClick:be=>{be.stopPropagation(),D(de.id),V(de.title||""),setTimeout(()=>{var ie;return(ie=C.current)==null?void 0:ie.focus()},0)},className:"sidebar-action-btn opacity-0 group-hover:opacity-100",title:e("common.edit"),children:i.jsx(C9,{className:"w-3 h-3"})}),i.jsx("button",{type:"button",disabled:ee===de.id,onClick:be=>{be.stopPropagation(),ne(de.id)},className:"sidebar-action-btn delete opacity-0 group-hover:opacity-100",title:e("common.delete"),children:ee===de.id?i.jsx("div",{className:"w-3 h-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):i.jsx(tm,{className:"w-3 h-3"})})]})})]})},de.id))})})]})]}),!Ai&&i.jsxs("div",{className:"sidebar-bottom",children:[i.jsxs("div",{className:"sidebar-section",ref:j,onMouseEnter:()=>{Se(),we(),!m&&y(!0)},onMouseLeave:()=>!m&&Be(y),children:[i.jsxs("button",{type:"button",className:"sidebar-settings-btn",onClick:()=>m&&y(!w),title:e("settings.title"),children:[i.jsx(Tn,{className:"w-4 h-4"}),!d&&i.jsx("span",{children:X.nativeName})]}),w&&i.jsxs("div",{className:m?"mt-2 pt-2 border-t border-[var(--border-default)]":"sidebar-popover settings-popover",children:[i.jsxs("div",{className:m?"mb-2":"popover-section",children:[i.jsx("div",{className:m?"text-xs font-medium text-[var(--text-tertiary)] px-2 mb-1":"popover-section-title",children:e("settings.language")}),Nn.map(de=>i.jsxs("button",{type:"button",className:m?`w-full text-left px-2 py-1.5 rounded-lg text-sm transition-colors ${t.language===de.code?"bg-[var(--accent-light)] text-[var(--accent-primary)]":"text-[var(--text-secondary)]"}`:`popover-option ${t.language===de.code?"active":""}`,onClick:()=>Oe(de.code),children:[i.jsx("span",{children:cg(de,t.language)}),!m&&t.language===de.code&&i.jsx("span",{className:"popover-option-dot"})]},de.code))]}),i.jsxs("div",{className:m?"":"popover-section",children:[i.jsx("div",{className:m?"text-xs font-medium text-[var(--text-tertiary)] px-2 mb-1":"popover-section-title",children:e("settings.theme")}),pe.map(de=>{const be=de.icon;return i.jsxs("button",{type:"button",className:m?`w-full text-left px-2 py-1.5 rounded-lg text-sm flex items-center gap-2 transition-colors ${u===de.id?"bg-[var(--accent-light)] text-[var(--accent-primary)]":"text-[var(--text-secondary)]"}`:`popover-option ${u===de.id?"active":""}`,onClick:()=>{c(de.id),m||y(!1)},children:[i.jsx(be,{className:"w-4 h-4"}),i.jsx("span",{children:de.label}),!m&&u===de.id&&i.jsx("span",{className:"popover-option-dot"})]},de.id)})]})]})]}),o?i.jsxs("div",{className:"sidebar-section sidebar-user",ref:S,onMouseEnter:()=>{Se(),we(),!m&&x(!0)},onMouseLeave:()=>!m&&Be(x),children:[i.jsxs("button",{type:"button",className:"sidebar-user-btn",onClick:()=>m&&x(!g),title:(a==null?void 0:a.name)||(a==null?void 0:a.email),children:[a!=null&&a.avatarUrl?i.jsx(lg,{url:a.avatarUrl,alt:"Avatar",className:"w-9 h-9 rounded-lg object-cover bg-[var(--bg-tertiary)]"}):i.jsx("div",{className:"sidebar-user-avatar",children:i.jsx(zl,{className:"w-4 h-4 text-white"})}),!d&&i.jsxs("div",{className:"sidebar-user-info",children:[i.jsxs("div",{className:"sidebar-user-name",children:[(a==null?void 0:a.name)||((Ne=a==null?void 0:a.email)==null?void 0:Ne.split("@")[0])," ",i.jsx(Uk,{})]}),i.jsxs("div",{className:"sidebar-user-credits",children:[i.jsx(xu,{className:"w-3 h-3"}),i.jsx("span",{children:h2(xe)})]})]})]}),g&&i.jsxs("div",{className:"sidebar-popover user-popover",children:[i.jsxs("div",{className:"popover-user-header",children:[a!=null&&a.avatarUrl?i.jsx(lg,{url:a.avatarUrl,alt:"Avatar",className:"w-11 h-11 rounded-xl object-cover"}):i.jsx("div",{className:"popover-user-avatar",children:i.jsx(zl,{className:"w-5 h-5 text-white"})}),i.jsxs("div",{className:"popover-user-info",children:[i.jsxs("div",{className:"popover-user-name",children:[(a==null?void 0:a.name)||"User"," ",i.jsx(Uk,{})]}),i.jsx("div",{className:"popover-user-email",children:a==null?void 0:a.email})]})]}),i.jsx("div",{className:"popover-credits",children:i.jsxs("div",{className:"popover-credit-item",children:[i.jsx(xu,{className:"w-4 h-4",style:{color:"var(--text-secondary)"}}),i.jsx("span",{children:e("billing.credits")}),i.jsx("span",{className:"popover-credit-value",children:h2(xe)})]})}),i.jsxs("div",{className:"popover-actions",children:[i.jsxs(Ke,{to:`/${R}/app/profile`,className:"popover-action-btn",onClick:()=>x(!1),children:[i.jsx(zl,{className:"w-4 h-4"}),i.jsx("span",{children:e("nav.profile")})]}),i.jsxs(Ke,{to:`/${R}/app/referral`,className:"popover-action-btn",onClick:()=>x(!1),children:[i.jsx(g9,{className:"w-4 h-4"}),i.jsx("span",{children:e("referral.title")})]}),i.jsxs(Ke,{to:`/${R}
1130/app/settings/teams`,className:"popover-action-btn",onClick:()=>x(!1),children:[i.jsx(L9,{className:"w-4 h-4"}),i.jsx("span",{children:e("nav.teamManagement")})]}),i.jsxs(Ke,{to:`/${R}/app/assets`,className:"popover-action-btn",onClick:()=>x(!1),children:[i.jsx(em,{className:"w-4 h-4"}),i.jsx("span",{children:e("nav.myAssets")})]}),i.jsxs(Ke,{to:`/${R}/app/feedback`,className:"popover-action-btn",onClick:()=>x(!1),children:[i.jsx(k9,{className:"w-4 h-4"}),i.jsx("span",{children:e("nav.feedback")})]}),i.jsxs(Ke,{to:`/${R}/app/billing`,className:"popover-action-btn",onClick:()=>x(!1),children:[i.jsx(Qw,{className:"w-4 h-4"}),i.jsx("span",{children:e("nav.billing")})]}),i.jsxs("button",{type:"button",className:"popover-action-btn logout",onClick:Ee,children:[i.jsx(v9,{className:"w-4 h-4"}),i.jsx("span",{children:e("nav.logout")})]})]})]})]}):i.jsx("div",{className:"sidebar-section sidebar-user",children:i.jsxs(Ke,{to:`/${R}/login?redirect=${encodeURIComponent(n.pathname)}`,className:"sidebar-user-btn",title:e("auth.login"),children:[i.jsx("div",{className:"sidebar-user-avatar",children:i.jsx(HV,{className:"w-4 h-4 text-white dark:text-black"})}),!d&&i.jsx("div",{className:"sidebar-user-info",children:i.jsx("div",{className:"sidebar-user-name",children:e("auth.login")})})]})}),i.jsx("div",{className:"sidebar-footer",children:!d&&i.jsx("span",{children:"v0.0.1"})})]}),q]})}const J9=v.createContext(void 0);function kK({children:e}){const[t,r]=v.useState(!1),[n,s]=v.useState(null),a=v.useCallback(u=>{s(u),r(!0)},[]),o=v.useCallback(()=>{r(!1),setTimeout(()=>s(null),300)},[]),l=v.useCallback(u=>{s(c=>c?{...c,...u}:null)},[]);return i.jsx(J9.Provider,{value:{isOpen:t,content:n,openPanel:a,closePanel:o,updatePanel:l},children:e})}function ej(){const e=v.useContext(J9);if(e===void 0)throw new Error("useDetailPanel must be used within a DetailPanelProvider");return e}const NK={pdf:Qr,document:Qr,ppt:t3,webpage:Tn,image:Ss,video:rm,code:SV,markdown:Qr,custom:Qr};function SK(){const{t:e}=We(),{isOpen:t,content:r,closePanel:n}=ej(),s=v.useRef(null);if(v.useEffect(()=>{const d=h=>{h.key==="Escape"&&t&&n()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[t,n]),!r)return null;const a=NK[r.type]||Qr,o=r.width||"50%",l=()=>{r.url&&window.open(r.url,"_blank")},u=()=>{r.url&&window.open(r.url,"_blank")},c=()=>{switch(r.type){case"pdf":return i.jsx("iframe",{src:r.url,className:"detail-panel-iframe",title:r.title||"PDF Preview"});case"webpage":return i.jsx("iframe",{src:r.url,className:"detail-panel-iframe",title:r.title||"Web Preview",sandbox:"allow-scripts allow-same-origin"});case"image":return i.jsx("div",{className:"detail-panel-image-container",children:i.jsx("img",{src:r.url,alt:r.title||"Image Preview",className:"detail-panel-image"})});case"video":return i.jsx("div",{className:"detail-panel-video-container",children:i.jsx("video",{src:r.url,controls:!0,className:"detail-panel-video"})});case"code":case"markdown":return i.jsx("div",{className:"detail-panel-code-container",children:i.jsx("pre",{className:"detail-panel-code",children:typeof r.data=="string"?r.data:JSON.stringify(r.data,null,2)})});case"document":case"ppt":return r.url?i.jsx("iframe",{src:r.url,className:"detail-panel-iframe",title:r.title||"Document Preview"}):r.content||i.jsxs("div",{className:"detail-panel-placeholder",children:[i.jsx(a,{className:"w-16 h-16"}),i.jsx("p",{children:e("common.noPreview")||"Preview not available"})]});case"custom":default:return r.content||i.jsxs("div",{className:"detail-panel-placeholder",children:[i.jsx(a,{className:"w-16 h-16"}),i.jsx("p",{children:e("common.noContent")||"No content"})]})}};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:`detail-panel-backdrop ${t?"open":""}`,onClick:n}),i.jsxs("div",{ref:s,className:`detail-panel ${t?"open":""}`,style:{width:o},children:[i.jsxs("div",{className:"detail-panel-header",children:[i.jsxs("div",{className:"detail-panel-title",children:[i.jsx(a,{className:"w-5 h-5"}),i.jsx("span",{children:r.title||e("common.preview")||"Preview"})]}),i.jsxs("div",{className:"detail-panel-actions",children:[r.url&&i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"detail-panel-action-btn",onClick:l,title:e("common.download")||"Download",children:i.jsx(ag,{className:"w-4 h-4"})}),i.jsx("button",{type:"button",className:"detail-panel-action-btn",onClick:u,title:e("common.openInNewTab")||"Open in new tab",children:i.jsx(ig,{className:"w-4 h-4"})})]}),i.jsx("button",{type:"button",className:"detail-panel-action-btn close",onClick:n,title:e("common.close")||"Close",children:i.jsx(cr,{className:"w-4 h-4"})})]})]}),i.jsx("div",{className:"detail-panel-content",children:c()})]})]})}function TK(){const e=gh(n=>n.notifications),t=gh(n=>n.dismissNotification),r=v.useRef(new Set);return v.useEffect(()=>{const n=new Set(["team_invited","team_invite_accepted","team_role_changed","team_removed","project_moved_to_team"]);for(const s of e){if(r.current.has(s.id))continue;if(r.current.add(s.id),n.has(s.type)){t(s.id);continue}const a=s.title?`${s.title}: ${s.message}`:s.message;switch(s.type){case"success":Qe.success(a);break;case"error":Qe.error(a);break;default:Qe(a);break}t(s.id)}},[e,t]),null}const CK={info:"#2563eb",warning:"#d97706",critical:"#dc2626"},_K={info:"rgba(37,99,235,0.08)",warning:"rgba(217,119,6,0.08)",critical:"rgba(220,38,38,0.08)"};function Vk(e){return`${e.type}-${e.title}-${e.message}`}function AK(){const e=gh(a=>a.broadcasts),[t,r]=v.useState(new Set),n=Date.now(),s=e.filter(a=>(!a.expiresAt||a.expiresAt>n)&&!t.has(Vk(a)));return s.length===0?null:i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:0},children:s.map(a=>{const o=Vk(a),l=a.type==="maintenance"?EG:u2,u=CK[a.level],c=_K[a.level];return i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 16px",background:c,borderBottom:`1px solid ${u}`,color:u,fontSize:14},children:[i.jsx(l,{size:16,style:{flexShrink:0}}),i.jsx("strong",{style:{marginRight:4},children:a.title}),i.jsx("span",{style:{flex:1},children:a.message}),a.level!=="critical"&&i.jsx("button",{onClick:()=>r(d=>new Set(d).add(o)),style:{background:"none",border:"none",cursor:"pointer",color:u,padding:2,display:"flex",alignItems:"center"},"aria-label":"Dismiss",children:i.jsx(cr,{size:16})})]},o)})})}function jK(){const e=gh(r=>r.credits),t=Nw();return v.useEffect(()=>
1130{e&&(t.invalidateQueries({queryKey:["credits"]}),t.invalidateQueries({queryKey:["credit-tier"]}),t.invalidateQueries({queryKey:["feature-models"]}))},[e,t]),null}function IK(){const{t:e}=We(),t=Xn(),r=v.useRef(t.pathname);return v.useEffect(()=>{r.current=t.pathname},[t.pathname]),v.useEffect(()=>{const n=Tt.onPodcastCompleted(a=>{if(r.current.includes("/audio/podcast"))return;const o=a.title||e("podcast.toast.defaultTitle");Qe.success(e("podcast.toast.ready",{title:o}),{icon:"ðï¸"})}),s=Tt.onPodcastFailed(()=>{r.current.includes("/audio/podcast")||Qe.error(e("podcast.toast.generationFailed"))});return()=>{n(),s()}},[]),null}function RK(){const{t:e}=We(),{lang:t}=Ut(),r=Er(),n=t||"en",{showLoginModal:s,closeLoginModal:a,setAuth:o}=ut(),[l,u]=v.useState(""),[c,d]=v.useState(""),[h,m]=v.useState(!1),[f,p]=v.useState(""),[g,x]=v.useState(!1),[w,y]=v.useState(!1),[b,k]=v.useState(!1),T=v.useRef(null),S=v.useRef(null);if(v.useEffect(()=>{if(!s)return;const W="https://ca.turing.captcha.qcloud.com/TJNCaptcha-global.js";if(window.TencentCaptcha){k(!0);return}const H=document.querySelector(`script[src="${W}"]`);if(H){H.addEventListener("load",()=>k(!0));return}const L=document.createElement("script");L.src=W,L.onload=()=>k(!0),L.onerror=()=>p(e("auth.captchaLoadFailed")),document.head.appendChild(L)},[s,e]),v.useEffect(()=>{s&&(u(""),d(""),p(""),x(!1))},[s]),v.useEffect(()=>{if(!s)return;const W=H=>{H.key==="Escape"&&a()};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[s,a]),!s)return null;const j=async(W,H)=>{var L,$;x(!0);try{typeof window<"u"&&localStorage.setItem("auth-remember","true");const ee=await ma.login({email:l,password:c,ticket:W,randstr:H,rememberMe:!0}),{accessToken:G,refreshToken:Q,expiresIn:D,user:K}=ee.data;o(G,Q,D,K),cd()}catch(ee){d("");const G=($=(L=ee.response)==null?void 0:L.data)==null?void 0:$.message;Array.isArray(G)?p(G.join(", ")):p(G||e("auth.loginFailed"))}finally{x(!1)}},E=W=>{var L;W.preventDefault(),p("");const H=window.TencentCaptcha;if(!H){p(e("auth.captchaLoadFailed"));return}(L=T.current)==null||L.destroy(),y(!0);try{const $=new H(document.getElementById("login-modal-submit-btn"),"189965924",ee=>{y(!1),ee.ret===0?j(ee.ticket,ee.randstr):ee.ret===2||p(e("auth.captchaRequired"))},{});T.current=$,$.show()}catch{y(!1);const ee="trerror_1001_"+"189965924"+"_"+Math.floor(Date.now()/1e3),G="@"+Math.random().toString(36).substring(2);j(ee,G)}},A=()=>{const W=encodeURIComponent(window.location.pathname+window.location.search);window.location.href=`/api/v1/auth/google?lang=${n}&redirect=${W}&origin=${encodeURIComponent(window.location.origin)}`},R=()=>{a(),r(`/${n}/register`)},M=W=>{W.target===S.current&&a()},B="w-full pl-10 pr-4 py-3 rounded-xl text-sm outline-none transition-colors bg-ui-bg-secondary border border-ui-border text-ui-text-primary placeholder:text-[var(--text-muted)] focus:border-[var(--border-strong)]";return i.jsx("div",{ref:S,onClick:M,className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200",children:i.jsxs("div",{className:"relative w-full max-w-md mx-4 p-8 rounded-2xl bg-ui-bg-primary border border-ui-border shadow-2xl animate-in zoom-in-95 duration-200",children:[i.jsx("button",{type:"button",onClick:a,className:"absolute top-4 right-4 p-1.5 rounded-lg text-ui-text-tertiary hover:bg-ui-bg-hover transition-colors",children:i.jsx(cr,{className:"w-5 h-5"})}),i.jsx("h2",{className:"text-xl font-bold text-center mb-2 text-ui-text-primary",children:e("auth.welcomeBack")}),i.jsx("p",{className:"text-center mb-6 text-sm text-ui-text-secondary",children:e("auth.loginSubtitle")}),i.jsxs("form",{onSubmit:E,className:"space-y-4",children:[f&&i.jsx("div",{className:"p-3 rounded-lg text-sm bg-red-50 text-ui-status-error border border-red-200",children:f}),i.jsx("div",{children:i.jsxs("div",{className:"relative",children:[i.jsx(dd,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:"email",required:!0,value:l,onChange:W=>u(W.target.value),placeholder:e("auth.emailPlaceholder"),maxLength:254,className:B,autoFocus:!0})]})}),i.jsx("div",{children:i.jsxs("div",{className:"relative",children:[i.jsx(Ts,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:h?"text":"password",required:!0,value:c,onChange:W=>d(W.target.value),placeholder:e("auth.passwordPlaceholder"),maxLength:64,className:`${B} !pr-12`}),i.jsx("button",{type:"button",onClick:()=>m(!h),className:"absolute right-3 top-1/2 -translate-y-1/2 p-1 rounded text-ui-text-tertiary hover:bg-ui-bg-hover",children:h?i.jsx(Jw,{className:"w-4 h-4"}):i.jsx(No,{className:"w-4 h-4"})})]})}),i.jsx("div",{className:"flex justify-end",children:i.jsx(Ke,{to:`/${n}/forgot-password`,onClick:a,className:"text-sm font-medium text-ui-text-primary hover:underline",children:e("auth.forgotPassword")})}),i.jsx("button",{id:"login-modal-submit-btn",type:"submit",disabled:g||w||!b,className:"btn-primary w-full py-3 rounded-xl",children:g||w?i.jsxs("span",{className:"flex items-center justify-center gap-2",children:[i.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),i.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e("auth.loggingIn")]}):i.jsxs("span",{className:"flex items-center justify-center gap-2",children:[e("auth.login"),i.jsx(fr,{className:"w-4 h-4"})]})})]}),i.jsxs("div",{className:"relative my-5",children:[i.jsx("div",{className:"absolute inset-0 flex items-center",children:i.jsx("div",{className:"w-full border-t border-ui-border"})}),i.jsx("div",{className:"relative flex justify-center text-sm",children:i.jsx("span",{className:"px-3 bg-ui-bg-primary text-ui-text-tertiary",children:e("auth.orDivider")})})]}),i.jsxs("button",{type:"button",onClick:A,className:"w-full flex items-center justify-center gap-3 py-3 rounded-xl border border-ui-border bg-ui-bg-secondary hover:bg-ui-bg-hover transition-colors text-ui-text-primary font-medium",children:[i.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[i.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),i.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),i.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),i.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),e("auth.continueWithGoogle")]}),i.jsxs("div",{className:"mt-5 text-center",children:[i.jsxs("span",{className:"text-sm text-ui-text-secondary",children:[e("auth.noAccount")," "]}),i.jsx("button",{type:"button",onClick:R,className:"text-sm font-medium text-ui-text-primary hover:underline",children:e("auth.register")})]})]})})}function DK(){const{collapsed:e,setCollapsed:t,isMobile:r}=Z9(),{isOpen:n}=ej(),s=lK();return i.jsxs("div",{className:`app-layout ${n?"detail-panel-active":""}`,children:[i.jsx(Tw,{children:i.jsx("meta",{name:"robots",content:"noindex, nofollow"})}),!s&&i.jsx(TK,{}),!s&&i.jsx(jK,{}),!s&&i.jsx(IK,{}),i.jsx(EK,{}),i.jsxs("main",{className:"app-main",children:[!s&&i.jsx(AK,{}),!s&&r&&e&&i.jsx("button",{className:"mobile-sidebar-toggle",onClick:()=>t(!1),"aria-label":"Open menu",children:i.jsx(s3,{className:"w-5 h-5"})}),i.jsx(zv,{})]}),!s&&i.jsx(SK,{}),i.jsx(RK,{}),!s&&r&&!e&&i.jsx("div",{className:"sidebar-overlay",onClick:()=>t(!0)})]})}function MK(){return i.jsx(bK,{children:i.jsx(kK,{children:i.jsx(DK,{})})})}
1130function ab({hideFooter:e,headerDark:t}){var Q,D;const{t:r,i18n:n}=We(),{lang:s}=Ut(),a=Er(),o=Xn(),{theme:l,setTheme:u,resolvedTheme:c}=Uw(),{user:d,isAuthenticated:h,logout:m}=ut(),f=s||"en",[p,g]=v.useState(!1),[x,w]=v.useState(null),[y,b]=v.useState(!1),[k,T]=v.useState(!1),[S,j]=v.useState(!1),E=v.useRef(null),A=v.useRef(null),R=v.useRef(null);v.useEffect(()=>{const K=V=>{p||(E.current&&!E.current.contains(V.target)&&b(!1),A.current&&!A.current.contains(V.target)&&T(!1),R.current&&!R.current.contains(V.target)&&j(!1))};return document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[p]);const M=()=>{m(),j(!1),a(`/${f}/login`)},B=K=>{n.changeLanguage(K);const V=Vw(o.pathname,K);a(V),b(!1)},W=Nn.find(K=>K.code===n.language)||Nn[0],H=[{id:"light",icon:yu,label:r("settings.themes.light")},{id:"dark",icon:bu,label:r("settings.themes.dark")},{id:"system",icon:v1,label:r("settings.themes.system")}],$=Object.fromEntries(["translate","text","image","video","audio"].filter(K=>M0[K]).map(K=>{const V=M0[K];return[K,{label:r(V.labelKey),items:V.items.filter(C=>!C.hideInHeader).map(C=>({path:C.path,icon:C.icon,name:r(C.nameKey),desc:r(C.descKey),hideOnMobile:C.hideOnMobile}))}]})),{data:ee}=ga({queryKey:["credits"],queryFn:()=>h1.getBalance(),enabled:h}),G=((Q=ee==null?void 0:ee.data)==null?void 0:Q.credits)||0;return Ai?i.jsx("div",{className:"min-h-screen bg-ui-bg-primary",children:i.jsx("main",{children:i.jsx(zv,{})})}):i.jsxs("div",{className:"min-h-screen public-page bg-ui-bg-primary",children:[i.jsxs("header",{className:`fixed left-0 right-0 z-50 backdrop-blur-md border-b border-ui-border ${t?"dark":""}`,style:{top:"var(--invite-banner-h, 0px)",backgroundColor:t?"rgba(11, 13, 18, 0.72)":"color-mix(in srgb, var(--bg-primary) 85%, transparent)",height:"var(--header-height)"},children:[i.jsxs("div",{className:"h-full flex items-center justify-between px-6",children:[i.jsxs(Ke,{to:`/${f}`,className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",children:i.jsx("img",{src:"/logos/uniai.png",alt:"UniAI",className:"w-8 h-8 rounded-lg"})}),i.jsx("span",{className:"text-[22px] font-bold tracking-tight text-ui-text-primary",children:"UniAI"})]}),i.jsxs("nav",{className:"hidden lg:flex items-center gap-1",children:[i.jsx(Ke,{to:`/${f}/app/chat`,className:"px-3 py-2 text-[14px] font-medium rounded-[10px] transition-all hover:bg-ui-bg-hover text-ui-text-primary",children:r("nav.chatMenu")}),i.jsx(Ke,{to:`/${f}/app/design`,className:"px-3 py-2 text-[14px] font-medium rounded-[10px] transition-all hover:bg-ui-bg-hover text-ui-text-primary",children:r("nav.design")}),i.jsx(Ke,{to:`/${f}/app/create`,className:"px-3 py-2 text-[14px] font-medium rounded-[10px] transition-all hover:bg-ui-bg-hover text-ui-text-primary",children:r("nav.create")}),Object.entries($).map(([K,V])=>i.jsxs("div",{className:"relative",onMouseEnter:()=>w(K),onMouseLeave:()=>w(null),children:[i.jsxs("button",{className:`flex items-center gap-1.5 px-3 py-2 text-[14px] font-medium rounded-[10px] transition-all ${x===K?"text-ui-text-primary font-semibold bg-ui-bg-hover":"text-ui-text-primary"}`,children:[V.label,i.jsx(dn,{className:`w-3.5 h-3.5 transition-transform ${x===K?"rotate-180":""}`})]}),x===K&&i.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 pt-2",children:i.jsx("div",{className:"min-w-[260px] p-2 rounded-[14px] bg-ui-bg-primary border border-ui-border",style:{boxShadow:"var(--shadow-xl)"},children:V.items.map(C=>{const O=C.icon;return i.jsxs(Ke,{to:`/${f}/app/${C.path}`,className:"flex items-center gap-3 px-3 py-2.5 rounded-[10px] transition-all hover:bg-ui-bg-hover",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center bg-ui-bg-tertiary text-ui-text-primary font-semibold",children:i.jsx(O,{className:"w-4 h-4"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"text-sm font-medium text-ui-text-primary",children:C.name}),i.jsx("div",{className:"text-xs truncate text-ui-text-tertiary",children:C.desc})]})]},C.path)})})})]},K)),i.jsx(Ke,{to:`/${f}/pricing`,className:"px-3 py-2 text-[14px] font-medium rounded-[10px] transition-all hover:bg-ui-bg-hover text-ui-text-primary",children:r("nav.pricing")}),i.jsx(Ke,{to:`/${f}/download`,className:"px-3 py-2 text-[14px] font-medium rounded-[10px] transition-all hover:bg-ui-bg-hover text-ui-text-primary",children:r("nav.download")})]}),i.jsxs("div",{className:"hidden lg:flex items-center gap-3",children:[i.jsxs("div",{className:"relative",ref:E,children:[i.jsxs("button",{onClick:()=>b(!y),className:`flex items-center gap-1.5 px-3 py-2 rounded-[10px] text-sm transition-colors text-ui-text-primary hover:bg-ui-bg-hover ${y?"bg-ui-bg-hover":""}`,children:[i.jsx(Tn,{className:"w-4 h-4"}),i.jsx("span",{children:W.nativeName}),i.jsx(dn,{className:`w-3 h-3 transition-transform ${y?"rotate-180":""}`})]}),y&&i.jsx("div",{className:"absolute right-0 top-full mt-2 min-w-[10rem] w-max rounded-[14px] py-2 z-50 bg-ui-bg-primary border border-ui-border",style:{boxShadow:"var(--shadow-xl)"},children:Nn.map(K=>i.jsxs("button",{onClick:()=>B(K.code),className:`w-full px-4 py-2 text-left text-sm flex items-center justify-between transition-colors hover:bg-ui-bg-hover ${n.language===K.
1130code?"text-ui-text-primary font-semibold":"text-ui-text-primary"}`,children:[i.jsx("span",{children:cg(K,n.language)}),n.language===K.code&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-ui-text-primary"})]},K.code))})]}),i.jsxs("div",{className:"relative",ref:A,children:[i.jsxs("button",{onClick:()=>T(!k),className:`flex items-center gap-1.5 px-3 py-2 rounded-[10px] text-sm transition-colors text-ui-text-primary hover:bg-ui-bg-hover ${k?"bg-ui-bg-hover":""}`,children:[c==="dark"?i.jsx(bu,{className:"w-4 h-4"}):i.jsx(yu,{className:"w-4 h-4"}),i.jsx(dn,{className:`w-3 h-3 transition-transform ${k?"rotate-180":""}`})]}),k&&i.jsx("div",{className:"absolute right-0 top-full mt-2 w-36 rounded-[14px] py-2 z-50 bg-ui-bg-primary border border-ui-border",style:{boxShadow:"var(--shadow-xl)"},children:H.map(K=>{const V=K.icon;return i.jsxs("button",{onClick:()=>{u(K.id),T(!1)},className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 transition-colors hover:bg-ui-bg-hover ${l===K.id?"text-ui-text-primary font-semibold":"text-ui-text-primary"}`,children:[i.jsx(V,{className:"w-4 h-4"}),i.jsx("span",{children:K.label}),l===K.id&&i.jsx("span",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-ui-text-primary"})]},K.id)})})]}),h?i.jsxs("div",{className:"relative",ref:R,children:[i.jsx("button",{onClick:()=>j(!S),className:"header-avatar-btn","aria-label":"User menu",children:d!=null&&d.avatarUrl?i.jsx(lg,{url:d.avatarUrl,alt:"",className:"header-avatar-img"}):i.jsx("span",{className:"header-avatar-fallback",children:((d==null?void 0:d.name)||(d==null?void 0:d.email)||"U").charAt(0).toUpperCase()})}),S&&i.jsxs("div",{className:"header-user-dropdown",children:[i.jsxs("div",{className:"header-user-info",children:[d!=null&&d.avatarUrl?i.jsx(lg,{url:d.avatarUrl,alt:"",className:"header-dropdown-avatar-img"}):i.jsx("span",{className:"header-dropdown-avatar-fallback",children:((d==null?void 0:d.name)||(d==null?void 0:d.email)||"U").charAt(0).toUpperCase()}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("div",{className:"text-sm font-medium truncate text-ui-text-primary",children:(d==null?void 0:d.name)||"User"}),i.jsx("div",{className:"text-xs truncate text-ui-text-tertiary",children:d==null?void 0:d.email})]})]}),i.jsx("div",{className:"header-user-credits",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-xs text-ui-text-tertiary",children:r("billing.credits")}),i.jsx("span",{className:"text-xs font-medium text-ui-text-primary",children:h2(G)})]})}),i.jsxs("div",{className:"header-user-actions",children:[i.jsxs(Ke,{to:`/${f}/app/profile`,className:"header-user-action-item",onClick:()=>j(!1),children:[i.jsx(zl,{className:"w-4 h-4"}),i.jsx("span",{children:r("nav.profile")})]}),i.jsxs("button",{onClick:M,className:"header-user-action-item header-user-action-danger",children:[i.jsx(v9,{className:"w-4 h-4"}),i.jsx("span",{children:r("nav.logout")})]})]})]})]}):i.jsxs(i.Fragment,{children:[i.jsx(Ke,{to:`/${f}/login`,className:"btn btn-ghost",children:r("auth.login")}),i.jsx(Ke,{to:`/${f}/register`,className:"btn btn-primary",children:r("auth.register")})]})]}),i.jsx("button",{type:"button",className:"lg:hidden w-10 h-10 flex items-center justify-center rounded-[10px] hover:bg-ui-bg-hover",onClick:()=>g(!p),children:p?i.jsx(cr,{className:"w-6 h-6"}):i.jsx(s3,{className:"w-6 h-6"})})]}),p&&i.jsx("div",{className:"lg:hidden absolute top-full left-0 right-0 p-4 max-h-[80vh] overflow-y-auto bg-ui-bg-primary border-b border-ui-border",style:{boxShadow:"var(--shadow-lg)"},children:i.jsxs("nav",{className:"flex flex-col gap-2",children:[Object.entries($).map(([K,V])=>i.jsxs("div",{className:"mb-2",children:[i.jsx("div",{className:"px-3 py-2 text-xs font-semibold uppercase tracking-wider text-ui-text-tertiary",children:V.label}),i.jsx("div",{className:"grid grid-cols-2 gap-1",children:V.items.filter(C=>!C.hideOnMobile).map(C=>{const O=C.icon;return i.jsxs(Ke,{to:`/${f}/app/${C.path}`,className:"flex items-center gap-2 px-3 py-2 rounded-[10px] hover:bg-ui-bg-hover",onClick:()=>g(!1),children:[i.jsx(O,{className:"w-4 h-4 text-ui-text-primary font-semibold"}),i.jsx("span",{className:"text-sm text-ui-text-primary",children:C.name})]},C.path)})})]},K)),i.jsxs("div",{className:"flex gap-2 mt-2 pt-2 border-t border-ui-border",children:[i.jsx(Ke,{to:`/${f}/app/chat`,className:"flex-1 px-3 py-2.5 text-sm font-medium text-center rounded-[10px] hover:bg-ui-bg-hover text-ui-text-primary",onClick:()=>g(!1),children:r("nav.chatMenu")}),i.jsx(Ke,{to:`/${f}/app/design`,className:"flex-1 px-3 py-2.5 text-sm font-medium text-center rounded-[10px] hover:bg-ui-bg-hover text-ui-text-primary",onClick:()=>g(!1),children:r("nav.design")}),i.jsx(Ke,{to:`/${f}/app/create`,className:"flex-1 px-3 py-2.5 text-sm font-medium text-center rounded-[10px] hover:bg-ui-bg-hover text-ui-text-primary",onClick:()=>g(!1),children:r("nav.create")}),i.jsx(Ke,{to:`/${f}/pricing`,className:"flex-1 px-3 py-2.5 text-sm font-medium text-center rounded-[10px] hover:bg-ui-bg-hover text-ui-text-primary",onClick:()=>g(!1),children:r("nav.pricing")}),i.jsx(Ke,{to:`/${f}/download`,className:"flex-1 px-3 py-2.5 text-sm font-medium text-center rounded-[10px] hover:bg-ui-bg-hover text-ui-text-primary",onClick:()=>g(!1),children:r("nav.download")})]}),i.jsxs("div",{className:"flex gap-2 mt-2 pt-2 border-t border-ui-border",children:[i.jsxs("div",{className:"flex-1 relative",children:[i.jsxs("button",{onClick:()=>b(!y),className:"w-full flex items-center justify-center gap-2 px-3 py-2 rounded-[10px] text-sm text-ui-text-primary bg-ui-bg-tertiary",children:[i.jsx(Tn,{className:"w-4 h-4"}),i.jsx("span",{children:W.nativeName}),i.jsx(dn,{className:`w-3 h-3 transition-transform ${y?"rotate-180":""}`})]}),y&&i.jsx("div",{className:"absolute bottom-full left-0 right-0 mb-2 rounded-[14px] py-2 z-50 bg-ui-bg-primary border border-ui-border",style:{boxShadow:"var(--shadow-xl)"},children:Nn.map(K=>i.jsxs("button",{onClick:()=>
1130{B(K.code),g(!1)},className:`w-full px-4 py-2 text-left text-sm flex items-center justify-between hover:bg-ui-bg-hover ${n.language===K.code?"text-ui-text-primary font-semibold":"text-ui-text-primary"}`,children:[i.jsx("span",{children:cg(K,n.language)}),n.language===K.code&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-ui-text-primary"})]},K.code))})]}),i.jsxs("div",{className:"flex-1 relative",children:[i.jsxs("button",{onClick:()=>T(!k),className:"w-full flex items-center justify-center gap-2 px-3 py-2 rounded-[10px] text-sm text-ui-text-primary bg-ui-bg-tertiary",children:[c==="dark"?i.jsx(bu,{className:"w-4 h-4"}):i.jsx(yu,{className:"w-4 h-4"}),i.jsx("span",{children:(D=H.find(K=>K.id===l))==null?void 0:D.label}),i.jsx(dn,{className:`w-3 h-3 transition-transform ${k?"rotate-180":""}`})]}),k&&i.jsx("div",{className:"absolute bottom-full left-0 right-0 mb-2 rounded-[14px] py-2 z-50 bg-ui-bg-primary border border-ui-border",style:{boxShadow:"var(--shadow-xl)"},children:H.map(K=>{const V=K.icon;return i.jsxs("button",{onClick:()=>{u(K.id),T(!1)},className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-ui-bg-hover ${l===K.id?"text-ui-text-primary font-semibold":"text-ui-text-primary"}`,children:[i.jsx(V,{className:"w-4 h-4"}),i.jsx("span",{children:K.label}),l===K.id&&i.jsx("span",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-ui-text-primary"})]},K.id)})})]})]}),i.jsx("div",{className:"flex gap-2 mt-2 pt-2 border-t border-ui-border",children:h?i.jsxs(i.Fragment,{children:[i.jsx(Ke,{to:`/${f}/app/profile`,className:"btn btn-primary flex-1",onClick:()=>g(!1),children:r("nav.account")}),i.jsx("button",{className:"btn btn-ghost flex-1",onClick:()=>{M(),g(!1)},children:r("nav.logout")})]}):i.jsxs(i.Fragment,{children:[i.jsx(Ke,{to:`/${f}/login`,className:"btn btn-outline flex-1",onClick:()=>g(!1),children:r("auth.login")}),i.jsx(Ke,{to:`/${f}/register`,className:"btn btn-primary flex-1",onClick:()=>g(!1),children:r("auth.register")})]})})]})})]}),i.jsx("main",{children:i.jsx(zv,{})}),!e&&i.jsxs("footer",{className:"border-t border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[!h&&i.jsxs("div",{className:"bg-gradient-to-r from-indigo-500 to-indigo-700 py-10 px-6 text-center relative overflow-hidden",children:[i.jsx("div",{className:"absolute -top-8 -right-8 w-32 h-32 bg-white/[0.04] rounded-full"}),i.jsx("div",{className:"absolute -bottom-6 -left-6 w-24 h-24 bg-white/[0.03] rounded-full"}),i.jsxs("div",{className:"relative max-w-md mx-auto",children:[i.jsx("h3",{className:"text-xl font-bold text-white mb-1.5",children:r("home.cta.start","åå¤å¥½å¼å§äºåï¼")}),i.jsx("p",{className:"text-sm text-white/60 mb-5",children:r("home.cta.subtitle","注åå³é 1,000 积å · æ éä¿¡ç¨å¡")}),i.jsxs(Ke,{to:`/${f}/register`,className:"inline-block bg-white text-indigo-600 px-7 py-2.5 rounded-xl text-sm font-bold hover:opacity-90 transition-opacity shadow-lg",children:[r("home.cta.startUsing","å
费注å")," â"]})]})]}),i.jsxs("div",{className:"max-w-[1120px] mx-auto px-6 py-12",children:[i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-2 lg:grid-cols-5 gap-x-6 gap-y-8 md:gap-10 mb-10",children:[i.jsxs("div",{className:"col-span-2 md:col-span-1 lg:col-span-2 lg:pr-8",children:[i.jsxs("div",{className:"flex items-center gap-2.5 mb-4",children:[i.jsx("img",{src:"/logos/uniai.png",alt:"UniAI",className:"w-8 h-8 rounded-lg"}),i.jsx("span",{className:"text-lg font-extrabold text-[var(--text-primary)]",children:"UniAI"})]}),i.jsx("p",{className:"text-[13px] leading-relaxed text-[var(--text-secondary)] mb-4 max-w-[260px]",children:r("footer.description")}),i.jsx("a",{href:"mailto:[email protected]",className:"text-[13px] font-medium text-ui-accent hover:underline",children:"[email protected]"})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"text-[11px] font-bold text-[var(--text-primary)] mb-4",children:r("footer.products")}),i.jsxs("div",{className:"flex flex-col gap-2.5",children:[i.jsx(Ke,{to:`/${f}/app/chat`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("nav.chat")}
1130),i.jsx(Ke,{to:`/${f}/app/create`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("nav.design","ç»å¸è®¾è®¡")}),i.jsx(Ke,{to:`/${f}/app/image/generate`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("nav.imageMenu")}),i.jsx(Ke,{to:`/${f}/app/video/generate`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("nav.video")}),i.jsx(Ke,{to:`/${f}/app/audio/tts`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("nav.audio")}),i.jsx(Ke,{to:`/${f}/app/translate/text`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("nav.translate")})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"text-[11px] font-bold text-[var(--text-primary)] mb-4",children:r("footer.resources")}),i.jsxs("div",{className:"flex flex-col gap-2.5",children:[i.jsx(Ke,{to:`/${f}/docs`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("footer.helpCenter")}),i.jsx(Ke,{to:`/${f}/blog`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("footer.blog")}),i.jsx(Ke,{to:`/${f}/announcements`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("footer.announcements")}),i.jsx(Ke,{to:`/${f}/pricing`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("nav.pricing","å®ä»·")})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"text-[11px] font-bold text-[var(--text-primary)] mb-4",children:r("footer.company")}),i.jsxs("div",{className:"flex flex-col gap-2.5",children:[i.jsx(Ke,{to:`/${f}/docs/about-us`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("footer.about")}),i.jsx(Ke,{to:`/${f}/docs/contact`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("footer.contact")}),i.jsx(Ke,{to:`/${f}/docs/terms`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("footer.terms")}),i.jsx(Ke,{to:`/${f}/docs/privacy`,className:"text-[13px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("footer.privacy")})]})]})]}),i.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4 pt-6 border-t border-[var(--border-default)]",children:[i.jsx("p",{className:"text-xs text-[var(--text-tertiary)]",children:"© 2026 UniAI · Hyperlink Galaxy Limited. All rights reserved."}),i.jsxs("div",{className:"flex gap-5",children:[i.jsx(Ke,{to:`/${f}/docs/terms`,className:"text-xs text-[var(--text-tertiary)] hover:text-[var(--text-primary)] transition-colors",children:r("footer.terms")}),i.jsx(Ke,{to:`/${f}/docs/privacy`,className:"text-xs text-[var(--text-tertiary)] hover:text-[var(--text-primary)] transition-colors",children:r("footer.privacy")})]})]})]})]})]})}function OK(){const e=ut(t=>t.setTokens);v.useEffect(()=>{if(!Ai)return;const t=r=>{var n;((n=r.data)==null?void 0:n.type)==="uniai-desktop-auth"&&r.data.token&&(localStorage.setItem("token",r.data.token),e(r.data.token,"",3600))};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[e])}const rc=ya((e,t)=>({statusMap:new Map,setStatus(r,n){e(s=>{const a=new Map(s.statusMap);return a.set(r,n),{statusMap:a}})},bulkUpsert(r){r.length!==0&&e(n=>{const s=new Map(n.statusMap);for(const a of r)s.set(a.assetId,{status:a.status,compliantUrl:a.compliantUrl,rejectReason:a.rejectReason});return{statusMap:s}})},getStatus(r){return t().statusMap.get(r)},clear(){e({statusMap:new Map})}}));function LK(e){return rc(t=>e?t.statusMap.get(e):void 0)}async function tj(e,t){var l;const r=e.filter(u=>!!u),n=(t||[]).filter(u=>!!u);if(r.length===0&&n.length===0)return console.log("[CF] ensure skip (no ids/urls)"),[];console.log(`[CF] ensure â POST /upload-to-kuaikuai ids=${r.length} urls=${n.length}`);const a=((l=(await U.post("/api/asset-compliance/upload-to-kuaikuai",{assetIds:r,assetUrls:n})).data)==null?void 0:l.results)??[];a.length>0&&rc.getState().bulkUpsert(a);const o=a.reduce((u,c)=>(u[c.status]=(u[c.status]||0)+1,u),{});return console.log(`[CF] ensure â results=${a.length} approved=${o.approved||0} pending=${o.pending||0} rejected=${o.rejected||0}`),a}function rj(e,t=4*60*1e3,r=3e3){return new Promise((n,s)=>{if(e.length===0){console.log("[CF] waitSettle skip (no ids)"),n([]);return}const a=Date.now();console.log(`[CF] waitSettle start ids=${e.length} timeoutMs=${t} pollMs=${r}`);let o=()=>{},l=null,u=null;const c=()=>{o(),l&&(clearInterval(l),l=null),u&&(clearTimeout(u),u=null)};u=setTimeout(()=>{console.warn(`[CF] waitSettle TIMEOUT after ${Math.round((Date.now()-a)/1e3)}s`),c(),s(new Error("compliance:timeout"))},t);const d=()=>{const m=rc.getState().statusMap;return e.map(f=>{const p=m.get(f);return{assetId:f,status:(p==null?void 0:p.status)??"pending",compliantUrl:p==null?void 0:p.compliantUrl,rejectReason:p==null?void 0:p.rejectReason}})},h=()=>{const m=d();if(m.every(f=>f.status!=="pending")){const f=m.reduce((p,g)=>(p[g.status]=(p[g.status]||0)+1,p),{});return console.log(`[CF] waitSettle DONE in ${Math.round((Date.now()-a)/1e3)}s approved=${f.approved||0} rejected=${f.rejected||0}`),c(),n(m),!0}return!1};h()||(o=rc.subscribe(()=>{h()}),l=setInterval(()=>{PK(e).catch(()=>{})},r))})}async function PK(e){var r;const t=e.filter(n=>!!n);if(t.length!==0)try{const s=((r=(await U.get(`/api/asset-compliance/status?assetIds=${t.map(encodeURIComponent).join(",")}`)).data)==null?void 0:r.results)??[];s.length>0&&rc.getState().bulkUpsert(s)}catch(n){console.warn("[compliance] hydrateComplianceStatuses failed:",(n==null?void 0:n.message)||n)}}function FK(){return Tt.on("compliance:done",e=>{const t=(e==null?void 0:e.data)??e;!(t!=null&&t.assetId)||!(t!=null&&t.status)||rc.getState().setStatus(t.assetId,{status:t.status,compliantUrl:t.compliantUrl,rejectReason:t.rejectReason})})}async function d3(e){return(await U.post("/teams",e)).data}async function h3(){return(await U.get("/teams")).data}async function nj(e){return(await U.get(`/teams/${e}`)).data}async function sj(e,t){return(await U.patch(`/teams/${e}`,t)).data}async function aj(e){return(await U.delete(`/teams/${e}`)).data}async function m3(e,t){return(await U.post(`/teams/${e}/members`,t)).data}async function f3(e){return(await U.get(`/teams/${e}/members`)).data}async function p3(e,t,r){return(await U.patch(`/teams/${e}/members/${t}`,r)).data}async function g3(e,t){return(await U.delete(`/teams/${e}/members/${t}`)).data}async function ij(e){return(await U.post(`/teams/${e}/leave`)).data}async function oj(e,t){return(await U.post(`/teams/${e}/invite-link`,t)).data}async function lj(e){return(await U.post(`/teams/join/${e}`)).data}async function x3(){return(await U.get("/teams/invitations/pending")).data}async function b3(e){return(await U.post(`/teams/invitations/${e}/accept`)).data}async function y3(e){return(await U.post(`/teams/invitations/${e}/decline`)).data}async function cj(e,t){const r=t.includes("@")?{email:t}:{toUserId:t};return(await U.post(`/teams/${e}/transfer-ownership`,r)).data}async function uj(e,t){return(await U.post(`/art/projects/${e}/move-to-team`,{teamId:t})).data}async function dj(e){return(await U.patch(`/art/projects/${e}/move-to-personal`)).data}async function v3(e){return(await U.get(`/teams/${e}/billing`)).data}async function w3(e,t){return(await U.patch(`/teams/${e}/billing`,t)).data}async function E3(e){return(await U.get(`/teams/${e}/quotas`)).data}async function k3(e,t,r){return(await U.put(`/teams/${e}/quotas/${t}`,r)).data}async function N3(e,t){return(await U.delete(`/teams/${e}/quotas/${t}`)).data}async function S3(e){return(await U.get(`/teams/${e}/quotas/me`)).data}async function hj(e){return(await U.get(`/teams/${e}/quotas/summary`)).data}const BK={createTeam:d3,getMyTeams:h3,getTeam:nj,updateTeam:sj,deleteTeam:aj,inviteMember:m3,getMembers:f3,updateMember:p3,removeMember:g3,leaveTeam:ij,generateInviteLink:oj,joinViaLink:lj,getPendingInvitations:x3,acceptInvitation:b3,declineInvitation:y3,transferOwnership:cj,moveProjectToTeam:uj,moveProjectToPersonal:dj,getBilling:v3,updateBilling:w3,getQuotas:E3,setQuota:k3,deleteQuota:N3,getMyQuota:S3,getQuotaSummary:hj},UK=Object.freeze(Object.defineProperty({__proto__:null,acceptInvitation:b3,createTeam:d3,declineInvitation:y3,deleteQuota:N3,deleteTeam:aj,generateInviteLink:oj,getBilling:v3,getMembers:f3,getMyQuota:S3,getMyTeams:h3,getPendingInvitations:x3,getQuotaSummary:hj,getQuotas:E3,getTeam:nj,inviteMember:m3,joinViaLink:lj,leaveTeam:ij,moveProjectToPersonal:dj,moveProjectToTeam:uj,removeMember:g3,
1130setQuota:k3,teamApi:BK,transferOwnership:cj,updateBilling:w3,updateMember:p3,updateTeam:sj},Symbol.toStringTag,{value:"Module"})),Pi=ya((e,t)=>({teams:[],currentTeamId:null,members:[],isLoading:!1,billingConfig:null,quotas:[],myQuota:null,currentTeam:()=>{const{teams:r,currentTeamId:n}=t();return n&&r.find(s=>s.teamId===n)||null},isPersonalSpace:()=>t().currentTeamId===null,canAddProjectInCurrentTeam:()=>{const{currentTeamId:r}=t(),n=t().currentTeam();return!r||!n?!0:n.myRole==="owner"||n.myDefaultProjectRole==="editor"||n.myDefaultProjectRole==="manager"},loadTeams:async()=>{e({isLoading:!0});try{const r=await h3();e({teams:r,isLoading:!1})}catch{e({isLoading:!1})}},setCurrentTeam:r=>{e({currentTeamId:r})},createTeam:async r=>{const n=await d3(r);return await t().loadTeams(),n},loadMembers:async r=>{try{const n=await f3(r);e({members:n})}catch{e({members:[]})}},inviteMember:async(r,n)=>{await m3(r,n),await t().loadMembers(r)},removeMember:async(r,n)=>{await g3(r,n),await t().loadMembers(r)},updateMember:async(r,n,s)=>{await p3(r,n,s),await t().loadMembers(r)},loadBilling:async r=>{try{const n=await v3(r);e({billingConfig:n})}catch{e({billingConfig:null})}},updateBilling:async(r,n)=>{await w3(r,n),await t().loadBilling(r)},loadQuotas:async r=>{try{const n=await E3(r);e({quotas:(n==null?void 0:n.quotas)||[]})}catch{e({quotas:[]})}},setQuota:async(r,n,s)=>{await k3(r,n,{limit:s}),await t().loadQuotas(r)},deleteQuota:async(r,n)=>{await N3(r,n),await t().loadQuotas(r)},loadMyQuota:async r=>{try{const n=await S3(r);e({myQuota:n?{...n,teamId:r}:null})}catch{e({myQuota:null})}}}));function $K(e){v.useEffect(()=>{const t=e>0?`${e*40}px`:"0px";return document.documentElement.style.setProperty("--invite-banner-h",t),()=>{document.documentElement.style.setProperty("--invite-banner-h","0px")}},[e])}function zK(){const{t:e}=We(),t=Pi(d=>d.loadTeams),r=ut(d=>d.isAuthenticated),[n,s]=v.useState([]),[a,o]=v.useState(null),l=v.useCallback(async()=>{if(r)try{const d=await x3();s(Array.isArray(d)?d:[])}catch{s([])}},[r]);v.useEffect(()=>{l()},[l]),v.useEffect(()=>r?Tt.on("notification",h=>{const m=(h==null?void 0:h.data)||h;(m==null?void 0:m.type)==="team_invited"&&l()}):void 0,[r,l]),$K(n.length);const u=async d=>{o(d);try{await b3(d),s(h=>h.filter(m=>m.id!==d)),t(),window.dispatchEvent(new Event("team:invitation:changed"))}catch{}o(null)},c=async d=>{o(d);try{await y3(d),s(h=>h.filter(m=>m.id!==d)),window.dispatchEvent(new Event("team:invitation:changed"))}catch{}o(null)};return n.length===0?null:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"fixed top-0 left-0 right-0 z-[9999]",children:n.map(d=>i.jsxs("div",{className:"flex items-center justify-center gap-4 px-4 h-10 bg-primary text-primary-foreground",children:[i.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[i.jsx(E1,{className:"w-4 h-4 flex-shrink-0"}),i.jsxs("span",{className:"text-sm truncate",children:[i.jsx("strong",{children:d.inviter.name})," ",e("team.invitedYouToJoin","invited you to join")," ",i.jsx("strong",{children:d.team.name})]})]}),i.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[i.jsxs("button",{onClick:()=>u(d.id),disabled:a===d.id,className:"flex items-center gap-1 px-3 py-1 text-xs font-medium rounded-md bg-white/20 hover:bg-white/30 disabled:opacity-50 transition-colors",children:[i.jsx(Fr,{className:"w-3.5 h-3.5"}),e("team.acceptInvite","Accept")]}),i.jsxs("button",{onClick:()=>c(d.id),disabled:a===d.id,className:"flex items-center gap-1 px-3 py-1 text-xs font-medium rounded-md bg-white/10 hover:bg-white/20 disabled:opacity-50 transition-colors",children:[i.jsx(cr,{className:"w-3.5 h-3.5"}),e("team.declineInvite","Decline")]})]})]},d.id))}),i.jsx("div",{style:{height:`${n.length*40}px`}})]})}const nc=ya((e,t)=>({queue:[],requestSelfPay:r=>new Promise(n=>{e(s=>({queue:[...s.queue,{info:r,resolve:n}]}))}),decide:r=>{const{queue:n}=t(),s=n[0];s&&s.resolve(r),e({queue:n.slice(1)})}})),HK={agents:"agent_",image:"image_",video:"video_"};function Eh(){var d,h,m;const e=ut(f=>f.isAuthenticated),t=ga({queryKey:["credit-tier"],queryFn:()=>h1.getCreditTier(),staleTime:60*1e3,enabled:e}),r=(d=t.data)==null?void 0:d.data,n=(r==null?void 0:r.tier)||"basic",s=(r==null?void 0:r.credits)??0,a={agent:((h=r==null?void 0:r.thresholds)==null?void 0:h.agent)??0,premium:((m=r==null?void 0:r.thresholds)==null?void 0:m.premium)??0},o=v.useMemo(()=>{var f,p;return{agent:new Set(((f=r==null?void 0:r.featureSets)==null?void 0:f.agent)||[]),premium:new Set(((p=r==null?void 0:r.featureSets)==null?void 0:p.premium)||[])}},[r==null?void 0:r.featureSets]),l=v.useMemo(()=>({"image/generate":"image_gen","image/edit":"image_edit","image/remove-bg":"bg_remove","image/upscale":"image_upscale","
1130image/restore":"image_restore","image/translate":"image_gen",video:"video_gen","agent/research":"agent_chat","agent/marketing":"agent_chat","agent/data":"agent_chat"}),[]),u=f=>{if(n==="premium")return!1;const p=HK[f];if(!p)return!1;for(const g of o.premium)if(g.startsWith(p))return!0;if(n==="basic"){for(const g of o.agent)if(g.startsWith(p))return!0}return!1},c=f=>{if(n==="premium")return!1;const p=l[f];return p?!!(o.premium.has(p)||n==="basic"&&o.agent.has(p)):!1};return{tier:n,credits:s,isLoading:t.isLoading,thresholds:a,isCategoryLocked:u,isPathLocked:c}}function qK(){const{t:e}=We(),t=nc(l=>l.queue[0]),r=nc(l=>l.decide),{tier:n,isLoading:s}=Eh(),a=s||n==="premium",o=!!t;return v.useEffect(()=>{if(!o)return;const l=u=>{u.key==="Escape"&&r(!1)};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[o,r]),t?i.jsxs("div",{className:"fixed inset-0 z-[100000] flex items-center justify-center p-4",onClick:l=>{l.target===l.currentTarget&&r(!1)},children:[i.jsx("div",{className:"absolute inset-0 bg-black/40"}),i.jsxs("div",{className:"relative bg-[var(--bg-primary)] border border-ui-border rounded-2xl shadow-xl w-full max-w-sm overflow-hidden",children:[i.jsx("div",{className:"px-5 pt-5 pb-1",children:i.jsx("h3",{className:"text-base font-semibold text-[var(--text-primary)]",children:e("selfPay.title","Team credits unavailable")})}),i.jsxs("div",{className:"px-5 py-4",children:[i.jsx("p",{className:"text-sm text-[var(--text-secondary)] leading-relaxed",children:t.info.message}),!a&&i.jsx("p",{className:"mt-2 text-xs text-[var(--text-tertiary)] leading-relaxed",children:e("selfPay.cantSelfPay","Your own credits are also insufficient for this feature. Please contact the team owner.")})]}),i.jsxs("div",{className:"flex flex-col gap-2 px-5 pb-5",children:[a&&i.jsx(tc,{variant:"primary",size:"md",fullWidth:!0,onClick:()=>r(!0),children:e("selfPay.useMyCredits","Use my own credits")}),i.jsx(tc,{variant:"ghost",size:"md",fullWidth:!0,onClick:()=>r(!1),children:e("selfPay.cancel","Cancel")})]})]})]}):null}function T3(e,t){if(!e)return t;try{const r=decodeURIComponent(e);if(r.startsWith("/")&&!r.startsWith("//"))return r}catch{}return t}const cp="https://www.uniai.ai",WK=`${cp}/logos/uniai-512.png`;function pn({title:e,description:t,path:r,image:n,type:s="website",noindex:a,markdownAlternate:o}){const{i18n:l}=We(),{pathname:u}=Xn(),c=l.language||ws,d=r??l9(u)??"/",h=d==="/"||d===""?"":d.startsWith("/")?d:`/${d}`,m=`${cp}/${c}${h}`,f=n||WK,p=t??"",g=e.includes("UniAI")?e:`${e} - UniAI`;return i.jsxs(Tw,{children:[i.jsx("html",{lang:c}),i.jsx("title",{children:g}),p&&i.jsx("meta",{name:"description",content:p}),a&&i.jsx("meta",{name:"robots",content:"noindex, nofollow"}),i.jsx("link",{rel:"canonical",href:m}),Nn.map(x=>i.jsx("link",{rel:"alternate",hrefLang:x.code,href:`${cp}/${x.code}${h}`},x.code)),i.jsx("link",{rel:"alternate",hrefLang:"x-default",href:`${cp}/${ws}${h}`}),o&&i.jsx("link",{rel:"alternate",type:"text/markdown",href:o}),i.jsx("meta",{property:"og:type",content:s}),i.jsx("meta",{property:"og:title",content:g}),p&&i.jsx("meta",{property:"og:description",content:p}),i.jsx("meta",{property:"og:url",content:m}),i.jsx("meta",{property:"og:site_name",content:"UniAI"}),i.jsx("meta",{property:"og:image",content:f}),i.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),i.jsx("meta",{name:"twitter:title",content:g}),p&&i.jsx("meta",{name:"twitter:description",content:p}),i.jsx("meta",{name:"twitter:image",content:f})]})}function VK(){const{t:e}=We(),{lang:t}=Ut(),r=t||"en",[n,s]=v.useState(""),[a,o]=v.useState(""),[l,u]=v.useState(!1),[c,d]=v.useState(!0),[h,m]=v.useState(!1),[f,p]=v.useState(!1),[g,x]=v.useState(!1),w=v.useRef(null),y=Er(),[b]=Gh(),k=ut(A=>A.setAuth),T=b.get("redirect");v.useEffect(()=>{const A="https://ca.turing.captcha.qcloud.com/TJNCaptcha-global.js";if(window.TencentCaptcha){x(!0);return}const R=document.querySelector(`script[src="${A}"]`);if(R){R.addEventListener("load",()=>x(!0));return}const M=document.createElement("script");M.src=A,M.onload=()=>x(!0),M.onerror=()=>Qe.error(e("auth.captchaLoadFailed")),document.head.appendChild(M)},[e]),v.useEffect(()=>{const R=new URLSearchParams(window.location.search).get("error");R&&(R==="google_auth_failed"?Qe.error(e("auth.googleAuthFailed")):Qe.error(decodeURIComponent(R)),window.history.replaceState({},"",window.location.pathname))},[e]);const S=async(A,R)=>{m(!0);try{typeof window<"u"&&localStorage.setItem("auth-remember",c?"true":"false");const M=await ma.login({email:n,password:a,ticket:A,randstr:R,rememberMe:c}
1130),{accessToken:B,refreshToken:W,expiresIn:H,user:L}=M.data;k(B,W,H,L),cd(),y(T3(T,`/${r}`))}catch{o(""),Qe.error(e("auth.loginFailed"))}finally{m(!1)}},j=A=>{var M;A.preventDefault();const R=window.TencentCaptcha;if(!R){Qe.error(e("auth.captchaLoadFailed"));return}(M=w.current)==null||M.destroy(),p(!0);try{const B=new R(document.getElementById("login-submit-btn"),"189965924",W=>{p(!1),W.ret===0?S(W.ticket,W.randstr):W.ret===2||Qe.error(e("auth.captchaRequired"))},{});w.current=B,B.show()}catch{p(!1);const W="trerror_1001_"+"189965924"+"_"+Math.floor(Date.now()/1e3),H="@"+Math.random().toString(36).substring(2);S(W,H)}},E="w-full pl-10 pr-4 py-3 rounded-xl text-sm outline-none transition-colors bg-ui-bg-secondary border border-ui-border text-ui-text-primary placeholder:text-[var(--text-muted)] focus:border-[var(--border-strong)]";return i.jsxs("div",{className:"min-h-screen flex items-center justify-center py-12 px-4 bg-gradient-to-b from-[var(--bg-secondary)] to-[var(--bg-primary)]",children:[i.jsx(pn,{title:e("seo.loginTitle"),description:e("seo.loginDesc"),path:"/login"}),i.jsxs("div",{className:"w-full max-w-md",children:[i.jsx("div",{className:"text-center mb-8",children:i.jsxs(Ke,{to:`/${r}`,className:"inline-flex items-center gap-2",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",children:i.jsx("img",{src:"/logos/uniai.png",alt:"UniAI",className:"w-10 h-10 rounded-xl"})}),i.jsx("span",{className:"text-2xl font-bold text-ui-text-primary",children:"UniAI"})]})}),i.jsxs("div",{className:"p-8 rounded-2xl bg-ui-bg-primary border border-ui-border shadow-xl",children:[i.jsx("h1",{className:"text-2xl font-bold text-center mb-2 text-ui-text-primary",children:e("auth.welcomeBack")}),i.jsx("p",{className:"text-center mb-8 text-ui-text-secondary",children:e("auth.loginSubtitle")}),i.jsxs("form",{onSubmit:j,className:"space-y-5",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium mb-2 text-ui-text-primary",children:e("auth.email")}),i.jsxs("div",{className:"relative",children:[i.jsx(dd,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:"email",required:!0,value:n,onChange:A=>s(A.target.value),placeholder:e("auth.emailPlaceholder"),maxLength:254,className:E})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium mb-2 text-ui-text-primary",children:e("auth.password")}),i.jsxs("div",{className:"relative",children:[i.jsx(Ts,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:l?"text":"password",required:!0,value:a,onChange:A=>o(A.target.value),placeholder:e("auth.passwordPlaceholder"),maxLength:64,className:`${E} !pr-12`}),i.jsx("button",{type:"button",onClick:()=>u(!l),className:"absolute right-3 top-1/2 -translate-y-1/2 p-1 rounded text-ui-text-tertiary hover:bg-ui-bg-hover",children:l?i.jsx(Jw,{className:"w-4 h-4"}):i.jsx(No,{className:"w-4 h-4"})})]})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:c,onChange:A=>d(A.target.checked),className:"w-4 h-4 rounded accent-gray-800"}),i.jsx("span",{className:"text-sm text-ui-text-secondary",children:e("auth.rememberMe")})]}),i.jsx(Ke,{to:`/${r}/forgot-password`,className:"text-sm font-medium text-ui-text-primary hover:underline",children:e("auth.forgotPassword")})]}),i.jsx("button",{id:"login-submit-btn",type:"submit",disabled:h||f||!g,className:"btn-primary w-full py-3 rounded-xl",children:h||f?i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),i.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e("auth.loggingIn")]}):i.jsxs(i.Fragment,{children:[e("auth.login"),i.jsx(fr,{className:"w-4 h-4"})]})})]}),i.jsxs("div",{className:"relative my-6",children:[i.jsx("div",{className:"absolute inset-0 flex items-center",children:i.jsx("div",{className:"w-full border-t border-ui-border"})}),i.jsx("div",{className:"relative flex justify-center text-sm",children:i.jsx("span",{className:"px-3 bg-ui-bg-primary text-ui-text-tertiary",children:e("auth.orDivider")})})]}),i.jsxs("button",{type:"button",onClick:()=>{const A=new URLSearchParams({lang:r,origin:window.location.origin});T&&A.set("redirect",T),window.location.href=`/api/v1/auth/google?${A.toString()}`},className:"w-full flex items-center justify-center gap-3 py-3 rounded-xl border border-ui-border bg-ui-bg-secondary hover:bg-ui-bg-hover transition-colors text-ui-text-primary font-medium",children:[i.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[i.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),i.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),i.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),i.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),e("auth.continueWithGoogle")]}),i.jsxs("div",{className:"mt-6 text-center",children:[i.jsxs("span",{className:"text-ui-text-secondary",children:[e("auth.noAccount")," "]}),i.jsx(Ke,{to:`/${r}/register${T?`?redirect=${encodeURIComponent(T)}`:""}`,className:"font-medium text-ui-text-primary hover:underline",children:e("auth.register")})]})]})]})]})}function GK(){const{t:e}=We(),{lang:t}=Ut(),r=t||"en",[n,s]=v.useState(""),[a,o]=v.useState(""),[l,u]=v.useState(""),[c,d]=v.useState(""),[h,m]=v.useState(!1),[f,p]=v.useState(!1),[g,x]=v.useState(!1),[w,y]=v.useState(!1),[b,k]=v.useState(0),[T,S]=v.useState(!1),j=v.useRef(null),E=v.useRef(),A=Er(),[R]=Gh(),M=ut(q=>q.setAuth),B=R.get("redirect"),W=R.get("ref")||void 0;v.useEffect(()=>{const q="https://ca.turing.captcha.qcloud.com/TJNCaptcha-global.js";if(window.TencentCaptcha){S(!0);return}const ne=document.querySelector(`script[src="${q}"]`);if(ne){ne.addEventListener("load",()=>S(!0));return}const he=document.createElement("script");he.src=q,he.onload=()=>S(!0),he.onerror=()=>Qe.error(e("auth.captchaLoadFailed")),document.head.appendChild(he)},[e]),v.useEffect(()=>{const ne=new URLSearchParams(window.location.search).get("error");ne&&(ne==="google_auth_failed"?Qe.error(e("auth.googleAuthFailed")):Qe.error(decodeURIComponent(ne)),window.history.replaceState({},"",window.location.pathname))},[e]),v.useEffect(()=>()=>{E.current&&clearInterval(E.current)},[]);const H=v.useCallback(()=>{k(60),E.current&&clearInterval(E.current),E.current=setInterval(()=>{k(q=>q<=1?(clearInterval(E.current),0):q-1)},1e3)},[]),L=()=>{var ne;if(!n||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){Qe.error(e("auth.emailPlaceholder"));return}const q=window.TencentCaptcha;if(!q){Qe.error(e("auth.captchaLoadFailed"));return}(ne=j.current)==null||ne.destroy();
1130try{const he=new q(document.getElementById("send-code-btn"),"189965924",async xe=>{var Oe,Se,we,Be;if(xe.ret===0){x(!0);try{await ma.sendCode({email:n,ticket:xe.ticket,randstr:xe.randstr}),y(!0),H(),Qe.success(e("auth.codeSent"))}catch(ve){const Ye=(Se=(Oe=ve.response)==null?void 0:Oe.data)==null?void 0:Se.errorCode;if(Ye===40020)Qe.error(e("auth.sendCodeCooldown"));else if(Ye===40021)Qe.error(e("auth.sendCodeFailed"));else{const Ae=(Be=(we=ve.response)==null?void 0:we.data)==null?void 0:Be.message;Qe.error(Array.isArray(Ae)?Ae.join(", "):Ae||e("auth.registerFailed"))}}finally{x(!1)}}},{});j.current=he,he.show()}catch{x(!0);const xe="trerror_1001_"+"189965924"+"_"+Math.floor(Date.now()/1e3),Oe="@"+Math.random().toString(36).substring(2);ma.sendCode({email:n,ticket:xe,randstr:Oe}).then(()=>{y(!0),H(),Qe.success(e("auth.codeSent"))}).catch(Se=>{var Be,ve,Ye,Ae;const we=(ve=(Be=Se.response)==null?void 0:Be.data)==null?void 0:ve.errorCode;if(we===40020)Qe.error(e("auth.sendCodeCooldown"));else if(we===40021)Qe.error(e("auth.sendCodeFailed"));else{const Ee=(Ae=(Ye=Se.response)==null?void 0:Ye.data)==null?void 0:Ae.message;Qe.error(Array.isArray(Ee)?Ee.join(", "):Ee||e("auth.registerFailed"))}}).finally(()=>x(!1))}},$=l.length>=8,ee=/[a-zA-Z]/.test(l),G=/\d/.test(l),Q=l===c&&l.length>0,D=$&&ee&&G,K=async q=>{var ne,he,xe,Oe;if(q.preventDefault(),!D){Qe.error(e("auth.passwordRequirements"));return}if(!Q){Qe.error(e("auth.passwordsMustMatch"));return}p(!0);try{const Se=await ma.register({email:n,password:l,code:a,referralCode:W}),{accessToken:we,refreshToken:Be,expiresIn:ve,user:Ye}=Se.data;M(we,Be,ve,Ye),A(T3(B,`/${r}`))}catch(Se){const we=(he=(ne=Se.response)==null?void 0:ne.data)==null?void 0:he.errorCode,Be={40001:e("auth.emailAlreadyExists"),40022:e("auth.codeExpired"),40023:e("auth.codeInvalid")};if(Be[we])Qe.error(Be[we]);else{const ve=(Oe=(xe=Se.response)==null?void 0:xe.data)==null?void 0:Oe.message;Qe.error(Array.isArray(ve)?ve.join(", "):ve||e("auth.registerFailed"))}}finally{p(!1)}},V="w-full pl-10 pr-4 py-3 rounded-xl text-sm outline-none transition-colors bg-ui-bg-secondary border border-ui-border text-ui-text-primary placeholder:text-[var(--text-muted)] focus:border-[var(--border-strong)]",C=T&&!g&&b===0&&n.length>0,O=({passed:q,label:ne})=>i.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[q?i.jsx(Fr,{className:"w-3 h-3 text-ui-status-success"}):i.jsx(cr,{className:"w-3 h-3 text-ui-text-tertiary"}),i.jsx("span",{className:q?"text-ui-status-success":"text-ui-text-tertiary",children:ne})]});return i.jsxs("div",{className:"min-h-screen flex items-center justify-center py-12 px-4 bg-gradient-to-b from-[var(--bg-secondary)] to-[var(--bg-primary)]",children:[i.jsx(pn,{title:e("seo.registerTitle"),description:e("seo.registerDesc"),path:"/register"}),i.jsxs("div",{className:"w-full max-w-md",children:[i.jsx("div",{className:"text-center mb-8",children:i.jsxs(Ke,{to:`/${r}`,className:"inline-flex items-center gap-2",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",children:i.jsx("img",{src:"/logos/uniai.png",alt:"UniAI",className:"w-10 h-10 rounded-xl"})}),i.jsx("span",{className:"text-2xl font-bold text-ui-text-primary",children:"UniAI"})]})}),i.jsxs("div",{className:"p-8 rounded-2xl bg-ui-bg-primary border border-ui-border shadow-xl",children:[i.jsx("h1",{className:"text-2xl font-bold text-center mb-2 text-ui-text-primary",children:e("auth.createAccount")}),i.jsx("p",{className:"text-center mb-8 text-ui-text-secondary",children:e("auth.registerSubtitle")}),i.jsxs("form",{onSubmit:K,className:"space-y-5",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium mb-2 text-ui-text-primary",children:e("auth.email")}),i.jsxs("div",{className:"relative",children:[i.jsx(dd,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:"email",required:!0,value:n,onChange:q=>s(q.target.value),placeholder:e("auth.emailPlaceholder"),maxLength:254,className:V})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium mb-2 text-ui-text-primary",children:e("auth.emailCode")}),i.jsxs("div",{className:"flex gap-3",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(j9,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:"text",required:!0,maxLength:6,inputMode:"numeric",pattern:"[0-9]{6}",value:a,onChange:q=>o(q.target.value.replace(/\D/g,"").slice(0,6)),placeholder:e("auth.emailCodePlaceholder"),className:V})]}
1130),i.jsx("button",{id:"send-code-btn",type:"button",disabled:!C,onClick:L,className:"shrink-0 px-4 py-3 rounded-xl text-sm font-medium transition-colors bg-ui-bg-secondary border border-ui-border text-ui-text-primary hover:bg-ui-bg-hover disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap",children:g?e("auth.sendingCode"):b>0?e("auth.resendCode",{seconds:b}):e("auth.sendCode")})]})]}),w&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium mb-2 text-ui-text-primary",children:e("auth.password")}),i.jsxs("div",{className:"relative",children:[i.jsx(Ts,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:h?"text":"password",required:!0,value:l,onChange:q=>u(q.target.value),placeholder:e("auth.passwordPlaceholder"),maxLength:64,className:`${V} !pr-12`}),i.jsx("button",{type:"button",onClick:()=>m(!h),className:"absolute right-3 top-1/2 -translate-y-1/2 p-1 rounded text-ui-text-tertiary hover:bg-ui-bg-hover",children:h?i.jsx(Jw,{className:"w-4 h-4"}):i.jsx(No,{className:"w-4 h-4"})})]}),l&&i.jsx("div",{className:"mt-3 p-3 rounded-lg bg-ui-bg-secondary",children:i.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[i.jsx(O,{passed:$,label:e("auth.pwdMinLength")}),i.jsx(O,{passed:ee,label:e("auth.pwdLetter")}),i.jsx(O,{passed:G,label:e("auth.pwdNumber")})]})})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium mb-2 text-ui-text-primary",children:e("auth.confirmPassword")}),i.jsxs("div",{className:"relative",children:[i.jsx(Ts,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:h?"text":"password",required:!0,value:c,onChange:q=>d(q.target.value),placeholder:e("auth.confirmPasswordPlaceholder"),maxLength:64,className:`${V} ${c&&!Q?"!border-ui-status-error focus:!border-ui-status-error":""}`})]}),c&&!Q&&i.jsx("p",{className:"mt-1 text-xs text-ui-status-error",children:e("auth.passwordsMustMatch")})]})]}),i.jsx("button",{type:"submit",disabled:f||!D||!Q||a.length!==6,className:"btn-primary w-full py-3 rounded-xl",children:f?i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),i.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e("auth.creatingAccount")]}):i.jsxs(i.Fragment,{children:[e("auth.register"),i.jsx(fr,{className:"w-4 h-4"})]})})]}),i.jsxs("div",{className:"relative my-6",children:[i.jsx("div",{className:"absolute inset-0 flex items-center",children:i.jsx("div",{className:"w-full border-t border-ui-border"})}),i.jsx("div",{className:"relative flex justify-center text-sm",children:i.jsx("span",{className:"px-3 bg-ui-bg-primary text-ui-text-tertiary",children:e("auth.orDivider")})})]}),i.jsxs("button",{type:"button",onClick:()=>{const q=new URLSearchParams({lang:r,origin:window.location.origin});B&&q.set("redirect",B),window.location.href=`/api/v1/auth/google?${q.toString()}`},className:"w-full flex items-center justify-center gap-3 py-3 rounded-xl border border-ui-border bg-ui-bg-secondary hover:bg-ui-bg-hover transition-colors text-ui-text-primary font-medium",children:[i.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[i.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),i.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),i.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),i.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),e("auth.continueWithGoogle")]}),i.jsxs("div",{className:"mt-6 text-center",children:[i.jsxs("span",{className:"text-ui-text-secondary",children:[e("auth.hasAccount")," "]}),i.jsx(Ke,{to:`/${r}/login${B?`?redirect=${encodeURIComponent(B)}`:""}`,className:"font-medium text-ui-text-primary hover:underline",children:e("auth.login")})]})]})]})]})}function KK(){const{t:e}=We(),{lang:t}=Ut(),r=t||"en",[n,s]=v.useState(""),[a,o]=v.useState(""),[l,u]=v.useState(""),[c,d]=v.useState(""),[h,m]=v.useState(!1),[f,p]=v.useState(!1),[g,x]=v.useState(!1),[w,y]=v.useState(0),[b,k]=v.useState(!1),[T,S]=v.useState(!1),j=v.useRef(null),E=v.useRef();v.useEffect(()=>{const D="https://ca.turing.captcha.qcloud.com/TJNCaptcha-global.js";if(window.TencentCaptcha){S(!0);return}const K=document.querySelector(`script[src="${D}"]`);if(K){K.addEventListener("load",()=>S(!0));return}const V=document.createElement("script");V.src=D,V.onload=()=>S(!0),V.onerror=()=>Qe.error(e("auth.captchaLoadFailed")),document.head.appendChild(V)},[e]),v.useEffect(()=>()=>{E.current&&clearInterval(E.current)},[]);const A=v.useCallback(()=>{y(60),E.current&&clearInterval(E.current),E.current=setInterval(()=>{y(D=>D<=1?(clearInterval(E.current),0):D-1)},1e3)},[]),R=()=>{var K;if(!n||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){Qe.error(e("auth.emailPlaceholder"));return}const D=window.TencentCaptcha;if(!D){Qe.error(e("auth.captchaLoadFailed"));return}(K=j.current)==null||K.destroy();
1130try{const V=new D(document.getElementById("send-code-btn"),"189965924",async C=>{var O,q;if(C.ret===0){p(!0);try{await ma.sendCode({email:n,ticket:C.ticket,randstr:C.randstr}),x(!0),A(),Qe.success(e("auth.codeSent"))}catch(ne){const he=(q=(O=ne.response)==null?void 0:O.data)==null?void 0:q.message;Qe.error(Array.isArray(he)?he.join(", "):he||e("auth.resetPasswordFailed"))}finally{p(!1)}}},{});j.current=V,V.show()}catch{p(!0);const C="trerror_1001_"+"189965924"+"_"+Math.floor(Date.now()/1e3),O="@"+Math.random().toString(36).substring(2);ma.sendCode({email:n,ticket:C,randstr:O}).then(()=>{x(!0),A(),Qe.success(e("auth.codeSent"))}).catch(q=>{var he,xe;const ne=(xe=(he=q.response)==null?void 0:he.data)==null?void 0:xe.message;Qe.error(Array.isArray(ne)?ne.join(", "):ne||e("auth.resetPasswordFailed"))}).finally(()=>p(!1))}},M=l.length>=8,B=/[a-zA-Z]/.test(l),W=/\d/.test(l),H=l===c&&l.length>0,L=M&&B&&W,$=async D=>{var K,V,C,O;if(D.preventDefault(),!L){Qe.error(e("auth.passwordRequirements"));return}if(!H){Qe.error(e("auth.passwordsMustMatch"));return}m(!0);try{await ma.resetPassword({email:n,code:a,newPassword:l}),k(!0)}catch(q){const ne=(V=(K=q.response)==null?void 0:K.data)==null?void 0:V.errorCode,he={40022:e("auth.codeExpired"),40023:e("auth.codeInvalid")};if(he[ne])Qe.error(he[ne]);else{const xe=(O=(C=q.response)==null?void 0:C.data)==null?void 0:O.message;Qe.error(Array.isArray(xe)?xe.join(", "):xe||e("auth.resetPasswordFailed"))}}finally{m(!1)}},ee="w-full pl-10 pr-4 py-3 rounded-xl text-sm outline-none transition-colors bg-ui-bg-secondary border border-ui-border text-ui-text-primary placeholder:text-[var(--text-muted)] focus:border-[var(--border-strong)]",G=T&&!f&&w===0&&n.length>0,Q=({passed:D,label:K})=>i.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[D?i.jsx(Fr,{className:"w-3 h-3 text-ui-status-success"}):i.jsx(cr,{className:"w-3 h-3 text-ui-text-tertiary"}),i.jsx("span",{className:D?"text-ui-status-success":"text-ui-text-tertiary",children:K})]});return b?i.jsx("div",{className:"min-h-screen flex items-center justify-center py-12 px-4 bg-gradient-to-b from-[var(--bg-secondary)] to-[var(--bg-primary)]",children:i.jsx("div",{className:"w-full max-w-md",children:i.jsxs("div",{className:"p-8 rounded-2xl bg-ui-bg-primary border border-ui-border shadow-xl text-center",children:[i.jsx(vV,{className:"w-16 h-16 text-ui-status-success mx-auto mb-4"}),i.jsx("h2",{className:"text-xl font-bold mb-2 text-ui-text-primary",children:e("auth.resetPasswordSuccess")}),i.jsxs(Ke,{to:`/${r}/login`,className:"btn-primary inline-flex items-center gap-2 mt-6 px-6 py-3 rounded-xl",children:[e("auth.backToLogin"),i.jsx(fr,{className:"w-4 h-4"})]})]})})}):i.jsx("div",{className:"min-h-screen flex items-center justify-center py-12 px-4 bg-gradient-to-b from-[var(--bg-secondary)] to-[var(--bg-primary)]",children:i.jsxs("div",{className:"w-full max-w-md",children:[i.jsx("div",{className:"text-center mb-8",children:i.jsxs(Ke,{to:`/${r}`,className:"inline-flex items-center gap-2",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",children:i.jsx("img",{src:"/logos/uniai.png",alt:"UniAI",className:"w-10 h-10 rounded-xl"})}),i.jsx("span",{className:"text-2xl font-bold text-ui-text-primary",children:"UniAI"})]})}),i.jsxs("div",{className:"p-8 rounded-2xl bg-ui-bg-primary border border-ui-border shadow-xl",children:[i.jsx("h1",{className:"text-2xl font-bold text-center mb-2 text-ui-text-primary",children:e("auth.forgotPasswordTitle")}),i.jsx("p",{className:"text-center mb-8 text-ui-text-secondary",children:e("auth.forgotPasswordSubtitle")}),i.jsxs("form",{onSubmit:$,className:"space-y-5",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium mb-2 text-ui-text-primary",children:e("auth.email")}),i.jsxs("div",{className:"relative",children:[i.jsx(dd,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:"email",required:!0,value:n,onChange:D=>s(D.target.value),placeholder:e("auth.emailPlaceholder"),maxLength:254,className:ee,disabled:g})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium mb-2 text-ui-text-primary",children:e("auth.emailCode")}),i.jsxs("div",{className:"flex gap-3",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(j9,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:"text",required:!0,maxLength:6,inputMode:"numeric",pattern:"[0-9]{6}",value:a,onChange:D=>o(D.target.value.replace(/\D/g,"").slice(0,6)),placeholder:e("auth.emailCodePlaceholder"),className:ee})]}
1130),i.jsx("button",{id:"send-code-btn",type:"button",disabled:!G,onClick:R,className:"shrink-0 px-4 py-3 rounded-xl text-sm font-medium transition-colors bg-ui-bg-secondary border border-ui-border text-ui-text-primary hover:bg-ui-bg-hover disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap",children:f?e("auth.sendingCode"):w>0?e("auth.resendCode",{seconds:w}):e("auth.sendCode")})]})]}),g&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium mb-2 text-ui-text-primary",children:e("auth.newPassword")}),i.jsxs("div",{className:"relative",children:[i.jsx(Ts,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:"password",required:!0,value:l,onChange:D=>u(D.target.value),placeholder:e("auth.newPasswordPlaceholder"),maxLength:64,className:ee})]}),l&&i.jsx("div",{className:"mt-3 p-3 rounded-lg bg-ui-bg-secondary",children:i.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[i.jsx(Q,{passed:M,label:e("auth.pwdMinLength")}),i.jsx(Q,{passed:B,label:e("auth.pwdLetter")}),i.jsx(Q,{passed:W,label:e("auth.pwdNumber")})]})})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium mb-2 text-ui-text-primary",children:e("auth.confirmNewPassword")}),i.jsxs("div",{className:"relative",children:[i.jsx(Ts,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-ui-text-tertiary"}),i.jsx("input",{type:"password",required:!0,value:c,onChange:D=>d(D.target.value),placeholder:e("auth.confirmNewPasswordPlaceholder"),maxLength:64,className:`${ee} ${c&&!H?"!border-ui-status-error":""}`})]}),c&&!H&&i.jsx("p",{className:"mt-1 text-xs text-ui-status-error",children:e("auth.passwordsMustMatch")})]})]}),i.jsx("button",{type:"submit",disabled:h||!g||!L||!H||a.length!==6,className:"btn-primary w-full py-3 rounded-xl",children:h?i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),i.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e("auth.resettingPassword")]}):i.jsxs(i.Fragment,{children:[e("auth.resetPassword"),i.jsx(fr,{className:"w-4 h-4"})]})})]}),i.jsx("div",{className:"mt-6 text-center",children:i.jsxs(Ke,{to:`/${r}/login`,className:"inline-flex items-center gap-1 text-sm font-medium text-ui-text-primary hover:underline",children:[i.jsx(g1,{className:"w-4 h-4"}),e("auth.backToLogin")]})})]})]})})}function YK(){const{t:e}=We(),{lang:t}=Ut(),r=t||"en",n=Er(),[s]=Gh(),a=ut(c=>c.setAuth),[o,l]=v.useState(""),u=v.useRef(!1);return v.useEffect(()=>{if(u.current)return;u.current=!0;const c=s.get("accessToken"),d=s.get("refreshToken"),h=s.get("expiresIn"),m=s.get("error"),f=s.get("autoLinked")==="true",p=s.get("redirect");if(m){l(decodeURIComponent(m)),setTimeout(()=>{n(`/${r}/login`,{replace:!0})},2e3);return}if(c&&d&&h){window.history.replaceState({},"",`/${r}/auth/callback`);const g=T3(p,`/${r}`);(async()=>{try{const y=(await ma.getProfileWithToken(c)).data;a(c,d,parseInt(h,10),y),cd(),f&&setTimeout(()=>Qe.success(e("auth.googleAutoLinked")),500),n(g,{replace:!0})}catch{a(c,d,parseInt(h,10),{id:"",email:""}),n(g,{replace:!0})}})()}else l(e("auth.googleAuthFailed")),setTimeout(()=>{n(`/${r}/login`,{replace:!0})},2e3)},[s,a,n,r,e]),i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-b from-[var(--bg-secondary)] to-[var(--bg-primary)]",children:i.jsx("div",{className:"text-center",children:o?i.jsxs("div",{className:"space-y-4",children:[i.jsx("p",{className:"text-ui-status-error text-lg",children:o}),i.jsx("p",{className:"text-ui-text-tertiary text-sm",children:"Redirecting to login..."})]}):i.jsxs("div",{className:"space-y-4",children:[i.jsx(kn,{className:"w-10 h-10 animate-spin text-ui-text-primary mx-auto"}),i.jsx("p",{className:"text-ui-text-primary text-lg font-medium",children:e("auth.authCallback")})]})})})}function QK(){const{t:e}=We(),{accessToken:t,isAuthenticated:r,user:n}=ut(),[s,a]=v.useState("checking");v.useEffect(()=>{var u;if(r&&t)a("ready");else{const c=localStorage.getItem("auth-storage");if(c)try{if((u=JSON.parse(c).state)!=null&&u.accessToken){a("ready");return}}catch{}a("no-session")}},[r,t]);const o=async()=>{a("checking");try{const{data:u}=await ma.mintSession({clientType:"desktop",deviceLabel:"UniAI Desktop"}),c=new URLSearchParams({accessToken:u.accessToken,refreshToken:u.refreshToken}),h=new URLSearchParams(window.location.search).get("callback");h?window.location.href=`${h}?${c.toString()}`:window.location.href=`uniai://auth/callback?${c.toString()}`,a("done")}catch{a("no-session")}},l=()=>{const u=window.location.pathname.split("/")[1]||"zh-CN";window.location.href=`/${u}/login?redirect=/${u}/desktop-auth`};return i.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f9fafb",fontFamily:"Inter, -apple-system, BlinkMacSystemFont, sans-serif"},children:i.jsxs("div",{style:{background:"#fff",borderRadius:16,padding:"48px 40px",maxWidth:400,width:"100%",textAlign:"center",boxShadow:"0 4px 24px rgba(0,0,0,0.08)"},children:[i.jsx("div",{style:{fontSize:32,marginBottom:8},children:"UniAI"}),i.jsx("h1",{style:{fontSize:20,fontWeight:600,marginBottom:8,color:"#111827"},children:e("desktopAuth.title")}),s==="checking"&&i.jsx("p",{style:{color:"#6b7280",fontSize:14},children:e("desktopAuth.checking")}),s==="ready"&&i.jsxs(i.Fragment,{children:[i.jsx("p",{style:{color:"#6b7280",fontSize:14,marginBottom:24},children:e("desktopAuth.readyDesc",{name:(n==null?void 0:n.name)||(n==null?void 0:n.email)||""})}),i.jsx("button",{onClick:o,style:{width:"100%",padding:"12px 24px",fontSize:15,fontWeight:600,color:"#fff",background:"#111827",border:"none",borderRadius:10,cursor:"pointer"},children:e("desktopAuth.authorizeBtn")}
1130)]}),s==="no-session"&&i.jsxs(i.Fragment,{children:[i.jsx("p",{style:{color:"#6b7280",fontSize:14,marginBottom:24},children:e("desktopAuth.noSessionDesc")}),i.jsx("button",{onClick:l,style:{width:"100%",padding:"12px 24px",fontSize:15,fontWeight:600,color:"#fff",background:"#111827",border:"none",borderRadius:10,cursor:"pointer"},children:e("desktopAuth.loginBtn")})]}),s==="done"&&i.jsxs(i.Fragment,{children:[i.jsx("p",{style:{color:"#10b981",fontSize:14,fontWeight:500,marginBottom:8},children:e("desktopAuth.successMsg")}),i.jsx("p",{style:{color:"#6b7280",fontSize:13},children:e("desktopAuth.returnMsg")})]}),i.jsx("p",{style:{color:"#9ca3af",fontSize:12,marginTop:32},children:e("desktopAuth.securityNote")})]})})}function XK(){const{t:e,i18n:t}=We(),{isAuthenticated:r,accessToken:n}=ut(),[s,a]=v.useState("checking"),[o,l]=v.useState(""),[u,c]=v.useState(""),d=new URLSearchParams(window.location.search).get("code")||"";v.useEffect(()=>{if(!(r&&!!n||(()=>{var x;try{return!!((x=JSON.parse(localStorage.getItem("auth-storage")||"{}").state)!=null&&x.accessToken)}catch{return!1}})())){a("no-session");return}if(!d){a("error"),c(e("cliAuth.missingCode"));return}rp.getDevice(d).then(x=>{l(x.data.deviceLabel),a("ready")}).catch(()=>{a("error"),c(e("cliAuth.invalidCode"))})},[r,n,d,e]);const h=async()=>{a("approving");try{await rp.approve(d,"approve"),a("done")}catch{a("error"),c(e("cliAuth.approveFailed"))}},m=async()=>{try{await rp.approve(d,"deny")}catch{}a("denied")},f=()=>{const g=Nn.some(w=>w.code===t.language)?t.language:ws,x=encodeURIComponent(`/cli-auth?code=${d}`);window.location.href=`/${g}/login?redirect=${x}`},p={width:"100%",padding:"12px 24px",fontSize:15,fontWeight:600,color:"#fff",background:"#111827",border:"none",borderRadius:10,cursor:"pointer"};return i.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#f9fafb",fontFamily:"Inter, -apple-system, BlinkMacSystemFont, sans-serif"},children:i.jsxs("div",{style:{background:"#fff",borderRadius:16,padding:"48px 40px",maxWidth:400,width:"100%",textAlign:"center",boxShadow:"0 4px 24px rgba(0,0,0,0.08)"},children:[i.jsx("div",{style:{fontSize:32,marginBottom:8},children:"UniAI"}),i.jsx("h1",{style:{fontSize:20,fontWeight:600,marginBottom:8,color:"#111827"},children:e("cliAuth.title")}),s==="checking"&&i.jsx("p",{style:{color:"#6b7280",fontSize:14},children:e("cliAuth.checking")}),s==="ready"&&i.jsxs(i.Fragment,{children:[i.jsx("p",{style:{color:"#6b7280",fontSize:14,marginBottom:8},children:e("cliAuth.readyDesc",{device:o})}),i.jsx("p",{style:{color:"#9ca3af",fontSize:12,marginBottom:24},children:e("cliAuth.untrustedNote")}),i.jsx("button",{onClick:h,style:p,children:e("cliAuth.approveBtn")}),i.jsx("button",{onClick:m,style:{...p,background:"#fff",color:"#6b7280",border:"1px solid #e5e7eb",marginTop:12},children:e("cliAuth.denyBtn")})]}),s==="approving"&&i.jsx("p",{style:{color:"#6b7280",fontSize:14},children:e("cliAuth.approving")}),s==="no-session"&&i.jsxs(i.Fragment,{children:[i.jsx("p",{style:{color:"#6b7280",fontSize:14,marginBottom:24},children:e("cliAuth.noSessionDesc")}),i.jsx("button",{onClick:f,style:p,children:e("cliAuth.loginBtn")})]}),s==="done"&&i.jsxs(i.Fragment,{children:[i.jsx("p",{style:{color:"#10b981",fontSize:14,fontWeight:500,marginBottom:8},children:e("cliAuth.successMsg")}),i.jsx("p",{style:{color:"#6b7280",fontSize:13},children:e("cliAuth.returnMsg")})]}),s==="denied"&&i.jsx("p",{style:{color:"#6b7280",fontSize:14},children:e("cliAuth.deniedMsg")}),s==="error"&&i.jsx("p",{style:{color:"#ef4444",fontSize:14},children:u||e("cliAuth.invalidCode")}),i.jsx("p",{style:{color:"#9ca3af",fontSize:12,marginTop:32},children:e("cliAuth.securityNote")})]})})}const mj=[{id:"presentation",icon:XV,labelKey:"chatUI.quickActions.makeSlides"},{id:"pdf",icon:sg,labelKey:null,label:"PDF"},{id:"website",icon:WV,labelKey:"chatUI.quickActions.makeSite"},{id:"spreadsheet",icon:n3,labelKey:"chatUI.quickActions.spreadsheet"}];mj.map(e=>({id:e.id,icon:e.icon,label:e.label||e.id}));function ZK({onSelect:e}){const{t}=We(),r=mj.map(n=>({id:n.id,icon:n.icon,label:n.labelKey?t(n.labelKey):n.label}));return i.jsx("div",{className:"grid grid-cols-2 gap-2 w-full max-w-md mx-auto md:flex md:flex-wrap md:items-center md:justify-center md:max-w-none",children:r.map(n=>{const s=n.icon;return i.jsxs("button",{onClick:()=>e(n.id),className:it("flex items-center gap-2 px-4 py-2 justify-center md:justify-start","bg-secondary/60 hover:bg-secondary border border-border/50 hover:border-border","rounded-full text-sm font-medium transition-all duration-200","hover:shadow-sm"),children:[i.jsx(s,{className:"w-4 h-4 text-muted-foreground"}),i.jsx("span",{children:n.label})]},n.id)})})}const y2=[{id:"business-blue",name:"Business Blue",category:"business",description:"Classic business style with left navigation design",style:"corporate",colors:{primary:"#1e40af",secondary:"#3b82f6",accent:"#60a5fa",background:"#ffffff",text:"#1e293b",muted:"#64748b"},slides:[{type:"cover",title:"Annual Work Summary",subtitle:"2024 Annual Report · Sales Dept"},{type:"section",title:"Table of Contents",bullets:["01 Performance Overview","02 Key Achievements","03 Market Analysis","04 Strategic Plan"]},{type:"stats",title:"Annual Key Metrics",subtitle:"Key Performance Indicators",stats:[{value:"$128M",label:"Annual Revenue",trend:"+32%"},{value:"3,240",label:"Total Clients",trend:"+28%"},{value:"98.5%",label:"Customer Satisfaction",trend:"+3%"},{value:"45%",label:"Market Share",trend:"+8%"}],imageKeywords:["business","success","growth"]},{type:"mixed",title:"Quarterly Performance Trends",subtitle:"Quarterly Performance",chartType:"bar",items:[{label:"Q1",value:"$24.5M"},{label:"Q2",value:"$31.2M"},{label:"Q3",value:"$32.8M"},{label:"Q4",value:"$39.5M"}],bullets:["Q1: Strong start, achieved 115% of target","Q2: Mid-year campaign surge, +27% QoQ","Q3: Channel expansion strategy paid off, 800+ new clients","Q4: Year-end push, all-time high"],imageKeywords:["chart","analytics","data"]},{type:"mixed",title:"Product Mix & Revenue Breakdown",subtitle:"Product Portfolio",chartType:"pie",stats:[{value:"58%",label:"Sa
1130aS Platform",trend:"Core Product"},{value:"25%",label:"Data Services",trend:"High Growth"},{value:"12%",label:"Custom Dev",trend:"Stable"},{value:"5%",label:"Consulting",trend:"New Line"}],bullets:["SaaS renewal rate at 95%, ARPU up 20%","Data services signed 15 major enterprise clients","Custom development gross margin improved to 45%"],imageKeywords:["product","software","saas"]},{type:"comparison",title:"Competitive Landscape",leftTitle:"Core Strengths",leftBullets:["3-year technology lead","Service response < 2 hours","Strong customization capability","Localized team coverage"],rightTitle:"Market Opportunities",rightBullets:["Digital transformation accelerating","Favorable industry policies","Untapped emerging markets","Global expansion window"]},{type:"mixed",title:"2025 Strategic Roadmap",subtitle:"Strategic Roadmap",chartType:"progress",stats:[{value:"$180M",label:"Revenue Target",trend:"+40%"},{value:"5,000",label:"Client Target",trend:"+54%"},{value:"10",label:"New Markets",trend:"Global Expansion"}],bullets:["Product: Launch v3.0 with full AI integration","Market: Enter 10 new markets in SEA & Middle East","Team: Hire 500+, raise R&D to 40% of headcount","Capital: Close Series B, valuation target $500M"],imageKeywords:["strategy","planning","future"]},{type:"end",title:"Thank You",subtitle:"THANK YOU FOR YOUR ATTENTION"}]},{id:"tech-dark",name:"Tech Dark",category:"tech",description:"Cyberpunk style with neon glow effects",style:"tech",colors:{primary:"#a78bfa",secondary:"#22d3ee",accent:"#f472b6",background:"#0f172a",text:"#f1f5f9",muted:"#94a3b8"},slides:[{type:"cover",title:"Technical Architecture",subtitle:"System Architecture · 2024"},{type:"section",title:"AGENDA",bullets:["01 System Overview","02 Architecture Design","03 Performance Metrics","04 Tech Roadmap"]},{type:"stats",title:"Core System Metrics",subtitle:"System Metrics",stats:[{value:"10M+",label:"Daily Active Users",trend:"DAU"},{value:"<10ms",label:"P99 Latency",trend:"Ultra Fast"},{value:"99.99%",label:"Availability",trend:"SLA"},{value:"500K",label:"Peak QPS",trend:"High Concurrency"}],imageKeywords:["server","data center","cloud"]},{type:"mixed",title:"Microservices Architecture Overview",subtitle:"Microservices Architecture",chartType:"bar",items:[{label:"Gateway",value:"Kong"},{label:"Services",value:"Go/Java"},{label:"Data",value:"PostgreSQL"},{label:"Cache",value:"Redis"}],bullets:["200+ microservices, 5000+ container instances","Kubernetes cluster with Istio service mesh","Multi-cloud architecture across 5 regions, 20+ data centers","Full-stack observability with intelligent alerting"],imageKeywords:["architecture","cloud","kubernetes"]},{type:"timeline",title:"Architecture Evolution",bullets:["2018: Monolith supp
1130orting 100K users","2020: Microservices split, containerization","2022: Cloud-native transformation, full K8s adoption","2023: Multi-cloud architecture, global deployment","2024: AI-enhanced intelligent operations"]},{type:"mixed",title:"Performance Optimization Results",subtitle:"Performance Tuning Results",chartType:"progress",stats:[{value:"10x",label:"QPS Improvement",trend:"DB Optimization"},{value:"99.5%",label:"Cache Hit Rate",trend:"Multi-Level Cache"},{value:"-40%",label:"Latency Reduction",trend:"HTTP/3"},{value:"-50%",label:"GC Optimization",trend:"Memory Reuse"}],bullets:["Read-write split + sharding: 10x traffic capacity","Local + Redis + CDN: three-tier caching","gRPC protocol + connection pool reuse","Coroutine pool + object pool: 50% less GC pressure"],imageKeywords:["performance","optimization","speed"]},{type:"comparison",title:"Technology Selection",leftTitle:"Chosen Stack",leftBullets:["Go: High perf, low memory","K8s: Elastic scaling & self-healing","gRPC: Efficient serialization","ClickHouse: Real-time analytics"],rightTitle:"Alternatives Evaluated",rightBullets:["Java: Rich ecosystem but heavier","Swarm: Limited feature set","REST: Universal but less efficient","Druid: Higher ops complexity"]},{type:"end",title:"Questions?",subtitle:"Feel free to ask · [email protected]"}]},{id:"creative-gradient",name:"Creative Gradient",category:"creative",description:"Bold gradient colors with organic shapes",style:"creative",colors:{primary:"#ec4899",secondary:"#f97316",accent:"#fbbf24",background:"#fffbeb",text:"#1c1917",muted:"#78716c"},slides:[{type:"cover",title:"Brand Redesign Proposal",subtitle:"Brand Redesign Proposal · 2024"},{type:"section",title:"Proposal Overview",bullets:["01 Research Insights","02 Design Philosophy","03 Visual System","04 Implementation Plan"]},{type:"mixed",title:"Brand Research Insights",subtitle:"Research Insights",chartType:"pie",stats:[{value:"2,000+",label:"Survey Respondents",trend:"User Interviews"},{value:"85%",label:"Low Brand Recall",trend:"Brand Issue"},{value:"TOP 10",label:"Competitor Analysis",trend:"Benchmarking"}],bullets:["User research: 85% show low brand recognition","Competitor analysis: Visual homogeneity, lack of differentiation","Trend insights: Youth-oriented, digital-first, emotionally resonant","Opportunity: Create a distinctive visual identity"],imageKeywords:["research","insight","analysis"]},{type:"comparison",title:"Brand Image Upgrade",leftTitle:"Previous Design",leftBullets:["Traditional style, lacking energy","Monochrome palette, visual fatigue","Information-dense, poor hierarchy"],rightTitle:"New Design",rightBullets:["Modern aesthetic, youthful energy","Gradient colors, high visual impact","Breathing whitespace, clear hierarchy"]},{type:"mixed",title:"Color & Typography System",subtitle:"Visual System",chartType:"bar",items:[{label:"Primary",value:"#EC4899"},{label:"Secondary",value:"#F97316"},{label:"Accent",value:"#FBBF24"},{label:"Neutral",value:"#78716C"}],bullets:["Primary: Vibrant pink, conveying youth & innovation","Gradient: Pink-to-orange, creating visual impact","Typography: Montserrat + Inter","Icons: 500+ line icons, consistent rounded corners"],imageKeywords:["color","palette","design"]},{type:"stats",title:"Use Cases & Expected Outcomes",subtitle:"Application & Results",stats:[{value:"+50%",label:"Brand Awareness",trend:"Projected"},{value:"+30%",label:"Website Conversion",trend:"Projected"},{value:"+40%",label:"User Favorability",trend:"Projected"},{value:"+60%",label:"Social Engagement",trend:"Projected"}],imageKeywords:["branding","mockup","application"]},{type:"mixed",title:"Project Plan & Budget",subtitle:"Timeline & Budget",chartType:"progress",items:[{label:"Design",value:"$30K"},{label:"Development",value:"$50K"},{label:"Collateral",value:"$10K"},{label:"Marketing",value:"$20K"}],bullets:["Week 1-2: Finalize design guidelines","Week 3-6: Website
1130+ App design & development","Week 7-8: Marketing collateral production","Week 9-10: Full-scale launch & promotion","Total budget: $110K, projected ROI 300%"],imageKeywords:["timeline","planning","budget"]},{type:"end",title:"Let's Collaborate",subtitle:"LET'S CREATE SOMETHING AMAZING"}]},{id:"minimal-white",name:"Minimal White",category:"simple",description:"Minimal whitespace with fine line design",style:"minimal",colors:{primary:"#18181b",secondary:"#3f3f46",accent:"#a1a1aa",background:"#fafafa",text:"#18181b",muted:"#71717a"},slides:[{type:"cover",title:"Product Proposal",subtitle:"Product Proposal · 2024"},{type:"section",title:"Contents",bullets:["01 Market Analysis","02 Product Solution","03 Business Model","04 Project Plan"]},{type:"mixed",title:"Market Opportunity Analysis",subtitle:"Market Opportunity",chartType:"bar",stats:[{value:"$50B",label:"Market Size",trend:"2024"},{value:"25%",label:"Annual Growth",trend:"CAGR"},{value:"50M",label:"Target Users",trend:"SMBs"}],bullets:["Market size: Projected to reach $50B in 2024","Competitive landscape: CR5 at 60%, opportunity remains","User pain points: Low efficiency, poor collaboration, slow decisions","Policy tailwinds: Digital transformation incentives"],imageKeywords:["market","analysis","chart"]},{type:"comparison",title:"Competitive Comparison",leftTitle:"Our Advantages",leftBullets:["Deep AI integration, smart recommendations","Minimal UX, zero learning curve","Flexible pricing, pay-as-you-go"],rightTitle:"Competitor Weaknesses",rightBullets:["Feature bloat, complex operations","High price barrier for SMBs","Weak localization, slow support"]},{type:"stats",title:"Core Feature Roadmap",subtitle:"Core Features",stats:[{value:"AI Workspace",label:"Smart Assistant",trend:"Core"},{value:"Project Mgmt",label:"Kanban + Gantt",trend:"Efficiency"},{value:"Doc Collab",label:"Real-time Editing",trend:"Teamwork"},{value:"Analytics",label:"Smart Reports",trend:"Decisions"}],imageKeywords:["features","product","software"]},{type:"mixed",title:"Business Model & Pricing",subtitle:"Business Model",chartType:"pie",items:[{label:"Free",value:"Lead Gen"},{label:"Pro",value:"$9/mo"},{label:"Business",value:"$19/mo"},{label:"Custom",value:"Contact Us"}],bullets:["Free: Core features, teams up to 10","Pro: $9/user/mo, full feature set","Business: $19/user/mo, private deployment","Projected Y1 revenue $500K, Y3 target $5M"],imageKeywords:["pricing","business","model"]},{type:"mixed",title:"Project Plan & Budget",subtitle:"Project Plan",chartType:"progress",items:[{label:"Research",value:"2 wks"},{label:"Design",value:"4 wks"},{label:"Development",value:"8 wks"},{label:"Testing",value:"2 wks"}],stats:[{value:"$1M",label:"Total Investment",trend:"16 weeks"},{value:"300%",label:"Projected ROI",trend:"3 years"}],bullets:["R&D investment: $500K","Marketing & ops: $300K","Personnel costs: $200K"],imageKeywords:["plan","timeline","roadmap"]},{type:"end",title:"Thank You",subtitle:"THANK YOU · Looking Forward to Feedback"}]},{id:"nature-green",name:"Nature Green",category:"creative",description:"Organic curves with natural element decor",style:"nature",colors:{primary:"#16a34a",secondary:"#84cc16",accent:"#22c55e",background:"#f0fdf4",text:"#14532d",muted:"#4d7c0f"},slides:[{type:"cover",title:"Sustainability Report",subtitle:"ESG Report · 2024"},{type:"section",title:"Report Contents",bullets:["01 ESG Achievements","02 Environmental Protection","03 Social Responsibility","04 Future Commitments"]},{type:"stats",title:"ESG Key Achievements",subtitle:"ESG Highlights",stats:[{value:"-40%",label:"Carbon Emissions",trend:"vs. Baseline Year"},{value:"60%",label:"Green Energy",trend:"Usage Share"},{value:"92%",label:"Employee Satisfaction",trend:"Industry Leading"},{value:"A",label:"MSCI Rating",trend:"ESG Rating"}],imageKeywords:["sustainability","green","eco"]},{type:"mixed",title:"Carbon Neutrality Roadmap",subtitle:"Carbon Neutrality Roadmap",chartType:"line",items:[{label:"2021",value:"Baseline"},{label:"2023",value:"-25%"},{label:"2025",value:"-50%"},{label:"2030",value:"Net Zero"}],bullets:["2021: Completed carbon inventory, established baseline","2023: Rooftop solar + green power procurement, -25%","2025: Full electrification + carbon offsets, -50%","2030: Achieve operational carbon neutrality"],imageKeywords:["carbon","neutral","climate"]},{type:"mixed",title:"Environmental Initiatives",subtitle:"Environmental Initiatives",chartType:"progress",stats:[{value:"85%",label:"Waste Recycling Rate",trend:"Circular Economy"},{value:"30%",label:"Water Savings",trend:"Water Resources"},{value:"100%",label:"Green Office",trend:"Full Coverage"}],bullets:["Energy: Solar + green power procurement at 60%","Water: Rainwater harvesting + reuse saves 30%","Waste: Sorted recycling + 85% resource recovery","Supply chain: 100% supplier ESG auditing"],imageKeywords:["recycle","energy","water"]},{type:"comparison",title:"ESG Governance Framework",leftTitle:"Governance",leftBullets:["Established ESG Committee","Annual board review","ESG tied to performance evaluation","Third-party audit verification"],rightTitle:"Disclosure",rightBullets:["Annual ESG report published","Full GRI Standards disclosure","CDP Climate Questionnaire A-","TCFD framework applied"]},{type:"mixed",title:"Social Responsibility & Future Commitments",subtitle:"Social & Future Commitment",chartType:"bar",stats:[{value:"$700K",label:"CSR Investment",trend:"Annual"},{value:"10,000+",label:"Volunteer Hours",trend:"Person-Hours"},{value:"500",label:"Scholarship Students",trend:"Sponsored"}],bullets:["2025 Goal: Reduce emissions by an additional 15%","2025 Goal: Green energy share to reach 80%","2025 Goal: Employee satisfaction to reach 95%","Long-term vision: Become an industry ESG benchmark"],imageKeywords:["community","volunteer","future"]},{type:"end",title:"Building a Green Future",subtitle:"BUILDING A SUSTAINABLE FUTURE"}]},{id:"elegant-gold",name:"Elegant Gold",category:"business",description:"Luxurious texture with golden border accents",style:"luxury",colors:{primary:"#b45309",secondary:"#d97706",accent:"#fbbf24",background:"#fffbeb",text:"#78350f",muted:"#a16207"},slides:[{type:"cover",title:"VIP Exclusive Gala",subtitle:"VIP Exclusive Event · 2024"},{type:"section",title:"Event Overview",bullets:["01 Brand Heritage","02 Masterpiece Showcase","03 Exclusive Privileges","04 Reservation"]}
1130,{type:"stats",title:"Brand Heritage",subtitle:"Brand Heritage",stats:[{value:"168 Years",label:"Master Craftsmanship",trend:"Since 1856"},{value:"50+",label:"Global Markets",trend:"Countries"},{value:"300+",label:"Boutiques",trend:"Worldwide"},{value:"No.1",label:"Brand Value",trend:"10 Consecutive Years"}],imageKeywords:["luxury","heritage","brand"]},{type:"mixed",title:"Masterpiece Collection",subtitle:"Masterpiece Collection",chartType:"bar",items:[{label:"2020",value:"$800K"},{label:"2021",value:"$1.0M"},{label:"2022",value:"$1.2M"},{label:"2023",value:"$1.7M"}],bullets:["Heritage Collection: 1920s revival, limited to 50 pieces","Master Collaboration: Artist-signed, limited to 100 pieces","Nature-Inspired: Alpine mountain range inspiration","Auction records continue to set new highs"],imageKeywords:["jewelry","watch","luxury goods"]},{type:"comparison",title:"Collection Comparison",leftTitle:"Heritage Classic",leftBullets:["Traditional craftsmanship essence","Timeless elegant design","Numbered limited editions","Investment & collectible value"],rightTitle:"Master Collaboration",rightBullets:["Contemporary art fusion","Innovative materials & techniques","Artist-signed editions","Global limited release"]},{type:"mixed",title:"Exclusive Member Benefits",subtitle:"VIP Benefits",chartType:"progress",stats:[{value:"7 Days",label:"Early Access",trend:"New Arrivals"},{value:"24/7",label:"Personal Concierge",trend:"Dedicated Service"},{value:"2x",label:"Points Multiplier",trend:"Loyalty Rewards"}],bullets:["Priority purchase rights, 7-day early preview","Global boutique VIP lounge access","Birthday month bespoke gift","Annual private tasting gala invitation"],imageKeywords:["vip","exclusive","service"]},{type:"content",title:"Reservation Details",subtitle:"Reservation Details",bullets:["Date: December 8, 2024 (Sunday)","Venue: The Peninsula Hotel, Grand Ballroom","Capacity: Limited to 50 distinguished guests","Dress Code: Black tie / formal evening attire","Reservation Line: 1-800-888-8888","VIP Email: [email protected]"]},{type:"end",title:"We Look Forward to Your Presence",subtitle:"WE LOOK FORWARD TO YOUR PRESENCE"}]}];function JK({template:e,isOpen:t,onClose:r,onSelect:n,isSelected:s}){const{t:a}=We(),[o,l]=v.useState(0);if(v.useEffect(()=>{t&&l(0)},[t,e==null?void 0:e.id]),!t||!e)return null;const u=e.slides,c=e.colors,d=e.style,h=()=>l(E=>E>0?E-1:u.length-1),m=()=>l(E=>E<u.length-1?E+1:0),p=(()=>{switch(d){case"corporate":return Lk;case"tech":return Ti;case"creative":return wn;case"minimal":return qV;case"nature":return Rn;case"luxury":return _c;default:return wn}})(),g=(E,A)=>`https://picsum.photos/seed/${((E==null?void 0:E.join("-"))||A||"default").replace(/[^a-z0-9]/gi,"")}/400/300`,x=(E,A)=>{var M,B,W,H,L,$,ee,G,Q,D,K,V;const R=A===o;return i.jsxs("div",{className:it("absolute inset-0 transition-all duration-500",R?"opacity-100":"opacity-0 pointer-events-none"),style:{backgroundColor:c.background},children:[i.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-16",style:{backgroundColor:c.primary},children:i.jsxs("div",{className:"h-full flex flex-col items-center justify-between py-8",children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-background/20"}),i.jsx("div",{className:"flex flex-col gap-2",children:u.map((C,O)=>i.jsx("div",{className:it("w-2 h-2 rounded-full transition-all",O===A?"bg-background scale-125":"bg-background/30")},O))}),i.jsx("div",{className:"w-6 h-6 border-2 border-white/30 rounded"})]})}),i.jsxs("div",{className:"absolute left-16 right-0 top-0 bottom-0 p-10",children:[E.type==="cover"&&i.jsxs("div",{className:"h-full flex flex-col justify-center",children:[i.jsx("div",{className:"w-20 h-1 mb-6",style:{backgroundColor:c.secondary}}),i.jsx("h1",{className:"text-5xl font-bold mb-4",style:{color:c.text},children:E.title}),i.jsx("p",{className:"text-xl",style:{color:c.muted},children:E.subtitle})]}),E.type==="section"&&i.jsxs("div",{className:"h-full flex flex-col justify-center",children:[i.jsx("h2",{className:"text-3xl font-bold mb-10",style:{color:c.primary},children:E.title}),i.jsx("div",{className:"grid grid-cols-2 gap-6",children:(M=E.bullets)==null?void 0:M.map((C,O)=>i.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg",style:{backgroundColor:`${c.primary}08`},children:[i.jsx("span",{className:"text-3xl font-light",style:{color:c.primary},children:C.substring(0,2)}),i.jsx("span",{className:"text-lg",style:{color:c.text},children:C.substring(3)})]},O))})]}),E.type==="content"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8",children:[i.jsx("h2",{className:"text-3xl font-bold",style:{color:c.text},children:E.title}),i.jsx("p",{className:"text-sm uppercase tracking-widest mt-2",style:{color:c.muted},children:E.subtitle})]}),i.jsx("div",{className:"flex-1 flex flex-col justify-center gap-5",children:(B=E.bullets)==null?void 0:B.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("div",{className:"w-2 h-2 rounded-full mt-2.5 flex-shrink-0",style:{backgroundColor:c.secondary}}),i.jsx("p",{className:"text-lg leading-relaxed",style:{color:c.text},children:C})]},O))})]}),E.type==="image-left"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6",children:[i.jsx("h2",{className:"text-2xl font-bold",style:{color:c.text},children:E.title}),i.jsx("p",{className:"text-sm uppercase tracking-widest mt-1",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[i.jsx("div",{className:"rounded-xl overflow-hidden shadow-lg",children:i.jsx("img",{src:g(E.imageKeywords,"left"),alt:"",className:"w-full h-full object-cover"})}),i.jsx("div",{className:"flex flex-col justify-center gap-4",children:(W=E.bullets)==null?void 0:W.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-2 h-2 rounded-full mt-2 flex-shrink-0",style:{backgroundColor:c.secondary}}),i.jsx("p",{className:"text-base leading-relaxed",style:{color:c.text},children:C})]},O))})]})]}),E.type==="image-right"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6",children:[i.jsx("h2",{className:"text-2xl font-bold",style:{color:c.text},children:E.title}),i.jsx("p",{className:"text-sm uppercase tracking-widest mt-1",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[i.jsx("div",{className:"flex flex-col justify-center gap-4",children:(H=E.bullets)==null?void 0:H.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-2 h-2 rounded-full mt-2 flex-shrink-0",style:{backgroundColor:c.secondary}}),i.jsx("p",{className:"text-base leading-relaxed",style:{color:c.text},children:C})]},O))}),i.jsx("div",{className:"rounded-xl overflow-hidden shadow-lg",children:i.jsx("img",{src:g(E.imageKeywords,"right"),alt:"",className:"w-full h-full object-cover"})})]})]}),E.type==="chart"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8",children:[i.jsx("h2",{className:"text-3xl font-bold",style:{color:c.text},children:E.title}),i.jsx("p",{className:"text-sm uppercase tracking-widest mt-2",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 flex items-center gap-8",children:[i.jsx("div",{className:"flex-1 h-full flex items-end justify-center gap-6 pb-8",children:(L=E.items)==null?void 0:L.map((C,O)=>{const q=[60,80,70,95];return i.jsxs("div",{className:"flex flex-col items-center flex-1 max-w-20",children:[i.jsx("div",{className:"w-full h-40 relative flex items-end justify-center mb-3",children:i.jsx("div",{className:"w-full rounded-t transition-all hover:opacity-80",style:{height:`${q[O%4]}%`,backgroundColor:O===E.items.length-1?c.primary:c.secondary,boxShadow:`0 4px 12px ${c.primary}30`}})}),i.jsx("p",{className:"text-xs font-medium",style:{color:c.muted},children:C.label}),i.jsx("p",{className:"text-sm font-bold",style:{color:c.primary},children:C.value})]},O)})}),i.jsxs("div",{className:"w-48 h-48 relative",children:[i.jsxs("svg",{viewBox:"0 0 100 100",className:"w-full h-full transform -rotate-90",children:[i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:`${c.primary}15`,strokeWidth:"20"}),i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:c.primary,strokeWidth:"20",strokeDasharray:"188.5 251.3",strokeLinecap:"round"}),i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:c.secondary,strokeWidth:"20",strokeDasharray:"62.8 251.3",strokeDashoffset:"-188.5",strokeLinecap:"round"})]}),i.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[i.jsx("span",{className:"text-2xl font-bold",style:{color:c.primary},children:"75%"}),i.jsx("span",{className:"text-xs",style:{color:c.muted},children:"Completion"})]})]})]})]}),E.type==="comparison"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("h2",{className:"text-3xl font-bold mb-8",style:{color:c.text},children:E.title}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-6 rounded-lg border-l-4",style:{borderColor:c.primary,backgroundColor:`${c.primary}05`},children:[i.jsx("h3",{className:"text-xl font-semibold mb-4",style:{color:c.primary},children:E.leftTitle}),($=E.leftBullets)==null?void 0:$.map((C,O)=>i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:c.primary}}),i.jsx("span",{style:{color:c.text},children:C})]},O))]}),i.jsxs("div",{className:"p-6 rounded-lg border-l-4",style:{borderColor:c.secondary,backgroundColor:`${c.secondary}05`},children:[i.jsx("h3",{className:"text-xl font-semibold mb-4",style:{color:c.secondary},children:E.rightTitle}),(ee=E.rightBullets)==null?void 0:ee.map((C,O)=>i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:c.secondary}}),i.jsx("span",{style:{color:c.text},children:C})]},O))]})]})]}),E.type==="stats"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("h2",{className:"text-2xl font-bold",style:{color:c.text},children:E.title}),i.jsx("p",{className:"text-sm uppercase tracking-widest mt-1",style:{color:c.muted},children:E.subtitle})]}),i.jsx("div",{className:"flex gap-2 mb-4",children:(G=E.stats)==null?void 0:G.slice(0,4).map((C,O)=>i.jsxs("div",{className:"flex-1 p-3 rounded-lg border-l-4",style:{borderColor:O===0?c.primary:c.secondary,backgroundColor:`${c.primary}05`},children:[i.jsx("div",{className:"text-2xl font-bold",style:{color:c.primary},children:C.value}),i.jsx("div",{className:"text-xs",style:{color:c.muted},children:C.label})]},O))}),i.jsxs("div",{className:"flex-1 flex gap-4",children:[i.jsxs("div",{className:"flex-1 rounded-lg overflow-hidden border",style:{borderColor:`${c.primary}20`},children:[i.jsxs("div",{className:"grid grid-cols-3 text-xs font-semibold p-2",style:{backgroundColor:c.primary,color:"white"},children:[i.jsx("span",{children:"Metric"}),i.jsx("span",{className:"text-center",children:"Value"}),i.jsx("span",{className:"text-right",children:"Trend"})]}),(Q=E.stats)==null?void 0:Q.map((C,O)=>i.jsxs("div",{className:"grid grid-cols-3 text-sm p-2 border-b",style:{borderColor:`${c.primary}10`,backgroundColor:O%2===0?`${c.primary}03`:"transparent"},children:[i.jsx("span",{style:{color:c.text},children:C.label}),i.jsx("span",{className:"text-center font-semibold",style:{color:c.primary},children:C.value}),i.jsx("span",{className:"text-right text-xs px-2 py-0.5 rounded",style:{backgroundColor:`${c.secondary}20`,color:c.secondary},children:C.trend||"-"})]},O))]}),E.imageKeywords&&i.jsx("div",{className:"w-36 rounded-lg overflow-hidden shadow-lg",children:i.jsx("img",{src:g(E.imageKeywords,"corporate-stats"),alt:"",className:"w-full h-full object-cover"})})]})]}),E.type==="mixed"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-3",children:[i.jsx("h2",{className:"text-xl font-bold",style:{color:c.text},children:E.title}),i.jsx("p",{className:"text-xs uppercase tracking-widest",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-12 gap-3",children:[E.imageKeywords&&i.jsx("div",{className:"col-span-3 rounded-lg overflow-hidden",children:i.jsx("img",{src:g(E.imageKeywords,"corporate-mixed"),alt:"",className:"w-full h-full object-cover"})}),i.jsxs("div",{className:it("rounded-lg p-3 h-full",E.imageKeywords?"col-span-5":"col-span-7"),style:{backgroundColor:`${c.primary}05`},children:[E.chartType==="bar"&&(E.items||E.stats)&&i.jsx("div",{className:"h-full flex items-end justify-around ga
1130p-2 min-h-[100px]",children:(D=E.items||E.stats)==null?void 0:D.map((C,O,q)=>{const ne=[55,75,65,90];return i.jsxs("div",{className:"flex flex-col items-center flex-1 h-full",children:[i.jsx("div",{className:"flex-1 w-full flex items-end justify-center mb-1",children:i.jsx("div",{className:"w-full max-w-10 rounded-t",style:{height:`${ne[O%4]}%`,backgroundColor:O===q.length-1?c.primary:c.secondary}})}),i.jsx("p",{className:"text-xs",style:{color:c.muted},children:C.label}),i.jsx("p",{className:"text-xs font-semibold",style:{color:c.primary},children:C.value})]},O)})}),E.chartType==="pie"&&i.jsx("div",{className:"h-full flex items-center justify-center",children:i.jsxs("svg",{viewBox:"0 0 100 100",className:"w-28 h-28 transform -rotate-90",children:[i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:`${c.primary}15`,strokeWidth:"18"}),i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:c.primary,strokeWidth:"18",strokeDasharray:"150 251",strokeLinecap:"round"}),i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:c.secondary,strokeWidth:"18",strokeDasharray:"60 251",strokeDashoffset:"-150",strokeLinecap:"round"})]})}),E.chartType==="progress"&&E.stats&&i.jsx("div",{className:"h-full flex flex-col justify-center gap-2",children:E.stats.slice(0,4).map((C,O)=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-16 text-xs",style:{color:c.muted},children:C.label}),i.jsx("div",{className:"flex-1 h-2 rounded-full overflow-hidden",style:{backgroundColor:`${c.primary}15`},children:i.jsx("div",{className:"h-full rounded-full",style:{width:`${[75,60,85,70][O%4]}%`,backgroundColor:O===0?c.primary:c.secondary}})}),i.jsx("div",{className:"w-12 text-xs font-semibold text-right",style:{color:c.primary},children:C.value})]},O))})]}),i.jsxs("div",{className:"col-span-4 flex flex-col gap-2",children:[i.jsx("div",{className:"p-2 rounded-lg",style:{backgroundColor:c.primary,color:"white"},children:i.jsx("div",{className:"text-xs font-semibold",children:"Key Points"})}),(K=E.bullets)==null?void 0:K.slice(0,4).map((C,O)=>i.jsxs("div",{className:"flex items-start gap-2 text-xs p-2 rounded border-l-2",style:{borderColor:c.secondary,backgroundColor:`${c.primary}05`},children:[i.jsxs("span",{className:"font-bold",style:{color:c.primary},children:[O+1,"."]}),i.jsx("span",{style:{color:c.text},children:C})]},O))]})]})]}),E.type==="timeline"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("h2",{className:"text-2xl font-bold mb-4",style:{color:c.primary},children:E.title}),i.jsxs("div",{className:"flex-1 flex",children:[i.jsx("div",{className:"w-2 relative mr-6",children:i.jsx("div",{className:"absolute top-0 bottom-0 left-1/2 w-0.5 -translate-x-1/2",style:{backgroundColor:c.primary}})}),i.jsx("div",{className:"flex-1 flex flex-col justify-around",children:(V=E.bullets)==null?void 0:V.map((C,O)=>i.jsxs("div",{className:"flex items-center gap-4 relative",children:[i.jsx("div",{className:"absolute -left-8 w-4 h-4 rounded-full border-2",style:{backgroundColor:c.background,borderColor:c.primary}}),i.jsx("div",{className:"flex-1 p-3 rounded-lg",style:{backgroundColor:`${c.primary}08`},children:i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})})]},O))})]})]}),E.type==="end"&&i.jsxs("div",{className:"h-full flex flex-col justify-center",children:[i.jsx("div",{className:"w-20 h-1 mb-6",style:{backgroundColor:c.secondary}}),i.jsx("h1",{className:"text-5xl font-bold mb-4",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-2xl tracking-widest",style:{color:c.muted},children:E.subtitle})]})]}),i.jsxs("div",{className:"absolute bottom-4 right-6 text-sm",style:{color:c.muted},children:[String(A+1).padStart(2,"0")," / ",String(u.length).padStart(2,"0")]})]},A)},w=(E,A)=>{var M,B,W,H,L,$,ee,G,Q,D,K,V;const R=A===o;return i.jsxs("div",{className:it("absolute inset-0 transition-all duration-500",R?"opacity-100":"opacity-0 pointer-events-none"),style:{backgroundColor:c.background},children:[i.jsx("div",{className:"absolute inset-0 opacity-10",style:{backgroundImage:` 1131 linear-gradient(${c.primary}40 1px, transparent 1px), 1132 linear-gradient(90deg, ${c.primary}40 1px, transparent 1px) 1133 `,backgroundSize:"40px 40px"}}),i.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 opacity-20 blur-3xl",style:{background:`radial-gradient(circle, ${c.primary} 0%, transparent 70%)`}}),i.jsx("div",{className:"absolute bottom-0 left-0 w-72 h-72 opacity-20 blur-3xl",style:{background:`radial-gradient(circle, ${c.secondary} 0%, transparent 70%)`}}),i.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5",style:{background:`linear-gradient(90deg, transparent, ${c.secondary}, ${c.primary}, transparent)`}}),i.jsxs("div",{className:"relative h-full p-10 z-10",children:[E.type==="cover"&&i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center",children:[i.jsxs("div",{className:"relative",children:[i.jsx("h1",{className:"text-6xl font-bold mb-4",style:{color:c.text,textShadow:`0 0 40px ${c.primary}60, 0 0 80px ${c.primary}30`},children:E.title}),i.jsx("p",{className:"text-xl tracking-[0.5em] uppercase",style:{color:c.secondary},children:E.subtitle})]}),i.jsxs("div",{className:"absolute bottom-16 left-1/2 -translate-x-1/2 flex items-center gap-3",children:[i.jsx("div",{className:"w-16 h-px",style:{backgroundColor:c.secondary}}),i.jsx("div",{className:"w-3 h-3 rotate-45 border",style:{borderColor:c.primary}}),i.jsx("div",{className:"w-16 h-px",style:{backgroundColor:c.secondary}})]})]}),E.type==="section"&&i.jsx("div",{className:"h-full flex items-center",children:i.jsxs("div",{className:"w-full",children:[i.jsxs("h2",{className:"text-4xl font-bold mb-12 tracking-widest",style:{color:c.primary},children:["< ",E.title," />"]}),i.jsx("div",{className:"space-y-4",children:(M=E.bullets)==null?void 0:M.map((C,O)=>i.jsxs("div",{className:"flex items-center gap-4 p-4 rounded border backdrop-blur-sm",style:{borderColor:`${c.primary}40`,backgroundColor:`${c.primary}10`},children:[i.jsx("span",{className:"font-mono text-2xl",style:{color:c.secondary},children:C.substring(0,2)}),i.jsx("span",{className:"text-lg",style:{color:c.text},children:C.substring(3)}),i.jsx("div",{className:"ml-auto w-2 h-2 rounded-full animate-pulse",style:{backgroundColor:c.accent}})]},O))})]})}),E.type==="content"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8",children:[i.jsxs("h2",{className:"text-3xl font-bold font-mono",style:{color:c.text},children:["// ",E.title]}),i.jsx("p",{className:"text-sm font-mono mt-2",style:{color:c.secondary},children:E.subtitle})]}),i.jsx("div",{className:"flex-1 flex flex-col justify-center gap-4",children:(B=E.bullets)==null?void 0:B.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-4 p-3 rounded border-l-2",style:{borderColor:c.primary,backgroundColor:`${c.primary}08`},children:[i.jsx(Ti,{className:"w-5 h-5 flex-shrink-0 mt-0.5",style:{color:c.secondary}}),i.jsx("p",{className:"text-base leading-relaxed",style:{color:c.text},children:C})]},O))})]}),E.type==="image-left"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6",children:[i.jsxs("h2",{className:"text-2xl font-bold font-mono",style:{color:c.text},children:["// ",E.title]}),i.jsx("p",{className:"text-sm font-mono mt-1",style:{color:c.secondary},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[i.jsx("div",{className:"rounded-lg overflow-hidden border",style:{borderColor:`${c.primary}60`},children:i.jsx("img",{src:g(E.imageKeywords,"tech-left"),alt:"",className:"w-full h-full object-cover"})}),i.jsx("div",{className:"flex flex-col justify-center gap-3",children:(W=E.bullets)==null?void 0:W.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3 p-2 rounded border-l-2",style:{borderColor:c.primary,backgroundColor:`${c.primary}08`},children:[i.jsx(Ti,{className:"w-4 h-4 flex-shrink-0 mt-0.5",style:{color:c.secondary}}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})]},O))})]})]}),E.type==="image-right"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6",children:[i.jsxs("h2",{className:"text-2xl font-bold font-mono",style:{color:c.text},children:["// ",E.title]}),i.jsx("p",{className:"text-sm font-mono mt-1",style:{color:c.secondary},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[i.jsx("div",{className:"flex flex-col justify-center gap-3",children:(H=E.bullets)==null?void 0:H.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3 p-2 rounded border-l-2",style:{borderColor:c.primary,backgroundColor:`${c.primary}08`},children:[i.jsx(Ti,{className:"w-4 h-4 flex-shrink-0 mt-0.5",style:{color:c.secondary}}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})]},O))}),i.jsx("div",{className:"rounded-lg overflow-hidden border",style:{borderColor:`${c.primary}60`},children:i.jsx("img",{src:g(E.imageKeywords,"tech-right"),alt:"",className:"w-full h-full object-cover"})})]})]}),E.type==="chart"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8",children:[i.jsxs("h2",{className:"text-3xl font-bold font-mono",style:{color:c.text},children:["$ ",E.title]}),i.jsx("p",{className:"text-sm font-mono mt-2",style:{color:c.secondary},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 flex items-center gap-8",children:[i.jsx("div",{className:"flex-1 h-full relative p-4 rounded border",style:{borderColor:`${c.primary}40`,backgroundColor:`${c.primary}08`},children:i.jsxs("svg",{viewBox:"0 0 300 150",className:"w-full h-full",children:[[0,1,2,3,4].map(C=>i.jsx("line",{x1:"0",y1:C*37.5,x2:"300",y2:C*37.5,stroke:`${c.primary}20`,strokeDasharray:"4 4"},C)),i.jsx("polyline",{fill:"none",stroke:c.secondary,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",points:"20,120 80,80 140,100 200,40 260,60",style:{filter:`drop-shadow(0 0 8px ${c.secondary})`}}),[[20,120],[80,80],[140,100],[200,40],[260,60]].map(([C,O],q)=>i.jsx("circle",{cx:C,cy:O,r:"6",fill:c.background,stroke:c.secondary,strokeWidth:"3"},q)),i.jsx("defs",{children:i.jsxs("linearGradient",{id:"techGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[i.jsx("stop",{offset:"0%",stopColor:c.secondary,stopOpacity:"0.3"}),i.jsx("stop",{offset:"100%",stopColor:c.secondary,stopOpacity:"0"})]})}),i.jsx("polygon",{fill:"url(#techGradient)",points:"20,120 80,80 140,100 200,40 260,60 260,150 20,150"})]})}),i.jsx("div",{className:"flex flex-col gap-4",children:(L=E.items)==null?void 0:L.slice(0,3).map((C,O)=>i.jsxs("div",{className:"flex items-center gap-4 p-3 rounded border",style:{borderColor:`${c.primary}40`,backgroundColor:`${c.primary}08`},children:[i.jsx("div",{className:"relative w-12 h-12",children:i.jsxs("svg",{viewBox:"0 0 36 36",className:"w-full h-full transform -rotate-90",children:[i.jsx("circle",{cx:"18",cy:"18",r:"14",fill:"none",stroke:`${c.primary}30`,strokeWidth:"4"}),i.jsx("circle",{cx:"18",cy:"18",r:"14",fill:"none",stroke:O===0?c.secondary:O===1?c.primary:c.accent,strokeWidth:"4",strokeDasharray:`${[75,60,90][O]} 100`,strokeLinecap:"round",style:{filter:`drop-shadow(0 0 4px ${O===0?c.secondary:O===1?c.primary:c.accent})`}})]})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-lg font-bold font-mono",style:{color:c.secondary},children:C.value}),i.jsx("p",{className:"text-xs uppercase",style:{color:c.muted},children:C.label})]})]},O))})]})]}),E.type==="stats"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-3 flex items-center gap-3",children:[i.jsxs("div",{className:"flex gap-1.5",children:[i.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:c.accent}}),i.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:c.secondary}}),i.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:c.primary}})]}),i.jsxs("h2",{className:"text-xl font-bold font-mono",style:{color:c.text},children:["> ",E.title]})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-3 grid-rows-2 gap-2",children:[i.jsxs("div",{className:"col-span-2 row-span-1 p-3 rounded border",style:{borderColor:`${c.primary}40`,backgroundColor:`${c.primary}08`},children:[i.jsx("div",{className:"text-xs font-mono mb-2",style:{color:c.secondary},children:"// SYSTEM_METRICS"}),i.jsx("div",{className:"flex gap-4",children:($=E.stats)==null?void 0:$.slice(0,2).map((C,O)=>i.jsxs("div",{className:"flex-1",children:[i.jsx("div",{className:"text-3xl font-bold font-mono",style:{color:c.secondary,textShadow:`0 0 20px ${c.secondary}40`},children:C.value}),i.jsx("div",{className:"text-xs font-mono",style:{color:c.muted},children:C.label})]},O))})]}),i.jsxs("div",{className:"p-3 rounded border",style:{borderColor:`${c.secondary}40`,backgroundColor:`${c.secondary}08`},children:[i.jsx("div",{className:"text-xs font-mono mb-2",style:{color:c.secondary},children:"STATUS"}),i.jsx("div",{className:"flex flex-col gap-1",children:["ONLINE","SYNC","READY"].map((C,O)=>i.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono",children:[i.jsx("div",{className:"w-2 h-2 rounded-full animate-pulse",style:{backgroundColor:c.accent}}),i.jsx("span",{style:{color:c.text},children:C})]},O))})]}),(ee=E.stats)==null?void 0:ee.slice(2,4).map((C,O)=>i.jsxs("div",{className:"p-3 rounded border",style:{borderColor:`${c.primary}40`,backgroundColor:`${c.primary}05`},children:[i.jsx("div",{className:"text-xs font-mono",style:{color:c.muted},children:C.label}),i.jsx("div",{className:"text-xl font-bold font-mono mt-1",style:{color:O===0?c.secondary:c.accent},children:C.value}),C.trend&&i.jsx("div",{className:"text-xs font-mono mt-1 px-1.5 py-0.5 rounded inline-block",style:{backgroundColor:`${c.accent}30`,color:c.accent},children:C.trend})]},O)),E.imageKeywords&&i.jsx("div",{className:"rounded border overflow-hidden",style:{borderColor:`${c.primary}60`},children:i.jsx("img",{src:g(E.imageKeywords,"tech-stats"),alt:"",className:"w-full h-full object-cover opacity-80"})})]})]}),E.type==="mixed"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-2 p-2 rounded-t border-x border-t flex items-center justify-between",style:{borderColor:`${c.primary}40`,backgroundColor:`${c.primary}15`},children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("div",{className:"flex gap-1",children:[i.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:c.accent}}),i.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:c.secondary}}),i.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:c.primary}})]}),i.jsxs("span",{className:"text-xs font-mono",style:{color:c.secondary},children:[E.title,".tsx"]})]}),i.jsx("span",{className:"text-xs font-mono",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-0 border rounded-b overflow-hidden",style:{borderColor:`${c.primary}40`},children:[i.jsxs("div",{className:"p-3 border-r h-full",style:{borderColor:`${c.primary}30`,backgroundColor:`${c.primary}05`},children:[E.chartType==="bar"&&(E.items||E.stats)&&i.jsxs("div",{className:"h-full flex flex-col min-h-[80px]",children:[i.jsx("div",{className:"text-xs font-mono mb-2",style:{color:c.secondary},children:"// chart_data"}),i.jsx("div",{className:"flex-1 flex items-end justify-around ga
1133p-2",children:(G=E.items||E.stats)==null?void 0:G.map((C,O)=>{const q=[50,70,60,85];return i.jsxs("div",{className:"flex flex-col items-center flex-1 h-full",children:[i.jsx("div",{className:"flex-1 w-full flex items-end justify-center",children:i.jsx("div",{className:"w-full max-w-8 rounded-t",style:{height:`${q[O%4]}%`,backgroundColor:c.secondary,boxShadow:`0 0 10px ${c.secondary}50`}})}),i.jsx("p",{className:"text-xs font-mono mt-1",style:{color:c.muted},children:C.label})]},O)})})]}),E.chartType==="pie"&&i.jsx("div",{className:"h-full flex items-center justify-center",children:i.jsxs("svg",{viewBox:"0 0 100 100",className:"w-24 h-24 transform -rotate-90",children:[i.jsx("circle",{cx:"50",cy:"50",r:"35",fill:"none",stroke:`${c.primary}30`,strokeWidth:"12"}),i.jsx("circle",{cx:"50",cy:"50",r:"35",fill:"none",stroke:c.secondary,strokeWidth:"12",strokeDasharray:"150 220",strokeLinecap:"round",style:{filter:`drop-shadow(0 0 8px ${c.secondary})`}})]})}),E.chartType==="progress"&&E.stats&&i.jsx("div",{className:"h-full flex flex-col justify-center gap-2",children:E.stats.slice(0,4).map((C,O)=>i.jsxs("div",{className:"text-xs font-mono",children:[i.jsxs("div",{className:"flex justify-between mb-0.5",children:[i.jsx("span",{style:{color:c.muted},children:C.label}),i.jsx("span",{style:{color:c.secondary},children:C.value})]}),i.jsx("div",{className:"h-1.5 rounded",style:{backgroundColor:`${c.primary}30`},children:i.jsx("div",{className:"h-full rounded",style:{width:`${[75,55,85,65][O%4]}%`,backgroundColor:c.secondary,boxShadow:`0 0 6px ${c.secondary}`}})})]},O))})]}),i.jsxs("div",{className:"p-3 font-mono text-xs",style:{backgroundColor:c.background},children:[i.jsx("div",{className:"mb-2",style:{color:c.secondary},children:"> output_log"}),(Q=E.bullets)==null?void 0:Q.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-2 mb-1.5",children:[i.jsxs("span",{style:{color:c.accent},children:["[",String(O).padStart(2,"0"),"]"]}),i.jsx("span",{style:{color:c.text},children:C})]},O)),E.items&&i.jsx("div",{className:"mt-3 pt-2 border-t",style:{borderColor:`${c.primary}30`},children:E.items.map((C,O)=>i.jsxs("div",{className:"flex justify-between",children:[i.jsxs("span",{style:{color:c.muted},children:[C.label,":"]}),i.jsx("span",{style:{color:c.secondary},children:C.value})]},O))})]})]})]}),E.type==="timeline"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[i.jsx("span",{className:"text-xs font-mono px-2 py-0.5 rounded",style:{backgroundColor:c.secondary,color:c.background},children:"git log"}),i.jsx("h2",{className:"text-xl font-bold font-mono",style:{color:c.text},children:E.title})]}),i.jsxs("div",{className:"flex-1 flex",children:[i.jsx("div",{className:"w-8 relative",children:i.jsx("div",{className:"absolute top-2 bottom-2 left-3 w-0.5",style:{backgroundColor:c.secondary}})}),i.jsx("div",{className:"flex-1 flex flex-col justify-around",children:(D=E.bullets)==null?void 0:D.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3 relative",children:[i.jsx("div",{className:"absolute -left-5 top-1 w-3 h-3 rounded-full border-2",style:{backgroundColor:c.background,borderColor:c.secondary}}),i.jsxs("div",{className:"flex-1 p-2 rounded font-mono",style:{backgroundColor:`${c.primary}08`,borderLeft:`2px solid ${c.primary}40`},children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${c.accent}30`,color:c.accent},children:"commit"}),i.jsxs("span",{className:"text-xs",style:{color:c.muted},children:["#",String(O+1).padStart(3,"0")]})]}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})]})]},O))})]})]}),E.type==="comparison"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"mb-6",children:i.jsxs("h2",{className:"text-2xl font-bold font-mono",style:{color:c.text},children:["// ",E.title]})}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[i.jsxs("div",{className:"p-4 rounded border",style:{borderColor:`${c.primary}40`,backgroundColor:`${c.primary}08`},children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4 pb-2 border-b",style:{borderColor:`${c.primary}30`},children:[i.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:c.secondary}}),i.jsx("span",{className:"text-sm font-mono",style:{color:c.secondary},children:E.leftTitle})]}),i.jsx("div",{className:"space-y-3",children:(K=E.leftBullets)==null?void 0:K.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"font-mono text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${c.secondary}30`,color:c.secondary},children:"+"}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})]},O))})]}),i.jsxs("div",{className:"p-4 rounded border",style:{borderColor:`${c.accent}40`,backgroundColor:`${c.accent}08`},children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4 pb-2 border-b",style:{borderColor:`${c.accent}30`},children:[i.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:c.accent}}),i.jsx("span",{className:"text-sm font-mono",style:{color:c.accent},children:E.rightTitle})]}),i.jsx("div",{className:"space-y-3",children:(V=E.rightBullets)==null?void 0:V.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"font-mono text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${c.accent}30`,color:c.accent},children:"-"}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})]},O))})]})]})]}),E.type==="end"&&i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center",children:[i.jsx("h1",{className:"text-6xl font-bold font-mono mb-4",style:{color:c.primary,textShadow:`0 0 40px ${c.primary}60`},children:E.title}),i.jsx("p",{className:"text-xl tracking-widest",style:{color:c.secondary},children:E.subtitle})]})]}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5",style:{background:`linear-gradient(90deg, transparent, ${c.primary}, ${c.secondary}, transparent)`}}),i.jsxs("div",{className:"absolute bottom-4 right-6 text-sm font-mono",style:{color:c.muted},children:["[",String(A+1).padStart(2,"0"),"/",String(u.length).padStart(2,"0"),"]"]})]},A)},y=(E,A)=>{var M,B,W,H,L,$,ee,G,Q,D,K,V;const R=A===o;return i.jsxs("div",{className:it("absolute inset-0 transition-all duration-500",R?"opacity-100":"opacity-0 pointer-events-none"),style:{backgroundColor:c.background},children:[i.jsx("div",{className:"absolute -top-20 -right-20 w-80 h-80 rounded-full opacity-30 blur-3xl",style:{background:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`}}),i.jsx("div",{className:"absolute -bottom-10 -left-10 w-60 h-60 rounded-full opacity-20 blur-2xl",style:{background:`linear-gradient(135deg, ${c.secondary}, ${c.accent})`}}),i.jsx("svg",{className:"absolute top-10 right-10 w-32 h-32 opacity-20",viewBox:"0 0 100 100",children:i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:c.primary,strokeWidth:"2",strokeDasharray:"10 5"})}),i.jsxs("div",{className:"relative h-full p-10 z-10",children:[E.type==="cover"&&i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center",children:[i.jsx("div",{className:"inline-block px-8 py-4 rounded-3xl mb-6",style:{background:`linear-gradient(135deg, ${c.primary}20, ${c.secondary}20)`},children:i.jsx("h1",{className:"text-5xl font-black bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title})}),i.jsx("p",{className:"text-xl font-medium",style:{color:c.muted},children:E.subtitle})]}),E.type==="section"&&i.jsx("div",{className:"h-full flex items-center",children:i.jsxs("div",{className:"w-full",children:[i.jsx("h2",{className:"text-4xl font-black mb-10 bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title}),i.jsx("div",{className:"flex flex-wrap gap-4",children:(M=E.bullets)==null?void 0:M.map((C,O)=>i.jsx("div",{className:"px-6 py-4 rounded-2xl border-2 transition-transform hover:scale-105",style:{borderColor:O%2===0?c.primary:c.secondary,backgroundColor:`${O%2===0?c.primary:c.secondary}10`},children:i.jsx("span",{className:"text-lg font-semibold",style:{color:c.text},children:C})},O))})]})}),E.type==="content"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8",children:[i.jsx("h2",{className:"text-3xl font-black bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title}),i.jsx("p",{className:"text-sm mt-2",style:{color:c.muted},children:E.subtitle})]}),i.jsx("div",{className:"flex-1 flex flex-col justify-center gap-5",children:(B=E.bullets)==null?void 0:B.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:i.jsx(wn,{className:"w-5 h-5 text-white"})}),i.jsx("p",{className:"text-lg leading-relaxed pt-2",style:{color:c.text},children:C})]},O))})]}),E.type==="image-left"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6",children:[i.jsx("h2",{className:"text-2xl font-black bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title}),i.jsx("p",{className:"text-sm mt-1",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[i.jsx("div",{className:"rounded-3xl overflow-hidden shadow-xl",style:{boxShadow:`0 20px 40px ${c.primary}30`},children:i.jsx("img",{src:g(E.imageKeywords,"creative-left"),alt:"",className:"w-full h-full object-cover"})}),i.jsx("div",{className:"flex flex-col justify-center gap-4",children:(W=E.bullets)==null?void 0:W.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:i.jsx(wn,{className:"w-4 h-4 text-white"})}),i.jsx("p",{className:"text-base pt-1",style:{color:c.text},children:C})]},O))})]})]}),E.type==="image-right"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6",children:[i.jsx("h2",{className:"text-2xl font-black bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title}),i.jsx("p",{className:"text-sm mt-1",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[i.jsx("div",{className:"flex flex-col justify-center gap-4",children:(H=E.bullets)==null?void 0:H.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:i.jsx(wn,{className:"w-4 h-4 text-white"})}),i.jsx("p",{className:"text-base pt-1",style:{color:c.text},children:C})]},O))}),i.jsx("div",{className:"rounded-3xl overflow-hidden shadow-xl",style:{boxShadow:`0 20px 40px ${c.secondary}30`},children:i.jsx("img",{src:g(E.imageKeywords,"creative-right"),alt:"",className:"w-full h-full object-cover"})})]})]}),E.type==="comparison"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("h2",{className:"text-3xl font-black mb-8 bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-6 rounded-3xl",style:{background:`linear-gradient(180deg, ${c.primary}15, ${c.primary}05)`},children:[i.jsx("h3",{className:"text-xl font-bold mb-4",style:{color:c.primary},children:E.leftTitle}),(L=E.leftBullets)==null?void 0:L.map((C,O)=>i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c.primary}}),i.jsx("span",{style:{color:c.text},children:C})]},O))]}),i.jsxs("div",{className:"p-6 rounded-3xl",style:{background:`linear-gradient(180deg, ${c.secondary}15, ${c.secondary}05)`},children:[i.jsx("h3",{className:"text-xl font-bold mb-4",style:{color:c.secondary},children:E.rightTitle}),($=E.rightBullets)==null?void 0:$.map((C,O)=>i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c.secondary}}),i.jsx("span",{style:{color:c.text},children:C})]},O))]})]})]}),E.type==="stats"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"mb-4 text-center",children:i.jsx("h2",{className:"text-2xl font-black bg-clip-text text-transparent inline-block",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title})}),i.jsxs("div",{className:"flex-1 relative",children:[(ee=E.stats)==null?void 0:ee.map((C,O)=>{const ne=[{top:"5%",left:"5%",rotate:"-3deg",scale:"1"},{top:"0%",right:"15%",rotate:"2deg",scale:"1.1"},{bottom:"15%",left:"20%",rotate:"4deg",scale:"0.95"},{bottom:"5%",right:"5%",rotate:"-2deg",scale:"1.05"}][O%4];return i.jsxs("div",{className:"absolute p-4 rounded-3xl shadow-xl",style:{...ne,transform:`rotate(${ne.rotate}) scale(${ne.scale})`,background:`linear-gradient(135deg, ${c.primary}20, ${c.secondary}15)`,backdropFilter:"blur(10px)",border:`2px solid ${O%2===0?c.primary:c.secondary}30`},children:[i.jsx("div",{className:"text-3xl font-black bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:C.value}),i.jsx("div",{className:"text-sm",style:{color:c.muted},children:C.label}),C.trend&&i.jsx("div",{className:"text-xs mt-2 px-3 py-1 rounded-full inline-block",style:{background:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`,color:"white"},children:C.trend})]},O)}),E.imageKeywords&&i.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-32 h-32 rounded-full overflow-hidden shadow-2xl",style:{boxShadow:`0 20px 60px ${c.primary}40`},children:i.jsx("img",{src:g(E.imageKeywords,"creative-stats"),alt:"",className:"w-full h-full object-cover"})})]})]}),E.type==="mixed"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"mb-3",children:i.jsx("h2",{className:"text-xl font-black bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title})}),i.jsxs("div",{className:"flex-1 grid grid-cols-4 grid-rows-3 gap-2",children:[i.jsxs("div",{className:"col-span-2 row-span-2 p-3 rounded-3xl h-full",style:{background:`linear-gradient(180deg, ${c.primary}15, ${c.secondary}10)`},children:[E.chartType==="bar"&&(E.items||E.stats)&&i.jsx("div",{className:"h-full flex items-end justify-around ga
1133p-2 min-h-[80px]",children:(G=E.items||E.stats)==null?void 0:G.map((C,O)=>{const q=[55,75,60,90];return i.jsxs("div",{className:"flex flex-col items-center flex-1 h-full",children:[i.jsx("div",{className:"flex-1 w-full flex items-end justify-center",children:i.jsx("div",{className:"w-full max-w-10 rounded-2xl",style:{height:`${q[O%4]}%`,background:`linear-gradient(180deg, ${c.primary}, ${c.secondary})`,boxShadow:`0 8px 20px ${c.primary}40`}})}),i.jsx("p",{className:"text-xs mt-1 font-bold bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:C.value})]},O)})}),E.chartType==="pie"&&i.jsx("div",{className:"h-full flex items-center justify-center",children:i.jsxs("svg",{viewBox:"0 0 100 100",className:"w-28 h-28 transform -rotate-90",children:[i.jsx("defs",{children:i.jsxs("linearGradient",{id:`creativeMixedGrad-${E.title}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[i.jsx("stop",{offset:"0%",stopColor:c.primary}),i.jsx("stop",{offset:"100%",stopColor:c.secondary})]})}),i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:`${c.primary}15`,strokeWidth:"18"}),i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:`url(#creativeMixedGrad-${E.title})`,strokeWidth:"18",strokeDasharray:"160 251",strokeLinecap:"round"})]})}),E.chartType==="progress"&&E.stats&&i.jsx("div",{className:"h-full flex flex-col justify-center gap-2",children:E.stats.slice(0,3).map((C,O)=>i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[i.jsx("span",{style:{color:c.muted},children:C.label}),i.jsx("span",{className:"font-bold bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:C.value})]}),i.jsx("div",{className:"h-3 rounded-full overflow-hidden",style:{backgroundColor:`${c.primary}15`},children:i.jsx("div",{className:"h-full rounded-full",style:{width:`${[80,60,90][O%3]}%`,background:`linear-gradient(90deg, ${c.primary}, ${c.secondary})`}})})]},O))})]}),i.jsx("div",{className:"col-span-2 row-span-1 p-3 rounded-3xl flex items-center justify-center",style:{background:`linear-gradient(135deg, ${c.secondary}20, ${c.accent}15)`},children:i.jsx("p",{className:"text-sm font-semibold text-center",style:{color:c.text},children:E.subtitle})}),E.imageKeywords&&i.jsx("div",{className:"col-span-1 row-span-2 rounded-3xl overflow-hidden shadow-xl",style:{boxShadow:`0 10px 30px ${c.primary}30`},children:i.jsx("img",{src:g(E.imageKeywords,"creative-mixed"),alt:"",className:"w-full h-full object-cover"})}),i.jsx("div",{className:"col-span-1 row-span-2 flex flex-col gap-1.5 overflow-hidden",children:(Q=E.bullets)==null?void 0:Q.slice(0,4).map((C,O)=>i.jsxs("div",{className:"flex-1 p-2 rounded-2xl flex items-center gap-2",style:{background:`linear-gradient(135deg, ${c.primary}${10+O*5}, transparent)`},children:[i.jsx(wn,{className:"w-3 h-3 flex-shrink-0",style:{color:c.primary}}),i.jsx("span",{className:"text-xs line-clamp-2",style:{color:c.text},children:C})]},O))}),i.jsx("div",{className:"col-span-2 row-span-1 p-2 rounded-3xl flex items-center gap-3",style:{background:`linear-gradient(90deg, ${c.primary}15, ${c.secondary}15)`},children:(D=E.stats)==null?void 0:D.slice(0,3).map((C,O)=>i.jsxs("div",{className:"flex-1 text-center",children:[i.jsx("div",{className:"text-lg font-black bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:C.value}),i.jsx("div",{className:"text-xs",style:{color:c.muted},children:C.label})]},O))})]})]}),E.type==="timeline"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("h2",{className:"text-2xl font-black mb-4 text-center bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title}),i.jsx("div",{className:"flex-1 flex flex-col justify-around px-4",children:(K=E.bullets)==null?void 0:K.map((C,O)=>i.jsxs("div",{className:"flex items-center gap-4",style:{marginLeft:O%2===0?"0":"25%",marginRight:O%2===0?"25%":"0"},children:[i.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0",style:{background:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`,boxShadow:`0 4px 15px ${c.primary}50`},children:i.jsx("span",{className:"text-xs font-bold text-white",children:O+1})}),i.jsx("div",{className:"flex-1 p-3 rounded-2xl",style:{background:`linear-gradient(${O%2===0?"90deg":"270deg"}, ${c.primary}15, transparent)`},children:i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})})]},O))})]}),E.type==="end"&&i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center",children:[i.jsx("h1",{className:"text-6xl font-black mb-4 bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title}),i.jsx("p",{className:"text-xl tracking-widest",style:{color:c.muted},children:E.subtitle})]}),E.type==="chart"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8",children:[i.jsx("h2",{className:"text-3xl font-black bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:E.title}),i.jsx("p",{className:"text-sm mt-2",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 flex items-center gap-8",children:[i.jsx("div",{className:"flex-1 flex items-end justify-center gap-6 h-48",children:(V=E.items)==null?void 0:V.map((C,O)=>{const q=[50,70,60,90];return i.jsxs("div",{className:"flex flex-col items-center flex-1 max-w-20",children:[i.jsx("div",{className:"w-full rounded-2xl transition-all hover:scale-105",style:{height:`${q[O%4]}%`,background:`linear-gradient(180deg, ${c.primary}, ${c.secondary})`,boxShadow:`0 8px 24px ${c.primary}40`}}),i.jsx("p",{className:"text-xs mt-3 font-medium",style:{color:c.muted},children:C.label}),i.jsx("p",{className:"text-sm font-bold bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:C.value})]},O)})}),i.jsxs("div",{className:"w-48 h-48 relative",children:[i.jsxs("svg",{viewBox:"0 0 100 100",className:"w-full h-full transform -rotate-90",children:[i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:"creativeGradient1",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[i.jsx("stop",{offset:"0%",stopColor:c.primary}),i.jsx("stop",{offset:"100%",stopColor:c.secondary})]}),i.jsxs("linearGradient",{id:"creativeGradient2",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[i.jsx("stop",{offset:"0%",stopColor:c.secondary}),i.jsx("stop",{offset:"100%",stopColor:c.accent})]})]}),i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:`${c.primary}15`,strokeWidth:"16"}),i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"url
1133(#creativeGradient1)",strokeWidth:"16",strokeDasharray:"150 251.3",strokeLinecap:"round"}),i.jsx("circle",{cx:"50",cy:"50",r:"25",fill:"none",stroke:`${c.secondary}15`,strokeWidth:"12"}),i.jsx("circle",{cx:"50",cy:"50",r:"25",fill:"none",stroke:"url(#creativeGradient2)",strokeWidth:"12",strokeDasharray:"100 157",strokeLinecap:"round"})]}),i.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[i.jsx("span",{className:"text-xl font-black bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${c.primary}, ${c.secondary})`},children:"60%"}),i.jsx("span",{className:"text-xs",style:{color:c.muted},children:"Growth"})]})]})]})]})]}),i.jsxs("div",{className:"absolute bottom-4 right-6 text-sm font-medium px-3 py-1 rounded-full",style:{backgroundColor:`${c.primary}20`,color:c.primary},children:[A+1," / ",u.length]})]},A)},b=(E,A)=>{var M,B,W,H,L,$,ee,G,Q,D,K;const R=A===o;return i.jsxs("div",{className:it("absolute inset-0 transition-all duration-500",R?"opacity-100":"opacity-0 pointer-events-none"),style:{backgroundColor:c.background},children:[i.jsx("div",{className:"absolute top-8 left-8 right-8 h-px",style:{backgroundColor:`${c.text}10`}}),i.jsx("div",{className:"absolute bottom-8 left-8 right-8 h-px",style:{backgroundColor:`${c.text}10`}}),i.jsxs("div",{className:"relative h-full p-12",children:[E.type==="cover"&&i.jsxs("div",{className:"h-full flex flex-col justify-center",children:[i.jsx("h1",{className:"text-6xl font-extralight tracking-tight mb-4",style:{color:c.text},children:E.title}),i.jsx("div",{className:"w-12 h-px my-6",style:{backgroundColor:c.text}}),i.jsx("p",{className:"text-lg font-light tracking-widest uppercase",style:{color:c.muted},children:E.subtitle})]}),E.type==="section"&&i.jsxs("div",{className:"h-full flex flex-col justify-center",children:[i.jsx("div",{className:"mb-12",children:i.jsx("p",{className:"text-xs uppercase tracking-[0.3em] mb-2",style:{color:c.muted},children:E.title})}),i.jsx("div",{className:"space-y-8",children:(M=E.bullets)==null?void 0:M.map((V,C)=>i.jsxs("div",{className:"flex items-center gap-8",children:[i.jsx("span",{className:"text-4xl font-extralight",style:{color:c.accent},children:V.substring(0,2)}),i.jsx("span",{className:"text-xl font-light",style:{color:c.text},children:V.substring(3)})]},C))})]}),E.type==="content"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-12",children:[i.jsx("p",{className:"text-xs uppercase tracking-[0.3em] mb-2",style:{color:c.muted},children:E.subtitle}),i.jsx("h2",{className:"text-4xl font-extralight",style:{color:c.text},children:E.title})]}),i.jsx("div",{className:"flex-1 flex flex-col justify-center gap-6",children:(B=E.bullets)==null?void 0:B.map((V,C)=>i.jsxs("div",{className:"flex items-start gap-6",children:[i.jsx("span",{className:"text-sm font-light",style:{color:c.accent},children:String(C+1).padStart(2,"0")}),i.jsx("p",{className:"text-lg font-light leading-relaxed",style:{color:c.text},children:V})]},C))})]}),E.type==="image-left"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8",children:[i.jsx("p",{className:"text-xs uppercase tracking-[0.3em] mb-2",style:{color:c.muted},children:E.subtitle}),i.jsx("h2",{className:"text-3xl font-extralight",style:{color:c.text},children:E.title})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-12",children:[i.jsx("div",{className:"overflow-hidden",children:i.jsx("img",{src:g(E.imageKeywords,"minimal-left"),alt:"",className:"w-full h-full object-cover"})}),i.jsx("div",{className:"flex flex-col justify-center gap-5",children:(W=E.bullets)==null?void 0:W.map((V,C)=>i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("span",{className:"text-sm font-light",style:{color:c.accent},children:String(C+1).padStart(2,"0")}),i.jsx("p",{className:"text-base font-light",style:{color:c.text},children:V})]},C))})]})]}),E.type==="image-right"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8",children:[i.jsx("p",{className:"text-xs uppercase tracking-[0.3em] mb-2",style:{color:c.muted},children:E.subtitle}),i.jsx("h2",{className:"text-3xl font-extralight",style:{color:c.text},children:E.title})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-12",children:[i.jsx("div",{className:"flex flex-col justify-center gap-5",children:(H=E.bullets)==null?void 0:H.map((V,C)=>i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("span",{className:"text-sm font-light",style:{color:c.accent},children:String(C+1).padStart(2,"0")}),i.jsx("p",{className:"text-base font-light",style:{color:c.text},children:V})]},C))}),i.jsx("div",{className:"overflow-hidden",children:i.jsx("img",{src:g(E.imageKeywords,"minimal-right"),alt:"",className:"w-full h-full object-cover"})})]})]}),E.type==="chart"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-12",children:[i.jsx("p",{className:"text-xs uppercase tracking-[0.3em] mb-2",style:{color:c.muted},children:E.subtitle}),i.jsx("h2",{className:"text-4xl font-extralight",style:{color:c.text},children:E.title})]}),i.jsxs("div",{className:"flex-1 flex items-center gap-12",children:[i.jsxs("div",{className:"flex-1 h-full relative",children:[i.jsxs("svg",{viewBox:"0 0 300 120",className:"w-full h-full",children:[[0,1,2,3].map(V=>i.jsx("line",{x1:"0",y1:V*40,x2:"300",y2:V*40,stroke:`${c.text}08`},V)),i.jsx("polyline",{fill:"none",stroke:c.text,strokeWidth:"1.5",points:"0,100 60,70 120,80 180,40 240,50 300,20"}),[[0,100],[60,70],[120,80],[180,40],[240,50],[300,20]].map(([V,C],O)=>i.jsx("circle",{cx:V,cy:C,r:"3",fill:c.background,stroke:c.text,strokeWidth:"1.5"},O))]}),i.jsxs("div",{className:"absolute bottom-0 left-0 right-0 flex justify-between text-xs",style:{color:c.muted},children:[i.jsx("span",{children:"Jan"}),i.jsx("span",{children:"Feb"}),i.jsx("span",{children:"Mar"}),i.jsx("span",{children:"Apr"}),i.jsx("span",{children:"May"}),i.jsx("span",{children:"Jun"})]})]}),i.jsx("div",{className:"w-48 flex flex-col gap-4",children:(L=E.items)==null?void 0:L.map((V,C)=>i.jsxs("div",{className:"flex items-center justify-between py-3 border-b",style:{borderColor:`${c.text}10`},children:[i.jsx("span",{className:"text-xs uppercase tracking-widest",style:{color:c.muted},children:V.label}),i.jsx("span",{className:"text-lg font-extralight",style:{color:c.text},children:V.value})]},C))})]})]}),E.type==="comparison"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-12",children:[i.jsx("h2",{className:"text-4xl font-extralight",style:{color:c.text},children:E.title}),i.jsx("div",{className:"w-12 h-px mt-4",style:{backgroundColor:c.text}})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-16",children:[i.jsxs("div",{className:"flex flex-col",children:[i.jsx("p",{className:"text-xs uppercase tracking-[0.3em] mb-6",style:{color:c.muted},children:E.leftTitle}),i.jsx("div",{className:"space-y-4",children:($=E.leftBullets)==null?void 0:$.map((V,C)=>i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("span",{className:"text-sm font-light",style:{color:c.accent},children:String(C+1).padStart(2,"0")}),i.jsx("p",{className:"text-base font-light",style:{color:c.text},children:V})]},C))})]}),i.jsxs("div",{className:"flex flex-col border-l pl-16",style:{borderColor:`${c.text}10`},children:[i.jsx("p",{className:"text-xs uppercase tracking-[0.3em] mb-6",style:{color:c.muted},children:E.rightTitle}),i.jsx("div",{className:"space-y-4",children:(ee=E.rightBullets)==null?void 0:ee.map((V,C)=>i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("span",{className:"text-sm font-light",style:{color:c.accent},children:String(C+1).padStart(2,"0")}),i.jsx("p",{className:"text-base font-light",style:{color:c.text},children:V})]},C))})]})]})]}),E.type==="stats"&&i.jsxs("div",{className:"h-full flex",children:[i.jsxs("div",{className:"w-1/3 flex flex-col justify-center pr-8",children:[i.jsx("p",{className:"text-xs uppercase tracking-[0.3em] mb-2",style:{color:c.muted},children:E.subtitle}),i.jsx("h2",{className:"text-3xl font-extralight leading-tight",style:{color:c.text},children:E.title}),i.jsx("div",{className:"w-8 h-px mt-6",style:{backgroundColor:c.text}})]}),i.jsx("div",{className:"flex-1 flex flex-col justify-center border-l pl-8",style:{borderColor:`${c.text}10`},children:(G=E.stats)==null?void 0:G.map((V,C)=>i.jsx("div",{className:"py-4 border-b last:border-b-0",style:{borderColor:`${c.text}08`},children:i.jsxs("div",{className:"flex items-baseline gap-6",children:[i.jsx("span",{className:"text-4xl font-extralight",style:{color:c.text},children:V.value}),i.jsx("span",{className:"text-xs uppercase tracking-[0.2em]",style:{color:c.muted},children:V.label}),V.trend&&i.jsx("span",{className:"text-xs ml-auto",style:{color:c.accent},children:V.trend})]})},C))})]}),E.type==="mixed"&&i.jsxs("div",{className:"h-full flex",children:[i.jsxs("div",{className:"w-1/2 flex flex-col justify-center pr-10 border-r",style:{borderColor:`${c.text}08`},children:[i.jsx("p",{className:"text-xs uppercase tracking-[0.3em] mb-4",style:{color:c.muted},children:E.subtitle}),E.chartType==="bar"&&(E.items||E.stats)&&i.jsx("div",{className:"flex items-end gap-3 h-32",children:(Q=E.items||E.stats)==null?void 0:Q.map((V,C)=>{const O=[50,70,55,85];return i.jsxs("div",{className:"flex flex-col items-center flex-1 h-full",children:[i.jsx("div",{className:"flex-1 w-full flex items-end justify-center",children:i.jsx("div",{className:"w-full max-w-6",style:{height:`${O[C%4]}%`,backgroundColor:c.text}})}),i.jsx("p",{className:"text-xs mt-2",style:{color:c.muted},children:V.label})]},C)})}),E.chartType==="pie"&&i.jsxs("svg",{viewBox:"0 0 100 100",className:"w-24 h-24 transform -rotate-90",children:[i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:`${c.text}10`,strokeWidth:"6"}),i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:c.text,strokeWidth:"6",strokeDasharray:"180 251"})]}),E.chartType==="progress"&&E.stats&&i.jsx("div",{className:"space-y-4",children:E.stats.slice(0,3).map((V,C)=>i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[i.jsx("span",{style:{color:c.muted},children:V.label}),i.jsx("span",{style:{color:c.text},children:V.value})]}),i.jsx("div",{className:"h-px",style:{backgroundColor:`${c.text}10`},children:i.jsx("div",{className:"h-full",style:{width:`${[75,55,85][C%3]}%`,backgroundColor:c.text}})})]},C))})]}),i.jsxs("div",{className:"w-1/2 flex flex-col justify-center pl-10",children:[i.jsx("h2",{className:"text-2xl font-extralight mb-8",style:{color:c.text},children:E.title}),i.jsx("div",{className:"space-y-4",children:(D=E.bullets)==null?void 0:D.slice(0,4).map((V,C)=>i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("span",{className:"text-xs font-light pt-1",style:{color:c.accent},children:String(C+1).padStart(2,"0")}),i.jsx("p",{className:"text-sm font-light leading-relaxed",style:{color:c.text},children:V})]},C))})]})]}),E.type==="timeline"&&i.jsxs("div",{className:"h-full flex",children:[i.jsxs("div",{className:"w-1/4 flex flex-col justify-center",children:[i.jsx("h2",{className:"text-3xl font-extralight leading-tight",style:{color:c.text},children:E.title}),i.jsx("div",{className:"w-6 h-px mt-4",style:{backgroundColor:c.text}})]}),i.jsx("div",{className:"flex-1 flex items-center pl-8",children:i.jsx("div",{className:"w-px h-3/4 relative",style:{backgroundColor:`${c.text}15`},children:(K=E.bullets)==null?void 0:K.map((V,C)=>i.jsxs("div",{className:"absolute flex items-center gap-4",style:{to
1133p:`${C/(E.bullets.length-1)*100}%`,left:0,transform:"translateY(-50%)"},children:[i.jsx("div",{className:"w-2 h-2 rounded-full -ml-[3px]",style:{backgroundColor:c.text}}),i.jsx("p",{className:"text-sm font-light whitespace-nowrap",style:{color:c.text},children:V})]},C))})})]}),E.type==="end"&&i.jsxs("div",{className:"h-full flex flex-col justify-center",children:[i.jsx("h1",{className:"text-6xl font-extralight mb-4",style:{color:c.text},children:E.title}),i.jsx("div",{className:"w-12 h-px my-6",style:{backgroundColor:c.text}}),i.jsx("p",{className:"text-lg font-light tracking-widest uppercase",style:{color:c.muted},children:E.subtitle})]})]}),i.jsxs("div",{className:"absolute bottom-4 right-8 text-xs font-light tracking-widest",style:{color:c.muted},children:[A+1,"â",u.length]})]},A)},k=(E,A)=>{var M,B,W,H,L,$,ee,G,Q,D,K,V;const R=A===o;return i.jsxs("div",{className:it("absolute inset-0 transition-all duration-500",R?"opacity-100":"opacity-0 pointer-events-none"),style:{backgroundColor:c.background},children:[i.jsx("svg",{className:"absolute top-0 right-0 w-64 h-64 opacity-20",viewBox:"0 0 200 200",children:i.jsx("path",{d:"M 100 0 Q 200 50, 150 100 Q 100 150, 100 200 Q 100 150, 50 100 Q 0 50, 100 0",fill:"none",stroke:c.primary,strokeWidth:"1"})}),i.jsxs("svg",{className:"absolute bottom-0 left-0 w-48 h-48 opacity-15",viewBox:"0 0 200 200",children:[i.jsx("circle",{cx:"100",cy:"100",r:"80",fill:"none",stroke:c.secondary,strokeWidth:"1"}
1133),i.jsx("circle",{cx:"100",cy:"100",r:"60",fill:"none",stroke:c.secondary,strokeWidth:"1"}),i.jsx("circle",{cx:"100",cy:"100",r:"40",fill:"none",stroke:c.secondary,strokeWidth:"1"})]}),i.jsx("div",{className:"absolute top-6 right-6",children:i.jsx(Rn,{className:"w-8 h-8 opacity-30",style:{color:c.primary}})}),i.jsxs("div",{className:"relative h-full p-10 z-10",children:[E.type==="cover"&&i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center",children:[i.jsx(Rn,{className:"w-12 h-12 mb-6",style:{color:c.primary}}),i.jsx("h1",{className:"text-5xl font-semibold mb-4",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-xl",style:{color:c.muted},children:E.subtitle})]}),E.type==="section"&&i.jsx("div",{className:"h-full flex items-center",children:i.jsxs("div",{className:"w-full",children:[i.jsx("h2",{className:"text-3xl font-semibold mb-10",style:{color:c.primary},children:E.title}),i.jsx("div",{className:"grid grid-cols-2 gap-6",children:(M=E.bullets)==null?void 0:M.map((C,O)=>i.jsxs("div",{className:"flex items-center gap-4 p-5 rounded-2xl",style:{backgroundColor:`${c.primary}10`},children:[i.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center",style:{backgroundColor:c.primary},children:i.jsx("span",{className:"text-white font-medium",children:C.substring(0,2)})}),i.jsx("span",{className:"text-lg",style:{color:c.text},children:C.substring(3)})]},O))})]})}),E.type==="content"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8 flex items-center gap-3",children:[i.jsx(Rn,{className:"w-6 h-6",style:{color:c.primary}}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-3xl font-semibold",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-sm mt-1",style:{color:c.muted},children:E.subtitle})]})]}),i.jsx("div",{className:"flex-1 flex flex-col justify-center gap-5",children:(B=E.bullets)==null?void 0:B.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-4 p-4 rounded-xl",style:{backgroundColor:`${c.primary}08`},children:[i.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{backgroundColor:c.accent},children:i.jsx("span",{className:"text-white text-xs font-medium",children:O+1})}),i.jsx("p",{className:"text-base leading-relaxed",style:{color:c.text},children:C})]},O))})]}),E.type==="image-left"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[i.jsx(Rn,{className:"w-5 h-5",style:{color:c.primary}}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-2xl font-semibold",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-sm",style:{color:c.muted},children:E.subtitle})]})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[i.jsx("div",{className:"rounded-2xl overflow-hidden shadow-lg",children:i.jsx("img",{src:g(E.imageKeywords,"nature-left"),alt:"",className:"w-full h-full object-cover"})}),i.jsx("div",{className:"flex flex-col justify-center gap-4",children:(W=E.bullets)==null?void 0:W.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-xl",style:{backgroundColor:`${c.primary}08`},children:[i.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",style:{backgroundColor:c.accent},children:i.jsx("span",{className:"text-white text-xs",children:O+1})}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})]},O))})]})]}),E.type==="image-right"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[i.jsx(Rn,{className:"w-5 h-5",style:{color:c.primary}}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-2xl font-semibold",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-sm",style:{color:c.muted},children:E.subtitle})]})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[i.jsx("div",{className:"flex flex-col justify-center gap-4",children:(H=E.bullets)==null?void 0:H.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-xl",style:{backgroundColor:`${c.primary}08`},children:[i.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",style:{backgroundColor:c.accent},children:i.jsx("span",{className:"text-white text-xs",children:O+1})}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})]},O))}),i.jsx("div",{className:"rounded-2xl overflow-hidden shadow-lg",children:i.jsx("img",{src:g(E.imageKeywords,"nature-right"),alt:"",className:"w-full h-full object-cover"})})]})]}),E.type==="chart"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8",children:[i.jsx("h2",{className:"text-3xl font-semibold",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-sm mt-1",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 flex items-center gap-8",children:[i.jsx("div",{className:"flex-1 h-full relative p-4 rounded-2xl",style:{backgroundColor:`${c.primary}08`},children:i.jsxs("svg",{viewBox:"0 0 300 140",className:"w-full h-full",children:[i.jsx("defs",{children:i.jsxs("linearGradient",{id:"natureGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[i.jsx("stop",{offset:"0%",stopColor:c.primary,stopOpacity:"0.4"}),i.jsx("stop",{offset:"100%",stopColor:c.primary,stopOpacity:"0.05"})]})}),i.jsx("path",{d:"M0,120 Q30,100 60,90 T120,80 T180,50 T240,70 T300,40 L300,140 L0,140 Z",fill:"url(#natureGradient)"}),i.jsx("path",{d:"M0,120 Q30,100 60,90 T120,80 T180,50 T240,70 T300,40",fill:"none",stroke:c.primary,strokeWidth:"3",strokeLinecap:"round"}),[[60,90],[120,80],[180,50],[240,70],[300,40]].map(([C,O],q)=>
1133i.jsxs("g",{children:[i.jsx("circle",{cx:C,cy:O,r:"8",fill:c.background,stroke:c.primary,strokeWidth:"2"}),i.jsx("circle",{cx:C,cy:O,r:"4",fill:c.accent})]},q))]})}),i.jsx("div",{className:"flex flex-col gap-4",children:(L=E.items)==null?void 0:L.map((C,O)=>{const q=[40,55,70,95];return i.jsxs("div",{className:"flex items-center gap-4 p-3 rounded-xl",style:{backgroundColor:`${c.primary}08`},children:[i.jsxs("div",{className:"relative w-12 h-12",children:[i.jsxs("svg",{viewBox:"0 0 36 36",className:"w-full h-full",children:[i.jsx("circle",{cx:"18",cy:"18",r:"14",fill:"none",stroke:`${c.primary}20`,strokeWidth:"4"}),i.jsx("circle",{cx:"18",cy:"18",r:"14",fill:"none",stroke:O===E.items.length-1?c.primary:c.secondary,strokeWidth:"4",strokeDasharray:`${q[O]} 100`,strokeLinecap:"round",transform:"rotate(-90 18 18)"})]}),i.jsx(Rn,{className:"absolute inset-0 m-auto w-4 h-4",style:{color:c.accent}})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-semibold",style:{color:c.primary},children:C.value}),i.jsx("p",{className:"text-xs",style:{color:c.muted},children:C.label})]})]},O)})})]})]}),E.type==="stats"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[i.jsx(Rn,{className:"w-6 h-6",style:{color:c.primary}}),i.jsx("h2",{className:"text-2xl font-semibold",style:{color:c.primary},children:E.title})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-3 gap-3",children:[i.jsxs("div",{className:"col-span-2 row-span-2 relative p-4 rounded-tl-3xl rounded-tr-[4rem] rounded-br-3xl rounded-bl-[4rem] overflow-hidden",style:{backgroundColor:`${c.primary}12`},children:[i.jsx("svg",{className:"absolute top-2 right-2 w-8 h-8 opacity-20",viewBox:"0 0 24 24",fill:c.primary,children:i.jsx("path",{d:"M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z"})}),i.jsx("div",{className:"flex flex-wrap gap-4",children:($=E.stats)==null?void 0:$.slice(0,2).map((C,O)=>i.jsxs("div",{className:"flex-1 min-w-[120px]",children:[i.jsx("div",{className:"text-3xl font-semibold",style:{color:c.primary},children:C.value}),i.jsx("div",{className:"text-sm",style:{color:c.muted},children:C.label}),C.trend&&i.jsx("div",{className:"text-xs mt-1 px-2 py-0.5 rounded-full inline-block",style:{backgroundColor:c.accent,color:"white"},children:C.trend})]},O))}),i.jsx("div",{className:"absolute bottom-3 left-4 right-4",children:i.jsx("div",{className:"h-2 rounded-full overflow-hidden",style:{backgroundColor:`${c.primary}20`},children:i.jsx("div",{className:"h-full rounded-full",style:{width:"75%",background:`linear-gradient(90deg, ${c.primary}, ${c.secondary})`}})})})]}),(ee=E.stats)==null?void 0:ee.slice(2,4).map((C,O)=>i.jsxs("div",{className:"p-3 rounded-2xl",style:{backgroundColor:`${c.primary}08`,borderRadius:O===0?"1.5rem 1.5rem 1.5rem 3rem":"1.5rem 3rem 1.5rem 1.5rem"},children:[i.jsx(Rn,{className:"w-4 h-4 mb-2",style:{color:c.accent}}),i.jsx("div",{className:"text-xl font-semibold",style:{color:c.primary},children:C.value}),i.jsx("div",{className:"text-xs",style:{color:c.muted},children:C.label})]},O)),E.imageKeywords&&i.jsx("div",{className:"col-span-3 h-20 rounded-2xl overflow-hidden",style:{borderRadius:"2rem 1rem 2rem 1rem"},children:i.jsx("img",{src:g(E.imageKeywords,"nature-stats"),alt:"",className:"w-full h-full object-cover"})})]})]}),E.type==="mixed"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[i.jsx(Rn,{className:"w-5 h-5",style:{color:c.primary}}),i.jsx("h2",{className:"text-xl font-semibold",style:{color:c.primary},children:E.title})]}),i.jsxs("div",{className:"flex-1 flex flex-col gap-2",children:[i.jsxs("div",{className:"flex-1 p-3 rounded-tl-3xl rounded-tr-2xl rounded-br-3xl rounded-bl-2xl h-full",style:{backgroundColor:`${c.primary}08`},children:[E.chartType==="bar"&&(E.items||E.stats)&&i.jsx("div",{className:"h-full flex items-end justify-around gap-3 pb-2 min-h-[80px]",children:(G=E.items||E.stats)==null?void 0:G.map((C,O)=>{const q=[50,70,55,90];return i.jsxs("div",{className:"flex flex-col items-center flex-1 h-full",children:[i.jsx("div",{className:"flex-1 w-full flex items-end justify-center",children:i.jsx("div",{className:"w-full max-w-8",style:{height:`${q[O%4]}%`,backgroundColor:c.primary,borderRadius:"9999px 9999px 1rem 1rem"}})}),i.jsx("p",{className:"text-xs mt-1",style:{color:c.muted},children:C.label}),i.jsx("p",{className:"text-sm font-semibold",style:{color:c.primary},children:C.value})]},O)})}),E.chartType==="pie"&&i.jsx("div",{className:"h-full flex items-center justify-center",children:i.jsxs("svg",{viewBox:"0 0 100 100",className:"w-24 h-24 transform -rotate-90",children:[i.jsx("defs",{children:i.jsxs("linearGradient",{id:`natureMixedGrad-${E.title}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[i.jsx("stop",{offset:"0%",stopColor:c.primary}),i.jsx("stop",{offset:"100%",stopColor:c.secondary})]})}),i.jsx("circle",{cx:"50",cy:"50",r:"35",fill:"none",stroke:`${c.primary}20`,strokeWidth:"15"}),i.jsx("circle",{cx:"50",cy:"50",r:"35",fill:"none",stroke:`url(#natureMixedGrad-${E.title})`,strokeWidth:"15",strokeDasharray:"160 220",strokeLinecap:"round"})]})}),E.chartType==="progress"&&E.stats&&i.jsx("div",{className:"h-full flex flex-col justify-center gap-2",children:E.stats.slice(0,3).map((C,O)=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-14 text-xs",style:{color:c.muted},children:C.label}),i.jsx("div",{className:"flex-1 h-2 rounded-full overflow-hidden",style:{backgroundColor:`${c.primary}20`},children:i.jsx("div",{className:"h-full rounded-full",style:{width:`${[80,60,90][O%3]}%`,background:`linear-gradient(90deg, ${c.primary}, ${c.secondary})`}})}),i.jsx("div",{className:"w-12 text-xs font-semibold text-right",style:{color:c.primary},children:C.value})]},O))})]}),i.jsx("div",{className:"flex gap-2 overflow-hidden",children:(Q=E.bullets)==null?void 0:Q.slice(0,4).map((C,O)=>i.jsxs("div",{className:"flex-1 p-2 rounded-xl flex items-center gap-2",style:{backgroundColor:`${c.primary}${8+O*3}`,marginTop:O%2===0?"0":"8px",marginBottom:O%2===0?"8px":"0"},children:[i.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",style:{backgroundColor:c.accent},children:i.jsx("span",{className:"text-white text-xs",children:O+1})}),i.jsx("span",{className:"text-xs line-clamp-2",style:{color:c.text},children:C})]},O))})]})]}),E.type==="timeline"&&i.jsxs("div",{className:"h-full flex",children:[i.jsxs("div",{className:"w-1/4 flex flex-col justify-center items-center",children:[i.jsx(Rn,{className:"w-10 h-10 mb-4",style:{color:c.primary}}),i.jsx("h2",{className:"text-xl font-semibold text-center",style:{color:c.primary},children:E.title})]}),i.jsx("div",{className:"flex-1 flex items-center pl-4",children:i.jsxs("div",{className:"relative h-4/5 w-full",children:[i.jsx("div",{className:"absolute left-8 top-0 bottom-0 w-1 rounded-full",style:{background:`linear-gradient(180deg, ${c.primary}, ${c.secondary})`}}),(D=E.bullets)==null?void 0:D.map((C,O)=>i.jsxs("div",{className:"absolute flex items-center gap-3",style:{to
1133p:`${O/(E.bullets.length-1)*100}%`,left:0,transform:"translateY(-50%)"},children:[i.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center",style:{backgroundColor:c.primary},children:i.jsx(Rn,{className:"w-4 h-4 text-white"})}),i.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:c.secondary}}),i.jsx("div",{className:"flex-1 p-2 rounded-xl",style:{backgroundColor:`${c.primary}08`},children:i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})})]},O))]})})]}),E.type==="comparison"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[i.jsx(Rn,{className:"w-6 h-6",style:{color:c.primary}}),i.jsx("h2",{className:"text-2xl font-semibold",style:{color:c.primary},children:E.title})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-6",children:[i.jsxs("div",{className:"p-5 rounded-2xl",style:{backgroundColor:`${c.primary}10`},children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center",style:{backgroundColor:c.primary},children:i.jsx(Rn,{className:"w-4 h-4 text-white"})}),i.jsx("span",{className:"text-sm font-semibold",style:{color:c.primary},children:E.leftTitle})]}),i.jsx("div",{className:"space-y-3",children:(K=E.leftBullets)==null?void 0:K.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3 p-2 rounded-xl",style:{backgroundColor:`${c.primary}08`},children:[i.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",style:{backgroundColor:c.accent},children:i.jsx("span",{className:"text-white text-xs",children:O+1})}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})]},O))})]}),i.jsxs("div",{className:"p-5 rounded-2xl",style:{backgroundColor:`${c.secondary}10`},children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center",style:{backgroundColor:c.secondary},children:i.jsx(Lk,{className:"w-4 h-4 text-white"})}),i.jsx("span",{className:"text-sm font-semibold",style:{color:c.secondary},children:E.rightTitle})]}),i.jsx("div",{className:"space-y-3",children:(V=E.rightBullets)==null?void 0:V.map((C,O)=>i.jsxs("div",{className:"flex items-start gap-3 p-2 rounded-xl",style:{backgroundColor:`${c.secondary}08`},children:[i.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0",style:{backgroundColor:c.accent},children:i.jsx("span",{className:"text-white text-xs",children:O+1})}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:C})]},O))})]})]})]}),E.type==="end"&&i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center",children:[i.jsx(Rn,{className:"w-12 h-12 mb-6",style:{color:c.primary}}),i.jsx("h1",{className:"text-5xl font-semibold mb-4",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-xl tracking-widest",style:{color:c.muted},children:E.subtitle})]})]}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-2",style:{background:`linear-gradient(90deg, ${c.primary}, ${c.secondary}, ${c.accent})`}}),i.jsx("div",{className:"absolute bottom-6 right-6 w-8 h-8 rounded-full flex items-center justify-center text-xs font-medium",style:{backgroundColor:c.primary,color:"white"},children:A+1})]},A)},T=(E,A)=>{var M,B,W,H,L,$,ee,G,Q,D,K,V,C;const R=A===o;return i.jsxs("div",{className:it("absolute inset-0 transition-all duration-500",R?"opacity-100":"opacity-0 pointer-events-none"),style:{backgroundColor:c.background},children:[i.jsx("div",{className:"absolute inset-4 border-2 rounded",style:{borderColor:`${c.accent}40`}}),i.jsx("div",{className:"absolute inset-6 border rounded",style:{borderColor:`${c.accent}20`}}),i.jsx("div",{className:"absolute top-4 left-4 w-8 h-8 border-t-2 border-l-2",style:{borderColor:c.accent}}),i.jsx("div",{className:"absolute top-4 right-4 w-8 h-8 border-t-2 border-r-2",style:{borderColor:c.accent}}),i.jsx("div",{className:"absolute bottom-4 left-4 w-8 h-8 border-b-2 border-l-2",style:{borderColor:c.accent}}),i.jsx("div",{className:"absolute bottom-4 right-4 w-8 h-8 border-b-2 border-r-2",style:{borderColor:c.accent}}),i.jsxs("div",{className:"relative h-full p-14 z-10",children:[E.type==="cover"&&i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center",children:[i.jsx(_c,{className:"w-10 h-10 mb-6",style:{color:c.accent}}),i.jsx("h1",{className:"text-5xl font-serif mb-4",style:{color:c.primary},children:E.title}),i.jsxs("div",{className:"flex items-center gap-4 mt-2",children:[i.jsx("div",{className:"w-12 h-px",style:{backgroundColor:c.accent}}),i.jsx("p",{className:"text-lg tracking-[0.3em] uppercase",style:{color:c.muted},children:E.subtitle}),i.jsx("div",{className:"w-12 h-px",style:{backgroundColor:c.accent}})]})]}),E.type==="section"&&i.jsxs("div",{className:"h-full flex flex-col justify-center",children:[i.jsx("h2",{className:"text-3xl font-serif mb-10 text-center",style:{color:c.primary},children:E.title}),i.jsx("div",{className:"grid grid-cols-2 gap-8",children:(M=E.bullets)==null?void 0:M.map((O,q)=>i.jsxs("div",{className:"flex items-center gap-4 justify-center",children:[i.jsx("div",{className:"w-2 h-2 rotate-45",style:{backgroundColor:c.accent}}),i.jsx("span",{className:"text-lg",style:{color:c.text},children:O})]},q))})]}),E.type==="content"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8 text-center",children:[i.jsx("h2",{className:"text-3xl font-serif",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-sm mt-2 tracking-widest uppercase",style:{color:c.muted},children:E.subtitle})]}),i.jsx("div",{className:"flex-1 flex flex-col justify-center gap-5",children:(B=E.bullets)==null?void 0:B.map((O,q)=>i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx("div",{className:"w-6 h-6 flex items-center justify-center flex-shrink-0",children:i.jsx("div",{className:"w-2 h-2 rotate-45",style:{backgroundColor:c.accent}})}),i.jsx("p",{className:"text-base leading-relaxed",style:{color:c.text},children:O})]},q))})]}),E.type==="image-left"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6 text-center",children:[i.jsx("h2",{className:"text-2xl font-serif",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-sm mt-1 tracking-widest uppercase",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-8",children:[i.jsx("div",{className:"border rounded overflow-hidden",style:{borderColor:`${c.accent}40`},children:i.jsx("img",{src:g(E.imageKeywords,"luxury-left"),alt:"",className:"w-full h-full object-cover"})}),i.jsx("div",{className:"flex flex-col justify-center gap-4",children:(W=E.bullets)==null?void 0:W.map((O,q)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-5 h-5 flex items-center justify-center flex-shrink-0",children:i.jsx("div",{className:"w-1.5 h-1.5 rotate-45",style:{backgroundColor:c.accent}})}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:O})]},q))})]})]}),E.type==="image-right"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-6 text-center",children:[i.jsx("h2",{className:"text-2xl font-serif",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-sm mt-1 tracking-widest uppercase",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-8",children:[i.jsx("div",{className:"flex flex-col justify-center gap-4",children:(H=E.bullets)==null?void 0:H.map((O,q)=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-5 h-5 flex items-center justify-center flex-shrink-0",children:i.jsx("div",{className:"w-1.5 h-1.5 rotate-45",style:{backgroundColor:c.accent}})}),i.jsx("p",{className:"text-sm",style:{color:c.text},children:O})]},q))}),i.jsx("div",{className:"border rounded overflow-hidden",style:{borderColor:`${c.accent}40`},children:i.jsx("img",{src:g(E.imageKeywords,"luxury-right"),alt:"",className:"w-full h-full object-cover"})})]})]}),E.type==="comparison"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("h2",{className:"text-3xl font-serif mb-8 text-center",style:{color:c.primary},children:E.title}),i.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-8",children:[i.jsxs("div",{className:"p-6 border rounded",style:{borderColor:`${c.accent}40`},children:[i.jsx("h3",{className:"text-xl font-serif mb-4 text-center",style:{color:c.primary},children:E.leftTitle}),i.jsx("div",{className:"w-8 h-px mx-auto mb-4",style:{backgroundColor:c.accent}}),(L=E.leftBullets)==null?void 0:L.map((O,q)=>i.jsxs("div",{className:"flex items-center gap-3 mb-3 justify-center",children:[i.jsx("div",{className:"w-1.5 h-1.5 rotate-45",style:{backgroundColor:c.accent}}),i.jsx("span",{style:{color:c.text},children:O})]},q))]}),i.jsxs("div",{className:"p-6 border rounded",style:{borderColor:`${c.accent}40`},children:[i.jsx("h3",{className:"text-xl font-serif mb-4 text-center",style:{color:c.primary},children:E.rightTitle}),i.jsx("div",{className:"w-8 h-px mx-auto mb-4",style:{backgroundColor:c.accent}}),($=E.rightBullets)==null?void 0:$.map((O,q)=>i.jsxs("div",{className:"flex items-center gap-3 mb-3 justify-center",children:[i.jsx("div",{className:"w-1.5 h-1.5 rotate-45",style:{backgroundColor:c.accent}}),i.jsx("span",{style:{color:c.text},children:O})]},q))]})]})]}),E.type==="chart"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"mb-8 text-center",children:[i.jsx("h2",{className:"text-3xl font-serif",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-sm mt-2 tracking-widest uppercase",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 flex items-center gap-10",children:[i.jsxs("div",{className:"w-48 h-48 relative",children:[i.jsxs("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:[i.jsx("defs",{children:i.jsxs("linearGradient",{id:"luxuryGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[i.jsx("stop",{offset:"0%",stopColor:c.accent}),i.jsx("stop",{offset:"100%",stopColor:c.primary})]})}),i.jsx("circle",{cx:"50",cy:"50",r:"48",fill:"none",stroke:`${c.accent}20`,strokeWidth:"1"}),i.jsx("circle",{cx:"50",cy:"50",r:"44",fill:"none",stroke:`${c.accent}30`,strokeWidth:"1",strokeDasharray:"4 4"}),i.jsx("circle",{cx:"50",cy:"50",r:"36",fill:"none",stroke:`${c.accent}15`,strokeWidth:"16"}),i.jsx("circle",{cx:"50",cy:"50",r:"36",fill:"none",stroke:"url
1133(#luxuryGradient)",strokeWidth:"16",strokeDasharray:"170 226",strokeLinecap:"round",transform:"rotate(-90 50 50)"}),i.jsx("circle",{cx:"50",cy:"50",r:"36",fill:"none",stroke:c.secondary,strokeWidth:"16",strokeDasharray:"56 226",strokeDashoffset:"-170",strokeLinecap:"round",transform:"rotate(-90 50 50)"})]}),i.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[i.jsx(_c,{className:"w-5 h-5 mb-1",style:{color:c.accent}}),i.jsx("span",{className:"text-xl font-serif",style:{color:c.primary},children:"75%"})]})]}),i.jsx("div",{className:"flex-1 grid grid-cols-2 gap-4",children:(ee=E.items)==null?void 0:ee.map((O,q)=>i.jsxs("div",{className:"text-center p-5 border rounded",style:{borderColor:`${c.accent}30`},children:[i.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[i.jsx("div",{className:"w-2 h-2 rotate-45",style:{backgroundColor:c.accent}}),i.jsx("p",{className:"text-2xl font-serif",style:{color:c.primary},children:O.value})]}),i.jsx("div",{className:"w-8 h-px mx-auto mb-2",style:{backgroundColor:`${c.accent}40`}}),i.jsx("p",{className:"text-xs uppercase tracking-wider",style:{color:c.muted},children:O.label})]},q))})]})]}),E.type==="stats"&&i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[i.jsx("div",{className:"w-12 h-px",style:{backgroundColor:c.accent}}),i.jsx(_c,{className:"w-5 h-5",style:{color:c.accent}}),i.jsx("div",{className:"w-12 h-px",style:{backgroundColor:c.accent}})]}),i.jsx("h2",{className:"text-2xl font-serif mb-1",style:{color:c.primary},children:E.title}),i.jsx("p",{className:"text-xs tracking-[0.3em] uppercase mb-6",style:{color:c.muted},children:E.subtitle}),i.jsxs("div",{className:"flex items-center gap-8",children:[(G=E.stats)==null?void 0:G.slice(0,2).map((O,q)=>i.jsxs("div",{className:"text-center px-6",children:[i.jsx("div",{className:"text-4xl font-serif mb-1",style:{color:c.primary},children:O.value}),i.jsx("div",{className:"w-8 h-px mx-auto mb-2",style:{backgroundColor:c.accent}}),i.jsx("div",{className:"text-xs uppercase tracking-wider",style:{color:c.muted},children:O.label})]},q)),i.jsx("div",{className:"w-3 h-3 rotate-45 border-2",style:{borderColor:c.accent}}),(Q=E.stats)==null?void 0:Q.slice(2,4).map((O,q)=>i.jsxs("div",{className:"text-center px-6",children:[i.jsx("div",{className:"text-4xl font-serif mb-1",style:{color:c.primary},children:O.value}),i.jsx("div",{className:"w-8 h-px mx-auto mb-2",style:{backgroundColor:c.accent}}),i.jsx("div",{className:"text-xs uppercase tracking-wider",style:{color:c.muted},children:O.label})]},q))]}),E.imageKeywords&&i.jsxs("div",{className:"mt-6 relative",children:[i.jsx("div",{className:"absolute -inset-2 border",style:{borderColor:`${c.accent}30`}}),i.jsx("div",{className:"w-48 h-20 overflow-hidden",children:i.jsx("img",{src:g(E.imageKeywords,"luxury-stats"),alt:"",className:"w-full h-full object-cover"})})]})]}),E.type==="mixed"&&i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"text-center mb-4",children:[i.jsxs("div",{className:"flex items-center justify-center gap-3 mb-2",children:[i.jsx("div",{className:"w-8 h-px",style:{backgroundColor:c.accent}}),i.jsx("h2",{className:"text-xl font-serif",style:{color:c.primary},children:E.title}),i.jsx("div",{className:"w-8 h-px",style:{backgroundColor:c.accent}})]}),i.jsx("p",{className:"text-xs tracking-[0.2em] uppercase",style:{color:c.muted},children:E.subtitle})]}),i.jsxs("div",{className:"flex-1 grid grid-cols-3 gap-4",children:[i.jsx("div",{className:"flex flex-col justify-center gap-3 pr-4 border-r",style:{borderColor:`${c.accent}20`},children:(D=E.bullets)==null?void 0:D.slice(0,3).map((O,q)=>i.jsxs("div",{className:"flex items-start gap-2 text-right",children:[i.jsx("span",{className:"text-xs flex-1",style:{color:c.text},children:O}),i.jsx("div",{className:"w-1.5 h-1.5 rotate-45 mt-1 flex-shrink-0",style:{backgroundColor:c.accent}})]},q))}),i.jsxs("div",{className:"flex items-center justify-center p-3 border rounded h-full",style:{borderColor:`${c.accent}30`},children:[E.chartType==="bar"&&(E.items||E.stats)&&i.jsx("div",{className:"h-full w-full flex items-end justify-around ga
1133p-2 min-h-[80px]",children:(K=E.items||E.stats)==null?void 0:K.map((O,q)=>{const ne=[55,75,60,90];return i.jsxs("div",{className:"flex flex-col items-center flex-1 h-full",children:[i.jsx("div",{className:"flex-1 w-full flex items-end justify-center",children:i.jsx("div",{className:"w-full max-w-6 rounded-t",style:{height:`${ne[q%4]}%`,background:`linear-gradient(180deg, ${c.accent}, ${c.primary})`}})}),i.jsx("p",{className:"text-xs mt-1 font-serif",style:{color:c.primary},children:O.value})]},q)})}),E.chartType==="pie"&&i.jsxs("div",{className:"relative",children:[i.jsxs("svg",{viewBox:"0 0 100 100",className:"w-24 h-24 transform -rotate-90",children:[i.jsx("defs",{children:i.jsxs("linearGradient",{id:`luxuryMixedGrad-${E.title}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[i.jsx("stop",{offset:"0%",stopColor:c.accent}),i.jsx("stop",{offset:"100%",stopColor:c.primary})]})}),i.jsx("circle",{cx:"50",cy:"50",r:"35",fill:"none",stroke:`${c.accent}15`,strokeWidth:"12"}),i.jsx("circle",{cx:"50",cy:"50",r:"35",fill:"none",stroke:`url(#luxuryMixedGrad-${E.title})`,strokeWidth:"12",strokeDasharray:"160 220",strokeLinecap:"round"})]}),i.jsx(_c,{className:"absolute inset-0 m-auto w-5 h-5",style:{color:c.accent}})]}),E.chartType==="progress"&&E.stats&&i.jsx("div",{className:"w-full space-y-2",children:E.stats.slice(0,3).map((O,q)=>i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[i.jsx("span",{style:{color:c.muted},children:O.label}),i.jsx("span",{className:"font-serif",style:{color:c.primary},children:O.value})]}),i.jsx("div",{className:"h-1.5 rounded-full overflow-hidden",style:{backgroundColor:`${c.accent}15`},children:i.jsx("div",{className:"h-full rounded-full",style:{width:`${[75,60,85][q%3]}%`,background:`linear-gradient(90deg, ${c.accent}, ${c.primary})`}})})]},q))})]}),i.jsx("div",{className:"flex flex-col justify-center gap-3 pl-4 border-l",style:{borderColor:`${c.accent}20`},children:(V=E.stats)==null?void 0:V.slice(0,3).map((O,q)=>i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-1.5 h-1.5 rotate-45 flex-shrink-0",style:{backgroundColor:c.accent}}),i.jsx("span",{className:"text-lg font-serif",style:{color:c.primary},children:O.value}),i.jsx("span",{className:"text-xs",style:{color:c.muted},children:O.label})]},q))})]})]}),E.type==="timeline"&&i.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[i.jsx("div",{className:"w-16 h-px",style:{backgroundColor:c.accent}}),i.jsx("h2",{className:"text-2xl font-serif",style:{color:c.primary},children:E.title}),i.jsx("div",{className:"w-16 h-px",style:{backgroundColor:c.accent}})]}),i.jsxs("div",{className:"w-full max-w-lg relative",children:[i.jsx("div",{className:"absolute top-4 left-0 right-0 h-px",style:{background:`linear-gradient(90deg, transparent, ${c.accent}, ${c.accent}, transparent)`}}),i.jsx("div",{className:"flex justify-between",children:(C=E.bullets)==null?void 0:C.map((O,q)=>i.jsxs("div",{className:"flex flex-col items-center",style:{width:`${100/E.bullets.length}%`},children:[i.jsx("div",{className:"w-3 h-3 rotate-45 border bg-background z-10",style:{borderColor:c.accent,backgroundColor:c.background}}),i.jsx("div",{className:"w-px h-4",style:{backgroundColor:`${c.accent}40`}}),i.jsx("div",{className:"text-center px-2",children:i.jsx("p",{className:"text-xs font-serif leading-tight",style:{color:c.text},children:O})})]},q))})]})]}),E.type==="end"&&i.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center",children:[i.jsx(_c,{className:"w-10 h-10 mb-6",style:{color:c.accent}}),i.jsx("h1",{className:"text-5xl font-serif mb-4",style:{color:c.primary},children:E.title}),i.jsxs("div",{className:"flex items-center gap-4 mt-2",children:[i.jsx("div",{className:"w-12 h-px",style:{backgroundColor:c.accent}}),i.jsx("p",{className:"text-lg tracking-[0.3em] uppercase",style:{color:c.muted},children:E.subtitle}),i.jsx("div",{className:"w-12 h-px",style:{backgroundColor:c.accent}})]})]})]}),i.jsxs("div",{className:"absolute bottom-8 left-1/2 -translate-x-1/2 flex items-center gap-2",children:[i.jsx("div",{className:"w-6 h-px",style:{backgroundColor:c.accent}}),i.jsx("span",{className:"text-sm font-serif",style:{color:c.muted},children:A+1}),i.jsx("div",{className:"w-6 h-px",style:{backgroundColor:c.accent}})]})]},A)},S=(E,A)=>{switch(d){case"corporate":return x(E,A);case"tech":return w(E,A);case"creative":return y(E,A);
1133case"minimal":return b(E,A);case"nature":return k(E,A);case"luxury":return T(E,A);default:return x(E,A)}},j=(E,A)=>i.jsxs("button",{onClick:()=>l(A),className:it("flex-shrink-0 w-28 aspect-[16/9] rounded-lg overflow-hidden transition-all relative","border-2 hover:scale-105",o===A?"border-primary ring-2 ring-primary/30 shadow-lg":"border-transparent hover:border-primary/30"),children:[i.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center p-2",style:{backgroundColor:c.background},children:[i.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5",style:{background:`linear-gradient(90deg, ${c.primary}, ${c.secondary})`}}),i.jsx("span",{className:"text-[9px] font-semibold text-center line-clamp-2 leading-tight",style:{color:c.primary},children:E.title}),E.subtitle&&i.jsxs("span",{className:"text-[7px] mt-0.5 opacity-60",style:{color:c.text},children:[E.subtitle.substring(0,15),"..."]})]}),o===A&&i.jsx("div",{className:"absolute bottom-1 left-1/2 -translate-x-1/2 w-4 h-1 rounded-full bg-primary"})]},A);return i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-md",onClick:r}),i.jsxs("div",{className:"relative w-full max-w-5xl bg-background rounded-2xl shadow-2xl overflow-hidden animate-in zoom-in-95 duration-200",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border bg-muted/30",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",style:{backgroundColor:`${c.primary}20`},children:i.jsx(p,{className:"w-5 h-5",style:{color:c.primary}})}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold",children:e.name}),i.jsx("p",{className:"text-xs text-muted-foreground",children:e.description})]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("button",{onClick:()=>n(e.id),className:it("flex items-center gap-2 px-5 py-2.5 rounded-xl font-medium transition-all",s?"bg-primary text-primary-foreground shadow-lg shadow-primary/25":"bg-secondary hover:bg-secondary/80"),children:[s&&i.jsx(Fr,{className:"w-4 h-4"}),a(s?"pptTemplate.selected":"pptTemplate.useTemplate")]}),i.jsx("button",{onClick:r,className:"p-2.5 hover:bg-secondary rounded-xl transition-colors",children:i.jsx(cr,{className:"w-5 h-5"})})]})]}),i.jsxs("div",{className:"relative aspect-[16/9] bg-muted/50 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-4 rounded-xl shadow-2xl overflow-hidden",children:u.map((E,A)=>S(E,A))}),i.jsx("button",{onClick:h,className:"absolute left-2 top-1/2 -translate-y-1/2 p-3 bg-background/90 hover:bg-background rounded-full shadow-lg transition-all hover:scale-110 z-20",children:i.jsx(x1,{className:"w-5 h-5"})}),i.jsx("button",{onClick:m,className:"absolute right-2 top-1/2 -translate-y-1/2 p-3 bg-background/90 hover:bg-background rounded-full shadow-lg transition-all hover:scale-110 z-20",children:i.jsx(Gs,{className:"w-5 h-5"})})]}),i.jsx("div",{className:"flex items-center gap-3 p-4 overflow-x-auto bg-muted/20",children:u.map((E,A)=>j(E,A))})]})]})}const eY={report:_V,review:ZV,newsletter:VV,faq:OV},Gk={"general-report":{title:"2024 Annual Market Analysis Report",subtitle:"Market Research Division · January 2024",sectionContents:[{title:"Executive Summary",content:"This report provides a comprehensive analysis of market data, revealing key trends and opportunities in the industry. Research indicates that digital transformation has become the core driver of business growth, with the market projected to maintain an annual growth rate of over 25% in the next three years."},{title:"Background",content:"In an increasingly competitive global landscape, enterprise digital transformation has become an irreversible trend. This study is based on survey data from 500 companies, offering an in-depth analysis of the current market landscape and development dynamics."},{title:"Key Findings",content:"In terms of core business performance, we achieved a 32% year-over-year revenue increase and expanded market share to 28%. Product line coverage grew from 3 to 8 series, with total clients surpassing 10,000."},{title:"Data Analysis",content:"Through in-depth analysis of sales, operations, and financial data, the following key insights were derived: customer acquisition cost decreased by 15%, customer lifetime value increased by 40%, and the repurchase rate reached 68%."},{title:"Conclusions & Recommendations",content:"Based on the above analysis, we recommend three strategic priorities: 1) Increase R&D investment to maintain technological leadership; 2) Optimize the product mix to raise the share of high-margin products; 3) Expand into emerging markets to achieve diversified growth."}]},"literature-review":{title:"A Review of Artificial Intelligence Applications in Medical Diagnostics",subtitle:"M. Zhang, H. Li · Journal of Medical Informatics, Vol. 3, 2024",sectionContents:[{title:"Research Backgroun
1133d",content:"The rapid advancement of artificial intelligence has brought revolutionary changes to the field of medical diagnostics. This review aims to systematically examine the research progress in AI-assisted diagnostics over the past five years, providing a reference for future studies."},{title:"Literature Overview",content:"A total of 2,847 relevant articles were retrieved, of which 186 high-quality papers were selected for analysis. The research covers multiple technical areas including machine learning, deep learning, and natural language processing."},{title:"Thematic Analysis",content:"Existing research is concentrated in the following areas: medical image recognition (45%), pathological diagnosis (28%), clinical decision support (18%), and drug development (9%)."},{title:"Research Findings",content:"Studies show that AI-assisted diagnostics has reached expert-level performance in image recognition, with accuracy rates exceeding 95%. However, challenges remain in clinical decision support, including insufficient explainability and data privacy concerns."},{title:"References",content:`[1] Smith J, et al. Deep Learning in Medical Imaging. Nature Medicine, 2023. 1134[2] Wang W, et al. Advances in AI-Assisted Medical Diagnosis Systems. Lancet Digital Health, 2024. 1135[3] Johnson A, et al. AI-Assisted Clinical Decision Making. JAMA, 2023.`}]},newsletter:{title:"Tech Weekly",subtitle:"Issue 12, 2024 · No. 156",sectionContents:[{title:"Top Headlines",content:`⢠OpenAI launches GPT-5 with major multimodal improvements 1136⢠Apple announces comprehensive AI strategy upgrade 1137⢠First general-purpose AI research institute established 1138⢠EU AI Act officially takes effect`},{title:"In-Depth Report",content:"How is generative AI reshaping the content creation industry? A revolution from text to video is underway. This special feature examines the far-reaching impact of AIGC on media, advertising, and entertainment."},{title:"Industry Updates",content:`[Funding] AI healthcare company closes $70M Series B round 1139[Policy] New AI industry development guidelines released 1140[Market] Global AI chip market surpasses $50 billion 1141[Technology] Major breakthrough in quantum computing`},{title:"Data & Charts",content:"Global AI market size forecast: projected to reach $150 billion in 2024 and surpass $400 billion by 2027. The Asia-Pacific AI market leads global growth with an annual growth rate of 35%."},{title:"Coming Next Issue",content:"Next week: CES 2025 highlights, major product launch schedules, noteworthy innovations and startups to watch. Stay tuned!"}]},"faq-document":{title:"Product FAQ Guide",subtitle:"Version 2.0 · Updated January 2024",sectionContents:[{title:"General Questions",content:`Q: How do I create an account? 1142A: Click the "Sign Up" button in the top right corner, enter your email and password, then verify your email to complete registration. 1143 1144Q: What if I forget my password? 1145A: Click "Forgot Password" on the login page and follow the instructions to reset via your registered email.`},{title:"Categorized Q&A",content:`[Account] 1146Q: How do I change my linked phone number? 1147A: Go to Settings > Account Security > Phone to update your number. 1148 1149[Billing] 1150Q: What payment methods are supported? 1151A: We support credit cards, PayPal, Apple Pay, and various other payment methods.`},{title:"Getting Started",content:`Quick start in three steps: 11521. Complete your profile to receive personalized recommendations 11532. Explore the feature navigation to learn about core capabilities 11543. Try creating your first project to experience the full workflow 1155 1156For more tutorials, visit our Help Center.`},{title:"Contact Support",content:`Live Chat: Available 24/7 1157Phone Support: 1-800-888-8888 (Mon-Fri, 9 AM - 9 PM) 1158Email Support: [email protected] 1159Community Forum: forum.example.com`}]}};function tY({template:e,isOpen:t,onClose:r,onSelect:n,isSelected:s}){const{t:a}=We(),[o,l]=v.useState(0),u=v.useRef(null),c=v.useRef([]);if(v.useEffect(()=>{t&&l(0)},[t,e==null?void 0:e.id]),!t||!e)return null;const d=eY[e.icon]||Qr,h=Gk[e.id]||Gk["general-report"],m=p=>{l(p);const g=c.current[p];g&&u.current&&g.scrollIntoView({behavior:"smooth",block:"start"})},f=p=>e.id==="general-report"?i.jsx("div",{className:"space-y-8",children:h.sectionContents.map((g,x)=>i.jsxs("div",{ref:w=>p.current[x]=w,children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-blue-600 flex items-center justify-center text-sm font-bold text-white",children:x+1}),i.jsx("h2",{className:"text-lg font-semibold text-foreground",children:g.title})]}),i.jsx("div",{className:"pl-11",children:x===0?i.jsx("div",{className:"bg-blue-500/10 border-l-4 border-blue-500 p-4 rounded-r-lg",children:i.jsx("p",{className:"text-foreground leading-relaxed",children:g.content})}):i.jsx("p",{className:"text-muted-foreground leading-relaxed",children:g.content})})]},x))}):e.id==="literature-review"?i.jsx("div",{className:"space-y-8",children:h.sectionContents.map((g,x)=>i.jsxs("div",{ref:w=>p.current[x]=w,children:[i.jsxs("h2",{className:"text-lg font-semibold text-foreground mb-3 pb-2 border-b border-border",children:[x+1,". ",g.title]}),x===0||x===3?i.jsx("blockquote",{className:"border-l-4 border-border pl-4 italic text-muted-foreground bg-muted/50 py-3 pr-4 rounded-r",children:g.content}):x===h.sectionContents.length-1?i.jsx("div",{className:"text-sm text-muted-foreground space-y-1 font-mono",children:g.content.split(` 1160`).map((w,y)=>i.jsx("p",{children:w},y))}):i.jsx("p",{className:"text-muted-foreground leading-relaxed text-justify",children:g.content})]},x))}):e.id==="newsletter"?i.jsx("div",{className:"space-y-6",children:h.sectionContents.map((g,x)=>i.jsx("div",{ref:w=>p.current[x]=w,children:x===0?i.jsxs("div",{className:"bg-emerald-500/10 rounded-xl p-4",children:[i.jsxs("h2",{className:"text-lg font-bold text-emerald-700 dark:text-emerald-400 mb-3 flex items-center gap-2",children:[i.jsx("span",{className:"w-2 h-2 bg-emerald-500 rounded-full animate-pulse"}),g.title]}),i.jsx("div",{className:"space-y-2",children:g.content.split(` 1161`).map((w,y)=>i.jsx("p",{className:"text-emerald-700 dark:text-emerald-400",children:w},y))})]}):x===1?i.jsxs("div",{className:"bg-background border border-border rounded-xl p-5 shadow-sm",children:[i.jsx("span",{className:"text-xs font-medium text-emerald-600 bg-emerald-100 px-2 py-1 rounded",children:a("pdfPreviewModal.featuredReport")}),i.jsx("h2",{className:"text-xl font-bold text-foreground mt-3 mb-2",children:g.title}),i.jsx("p",{className:"text-muted-foreground leading-relaxed",children:g.content})]}):x===2?i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:g.title}),i.jsx("div",{className:"grid grid-cols-2 gap-3",children:g.content.split(` 1162`).map((w,y)=>i.jsx("div",{className:"bg-muted/50 rounded-lg p-3",children:i.jsx("p",{className:"text-sm text-muted-foreground",children:w})},y))})]}):i.jsxs("div",{className:"bg-muted/50 rounded-xl p-4",children:[i.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:g.title}),i.jsx("p",{className:"text-muted-foreground",children:g.content})]})},x))}):e.id==="faq-document"?i.jsx("div",{className:"space-y-8",children:h.sectionContents.map((g,x)=>i.jsxs("div",{ref:w=>p.current[x]=w,children:[i.jsx("h2",{className:"text-lg font-semibold text-foreground mb-4 pb-2 border-b border-orange-200",children:g.title}),i.jsx("div",{className:"space-y-4",children:g.content.split(` 1163 1164`).map((w,y)=>{const b=w.split(` 1165`);return i.jsx("div",{className:"space-y-2",children:b.map((k,T)=>k.startsWith("Q:")?i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("span",{className:"w-6 h-6 rounded-full bg-orange-500 flex items-center justify-center text-xs font-bold text-white flex-shrink-0",children:"Q"}),i.jsx("p",{className:"font-medium text-foreground",children:k.substring(2).trim()})]},T):k.startsWith("A:")?i.jsxs("div",{className:"flex items-start gap-3 ml-9",children:[i.jsx("span",{className:"w-5 h-5 rounded-full bg-muted flex items-center justify-center text-xs font-bold text-muted-foreground flex-shrink-0",children:"A"}),i.jsx("p",{className:"text-muted-foreground",children:k.substring(2).trim()})]},T):k.startsWith("[")&&k.includes("]")?i.jsx("p",{className:"font-medium text-orange-600 mt-4",children:k},T):k.match(/^\d\./)?i.jsx("p",{className:"text-muted-foreground ml-9",children:k},T):i.jsx("p",{className:"text-muted-foreground",children:k},T))},y)})})]},x))}):i.jsx("div",{className:"space-y-6",children:h.sectionContents.map((g,x)=>i.jsxs("div",{ref:w=>p.current[x]=w,children:[i.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:g.title}),i.jsx("p",{className:"text-muted-foreground leading-relaxed",children:g.content})]},x))});return i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-md",onClick:r}),i.jsxs("div",{className:"relative w-full max-w-5xl bg-background rounded-2xl shadow-2xl overflow-hidden animate-in zoom-in-95 duration-200",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border bg-muted/30",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:i.jsx(d,{className:"w-5 h-5 text-primary"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold",children:e.name}),i.jsx("p",{className:"text-xs text-muted-foreground",children:e.description})]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("button",{onClick:()=>n(e.id),className:it("flex items-center gap-2 px-5 py-2.5 rounded-xl font-medium transition-all",s?"bg-primary text-primary-foreground shadow-lg shadow-primary/25":"bg-secondary hover:bg-secondary/80"),children:[s&&i.jsx(Fr,{className:"w-4 h-4"}),a(s?"pdfPreviewModal.selected":"pdfPreviewModal.useTemplate")]}),i.jsx("button",{onClick:r,className:"p-2 hover:bg-secondary rounded-lg transition-colors",children:i.jsx(cr,{className:"w-5 h-5"})})]})]}),i.jsxs("div",{className:"flex h-[70vh]",children:[i.jsxs("div",{className:"w-64 border-r border-border bg-muted/20 p-4 overflow-y-auto",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4 pb-3 border-b border-border",children:[i.jsx($V,{className:"w-4 h-4 text-primary"}),i.jsx("span",{className:"text-sm font-medium",children:a("pdfPreviewModal.docStructure")})]}),i.jsx("div",{className:"space-y-2",children:e.sections.map((p,g)=>i.jsxs("div",{onClick:()=>m(g),className:it("flex items-center gap-3 p-3 rounded-lg transition-all cursor-pointer",o===g?"bg-primary/10":"hover:bg-background"),children:[i.jsx("div",{className:it("w-6 h-6 rounded-full flex items-center justify-center text-xs font-medium",o===g?"bg-primary text-white":"bg-muted text-muted-foreground"),children:g+1}),i.jsx("span",{className:it("text-sm",o===g?"font-medium":"text-muted-foreground"),children:p})]},g))})]}),i.jsx("div",{ref:u,className:"flex-1 bg-muted overflow-y-auto p-8",children:i.jsx("div",{className:"max-w-2xl mx-auto bg-background rounded-lg shadow-2xl overflow-hidden",children:i.jsxs("div",{className:"p-8",children:[i.jsxs("div",{className:"text-center mb-8 pb-6 border-b border-border",children:[i.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1 rounded-full text-xs font-medium mb-4 bg-muted text-muted-foreground",children:[i.jsx(Qr,{className:"w-3 h-3"}),e.name]}),i.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:h.title}),i.jsx("p",{className:"text-sm text-muted-foreground",children:h.subtitle})]}),f(c),i.jsxs("div",{className:"mt-12 pt-6 border-t border-border flex items-center justify-between text-xs text-muted-foreground
1165/60",children:[i.jsx("span",{children:a("pdfPreviewModal.aiGenerated")}),i.jsx("span",{children:a("pdfPreviewModal.pageNumber")})]})]})})})]}),i.jsx("div",{className:"p-4 bg-muted/20 border-t border-border",children:i.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[i.jsx(fr,{className:"w-4 h-4"}),i.jsx("span",{children:a("pdfPreviewModal.hint")})]})})]})]})}const Kk={"corporate-minimal":{pages:[{name:"Home",path:"/",sections:["Hero","Services","Key Metrics","Contact Us"]},{name:"Services",path:"/services",sections:["Service List","Case Studies"]},{name:"About",path:"/about",sections:["Company Overview","Team Members","Milestones"]},{name:"Contact",path:"/contact",sections:["Contact Form","Map"]}],hero:{title:"Innovative Tech, Shaping the Future",subtitle:"We are a technology-driven company delivering world-class digital solutions for enterprises"},features:{title:"Our Services",items:["Tech Development","Design Services","Digital Marketing","Security Consulting"]}},"saas-startup":{pages:[{name:"Home",path:"/",sections:["Hero","Features","How It Works","Testimonials","CTA"]},{name:"Features",path:"/features",sections:["All Features","Comparison Table"]},{name:"Pricing",path:"/pricing",sections:["Plan Comparison","FAQ"]}],hero:{title:"Unleash Your Writing Potential with AI",subtitle:"An intelligent writing assistant that makes creation faster and better"},features:{title:"Powerful Features",items:["AI-Powered Generation","Lightning Fast","Multi-Language Support","Secure & Reliable"]}},"ecommerce-handcraft":{pages:[{name:"Home",path:"/",sections:["Hero Banner","Featured Products","Brand Story"]},{name:"Products",path:"/products",sections:["Product Filters","Product Grid"]},{name:"About",path:"/about",sections:["Brand Story","Craftsmanship"]},{name:"Contact",path:"/contact",sections:["Contact Info","Store Locations"]}],hero:{title:"Handcrafted, One of a Kind",subtitle:"Every piece is a labor of love, carrying forward a century-old tradition of fine leatherwork"},features:{title:"Featured Products",items:["Vintage Leather Wallet","Handmade Belt","Leather Card Holder","Crossbody Bag"]}},"portfolio-designer":{pages:[{name:"Work",path:"/",sections:["Hero","Featured Projects"]},{name:"About",path:"/about",sections:["Bio","Skills","Experience"]},{name:"Contact",path:"/contact",sections:["Contact Info","Social Links"]}],hero:{title:"Alex Chen",subtitle:"UI/UX Designer based in Shanghai. I create digital experiences that matter."},features:{title:"Featured Work",items:["App Redesign","Brand Identity","Dashboard UI","E-commerce"]}}};function rY({template:e,isOpen:t,onClose:r,onSelect:n,isSelected:s}){const{t:a}=We(),[o,l]=v.useState(0),[u,c]=v.useState("desktop");if(!t||!e)return null;const d=Kk[e.id]||Kk["corporate-minimal"],h=e.colors,m=()=>{switch(u){case"mobile":return"w-[375px]";case"tablet":return"w-[768px]";default:return"w-full max-w-4xl"}},f=()=>{const p=d.pages[o];return i.jsxs("div",{className:it("mx-auto bg-background rounded-lg shadow-2xl overflow-hidden transition-all duration-300",m()),style:{minHeight:"500px"},children:[i.jsxs("div",{className:"bg-muted border-b border-border px-4 py-2 flex items-center gap-2",children:[i.jsxs("div",{className:"flex gap-1.5",children:[i.jsx("div",{className:"w-3 h-3 rounded-full bg-red-400"}),i.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-400"}),i.jsx("div",{className:"w-3 h-3 rounded-full bg-green-400"})]}),i.jsx("div",{className:"flex-1 flex justify-center",children:i.jsxs("div",{className:"bg-background rounded-md px-4 py-1 text-xs text-muted-foreground flex items-center gap-2 border border-border",children:[i.jsx(Tn,{className:"w-3 h-3"}),"www.",e.mockContent.brandName.toLowerCase().replace(/\s/g,""),".com",p.path]})})]}),i.jsxs("div",{className:"overflow-y-auto",style:{maxHeight:"calc(70vh - 200px)"},children:[i.jsxs("header",{className:"sticky top-0 z-10 px-6 py-4 flex items-center justify-between border-b",style:{backgroundColor:h.background,borderColor:`${h.primary}10`},children:[i.jsx("div",{className:"font-bold",style:{color:h.primary},children:e.mockContent.brandName}),i.jsxs("nav",{className:"flex items-center gap-6",children:[d.pages.map((g,x)=>i.jsx("button",{onClick:()=>l(x),className:it("text-sm transition-colors",x===o?"font-medium":"opacity-60 hover:opacity-100"),style:{color:h.text},children:g.name},x)),e.category==="saas"&&i.jsx("button",{className:"text-sm px-4 py-1.5 rounded-lg",style:{backgroundColor:h.primary,color:h.background},children:a("websitePreviewModal.tryForFree")})]})]}),i.jsxs("section",{className:"py-20 px-6 text-center",style:{backgroundColor:h.background},children:[i.jsx("h1",{className:it("font-bold mb-4",u==="mobile"?"text-2xl":"text-4xl md:text-5xl"),style:{color:h.text},children:d.hero.title}),i.jsx("p",{className:it("max-w-2xl mx-auto mb-8",u==="mobile"?"text-sm":"text-lg"),style:{color:`${h.text}99`},children:d.hero.subtitle}),i.jsxs("div",{className:"flex justify-center gap-4",children:[i.jsx("button",{className:"px-6 py-3 rounded-lg font-medium",style:{backgroundColor:h.primary,color:h.background},children:e.category==="saas"?a("websitePreviewModal.tryForFree"):a("websitePreviewModal.learnMore")}),i.jsx("button",{className:"px-6 py-3 rounded-lg font-medium border-2",style:{borderColor:h.primary,color:h.primary},children:e.category==="ecommerce"?a("websitePreviewModal.browseProducts"):a("websitePreviewModal.contactUs")})]})]}),i.jsxs("section",{className:"py-16 px-6",style:{backgroundColor:`${h.secondary}10`},children:[i.jsx("h2",{className:"text-2xl font-bold text-center mb-10",style:{color:h.text},children:d.features.title}),i.jsx("div",{className:it("grid gap-6 max-w-4xl mx-auto",u==="mobile"?"grid-cols-1":"grid-cols-2 md:grid-cols-4"),children:d.features.items.map((g,x)=>i.jsxs("div",{className:"p-6 rounded-xl text-center",style:{backgroundColor:h.background},children:[i.jsx("div",{className:"w-12 h-12 rounded-lg mx-auto mb-4 flex items-center justify-center",style:{backgroundColor:`${h.primary}15`},children:i.jsx("div",{className:"w-6 h-6 rounded",style:{backgroundColor:h.primary}})}),i.jsx("h3",{className:"font-medium mb-2",style:{color:h.text},children:g}),i.jsx("p",{className:"text-sm",style:{color:`${h.text}80`},children:a("websitePreviewModal.featureDesc",{item:g})})]},x))})]}),i.jsx("footer",{className:"py-8 px-6 text-center",style:{backgroundColor:h.primary},children:i.jsxs("p",{className:"text-sm",style:{color:`${h.background}cc`},children:["© 2024 ",e.mockContent.brandName,". All rights reserved."]})})]})]})};return i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-md",onClick:r}),i.jsxs("div",{className:"relative w-full max-w-6xl bg-background rounded-2xl shadow-2xl overflow-hidden animate-in zoom-in-95 duration-200",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border bg-muted/30",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",style:{backgroundColor:`${h.primary}15`},children:i.jsx(Tn,{className:"w-5 h-5",style:{color:h.primary}})}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold",children:e.nameZh}),i.jsx("p",{className:"text-xs text-muted-foreground",children:e.description})]}),i.jsx("div",{className:"flex gap-1.5 ml-4",children:e.tags.map(p=>i.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-secondary/60 text-muted-foreground",children:p},p))})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{className:"flex items-center gap-1 bg-secondary/50 rounded-lg p-1",children:[i.jsx("button",{onClick:()=>c("desktop"),className:it("p-2 rounded-md transition-colors",u==="desktop"?"bg-background shadow-sm":"hover:bg-background/50"),children:i.jsx(v1,{className:"w-4 h-4"})}),i.jsx("button",{onClick:()=>c("tablet"),className:it("p-2 rounded-md transition-colors",u==="tablet"?"bg-background shadow-sm":"hover:bg-background/50"),children:i.jsx(fG,{className:"w-4 h-4"})}),i.jsx("button",{onClick:()=>c("mobile"),className:it("p-2 rounded-md transition-colors",u==="mobile"?"bg-background shadow-sm":"hover:bg-background/50"),children:i.jsx(cG,{className:"w-4 h-4"})})]}),i.jsxs("button",{onClick:()=>n(e.id),className:it("flex items-center gap-2 px-5 py-2.5 rounded-xl font-medium transition-all",s?"bg-primary text-primary-foreground shadow-lg shadow-primary/25":"bg-secondary hover:bg-secondary/80"),children:[s&&i.jsx(Fr,{className:"w-4 h-4"}),a(s?"websitePreviewModal.selected":"websitePreviewModal.useTemplate")]}),i.jsx("button",{onClick:r,className:"p-2 hover:bg-secondary rounded-lg transition-colors",children:i.jsx(cr,{className:"w-5 h-5"})})]})]}),i.jsxs("div",{className:"flex h-[70vh]",children:[i.jsxs("div",{className:"w-64 border-r border-border bg-muted/20 p-4 overflow-y-auto",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4 pb-3 border-b border-border",children:[i.jsx(Tn,{className:"w-4 h-4 text-primary"}),i.jsx("span",{className:"text-sm font-medium",children:a("websitePreviewModal.siteStructure")})]}),i.jsx("div",{className:"space-y-2",children:d.pages.map((p,g)=>i.jsxs("div",{children:[i.jsxs("div",{onClick:()=>l(g),className:it("flex items-center gap-3 p-3 rounded-lg transition-all cursor-pointer",o===g?"bg-primary/10":"hover:bg-background"),children:[i.jsx("div",{className:it("w-6 h-6 rounded-full flex items-center justify-center text-xs font-medium",o===g?"bg-primary text-white":"bg-muted text-muted-foreground"),children:g+1}),i.jsx("span",{className:it("text-sm",o===g?"font-medium":"text-muted-foreground"),children:p.name})]}
1165),o===g&&i.jsx("div",{className:"ml-9 mt-1 space-y-1",children:p.sections.map((x,w)=>i.jsxs("div",{className:"text-xs text-muted-foreground py-1 px-2 rounded hover:bg-background/50",children:["⢠",x]},w))})]},g))}),i.jsxs("div",{className:"mt-6 pt-4 border-t border-border",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:a("websitePreviewModal.colorScheme")}),i.jsxs("div",{className:"flex gap-2 mt-2",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg shadow-sm",style:{backgroundColor:h.primary},title:a("websitePreviewModal.primaryColor")}),i.jsx("div",{className:"w-8 h-8 rounded-lg shadow-sm",style:{backgroundColor:h.secondary},title:a("websitePreviewModal.secondaryColor")}),i.jsx("div",{className:"w-8 h-8 rounded-lg shadow-sm border",style:{backgroundColor:h.background},title:a("websitePreviewModal.bgColor")}),i.jsx("div",{className:"w-8 h-8 rounded-lg shadow-sm",style:{backgroundColor:h.text},title:a("websitePreviewModal.textColor")})]})]})]}),i.jsx("div",{className:"flex-1 bg-muted overflow-y-auto p-8 flex items-start justify-center",children:f()})]}),i.jsx("div",{className:"p-4 bg-muted/20 border-t border-border",children:i.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[i.jsx(ig,{className:"w-4 h-4"}),i.jsx("span",{children:a("websitePreviewModal.hint")})]})})]})]})}const Yk=[{id:"sales-data",name:"Sales Data",description:"For sales performance, financial data, inventory statistics, etc.",descriptionKey:"tableTemplate.descriptions.salesData",icon:"statistics",category:"data",columns:[{key:"product",title:"Product",type:"string"},{key:"category",title:"Category",type:"string"},{key:"sales",title:"Revenue",type:"number"},{key:"quantity",title:"Units Sold",type:"number"},{key:"growth",title:"YoY Growth",type:"number"}],sampleRows:[{product:"iPhone 15 Pro",category:"Phones",sales:128500,quantity:450,growth:15.2},{product:"MacBook Pro",category:"Laptops",sales:256e3,quantity:180,growth:8.5},{product:"AirPods Pro",category:"Accessories",sales:45800,quantity:620,growth:22.3},{product:"iPad Air",category:"Tablets",sales:89600,quantity:280,growth:-3.2},{product:"Apple Watch",category:"Wearables",sales:67200,quantity:380,growth:18.7}],colors:{primary:"#3b82f6",headerBg:"#1e40af",headerText:"#ffffff",rowAlt:"#eff6ff"}},{id:"project-tracker",name:"Project Tracker",description:"For project management, task tracking, milestones, etc.",descriptionKey:"tableTemplate.descriptions.projectTracker",icon:"project",category:"project",columns:[{key:"task",title:"Task",type:"string"},{key:"owner",title:"Owner",type:"string"},{key:"startDate",title:"Start Date",type:"date"},{key:"endDate",title:"Due Date",type:"date"},{key:"progress",title:"Progress",type:"progress"},{key:"status",title:"Status",type:"status"}],sampleRows:[{task:"Requirements Analysis",owner:"Alice",startDate:"2024-01-01",endDate:"2024-01-15",progress:100,status:"Completed"},{task:"UI Design",owner:"Bob",startDate:"2024-01-10",endDate:"2024-01-25",progress:80,status:"In Progress"},{task:"Frontend Dev",owner:"Charlie",startDate:"2024-01-20",endDate:"2024-02-15",progress:45,status:"In Progress"},{task:"Backend Dev",owner:"Diana",startDate:"2024-01-20",endDate:"2024-02-20",progress:30,status:"In Progress"},{task:"QA & Acceptance",owner:"Eve",startDate:"2024-02-15",endDate:"2024-02-28",progress:0,status:"Not Started"}],colors:{primary:"#8b5cf6",headerBg:"#6d28d9",headerText:"#ffffff",rowAlt:"#f5f3ff"}},{id:"employee-list",name:"Employee Directory",description:"For employee rosters, client info, contact management, etc.",descriptionKey:"tableTemplate.descriptions.employeeList",icon:"personnel",category:"hr",columns:[{key:"name",title:"Name",type:"string"},{key:"department",title:"Department",type:"string"},{key:"position",title:"Position",type:"string"},{key:"phone",title:"Phone",type:"string"},{key:"email",title:"Email",type:"string"},{key:"joinDate",title:"Join Date",type:"date"}],sampleRows:[{name:"Alice Zhang",department:"Engineering",position:"Senior Engineer",phone:"(555) 123-4567",email:"[email protected]",joinDate:"2020-03-15"},{name:"Bob Li",department:"Product",position:"Product Manager",phone:"(555) 234-5678",email:"[email protected]",joinDate:"2019-07-20"},{name:"Charlie Wang",department:"Design",position:"UI Designer",phone:"(555) 345-6789",email:"[email protected]",joinDate:"2021-01-10"},{name:"Diana Zhao",department:"Marketing",position:"Marketing Director",phone:"(555) 456-7890",email:"[email protected]",joinDate:"2018-05-08"},{name:"Eve Chen",department:"HR",position:"HR Specialist",phone:"(555) 567-8901",email:"[email protected]",joinDate:"2022-09-01"}],colors:{primary:"#10b981",headerBg:"#059669",headerText:"#ffffff",rowAlt:"#ecfdf5"}},{id:"comparison-table",name:"Comparison Table",description:"For product comparisons, plan evaluations, feature matrices, etc.",descriptionKey:"tableTemplate.descriptions.comparisonTable",icon:"comparison",category:"analysis",columns:[{key:"feature",title:"Feature",type:"string"},{key:"planA",title:"Basic",type:"string"},{key:"planB",title:"Pro",type:"string"},{key:"planC",title:"Enterprise",type:"string"}],sampleRows:[{feature:"Users",planA:"1",planB:"10",planC:"Unlimited"},{feature:"Storage",planA:"5GB",planB:"100GB",planC:"1TB"},{feature:"API Calls",planA:"1,000/mo",planB:"50,000/mo",planC:"Unlimited"},{feature:"Support",planA:"Email",planB:"Live Chat",planC:"Dedicated Rep"},{feature:"Data Export",planA:"â",planB:"â",planC:"â"},{feature:"Custom Domain",planA:"â",planB:"â",planC:"â"}
1165],colors:{primary:"#f59e0b",headerBg:"#d97706",headerText:"#ffffff",rowAlt:"#fffbeb"}},{id:"checklist",name:"Checklist",description:"For to-do items, inspection checklists, approval workflows, etc.",descriptionKey:"tableTemplate.descriptions.checklist",icon:"checklist",category:"project",columns:[{key:"item",title:"Check Item",type:"string"},{key:"category",title:"Category",type:"string"},{key:"responsible",title:"Owner",type:"string"},{key:"status",title:"Status",type:"status"},{key:"notes",title:"Notes",type:"string"}],sampleRows:[{item:"Server Configuration Check",category:"Infrastructure",responsible:"Ops Team",status:"Completed",notes:"Passed"},{item:"Security Vulnerability Scan",category:"Security",responsible:"Security Team",status:"Completed",notes:"No critical issues"},{item:"Code Review",category:"Development",responsible:"Dev Team",status:"In Progress",notes:"Under review"},{item:"Performance Testing",category:"QA",responsible:"QA Team",status:"Not Started",notes:"Pending schedule"},{item:"Documentation Update",category:"Docs",responsible:"Product Team",status:"In Progress",notes:"50% complete"}],colors:{primary:"#ef4444",headerBg:"#dc2626",headerText:"#ffffff",rowAlt:"#fef2f2"}},{id:"schedule",name:"Schedule",description:"For meeting agendas, timetables, event planning, etc.",descriptionKey:"tableTemplate.descriptions.schedule",icon:"schedule",category:"project",columns:[{key:"time",title:"Time",type:"string"},{key:"event",title:"Event / Meeting",type:"string"},{key:"location",title:"Location",type:"string"},{key:"participants",title:"Participants",type:"string"},{key:"notes",title:"Notes",type:"string"}],sampleRows:[{time:"09:00-09:30",event:"Daily Standup",location:"Room A",participants:"All Team",notes:"Weekly status update"},{time:"10:00-11:30",event:"Product Review",location:"Room B",participants:"Product/Eng/Design",notes:"V2.0 feature review"},{time:"14:00-15:00",event:"Client Meeting",location:"Client Office",participants:"Sales/Tech",notes:"Bring demo equipment"},{time:"15:30-16:30",event:"Tech Talk",location:"Training Room",participants:"Engineering",notes:"AI technology session"},{time:"17:00-18:00",event:"Weekly Recap",location:"Virtual",participants:"Leadership",notes:"Prepare weekly report"}],colors:{primary:"#06b6d4",headerBg:"#0891b2",headerText:"#ffffff",rowAlt:"#ecfeff"}}],nY=["all","data","project","hr","analysis"],sY={statistics:ng,project:xh,personnel:E1,comparison:jV,checklist:wV,schedule:xh};function aY({template:e,isOpen:t,onClose:r,onSelect:n,isSelected:s}){const{t:a}=We(),o=v.useRef(null);if(!t||!e)return null;const l=sY[e.icon]||d2,u=(m,f)=>f==="number"&&typeof m=="number"?m>=1e4?`$${(m/1e3).toFixed(1)}K`:String(m).includes(".")&&Math.abs(m)<100?`${m>0?"+":""}${m}%`:m.toLocaleString():m,c=m=>{const f={Completed:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400","In Progress":"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400","Not Started":"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400"};return i.jsx("span",{className:it("px-2 py-0.5 rounded-full text-xs font-medium",f[m]||f["Not Started"]),children:m})},d=m=>{const f=m>=80?"bg-green-500":m>=50?"bg-blue-500":m>0?"bg-yellow-500":"bg-gray-300";return i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"flex-1 h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",children:i.jsx("div",{className:it("h-full rounded-full transition-all",f),style:{width:`${m}%`}})}),i.jsxs("span",{className:"text-xs text-muted-foreground w-10 text-right",children:[m,"%"]})]})},h=(m,f)=>{if(f.type==="status")return c(String(m));if(f.type==="progress")return d(Number(m));if(f.type==="number"){const p=u(m,f.type);if(String(m).includes(".")&&Math.abs(Number(m))<100){const g=Number(m)>0;return i.jsx("span",{className:g?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400",children:p})}return i.jsx("span",{className:"font-medium",children:p})}return m};return i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[i.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-md",onClick:r}),i.jsxs("div",{className:"relative w-full max-w-5xl bg-background rounded-2xl shadow-2xl overflow-hidden animate-in zoom-in-95 duration-200",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border bg-muted/30",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",style:{backgroundColor:`${e.colors.primary}20`},children:i.jsx(l,{className:"w-5 h-5",style:{color:e.colors.primary}})}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold",children:e.name}),i.jsx("p",{className:"text-xs text-muted-foreground",children:a(e.descriptionKey)})]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("button",{onClick:()=>n(e.id),className:it("flex items-center gap-2 px-5 py-2.5 rounded-xl font-medium transition-all",s?"bg-primary text-primary-foreground shadow-lg shadow-primary/25":"bg-secondary hover:bg-secondary/80"),children:[s&&i.jsx(Fr,{className:"w-4 h-4"}),a(s?"tableTemplate.selected":"tableTemplate.useTemplate")]}),i.jsx("button",{onClick:r,className:"p-2 hover:bg-secondary rounded-lg transition-colors",children:i.jsx(cr,{className:"w-5 h-5"})})]})]}),i.jsx("div",{className:"h-[70vh]",children:i.jsx("div",{ref:o,className:"h-full bg-muted overflow-auto p-8",children:i.jsxs("div",{className:"bg-background rounded-lg shadow-2xl overflow-hidden",children:[i.jsxs("div",{className:"p-4 border-b border-border",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(d2,{className:"w-5 h-5",style:{color:e.colors.primary}}),i.jsx("h3",{className:"text-lg font-semibold",children:e.name})]}),i.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a(e.descriptionKey)})]}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{children:i.jsx("tr",{style:{backgroundColor:e.colors.headerBg},children:e.columns.map((m,f)=>i.jsx("th",{className:"px-4 py-3 text-left text-sm font-semibold whitespace-nowrap",style:{color:e.colors.headerText},children:m.title},f))})}),i.jsx("tbody",{children:e.sampleRows.map((m,f)=>i.jsx("tr",{className:"border-b border-border last:border-b-0 hover:bg-muted/50 transition-colors",style:{backgroundColor:f%2===1?e.colors.rowAlt:"transparent"},children:e.columns.map((p,g)=>i.jsx("td",{className:"px-4 py-3 text-sm whitespace-nowrap",children:h(m[p.key],p)},g))},f))})]})}),i.jsxs("div",{className:"p-4 bg-muted/30 border-t border-border flex items-center justify-between text-xs text-muted-foreground",children:[i.jsx("span",{children:a("tableTemplate.rowCount",{count:e.sampleRows.length})}),i.jsx("span",{children:a("tableTemplate.aiGenerated")})]})]})})}),i.jsx("div",{className:"p-4 bg-muted/20 border-t border-border",children:i.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[i.jsx(fr,{className:"w-4 h-4"}),i.jsx("span",{children:a("tableTemplate.hint")})]})})]})]})}const iY=["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel","text/plain","text/markdown","text/csv","application/json","text/html","text/css","text/javascript","application/javascript","application/typescript","text/x-python","text/x-java","application/xml","text/xml","application/x-yaml","text/yaml"],fj=[".pdf",".doc",".docx",".xls",".xlsx",".csv",".txt",".md",".json",".js",".ts",".jsx",".tsx",".py",".java",".c",".cpp",".h",".hpp",".go",".rs",".rb",".php",".swift",".kt",".scala",".cs",".vb",".html",".htm",".css",".scss",".sass",".less",".xml",".yaml",".yml",".toml",".ini",".conf",".cfg",".sh",".bash",".zsh",".ps1",".bat",".cmd",".sql",".graphql",".prisma",".vue",".svelte",".astro"],oY=20*1024*1024,qd=20;function lY(e){var r;if(iY.includes(e.type))return!0;
1165const t="."+((r=e.name.split(".").pop())==null?void 0:r.toLowerCase());return fj.includes(t)}function cY(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}function uY(e,t){var n;if(e.includes("pdf")||e.includes("word"))return i.jsx(Qr,{className:"w-4 h-4"});if(e.includes("sheet")||e.includes("excel")||e.includes("csv"))return i.jsx(t3,{className:"w-4 h-4"});if(e.startsWith("image/"))return i.jsx(m9,{className:"w-4 h-4"});const r=[".js",".ts",".jsx",".tsx",".py",".java",".c",".cpp",".go",".rs",".html",".css",".vue",".json",".xml",".yaml",".yml",".sh",".sql"];if(t){const s="."+((n=t.split(".").pop())==null?void 0:n.toLowerCase());if(r.includes(s))return i.jsx(h9,{className:"w-4 h-4"})}return i.jsx(f9,{className:"w-4 h-4"})}const v2=[{id:"general-report",name:"general-report",description:"general-report",icon:"report",sections:["Summary","Background","Main Content","Data Analysis","Conclusions & Recommendations"]},{id:"literature-review",name:"literature-review",description:"literature-review",icon:"review",sections:["Research Background","Literature Overview","Thematic Analysis","Findings","References"]},{id:"newsletter",name:"newsletter",description:"newsletter",icon:"newsletter",sections:["News Brief","In-Depth Report","Industry Trends","Data & Charts","Upcoming"]},{id:"faq-document",name:"faq-document",description:"faq-document",icon:"faq",sections:["FAQ","Categorized Q&A","User Guide","Contact Support"]}],Qk=[{id:"corporate-minimal",name:"Minimal Corporate",nameZh:"æç®ä¼ä¸ç«",description:"Professional corporate website for tech companies and consultancies",category:"corporate",colors:{primary:"#18181b",secondary:"#71717a",background:"#ffffff",text:"#18181b"},mockContent:{brandName:"TechCorp",tagline:"Innovative Technology, Shaping the Future"},tags:["Minimal","Professional","Tech"]},{id:"saas-startup",name:"SaaS Startup",nameZh:"SaaS åä¸",description:"Modern template for SaaS products and tool websites",category:"saas",colors:{primary:"#3b82f6",secondary:"#10b981",background:"#ffffff",text:"#1e293b"},mockContent:{brandName:"WriteAI",tagline:"Writing Made Simple"},tags:["Modern","SaaS","Tech"]},{id:"ecommerce-handcraft",name:"Handcraft Store",nameZh:"æå·¥èºååº",description:"Artsy e-commerce template for handcrafted goods and designer brands",category:"ecommerce",colors:{primary:"#92400e",secondary:"#d97706",background:"#fffbeb",text:"#451a03"},mockContent:{brandName:"Artisan Leather",tagline:"Handcrafted, One of a Kind"},tags:["Artsy","Vintage","Handcraft"]},{id:"portfolio-designer",name:"Designer Portfolio",nameZh:"设计å¸ä½åé",description:"Minimalist portfolio template for UI/UX designers and creatives",category:"portfolio",colors:{primary:"#000000",secondary:"#666666",background:"#ffffff",text:"#000000"},mockContent:{brandName:"Alex Chen",tagline:"UI/UX Designer"},tags:["Minimal","Creative","Designer"]}],dY=["all","corporate","saas","ecommerce","portfolio"],hY=["all","business","tech","creative","simple"],mY={presentation:bl,pdf:Qr,website:Tn,spreadsheet:d2,app:bl,design:bl,document:bl,data:bl,search:bl};function Xk({toolType:e,onSubmit:t,onBack:r,sendDisabled:n,onSendDisabledClick:s,hideTitle:a}){var be;const{t:o,i18n:l}=We(),u=(be=l.language)==null?void 0:be.startsWith("zh"),[c,d]=v.useState(""),[h,m]=v.useState(null),[f,p]=v.useState(null),[g,x]=v.useState(null),[w,y]=v.useState(null),[b,k]=v.useState("all"),[T,S]=v.useState("all"),[j,E]=v.useState("all"),[A,R]=v.useState(null),[M,B]=v.useState(null),[W,H]=v.useState(null),[L,$]=v.useState(null),[ee,G]=v.useState([]),[Q,D]=v.useState(!1),[K,V]=v.useState(null),C=v.useRef(null),O=v.useRef(null),q=v.useRef(!1),ne=mY[e],he=o(`toolConfig.toolLabels.${e}`),xe=u3(),Oe=b==="all"?y2:y2.filter(ie=>ie.category===b),Se=T==="all"?Qk:Qk.filter(ie=>ie.category===T),we=j==="all"?Yk:Yk.filter(ie=>ie.category===j),Be=e==="pdf"?o("toolConfig.pdfExamples",{returnObjects:!0}):e==="website"?o("toolConfig.websiteExamples",{returnObjects:!0}):e==="spreadsheet"?o("tableTemplate.examplePrompts",{returnObjects:!0}):o("toolConfig.pptExamples",{returnObjects:!0});v.useEffect(()=>{var ie;
1165(ie=C.current)==null||ie.focus()},[]);const ve=()=>{if(!c.trim())return;let ie=null;e==="pdf"?ie=f:e==="website"?ie=g:e==="spreadsheet"?ie=w:ie=h;const De={toolType:e,...ie?{templateId:ie}:{}};t(c.trim(),De,ee.length>0?ee:void 0)},Ye=ie=>{q.current||ie.key==="Enter"&&!ie.shiftKey&&(ie.preventDefault(),ve())},Ae=()=>{const ie=C.current;ie&&(ie.style.height="auto",ie.style.height=`${Math.min(ie.scrollHeight,120)}px`)},Ee=ie=>{var De;d(ie),(De=C.current)==null||De.focus()},Ce=async ie=>{const De=ie.target.files;if(!De||De.length===0)return;V(null);const F=ee.length,se=De.length;if(F+se>qd){V(o("toolConfig.maxFileCountError",{max:qd,current:F})),O.current&&(O.current.value="");return}D(!0);try{const ue=[],je=[];for(const Ge of Array.from(De)){if(!lY(Ge)){je.push(o("toolConfig.unsupportedFileType",{name:Ge.name}));continue}if(Ge.size>oY){je.push(o("toolConfig.fileTooLarge",{name:Ge.name}));continue}const mt=await P9.upload(Ge);ue.push(mt)}je.length>0&&V(je.join("ï¼")),G(Ge=>[...Ge,...ue])}catch(ue){console.error("Upload failed:",ue),V(o("toolConfig.uploadFailed"))}finally{D(!1),O.current&&(O.current.value="")}},X=ie=>{G(De=>De.filter(F=>F.id!==ie))},pe=()=>{var ie;(ie=O.current)==null||ie.click()},_e=ie=>{var ue;const De=ie.slides[0],F=ie.colors,se=ie.style;return se==="corporate"?i.jsxs("div",{className:"aspect-[16/9] rounded-lg overflow-hidden relative",style:{backgroundColor:F.background},children:[i.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-3",style:{backgroundColor:F.primary}}),i.jsxs("div",{className:"absolute left-3 right-0 top-0 bottom-0 p-2 pl-3",children:[i.jsx("div",{className:"w-4 h-0.5 mb-2",style:{backgroundColor:F.secondary}}),i.jsx("h3",{className:"text-[10px] font-bold leading-tight",style:{color:F.text},children:De.title}),i.jsx("p",{className:"text-[8px] mt-0.5 opacity-60",style:{color:F.muted},children:De.subtitle})]})]}):se==="tech"?i.jsxs("div",{className:"aspect-[16/9] rounded-lg overflow-hidden relative",style:{backgroundColor:F.background},children:[i.jsx("div",{className:"absolute inset-0 opacity-20",style:{backgroundImage:`linear-gradient(${F.primary}40 1px, transparent 1px), linear-gradient(90deg, ${F.primary}40 1px, transparent 1px)`,backgroundSize:"8px 8px"}}),i.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5",style:{background:`linear-gradient(90deg, transparent, ${F.secondary}, ${F.primary}, transparent)`}}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5",style:{background:`linear-gradient(90deg, transparent, ${F.primary}, ${F.secondary}, transparent)`}}),i.jsxs("div",{className:"relative h-full flex flex-col items-center justify-center p-2 text-center",children:[i.jsx("h3",{className:"text-[10px] font-bold",style:{color:F.text,textShadow:`0 0 10px ${F.primary}60`},children:De.title}),i.jsx("p",{className:"text-[7px] mt-0.5 tracking-widest uppercase",style:{color:F.secondary},children:De.subtitle})]})]}):se==="creative"?i.jsxs("div",{className:"aspect-[16/9] rounded-lg overflow-hidden relative",style:{backgroundColor:F.background},children:[i.jsx("div",{className:"absolute -top-4 -right-4 w-12 h-12 rounded-full opacity-30 blur-xl",style:{background:`linear-gradient(135deg, ${F.primary}, ${F.secondary})`}}),i.jsxs("div",{className:"relative h-full flex flex-col items-center justify-center p-2 text-center",children:[i.jsx("div",{className:"px-2 py-1 rounded-full mb-1",style:{background:`linear-gradient(135deg, ${F.primary}20, ${F.secondary}20)`},children:i.jsx("h3",{className:"text-[10px] font-black bg-clip-text text-transparent",style:{backgroundImage:`linear-gradient(135deg, ${F.primary}, ${F.secondary})`},children:De.title})}),i.jsx("p",{className:"text-[7px] opacity-60",style:{color:F.muted},children:De.subtitle})]})]}):se==="minimal"?i.jsxs("div",{className:"aspect-[16/9] rounded-lg overflow-hidden relative",style:{backgroundColor:F.background},children:[i.jsx("div",{className:"absolute top-2 left-2 right-2 h-px",style:{backgroundColor:`${F.text}10`}}),i.jsx("div",{className:"absolute bottom-2 left-2 right-2 h-px",style:{backgroundColor:`${F.text}10`}}),i.jsxs("div",{className:"h-full flex flex-col justify-center p-3",children:[i.jsx("h3",{className:"text-[11px] font-extralight tracking-tight",style:{color:F.text},children:De.title}),i.jsx("div",{className:"w-3 h-px my-1",style:{backgroundColor:F.text}}),i.jsx("p",{className:"text-[7px] font-light tracking-widest uppercase",style:{color:F.muted},children:De.subtitle})]})]}):se==="nature"?i.jsxs("div",{className:"aspect-[16/9] rounded-lg overflow-hidden relative",style:{backgroundColor:F.background},children:[i.jsxs("svg",{className:"absolute top-0 right-0 w-8 h-8 opacity-20",viewBox:"0 0 100 100",children:[i.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:F.primary,strokeWidth:"2"}),i.jsx("circle",{cx:"50",cy:"50",r:"25",fill:"none",stroke:F.secondary,strokeWidth:"1"})]}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1",style:{background:`linear-gradient(90deg, ${F.primary}, ${F.secondary}, ${F.accent})`}}),i.jsxs("div",{className:"h-full flex flex-col items-center justify-center p-2 text-center",children:[i.jsx("h3",{className:"text-[10px] font-semibold",style:{color:F.primary},children:De.title}),i.jsx("p",{className:"text-[7px] mt-0.5",style:{color:F.muted},children:De.subtitle})]})]}):se==="luxury"?i.jsxs("div",{className:"aspect-[16/9] rounded-lg overflow-hidden relative",style:{backgroundColor:F.background},children:[i.jsx("div",{className:"absolute inset-1 border rounded",style:{borderColor:`${F.accent}40`}}),i.jsx("div",{className:"absolute top-1 left-1 w-2 h-2 border-t border-l",style:{borderColor:F.accent}}),i.jsx("div",{className:"absolute top-1 right-1 w-2 h-2 border-t border-r",style:{borderColor:F.accent}}),i.jsx("div",{className:"absolute bottom-1 left-1 w-2 h-2 border-b border-l",style:{borderColor:F.accent}}),i.jsx("div",{className:"absolute bottom-1 right-1 w-2 h-2 border-b border-r",style:{borderColor:F.accent}}),i.jsxs("div",{className:"h-full flex flex-col items-center justify-center p-2 text-center",children:[i.jsx("h3",{className:"text-[10px] font-serif",style:{color:F.primary},children:De.title}),i.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[i.jsx("div",{className:"w-2 h-px",style:{backgroundColor:F.accent}}),i.jsx("p",{className:"text-[6px] tracking-widest uppercase",style:{color:F.muted},children:(ue=De.subtitle)==null?void 0:ue.substring(0,10)}),i.jsx("div",{className:"w-2 h-px",style:{backgroundColor:F.accent}})]})]})]}):i.jsxs("div",{className:"aspect-[16/9] rounded-lg overflow-hidden relative",style:{backgroundColor:F.background},children:[i.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5",style:{background:`linear-gradient(90deg, ${F.primary}, ${F.secondary})`}}),i.jsxs("div",{className:"relative h-full flex flex-col items-center justify-center p-3",children:[i.jsx("h3",{className:"text-xs font-bold mb-1 text-center leading-tight",style:{color:F.primary},children:De.title}
1165),De.subtitle&&i.jsx("p",{className:"text-[10px] opacity-60 text-center",style:{color:F.text},children:De.subtitle})]})]})},Ne=(ie,De)=>{De.stopPropagation(),R(ie)},de=(ie,De)=>{De.stopPropagation(),B(ie)};return i.jsxs("div",{className:`flex flex-col overflow-auto ${a?"":"h-full"}`,children:[i.jsx("div",{className:`flex-1 ${a?"":"p-6"}`,children:i.jsxs("div",{className:a?"":"max-w-4xl mx-auto",children:[!a&&i.jsx("h1",{className:"text-3xl font-bold mb-6 text-center",children:o("toolConfig.title")}),i.jsxs("div",{className:"w-full mb-8",children:[ee.length>0&&i.jsx("div",{className:"flex flex-wrap gap-2 mb-2 px-3",children:ee.map(ie=>i.jsxs("div",{className:"flex items-center gap-2 bg-secondary/70 rounded-lg px-3 py-1.5 text-sm",children:[uY(ie.mimeType,ie.name),i.jsx("span",{className:"max-w-[150px] truncate",children:ie.name}),i.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",cY(ie.size),")"]}),i.jsx("button",{onClick:()=>X(ie.id),className:"p-0.5 hover:bg-destructive/20 rounded transition-colors",title:o("toolConfig.removeFile"),children:i.jsx(cr,{className:"w-3.5 h-3.5 text-muted-foreground hover:text-destructive"})})]},ie.id))}),K&&i.jsx("div",{className:"text-destructive text-sm px-3 mb-2",children:K}),i.jsxs("div",{className:"relative flex flex-col bg-secondary/50 rounded-2xl border border-border p-3 shadow-sm focus-within:border-primary/50 transition-colors",children:[i.jsx("input",{ref:O,type:"file",multiple:!0,accept:fj.join(","),onChange:Ce,className:"hidden"}),i.jsx("div",{className:"flex items-center gap-2 mb-2",children:i.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 px-3 py-1 bg-primary/10 rounded-full text-sm cursor-pointer transition-all hover:bg-primary/20",onClick:r,children:[i.jsx(ne,{className:"w-4 h-4 text-primary"}),i.jsx("span",{className:"text-primary font-medium",children:he}),!xe&&i.jsx(cr,{className:"w-3.5 h-3.5 text-primary/60"})]})}),i.jsx("textarea",{ref:C,value:c,onChange:ie=>d(ie.target.value),onKeyDown:Ye,onInput:Ae,onCompositionStart:()=>q.current=!0,onCompositionEnd:()=>q.current=!1,placeholder:o(e==="pdf"?"toolConfig.placeholder.pdf":e==="website"?"toolConfig.placeholder.website":e==="spreadsheet"?"toolConfig.placeholder.spreadsheet":"toolConfig.placeholder.presentation"),rows:xe?2:1,maxLength:2e3,className:it("w-full bg-transparent resize-none outline-none text-foreground placeholder:text-muted-foreground",xe?"min-h-[48px] max-h-[120px] py-2":"min-h-[24px] max-h-[120px] py-2")}),i.jsxs("div",{className:"flex items-center justify-between mt-2",children:[i.jsx("button",{onClick:pe,disabled:Q||ee.length>=qd,className:it("p-1.5 text-muted-foreground hover:text-foreground hover:bg-secondary rounded-lg transition-colors",(Q||ee.length>=qd)&&"opacity-50 cursor-not-allowed"),title:o("toolConfig.uploadFilesTitle",{max:qd}),children:Q?i.jsx("div",{className:"w-5 h-5 border-2 border-current border-t-transparent rounded-full animate-spin"}):i.jsx(a3,{className:"w-5 h-5"})}),i.jsx("button",{onClick:()=>{if(n){s==null||s();return}ve()},disabled:!n&&!c.trim(),className:it("p-1.5 rounded-lg transition-all shrink-0",n?"bg-muted text-muted-foreground opacity-50":c.trim()?"bg-[var(--theme)] text-white hover:bg-[var(--theme-hover)]":"bg-[var(--theme-medium)] text-[var(--text-muted)] curs
1165or-not-allowed"),title:o("toolConfig.sendTitle"),children:i.jsx(Gu,{className:"w-4 h-4"})})]})]})]}),i.jsxs("div",{className:"mb-8",children:[i.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:o("toolConfig.examplePrompts")}),i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:Be.map((ie,De)=>i.jsxs("button",{onClick:()=>Ee(ie),className:it("group relative px-4 pt-3 pb-6 text-sm rounded-xl transition-all","bg-secondary/60 hover:bg-secondary border border-border/50 hover:border-border","text-left leading-relaxed"),children:[i.jsx("span",{className:"line-clamp-2",children:ie}),i.jsx(xV,{className:"absolute right-2 bottom-2 w-4 h-4 text-muted-foreground group-hover:text-primary transition-colors"})]},De))})]}),e==="presentation"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:o("toolConfig.selectTemplate")}),i.jsx("div",{className:"flex gap-2 overflow-x-auto",children:hY.map(ie=>i.jsx("button",{onClick:()=>k(ie),className:it("px-4 py-1.5 rounded-full text-sm font-medium transition-all whitespace-nowrap shrink-0",b===ie?"bg-primary text-primary-foreground":"bg-secondary/60 hover:bg-secondary text-foreground"),children:o(`toolConfig.templateCategories.${ie}`)},ie))})]}),i.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4",children:Oe.map(ie=>i.jsxs("div",{onClick:()=>m(ie.id),className:it("group relative rounded-xl overflow-hidden transition-all duration-300 text-left cursor-pointer","border-2 bg-background",h===ie.id?"border-primary shadow-lg ring-2 ring-primary/20":"border-border hover:border-primary/50 hover:shadow-md"),children:[i.jsxs("div",{className:"relative",children:[_e(ie),i.jsx("button",{onClick:De=>Ne(ie,De),className:it("absolute inset-0 flex items-center justify-center","bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity hidden md:flex"),children:i.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-background rounded-full text-sm font-medium text-foreground",children:[i.jsx(No,{className:"w-4 h-4"}),o("toolConfig.previewBtn")]})})]}),h===ie.id&&i.jsx("div",{className:"absolute top-2 right-2 w-5 h-5 bg-primary rounded-full flex items-center justify-center",children:i.jsx("svg",{className:"w-3 h-3 text-primary-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),i.jsxs("div",{className:"absolute bottom-0 left-0 right-0 h-1 flex",children:[i.jsx("div",{className:"flex-1",style:{backgroundColor:ie.colors.primary}}),i.jsx("div",{className:"flex-1",style:{backgroundColor:ie.colors.secondary}})]})]},ie.id))}),i.jsx("p",{className:"text-center text-sm text-muted-foreground mt-6",children:o("toolConfig.pptHint",{templateHint:o(h?"toolConfig.pptHintWithTemplate":"toolConfig.pptHintNoTemplate")})})]}),e==="pdf"&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mb-4",children:i.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:o("toolConfig.selectTemplate")})}),i.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:v2.map(ie=>{const De=()=>ie.id==="general-report"?i.jsxs("div",{className:"w-full h-full bg-background rounded shadow-sm p-2.5 flex flex-col",children:[i.jsx("div",{className:"h-2.5 w-3/4 bg-gray-800 rounded-sm mb-2"}),i.jsx("div",{className:"h-1.5 w-1/2 bg-gray-300 rounded-sm mb-3"}),i.jsxs("div",{className:"bg-blue-500/10 border-l-2 border-blue-500 p-1.5 mb-2",children:[i.jsx("div",{className:"h-1 w-full bg-blue-200 rounded-sm mb-1"}),i.jsx("div",{className:"h-1 w-4/5 bg-blue-200 rounded-sm"})]}),i.jsxs("div",{className:"flex-1 space-y-1.5",children:[i.jsx("div",{className:"h-1.5 w-1/3 bg-gray-700 rounded-sm"}),i.jsx("div",{className:"h-1 w-full bg-muted rounded-sm"}),i.jsx("div",{className:"h-1 w-full bg-muted rounded-sm"}),i.jsx("div",{className:"h-1 w-3/4 bg-muted rounded-sm"})]})]}):ie.id==="literature-review"?i.jsxs("div",{className:"w-full h-full bg-background rounded shadow-sm p-2.5 flex flex-col",children:[i.jsx("div",{className:"h-2.5 w-2/3 bg-gray-800 rounded-sm mb-2 mx-auto"}),i.jsx("div",{className:"h-1 w-1/3 bg-gray-400 rounded-sm mb-3 mx-auto"}),i.jsxs("div",{className:"bg-muted/50 border-l-2 border-gray-400 p-1.5 mb-2 italic",children:[i.jsx("div",{className:"h-1 w-full bg-gray-300 rounded-sm mb-1"}),i.jsx("div",{className:"h-1 w-3/4 bg-gray-300 rounded-sm"})]}),i.jsxs("div",{className:"flex-1 space-y-1",children:[i.jsx("div",{className:"h-1 w-full bg-muted rounded-sm"}),i.jsx("div",{className:"h-1 w-full bg-muted rounded-sm"})]}),i.jsxs("div",{className:"border-t border-border pt-1.5 mt-auto",children:[i.jsx("div",{className:"h-1 w-1/4 bg-gray-600 rounded-sm mb-1"}),i.jsx("div",{className:"h-0.5 w-full bg-gray-300 rounded-sm mb-0.5"}),i.jsx("div",{className:"h-0.5 w-4/5 bg-gray-300 rounded-sm"})]})]}):ie.id==="newsletter"?i.jsxs("div",{className:"w-full h-full bg-background rounded shadow-sm p-2.5 flex flex-col",children:[i.jsx("div",{className:"bg-emerald-600 -mx-2.5 -mt-2.5 p-2 mb-2",children:i.jsx("div",{className:"h-2 w-2/3 bg-background/90 rounded-sm"})}),i.jsxs("div",{className:"grid grid-cols-2 gap-1.5 flex-1",children:[i.jsxs("div",{className:"bg-muted/50 rounded p-1",children:[i.jsx("div",{className:"h-4 bg-muted rounded-sm mb-1"}),i.jsx("div",{className:"h-1 w-full bg-gray-300 rounded-sm"})]}),i.jsxs("div",{className:"bg-muted/50 rounded p-1",children:[i.jsx("div",{className:"h-4 bg-muted rounded-sm mb-1"}),i.jsx("div",{className:"h-1 w-full bg-gray-300 rounded-sm"})]}),i.jsxs("div",{className:"col-span-2 bg-emerald-500/10 rounded p-1",children:[i.jsx("div",{className:"h-1.5 w-1/2 bg-emerald-600 rounded-sm mb-1"}),i.jsx("div",{className:"h-1 w-full bg-emerald-200 rounded-sm"})]})]})]}):ie.id==="faq-document"?i.jsxs("div",{className:"w-full h-full bg-background rounded shadow-sm p-2.5 flex flex-col",children:[i.jsx("div",{className:"h-2 w-1/2 bg-gray-800 rounded-sm mb-2"}),i.jsx("div",{className:"flex-1 space-y-2",children:[1,2,3].map(F=>i.jsxs("div",{className:"space-y-0.5",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("div",{className:"w-3 h-3 rounded-full bg-orange-500 flex items-center justify-center",children:i.jsx("span",{className:"text-[6px] text-white font-bold",children:"Q"})}),i.jsx("div",{className:"h-1.5 flex-1 bg-gray-700 rounded-sm"})]}),i.jsxs("div",{className:"flex items-start gap-1 pl-4",children:[i.jsx("div",{className:"w-2 h-2 rounded-full bg-gray-300 flex items-center justify-center mt-0.5",children:i.jsx("span",{className:"text-[5px] text-muted-foreground font-bold",children:"A"})}),i.jsxs("div",{className:"flex-1 space-y-0.5",children:[i.jsx("div",{className:"h-1 w-full bg-muted rounded-sm"}),i.jsx("div",{className:"h-1 w-3/4 bg-muted rounded-sm"})]})]})]},F))})]}):i.jsxs("div",{className:"w-full h-full bg-background rounded shadow-sm p-2.5",children:[i.jsx("div",{className:"h-2 w-1/2 bg-gray-800 rounded-sm mb-2"}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("div",{className:"h-1 w-full bg-muted rounded-sm"}),i.jsx("div",{className:"h-1 w-full bg-muted rounded-sm"}),i.jsx("div",{className:"h-1 w-3/4 bg-muted rounded-sm"})]})]});return i.jsxs("div",{onClick:()=>p(ie.id),className:it("group relative rounded-xl overflow-hidden transition-all duration-300 text-left cursor-pointer","border-2 bg-background",f===ie.id?"border-primary shadow-lg ring-2 ring-primary/20":"border-border hover:border-primary/50 hover:shadow-md"),children:[i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"aspect-[4/3] flex items-center justify-center p-3 bg-muted",children:De()}),i.jsx("button",{onClick:F=>de(ie,F),className:it("absolute inset-0 flex items-center justify-center","bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity hidden md:flex"),children:i.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-background rounded-full text-sm font-medium text-foreground",children:[i.jsx(No,{className:"w-4 h-4"}),o("toolConfig.previewBtn")]})})]}),i.jsxs("div",{className:"p-3",children:[i.jsx("h4",{className:"font-medium text-sm mb-1",children:o(`toolConfig.pdfTemplates.${ie.id.replace(/-([a-z])/g,(F,se)=>se.toUpperCase())}Name`)}),i.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1",children:o(`toolConfig.pdfTemplates.${ie.id.replace(/-([a-z])/g,(F,se)=>se.toUpperCase())}Desc`)})]}),f===ie.id&&i.jsx("div",{className:"absolute top-2 right-2 w-5 h-5 bg-primary rounded-full flex items-center justify-center",children:i.jsx("svg",{className:"w-3 h-3 text-primary-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})})]},ie.id)})}),i.jsx("p",{className:"text-center text-sm text-muted-foreground mt-6",children:o("toolConfig.pdfHint",{templateHint:o(f?"toolConfig.pdfHintWithTemplate":"toolConfig.pdfHintNoTemplate")})})]}),e==="website"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:o("toolConfig.selectTemplate")}),i.jsx("div",{className:"flex gap-2 overflow-x-auto",children:dY.map(ie=>i.jsx("button",{onClick:()=>S(ie),className:it("px-4 py-1.5 rounded-full text-sm font-medium transition-all whitespace-nowrap shrink-0",T===ie?"bg-primary text-primary-foreground":"bg-secondary/60 hover:bg-secondary text-foreground"),children:o(`toolConfig.websiteCategories.${ie}`)},ie))})]}),i.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:Se.map(ie=>{const De=()=>{const{colors:F,category:se}=ie;return se==="corporate"?i.jsxs("div",{className:"w-full h-full rounded shadow-sm overflow-hidden flex flex-col",style:{backgroundColor:F.background},children:[i.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b",style:{borderColor:`${F.primary}20`},children:[i.jsx("div",{className:"h-1.5 w-8 rounded-sm",style:{backgroundColor:F.primary}}),i.jsx("div",{className:"flex gap-1",children:[1,2,3].map(ue=>
1165i.jsx("div",{className:"h-1 w-4 rounded-sm",style:{backgroundColor:F.secondary}},ue))})]}),i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-2 text-center",children:[i.jsx("div",{className:"h-2 w-16 rounded-sm mb-1",style:{backgroundColor:F.primary}}),i.jsx("div",{className:"h-1 w-12 rounded-sm mb-2",style:{backgroundColor:F.secondary}}),i.jsx("div",{className:"h-2 w-10 rounded-sm",style:{backgroundColor:F.primary}})]}),i.jsx("div",{className:"h-3 px-2",style:{backgroundColor:F.primary},children:i.jsx("div",{className:"h-1 w-8 rounded-sm mx-auto mt-1",style:{backgroundColor:`${F.background}80`}})})]}):se==="saas"?i.jsxs("div",{className:"w-full h-full rounded shadow-sm overflow-hidden flex flex-col",style:{backgroundColor:F.background},children:[i.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[i.jsx("div",{className:"h-1.5 w-6 rounded-sm",style:{backgroundColor:F.primary}}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("div",{className:"h-1 w-3 rounded-sm",style:{backgroundColor:F.secondary}}),i.jsx("div",{className:"h-2 w-6 rounded-sm",style:{backgroundColor:F.primary}})]})]}),i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-2",children:[i.jsx("div",{className:"h-2.5 w-14 rounded-sm mb-1",style:{backgroundColor:F.text}}),i.jsx("div",{className:"h-1 w-16 rounded-sm mb-2",style:{backgroundColor:`${F.text}40`}}),i.jsxs("div",{className:"flex gap-1",children:[i.jsx("div",{className:"h-2 w-8 rounded-sm",style:{backgroundColor:F.primary}}),i.jsx("div",{className:"h-2 w-6 rounded-sm border",style:{borderColor:F.primary,color:F.primary}})]})]}),i.jsx("div",{className:"flex justify-center gap-2 p-2",children:[1,2,3].map(ue=>i.jsx("div",{className:"w-4 h-4 rounded",style:{backgroundColor:`${F.primary}15`},children:i.jsx("div",{className:"w-2 h-2 rounded-sm mx-auto mt-1",style:{backgroundColor:F.primary}})},ue))})]}):se==="ecommerce"?i.jsxs("div",{className:"w-full h-full rounded shadow-sm overflow-hidden flex flex-col",style:{backgroundColor:F.background},children:[i.jsx("div",{className:"flex items-center justify-center px-2 py-1.5 border-b",style:{borderColor:`${F.primary}30`},children:i.jsx("div",{className:"h-2 w-12 rounded-sm",style:{backgroundColor:F.primary}})}),i.jsx("div",{className:"flex-1 grid grid-cols-2 gap-1 p-1.5",children:[1,2,3,4].map(ue=>i.jsxs("div",{className:"rounded overflow-hidden",style:{backgroundColor:`${F.secondary}15`},children:[i.jsx("div",{className:"h-4 w-full",style:{backgroundColor:`${F.secondary}30`}}),i.jsxs("div",{className:"p-0.5",children:[i.jsx("div",{className:"h-1 w-full rounded-sm mb-0.5",style:{backgroundColor:F.text}}),i.jsx("div",{className:"h-1 w-1/2 rounded-sm",style:{backgroundColor:F.primary}})]})]},ue))})]}):se==="portfolio"?i.jsxs("div",{className:"w-full h-full rounded shadow-sm overflow-hidden flex flex-col",style:{backgroundColor:F.background},children:[i.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[i.jsx("div",{className:"h-1.5 w-8 rounded-sm",style:{backgroundColor:F.primary}}),i.jsx("div",{className:"flex gap-1.5",children:[1,2].map(ue=>i.jsx("div",{className:"h-1 w-4 rounded-sm",style:{backgroundColor:F.secondary}},ue))})]}),i.jsxs("div",{className:"flex-1 flex flex-col justify-center px-2",children:[i.jsx("div",{className:"h-3 w-16 rounded-sm mb-1",style:{backgroundColor:F.primary}}),i.jsx("div",{className:"h-1 w-10 rounded-sm",style:{backgroundColor:F.secondary}})]}),i.jsx("div",{className:"grid grid-cols-2 gap-1 p-1.5",children:[1,2].map(ue=>i.jsx("div",{className:"h-5 rounded",style:{backgroundColor:`${F.secondary}20`}},ue))})]}):i.jsxs("div",{className:"w-full h-full rounded shadow-sm overflow-hidden flex flex-col",style:{backgroundColor:F.background},children:[i.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b",style:{borderColor:`${F.primary}20`},children:[i.jsx("div",{className:"h-1.5 w-6 rounded-sm",style:{backgroundColor:F.primary}}),i.jsx("div",{className:"h-1 w-8 rounded-sm",style:{backgroundColor:F.secondary}})]}),i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-2",children:[i.jsx("div",{className:"h-2 w-12 rounded-sm mb-1",style:{backgroundColor:F.primary}}),i.jsx("div",{className:"h-1 w-16 rounded-sm",style:{backgroundColor:F.secondary}})]})]})};return i.jsxs("div",{onClick:()=>x(ie.id),className:it("group relative rounded-xl overflow-hidden transition-all duration-300 text-left cursor-pointer","border-2 bg-background",g===ie.id?"border-primary shadow-lg ring-2 ring-primary/20":"border-border hover:border-primary/50 hover:shadow-md"),children:[i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"aspect-[4/3] flex items-center justify-center p-3 bg-muted",children:De()}),i.jsx("button",{onClick:F=>{F.stopPropagation(),H(ie)},className:it("absolute inset-0 flex items-center justify-center","bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity hidden md:flex"),children:i.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-background rounded-full text-sm font-medium text-foreground",children:[i.jsx(No,{className:"w-4 h-4"}),o("toolConfig.previewBtn")]})})]}),i.jsxs("div",{className:"p-3",children:[i.jsx("h4",{className:"font-medium text-sm mb-1",children:u?ie.n
1165ameZh:ie.name}),i.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1",children:ie.description}),i.jsx("div",{className:"flex gap-1 mt-2 flex-wrap",children:ie.tags.slice(0,3).map(F=>i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-secondary/60 text-muted-foreground",children:F},F))})]}),g===ie.id&&i.jsx("div",{className:"absolute top-2 right-2 w-5 h-5 bg-primary rounded-full flex items-center justify-center",children:i.jsx("svg",{className:"w-3 h-3 text-primary-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),i.jsxs("div",{className:"absolute bottom-0 left-0 right-0 h-1 flex",children:[i.jsx("div",{className:"flex-1",style:{backgroundColor:ie.colors.primary}}),i.jsx("div",{className:"flex-1",style:{backgroundColor:ie.colors.secondary}})]})]},ie.id)})}),i.jsx("p",{className:"text-center text-sm text-muted-foreground mt-6",children:o("toolConfig.websiteHint",{templateHint:o(g?"toolConfig.websiteHintWithTemplate":"toolConfig.websiteHintNoTemplate")})})]}),e==="spreadsheet"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:o("toolConfig.selectTemplate")}),i.jsx("div",{className:"flex gap-2 overflow-x-auto",children:nY.map(ie=>i.jsx("button",{onClick:()=>E(ie),className:it("px-4 py-1.5 rounded-full text-sm font-medium transition-all whitespace-nowrap shrink-0",j===ie?"bg-primary text-primary-foreground":"bg-secondary/60 hover:bg-secondary text-foreground"),children:o(`tableTemplate.categories.${ie}`)},ie))})]}),i.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4",children:we.map(ie=>{const De=()=>i.jsxs("div",{className:"w-full h-full rounded shadow-sm overflow-hidden flex flex-col",style:{backgroundColor:"#ffffff"},children:[i.jsx("div",{className:"flex",style:{backgroundColor:ie.colors.headerBg},children:ie.columns.slice(0,4).map((F,se)=>i.jsx("div",{className:"flex-1 px-1 py-1 text-[6px] font-medium truncate",style:{color:ie.colors.headerText},children:F.title},se))}),ie.sampleRows.slice(0,4).map((F,se)=>i.jsx("div",{className:"flex border-b",style:{backgroundColor:se%2===1?ie.colors.rowAlt:"transparent",borderColor:"#e5e7eb"},children:ie.columns.slice(0,4).map((ue,je)=>i.jsx("div",{className:"flex-1 px-1 py-0.5 text-[5px] truncate text-gray-700",children:ue.type==="status"?i.jsx("span",{className:"inline-block px-1 rounded text-[4px]",style:{backgroundColor:F[ue.key]==="已宿"?"#dcfce7":F[ue.key]==="è¿è¡ä¸"?"#dbeafe":"#f3f4f6",color:F[ue.key]==="已宿"?"#166534":F[ue.key]==="è¿è¡ä¸"?"#1d4ed8":"#6b7280"},children:String(F[ue.key]).slice(0,4)}):ue.type==="progress"?i.jsx("div",{className:"flex items-center gap-0.5",children:i.jsx("div",{className:"flex-1 h-1 bg-gray-200 rounded-full overflow-hidden",children:i.jsx("div",{className:"h-full rounded-full",style:{width:`${F[ue.key]}%`,backgroundColor:Number(F[ue.key])>=80?"#22c55e":Number(F[ue.key])>=50?"#3b82f6":"#eab308"}})})}):String(F[ue.key]).slice(0,8)},je))},se))]});return i.jsxs("div",{onClick:()=>y(ie.id),className:it("group relative rounded-xl overflow-hidden transition-all duration-300 text-left cursor-pointer","border-2 bg-background",w===ie.id?"border-primary shadow-lg ring-2 ring-primary/20":"border-border hover:border-primary/50 hover:shadow-md"),children:[i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"aspect-[4/3] flex items-center justify-center p-3 bg-muted",children:De()}),i.jsx("button",{onClick:F=>{F.stopPropagation(),$(ie)},className:it("absolute inset-0 flex items-center justify-center","bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity hidden md:flex"),children:i.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-background rounded-full text-sm font-medium text-foreground",children:[i.jsx(No,{className:"w-4 h-4"}),o("toolConfig.previewBtn")]})})]}),i.jsxs("div",{className:"p-3",children:[i.jsx("h4",{className:"font-medium text-sm mb-1",children:ie.name}),i.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1",children:o(ie.descriptionKey)})]}),w===ie.id&&i.jsx("div",{className:"absolute top-2 right-2 w-5 h-5 bg-primary rounded-full flex items-center justify-center",children:i.jsx("svg",{className:"w-3 h-3 text-primary-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),i.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1",style:{backgroundColor:ie.colors.primary}})]},ie.id)})}),i.jsx("p",{className:"text-center text-sm text-muted-foreground mt-6",children:o("toolConfig.tableHint",{templateHint:o(w?"toolConfig.tableHintWithTemplate":"toolConfig.tableHintNoTemplate")})})]})]})}),i.jsx(JK,{template:A,isOpen:!!A,onClose:()=>R(null),onSelect:ie=>{m(ie),R(null)},isSelected:h===(A==null?void 0:A.id)}),i.jsx(tY,{template:M,isOpen:!!M,onClose:()=>B(null),onSelect:ie=>{p(ie),B(null)},isSelected:f===(M==null?void 0:M.id)}),i.jsx(rY,{template:W,isOpen:!!W,onClose:()=>H(null),onSelect:ie=>{x(ie),H(null)},isSelected:g===(W==null?void 0:W.id)}),i.jsx(aY,{template:L,isOpen:!!L,onClose:()=>$(null),onSelect:ie=>{y(ie),$(null)},isSelected:w===(L==null?void 0:L.id)})]})}const fY=[{templateId:"business-blue",name:"åå¡è",category:"business",description:"ç»å
¸åå¡é£æ ¼ï¼å·¦ä¾§å¯¼èªè®¾è®¡",style:"corporate",colors:{primary:"#1e40af",secondary:"#3b82f6",accent:"#60a5fa",background:"#ffffff",text:"#1e293b",muted:"#64748b"}},{templateId:"tech-dark",name:"ç§ææé»",category:"tech",description:"èµåæå
飿 ¼ï¼éè¹å
æ",style:"tech",colors:{primary:"#a78bfa",secondary:"#22d3ee",accent:"#f472b6",background:"#0f172a",text:"#f1f5f9",muted:"#94a3b8"}},{templateId:"creative-gradient",name:"åææ¸å",category:"creative",description:"å¤§èæ¸åè²å½©ï¼ä¸è§åå½¢ç¶",style:"creative",colors:{primary:"#ec4899",secondary:"#f97316",accent:"#fbbf24",background:"#fffbeb",text:"#1c1917",muted:"#78716c"}},{templateId:"minimal-white",name:"æç®ç½",category:"simple",description:"æè´çç½ï¼ç»çº¿æ¡è®¾è®¡",style:"minimal",colors:{primary:"#18181b",secondary:"#3f3f46",accent:"#a1a1aa",background:"#fafafa",text:"#18181b",muted:"#71717a"}},{templateId:"nature-green",name:"èªç¶ç»¿",category:"creative",description:"ææºæ²çº¿ï¼èªç¶å
ç´ è£
饰",style:"nature",colors:{primary:"#16a34a",secondary:"#84cc16",accent:"#22c55e",background:"#f0fdf4",text:"#14532d",muted:"#4d7c0f"}},{templateId:"elegant-gold",name:"ä¼é
é",category:"business",description:"奢åè´¨æï¼éè²è¾¹æ¡è£
饰",style:"luxury",colors:{primary:"#b45309",secondary:"#d97706",accent:"#fbbf24",background:"#fffbeb",text:"#78350f",muted:"#a16207"}}];function pY(e){return fY.find(t=>t.templateId===e)}function kh(e){var h;const t=ga({queryKey:["feature-models",e],queryFn:()=>UA.getModels(e),staleTime:3e5,enabled:!!e}),r=(h=t.data)==null?void 0:h.data,n=(r==null?void 0:r.models)||[],s=n.find(m=>m.isDefault)||n[0],a=!t.isLoading&&!!r,o=(r==null?void 0:r.creditTier)||"basic",l=a?(r==null?void 0:r.featureAllowed)??!1:!0,u=a?(r==null?void 0:r.allowedModelTiers)||["basic"]:["basic","advanced","reasoning"],c=a?n.filter(m=>m.tier&&!u.includes(m.tier)).map(m=>m.canonicalId):[],d=r==null?void 0:r.defaultMarkup;return{models:n,defaultModel:s,defaultMarkup:d,isLoading:t.isLoading,error:t.error,creditTier:o,featureAllowed:l,allowedModelTiers:u,restrictedModelIds:c}}const gY={fast:{label:"Fast",color:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400"},versatile:{label:"Versatile",color:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"},photorealistic:{label:"Realistic",color:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"},"text-rendering":{label:"Text",color:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400"},"character-consistency":{label:"Character",color:"bg-pink-100 text-pink-700 dark:bg-pink-900/30 dark:text-pink-400"},"4K":{label:"4K",color:"bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400"},"high-detail":{label:"Detail",color:"bg-indigo-100 text-indigo-700 dark:bg-indigo-900/30 dark:text-indigo-400"},semantic:{label:"Semantic",color:"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400"}
1165,logo:{label:"Logo",color:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"},vector:{label:"Vector",color:"bg-teal-100 text-teal-700 dark:bg-teal-900/30 dark:text-teal-400"},illustration:{label:"Illustration",color:"bg-rose-100 text-rose-700 dark:bg-rose-900/30 dark:text-rose-400"},poster:{label:"Poster",color:"bg-fuchsia-100 text-fuchsia-700 dark:bg-fuchsia-900/30 dark:text-fuchsia-400"},portrait:{label:"Portrait",color:"bg-sky-100 text-sky-700 dark:bg-sky-900/30 dark:text-sky-400"},bilingual:{label:"Bilingual",color:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400"},"brand-color":{label:"Brand",color:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400"},"prompt-enhance":{label:"Enhance",color:"bg-lime-100 text-lime-700 dark:bg-lime-900/30 dark:text-lime-400"},"prompt-follow":{label:"Precise",color:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400"},"web-search":{label:"Web",color:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"},reasoning:{label:"Reasoning",color:"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400"},editing:{label:"Editing",color:"bg-slate-100 text-slate-700 dark:bg-slate-900/30 dark:text-slate-400"},"ultra-quality":{label:"Ultra HD",color:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"}};function xY(e){return e.map(t=>({id:t.modelId,displayName:t.displayName,description:t.description,logoUrl:t.logoUrl,tags:t.capabilities.slice(0,4).map(r=>{const n=gY[r];return n?{label:n.label,className:n.color}:null}).filter(r=>r!==null)}))}function bY(e){const t=Rt.language.startsWith("zh");return e.map(r=>({id:r.id,displayName:t&&r.nameZh||r.name,description:r.description,logoUrl:r.logoUrl,isDefault:r.isDefault}))}const Zk=({logoUrl:e,displayName:t,size:r=16})=>e?i.jsx("img",{src:e,alt:t||"",crossOrigin:void 0,style:{width:r,height:r,padding:r*.1,borderRadius:r*.25},className:"shrink-0 bg-white/90 dark:bg-white/90"}):i.jsx(sG,{style:{width:r,height:r},className:"text-[var(--text-tertiary)] shrink-0"});function yY(e){return{id:e.canonicalId,displayName:e.displayName,description:e.description,logoUrl:e.logoUrl,tier:e.tier,isDefault:e.isDefault}}function w2({featureKey:e,items:t,externalLoading:r=!1,value:n,onChange:s,disabled:a=!1,className:o="",showDescription:l=!1,showTiers:u=!0,preferUpward:c=!1,compact:d=!1,hideChevron:h=!1,disabledIds:m,deferAutoSelectIfEmpty:f=!1}){const{t:p}=We(),[g,x]=v.useState(!1),w=v.useRef(null),y=v.useRef(null),[b,k]=v.useState({}),{credits:T,thresholds:S}=Eh(),j=v.useCallback(()=>{if(!y.current)return;const Q=y.current.getBoundingClientRect(),D=Math.max(Q.width,320),K=window.innerHeight-Q.bottom-8,V=Q.top-8,C=c||K<300&&V>K,O=Math.min(400,C?V:K);let q=Q.left;q+D>window.innerWidth-8&&(q=window.innerWidth-D-8),k({position:"fixed",left:q,width:D,maxHeight:O,...C?{bottom:window.innerHeight-Q.top+4}:{top:Q.bottom+4},zIndex:9999})},[c]),{models:E,defaultModel:A,isLoading:R,restrictedModelIds:M}=kh(e||""),B=v.useMemo(()=>t||E.map(yY),[t,E]),W=v.useMemo(()=>{const Q=new Set(m||[]);return e&&M.forEach(D=>Q.add(D)),Q.size>0?[...Q]:void 0},[m,M,e]),H=e?R:r,L=v.useRef();v.useEffect(()=>{const Q=B.find(D=>D.id===n);Q!=null&&Q.tier&&(L.current=Q.tier)},[n,B]);const $=v.useRef(!1),ee=v.useRef(!1);v.useEffect(()=>{if(!e||R||E.length===0)return;if(f&&!n&&!ee.current){ee.current=!0;return}const Q=n&&E.some(q=>q.canonicalId===n),D=W==null?void 0:W.includes(n),K=!!e&&!!n&&M.includes(n);if(Q&&!D){$.current=!0;return}const V=E.filter(q=>!(W!=null&&W.includes(q.canonicalId)));if(L.current){const q=V.find(ne=>ne.tier===L.current);if(q){s(q.canonicalId,!0);return}}const O=(A&&!(W!=null&&W.includes(A.canonicalId))?A:null)||V[0];O&&($.current&&K&&Je(async()=>{const{default:q}=await Promise.resolve().then(()=>dA);return{default:q}},void 0).then(({default:q})=>{q(p("credits.modelDowngraded",{model:O.displayName}),{icon:"â ï¸"})}),s(O.canonicalId,!0)),$.current=!0},[A==null?void 0:A.canonicalId,E.length,n,W]),v.useEffect(()=>{const Q=D=>{const K=D.target;w.current&&!w.current.contains(K)&&y.current&&!y.current.contains(K)&&x(!1)};return document.addEventListener("mousedown",Q),()=>document.removeEventListener("mousedown",Q)},[]),v.useEffect(()=>{if(!g)return;j();const Q=K=>{K.key==="Escape"&&x(!1)},D=()=>j();return document.addEventListener("keydown",Q),window.addEventListener("scroll",D,!0),window.addEventListener("resize",D),()=>{document.removeEventListener("keydown",Q),window.removeEventListener("scroll",D,!0),window.removeEventListener("resize",D)}},[g,j]);const G=B.find(Q=>Q.id===n);return H?i.jsx("div",{className:`flex items-center justify-center h-8 w-8 bg-[var(--bg-tertiary)] border border-ui-border rounded-lg ${o}`,"aria-label":p("common.loading"),title:p("common.loading"),children:i.jsx(kn,{className:"w-3.5 h-3.5 animate-spin text-[var(--text-tertiary)]"})}):i.jsxs("div",{className:`relative ${d?"w-fit":"min-w-[140px]"} ${o}`,children:[i.jsxs("button",{ref:y,onClick:()=>!a&&x(!g),disabled:a,className:`flex items-center gap-2 h-8 bg-[var(--bg-tertiary)] border border-ui-border rounded-lg hover:bg-[var(--bg-hover)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${d?"px-2 gap-1.5 w-fit":"px-3 w-full"}`,children:[i.jsx(Zk,{logoUrl:G==null?void 0:G.logoUrl,displayName:G==null?void 0:G.displayName,size:20}),!d&&i.jsx("span",{className:"flex-1 text-left text-xs font-medium text-[var(--text-primary)] truncate",children:(G==null?void 0:G.displayName)||n||p("common.model")}),!h&&i.jsx(dn,{className:`w-3.5 h-3.5 text-gray-400 transition-transform shrink-0 ${g?"rotate-180":""}`})]}),g&&fn.createPortal(i.jsx("div",{ref:w,className:"bg-[var(--bg-primary)] border border-ui-border rounded-lg shadow-lg overflow-hidden",style:b,children:i.jsx("div",{className:"overflow-y-auto max-h-[inherit]",style:{scrollbarWidth:"none"},children:(()=>{const Q={advanced:p("credits.tierAdvanced"),reasoning:p("credits.tierReasoning"),basic:p("credits.tierBasic"),free:p("credits.tierFree",{defaultValue:"Free"})},D=["advanced","reasoning","basic","free"],K=u&&B.some(C=>C.tier),V=C=>{const O=n===C.id,q=(W==null?void 0:W.includes(C.id))??!1;return i.jsxs("button",{onClick:()=>{q||(s(C.id),x(!1))},className:`w-full px-3 py-2.5 text-left flex items-center gap-2 transition-colors ${q?"opacity-40 cursor-not-allowed":"hover:bg-[var(--bg-hover)]"} ${O?"bg-[var(--bg-tertiary)]":""}`,children:[i.jsx(Zk,{logoUrl:C.logoUrl,displayName:C.displayName,size:24}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm font-medium text-[var(--text-primary)] truncate",children:C.displayName}),C.isDefault&&i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--bg-tertiary)] text-[var(--text-tertiary)] border border-ui-border shrink-0",children:p("common.default")}),C.rightLabel&&i.jsx("span",{className:"text-[10px] text-[var(--text-tertiary)] ml-auto shrink-0",children:C.rightLabel})]}),l&&C.description&&i.jsx("div",{className:"text-xs text-[var(--text-tertiary)] mt-0.5",children:C.description}),C.tags&&C.tags.length>0&&i.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:C.tags.map((ne,he)=>i.jsx("span",{className:`text-[9px] px-1 py-0.5 rounded ${ne.className}`,children:ne.label},he))})]})]},C.id)};return K?D.map(C=>{const O=B.filter(ne=>ne.tier===C);if(O.length===0)return null;const q=O.some(ne=>M.includes(ne.id));return i.jsxs("div",{children:[i.jsxs("div",{className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-[var(--text-tertiary)] bg-[var(--bg-secondary)] sticky top-0 flex items-center justify-between",children:[i.jsx("span",{children:Q[C]||C}),q&&(()=>{const ne=C==="advanced"||C==="reasoning"?S.agent:S.premium,he=ne-T;return i.jsx("span",{className:"font-normal normal-case tracking-normal text-[9px] px-1.5 py-0.5 rounded",style:{background:"var(--theme-light)",color:"var(--theme-text)"}
1165,children:p("credits.shortfall",{required:ne.toLocaleString(),gap:he.toLocaleString()})})})()]}),O.map(V)]},C)}):B.map(V)})()})}),document.body)]})}function vY({className:e}){const{t}=We(),r=$t(l=>l.activeTab),n=$t(l=>l.webSearchEnabled),s=$t(l=>l.toggleWebSearch),a=$t(l=>l.memoSearchEnabled),o=$t(l=>l.toggleMemoSearch);return r!=="chat"?null:i.jsxs("div",{className:it("flex items-center gap-2",e),children:[i.jsxs("button",{onClick:s,className:"flex items-center gap-1 text-muted-foreground",title:t("chatUI.webSearchTitle"),children:[i.jsx(Tn,{className:"w-3.5 h-3.5"}),i.jsx("span",{className:"text-xs font-medium",children:t("chatUI.webSearch")}),i.jsx("div",{className:it("w-7 h-[16px] rounded-full flex items-center px-0.5 transition-colors",n?"bg-primary":"bg-muted-foreground/30"),children:i.jsx("div",{className:it("w-3 h-3 rounded-full bg-white transition-transform",n?"ml-auto":"ml-0")})})]}),i.jsxs("button",{onClick:o,className:"flex items-center gap-1 text-muted-foreground",title:t("chatUI.memoTitle"),children:[i.jsx(Gw,{className:"w-3.5 h-3.5"}),i.jsx("span",{className:"text-xs font-medium",children:t("chatUI.memo")}),i.jsx("div",{className:it("w-7 h-[16px] rounded-full flex items-center px-0.5 transition-colors",a?"bg-primary":"bg-muted-foreground/30"),children:i.jsx("div",{className:it("w-3 h-3 rounded-full bg-white transition-transform",a?"ml-auto":"ml-0")})})]})]})}function wY({disabled:e,extraTab:t,lockable:r=!0}={}){const n=$t(c=>c.activeTab),s=$t(c=>c.setActiveTab),a=$t(c=>c.currentSessionId),o=$t(c=>c.messages.length>0),l=r&&(e||!!a&&o),u=[{id:"chat",label:"Chat",icon:E9},{id:"agent",label:"Agent",icon:Kw}];return i.jsxs("div",{className:"inline-flex items-center gap-1 mb-2",children:[u.map(c=>{const d=c.icon,h=n===c.id;return i.jsxs("button",{onClick:()=>!l&&s(c.id),disabled:l,className:it("flex items-center gap-1.5 px-4 py-1.5 rounded-full text-sm font-medium transition-all",h?"bg-secondary text-foreground":"text-muted-foreground hover:text-foreground hover:bg-secondary/50",l&&!h&&"opacity-40 cursor-not-allowed",l&&h&&"cursor-default"),children:[i.jsx(d,{className:"w-4 h-4"}),i.jsx("span",{children:c.label}),c.badge&&i.jsx("span",{className:"px-1.5 py-0.5 text-[10px] font-semibold leading-none rounded-full bg-orange-500 text-white",children:c.badge})]},c.id)}),t&&(()=>{const c=t.icon;return i.jsxs("button",{onClick:t.onClick,className:"flex items-center gap-1.5 px-4 py-1.5 rounded-full text-sm font-medium transition-all text-muted-foreground hover:text-foreground hover:bg-secondary/50",children:[i.jsx(c,{className:"w-4 h-4"}),i.jsx("span",{children:t.label})]})})()]})}function EY(){const e=$t(s=>s.activeTab),t=$t(s=>s.selectedChatModel),r=$t(s=>s.setSelectedChatModel),n=u3();return e!=="chat"?null:i.jsxs("div",{className:"flex items-center gap-4 pt-2 mt-1 border-t border-border/30",children:[i.jsx(w2,{featureKey:"agent_chat",value:t||"",onChange:r,showDescription:!1,preferUpward:!0}),!n&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-px h-4 bg-border/50"}),i.jsx(vY,{})]})]})}function kY(){var u;const e=Nw(),t=$t(c=>c._creditErrorFlag),r=ut(c=>c.isAuthenticated),n=ga({queryKey:["credits"],queryFn:()=>d1.getBalance(),staleTime:3e4,refetchInterval:6e4,enabled:r});v.useEffect(()=>{t>
11650&&e.invalidateQueries({queryKey:["credits"]})},[t,e]);const s=(u=n.data)==null?void 0:u.data,a=(s==null?void 0:s.credits)??0,o=(s==null?void 0:s.frozenCredits)??0,l=a-o;return{credits:a,frozenCredits:o,available:l,isLoading:n.isLoading}}function NY(){var o;const e=$t(l=>l.activeTab),t=$t(l=>l.selectedChatModel),{models:r,defaultMarkup:n}=kh("agent_chat"),s=v.useMemo(()=>{if(e!=="chat"||!t||n==null)return null;const l=r.find(m=>m.canonicalId===t);if(!(l!=null&&l.primaryChannel))return null;const{inputPrice:u,outputPrice:c}=l.primaryChannel,d=1e3*u+1e3*c,h=Math.max(1,Math.ceil(d*n*1e3));return h<10?h:h<100?Math.ceil(h/10)*10:Math.ceil(h/100)*100},[e,t,r,n]),a=ga({queryKey:["agent-estimate-credits"],queryFn:()=>b0.estimateCredits(),staleTime:5*60*1e3,enabled:e==="agent"});return e==="chat"?s:((o=a.data)==null?void 0:o.estimatedCredits)??null}function pj({open:e,onClose:t,title:r,children:n,maxWidth:s="600px",dark:a}){return v.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),e?fn.createPortal(i.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",onClick:o=>{o.target===o.currentTarget&&t()},children:[i.jsx("div",{className:`absolute inset-0 ${a?"bg-black/65 backdrop-blur-sm":"bg-black/40"}`}),i.jsxs("div",{className:`relative bg-[var(--bg-primary)] border border-ui-border rounded-2xl shadow-xl w-full max-w-[90vw] overflow-hidden ${a?"dark ring-1 ring-white/10 shadow-2xl shadow-black/60":""}`,style:{maxWidth:s},children:[r&&i.jsxs("div",{className:"flex items-center justify-between px-4 md:px-6 py-3 md:py-4 border-b border-ui-border",children:[i.jsx("h2",{className:"text-base font-semibold text-[var(--text-primary)]",children:r}),i.jsx("button",{type:"button",onClick:t,className:"w-8 h-8 flex items-center justify-center rounded-lg text-[var(--text-tertiary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] transition-colors",children:i.jsx(cr,{className:"w-4 h-4"})})]}),i.jsx("div",{className:"overflow-y-auto",style:{maxHeight:"calc(90vh - 120px)"},children:n})]})]}),document.body):null}function up({open:e,onClose:t,requiredCredits:r,currentCredits:n}){const{t:s,i18n:a}=We(),o=Er(),l=a.language;return i.jsx(pj,{open:e,onClose:t,maxWidth:"400px",children:i.jsxs("div",{className:"p-6 text-center",children:[i.jsx("div",{className:"w-12 h-12 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center mx-auto mb-4",children:i.jsx(Ts,{className:"w-6 h-6 text-[var(--text-tertiary)]"})}),i.jsx("h3",{className:"text-lg font-semibold text-[var(--text-primary)] mb-2",children:s("credits.featureLocked")}),i.jsx("p",{className:"text-sm text-[var(--text-secondary)] mb-4",children:s("credits.featureRequiresCredits",{required:r.toLocaleString()})}),i.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-[var(--text-tertiary)] mb-6",children:[i.jsx(xu,{className:"w-4 h-4"}),i.jsx("span",{children:s("credits.currentBalance",{credits:n.toLocaleString()})})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(tc,{variant:"secondary",size:"sm",fullWidth:!0,onClick:t,children:s("common.cancel")}),i.jsx(tc,{variant:"primary",size:"sm",fullWidth:!0,onClick:()=>{t(),o(`/${l}/pricing`)},children:s("credits.recharge")})]})]})})}const SY=["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel","text/plain","text/markdown","text/csv","application/json","text/html","text/css","text/javascript","application/javascript","application/typescript","text/x-python","text/x-java","text/x-c","text/x-cpp","text/x-go","text/x-rust","application/xml","text/xml","application/x-yaml","text/yaml"],gj=[".pdf",".doc",".docx",".xls",".xlsx",".csv",".txt",".md",".json",".js",".ts",".jsx",".tsx",".py",".java",".c",".cpp",".h",".hpp",".go",".rs",".rb",".php",".swift",".kt",".scala",".cs",".vb",".html",".htm",".css",".scss",".sass",".less",".xml",".yaml",".yml",".toml",".ini",".conf",".cfg",".sh",".bash",".zsh",".ps1",".bat",".cmd",".sql",".graphql",".prisma",".vue",".svelte",".astro",".r",".R",".m",".mat"],TY=20*1024*1024,Wd=20;function CY(e,t){var n;if(e.includes("pdf")||e.includes("word"))return i.jsx(Qr,{className:"w-4 h-4"});if(e.includes("sheet")||e.includes("excel")||e.includes("csv"))return i.jsx(t3,{className:"w-4 h-4"});if(e.startsWith("image/"))return i.jsx(m9,{className:"w-4 h-4"});const r=[".js",".ts",".jsx",".tsx",".py",".java",".c",".cpp",".go",".rs",".html",".css",".vue",".json",".xml",".yaml",".yml",".sh",".sql"];if(t){const s="."+((n=t.split(".").pop())==null?void 0:n.toLowerCase());if(r.includes(s))return i.jsx(h9,{className:"w-4 h-4"})}return i.jsx(f9,{className:"w-4 h-4"})}function _Y(e){var r;if(SY.includes(e.type))return!0;
1165const t="."+((r=e.name.split(".").pop())==null?void 0:r.toLowerCase());return gj.includes(t)}function AY(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}function Jk(e){return e.map((t,r)=>{var m,f,p,g,x;const n=r===0,s=r===e.length-1,o=["image-left","image-right","full-image"].includes(t.type),l=((m=t.bullets)==null?void 0:m.length)||0,u=((f=t.leftBullets)==null?void 0:f.length)||0,c=((p=t.rightBullets)==null?void 0:p.length)||0,d=t.type==="mixed"?"chart":t.type,h=t.type==="mixed";return{type:d,name:jY(t.type),elements:{hasTitle:!0,hasSubtitle:!!t.subtitle,bulletRange:l>0?[Math.max(1,l-1),l+2]:void 0,hasImage:o||h&&!!t.imageKeywords,imagePosition:o?t.type==="image-left"?"left":t.type==="image-right"?"right":"background":h?"left":void 0,hasStats:(t.type==="chart"||h)&&(!!t.items||!!t.stats),statsCount:((g=t.items)==null?void 0:g.length)||((x=t.stats)==null?void 0:x.length),hasComparison:t.type==="comparison",columnBulletRange:u>0||c>0?[Math.min(u,c),Math.max(u,c)+1]:void 0,hasTimeline:t.type==="timeline",timelineCount:t.type==="timeline"?l:void 0},repeatable:!n&&!s&&!["cover","end"].includes(t.type),position:n?"first":s?"last":"any"}})}function jY(e){return{cover:"Cover",section:"Section / TOC",content:"Content",chart:"Chart",comparison:"Comparison",timeline:"Timeline / List","image-left":"Image Left","image-right":"Image Right","full-image":"Full Image",quote:"Quote",stats:"Statistics",mixed:"Mixed Chart & Data",end:"End"}[e]||e}const ib={presentation:"presentation",pdf:"pdf",website:"website",spreadsheet:"spreadsheet",app:"app",design:"design"};function IY({onSend:e,onArtAgentClick:t,renderTitle:r}){const{t:n,i18n:s}=We(),a=$t(we=>we.activeTab),[o,l]=v.useState(""),[u,c]=v.useState(null),[d,h]=v.useState([]),[m,f]=v.useState(!1),[p,g]=v.useState(null),x=v.useRef(null),w=v.useRef(null),y=v.useRef(!1),b=v.useMemo(()=>[...n("welcome.quickChatItems",{returnObjects:!0})||[]].sort(()=>Math.random()-.5).slice(0,3),[n,s.language]);v.useEffect(()=>{const we=Be=>{var Ye;const ve=(Ye=Be.detail)==null?void 0:Ye.action;ve&&ib[ve]&&c(ib[ve])};return window.addEventListener("uniai-quick-action",we),()=>window.removeEventListener("uniai-quick-action",we)},[]);const k=v.useRef(a);v.useEffect(()=>{k.current!==a&&(k.current=a,c(null),l(""),h([]),g(null))},[a]);const{available:T,isLoading:S}=kY(),j=NY(),E=$t(we=>we.webSearchEnabled),A=$t(we=>we.toggleWebSearch),R=$t(we=>we.memoSearchEnabled),M=$t(we=>we.toggleMemoSearch),B=u3(),{tier:W,credits:H,thresholds:L}=Eh(),ee=!Eh().isLoading&&a==="agent"&&W==="basic",[G,Q]=v.useState(!1),D=!ee&&!S&&j!=null&&T<j;v.useEffect(()=>{var we;u||(we=x.current)==null||we.focus({preventScroll:!0})},[u]);const K=async we=>{const Be=we.target.files;if(!Be||Be.length===0)return;g(null);const ve=d.length,Ye=Be.length;if(ve+Ye>Wd){g(n("chatInput.errors.tooManyFiles",{max:Wd,current:ve})),w.current&&(w.current.value="");return}f(!0);try{const Ae=[],Ee=[];for(const Ce of Array.from(Be)){if(!_Y(Ce)){Ee.push(n("chatInput.errors.unsupportedType",{name:Ce.name}));continue}if(Ce.size>TY){Ee.push(n("chatInput.errors.fileTooLarge",{name:Ce.name}));continue}const X=await P9.upload(Ce);Ae.push(X)}Ee.length>0&&g(Ee.join("ï¼")),h(Ce=>[...Ce,...Ae])}catch(Ae){console.error("Upload failed:",Ae),g(n("chatInput.errors.uploadFailed"))}finally{f(!1),w.current&&(w.current.value="")}},V=we=>{h(Be=>Be.filter(ve=>ve.id!==we))},C=()=>{var we;(we=w.current)==null||we.click()},O=we=>{const Be=ib[we];Be&&c(Be)},q=(we,Be,ve)=>{if(ee){Q(!0);return}let Ye;if(u==="presentation")if(Be!=null&&Be.templateId){const Ee=pY(Be.templateId),Ce=y2.find(X=>X.id===Be.templateId);Ee?Ye={toolType:"presentation",templateId:Ee.templateId,style:Ee.style,colors:Ee.colors,autoSelect:!1,slideLayouts:Ce?Jk(Ce.slides):void 0}:Ce&&(Ye={toolType:"presentation",templateId:Ce.id,style:Ce.style,colors:Ce.colors,autoSelect:!1,slideLayouts:Jk(Ce.slides)})}else Ye={toolType:"presentation",autoSelect:!0};if(u==="pdf"){const Ee=Be!=null&&Be.templateId?v2.find(Ce=>Ce.id===Be.templateId):v2[0];Ye={toolType:"pdf",pdfTemplate:Ee?{templateId:Ee.id,name:Ee.name,sections:Ee.sections}:void 0}}u==="spreadsheet"&&(Ye={toolType:"spreadsheet",templateId:Be==null?void 0:Be.templateId});const Ae=[...d,...ve||[]];e(we,Ae.length>0?Ae:void 0,Ye),c(null),l(""),h([]),g(null)},ne=()=>{if(ee){Q(!0);return}!o.trim()||D||(e(o.trim(),d.length>0?d:void 0),l(""),h([]),g(null),x.current&&(x.current.style.height="auto"))},he=we=>{y.current||we.key==="Enter"&&!we.shiftKey&&(we.preventDefault(),ne())},xe=()=>{y.current=!0},Oe=()=>{y.current=!1},Se=()=>{const we=x.current;we&&(we.style.height="auto",we.style.height=`${Math.min(we.scrollHeight,200)}px`)};return u&&!t?i.jsxs("div",{className:"h-full",children:[i.jsx(Xk,{toolType:u,onSubmit:q,onBack:()=>c(null),sendDisabled:ee,onSendDisabledClick:()=>Q(!0)}),i.jsx(up,{open:G,onClose:()=>Q(!1),requiredCredits:L.agent,currentCredits:H})]}):i.jsxs(i.Fragment,{children:[!u&&(r==null?void 0:r()),i.jsxs("div",{className:"w-full mb-6 max-w-3xl",children:[i.jsx(wY,{extraTab:t?{icon:w1,label:"Design Agent",onClick:t}:void 0,lockable:!t}),u&&t&&i.jsxs(i.Fragment,{children:[i.jsx(Xk,{toolType:u,onSubmit:q,onBack:()=>c(null),sendDisabled:ee,onSendDisabledClick:()=>Q(!0),hideTitle:!0}),i.jsx(up,{open:G,onClose:()=>Q(!1),requiredCredits:L.agent,currentCredits:H})]}),!u&&i.jsxs(i.Fragment,{children:[d.length>0&&i.jsx("div",{className:"flex flex-wrap gap-2 mb-2 px-3",children:d.map(we=>i.jsxs("div",{className:"flex items-center gap-2 bg-secondary/70 rounded-lg px-3 py-1.5 text-sm",children:[CY(we.mimeType,we.name),i.jsx("span",{className:"max-w-[150px] truncate",children:we.name}),i.jsxs("span",{className:"text-muted-foreground text-xs",children:["(",AY(we.size),")"]}),i.jsx("button",{onClick:()=>V(we.id),className:"p-0.5 hover:bg-destructive/20 rounded transition-colors",title:n("chatInput.removeFile"),children:i.jsx(cr,{className:"w-3.5 h-3.5 text-muted-foreground hover:text-destructive"})})]},we.id))}),p&&i.jsx("div",{className:"text-destructive text-sm px-3 mb-2",children:p}),i.jsxs("div",{className:"rounded-2xl border border-border bg-secondary/30 p-3 shadow-sm focus-within:border-primary/50 transition-colors",children:[i.jsx("input",{ref:w,type:"file",multiple:!0,accept:gj.join(","),onChange:K,className:"hidden"}),i.jsx("textarea",{ref:x,value:o,onChange:we=>l(we.target.value),onKeyDown:he,onInput:Se,onCompositionStart:xe,onCompositionEnd:Oe,placeholder:d.length>0?n("chatInput.placeholderWithFiles"):n(a==="chat"?"chatInput.placeholderChat":"chatInput.placeholderAgent"),rows:1,maxLength:1e3,className:it("w-full bg-transparent resize-none outline-none text-foreground placeholder:text-muted-foreground","min-h-[24px] max-h-[200px] py-2")}),i.jsxs("div",{className:"flex items-center justify-between mt-2",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("button",{onClick:C,disabled:m||d.length>=Wd,className:it("p-1.5 text-muted-foreground hover:text-foreground hover:bg-secondary rounded-lg transition-colors",(m||d.length>=Wd)&&"opacity-50 cursor-not-allowed"),title:n("chatInput.uploadTitle",{max:Wd}),children:m?i.jsx("div",{className:"w-5 h-5 border-2 border-current border-t-transparent roun
1165ded-full animate-spin"}):i.jsx(a3,{className:"w-5 h-5"})}),B&&a==="chat"&&i.jsxs("div",{className:"flex items-center gap-3 ml-1",children:[i.jsxs("button",{type:"button",onClick:A,className:"flex items-center gap-1.5 text-muted-foreground",children:[i.jsx(Tn,{className:"w-4 h-4"}),i.jsx("span",{className:"text-sm font-medium",children:n("chatInput.webSearch")}),i.jsx("div",{className:it("w-8 h-[18px] rounded-full flex items-center px-0.5 transition-colors",E?"bg-primary":"bg-muted-foreground/30"),children:i.jsx("div",{className:it("w-3.5 h-3.5 rounded-full bg-white transition-transform",E?"ml-auto":"ml-0")})})]}),i.jsxs("button",{type:"button",onClick:M,className:"flex items-center gap-1.5 text-muted-foreground",children:[i.jsx(Gw,{className:"w-4 h-4"}),i.jsx("span",{className:"text-sm font-medium",children:n("chatInput.memo")}),i.jsx("div",{className:it("w-8 h-[18px] rounded-full flex items-center px-0.5 transition-colors",R?"bg-primary":"bg-muted-foreground/30"),children:i.jsx("div",{className:it("w-3.5 h-3.5 rounded-full bg-white transition-transform",R?"ml-auto":"ml-0")})})]})]})]}),i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("button",{onClick:ne,disabled:!ee&&(!o.trim()||m||D),className:it("p-1.5 rounded-lg transition-all shrink-0",ee?"bg-muted text-muted-foreground opacity-50":D?"bg-destructive/20 text-destructive cursor-not-allowed":o.trim()&&!m?"bg-[var(--theme)] text-white hover:bg-[var(--theme-hover)]":"bg-[var(--theme-medium)] text-[var(--text-muted)] curs
1165or-not-allowed"),title:ee?n("chatInput.agentLocked",{credits:L.agent}):D?n("chatInput.insufficientCredits",{credits:j}):n("chatInput.send"),children:i.jsx(Gu,{className:"w-4 h-4"})})})]}),i.jsx(EY,{})]}),o&&o.includes("[")&&i.jsx("p",{className:"text-xs text-muted-foreground text-center mt-2",children:n("welcome.bracketHint")})]})]}),!u&&a==="chat"&&i.jsx("div",{className:"grid grid-cols-3 gap-2 w-full max-w-3xl mx-auto",children:b.map(we=>i.jsxs("button",{onClick:()=>{var Be;l(we.text),(Be=x.current)==null||Be.focus()},className:it("flex items-center gap-2 px-4 py-2 min-w-0 shrink-1","bg-secondary/60 hover:bg-secondary border border-border/50 hover:border-border","rounded-full text-sm font-medium transition-all duration-200","hover:shadow-sm"),children:[i.jsx("span",{className:"text-base leading-none shrink-0",children:we.icon}),i.jsx("span",{className:"truncate",children:we.text})]},we.text))}),!u&&a==="agent"&&i.jsx(ZK,{onSelect:O}),i.jsx(up,{open:G,onClose:()=>Q(!1),requiredCredits:L.agent,currentCredits:H})]})}function RY(){const e=ut(n=>n.isAuthenticated),t=ut(n=>n.openLoginModal),r=v.useCallback(()=>e?!0:(t(),!1),[e,t]);return{isAuthenticated:e,requireAuth:r}}const xj={text:{upstream:["text","image","video"],downstream:["text","image","video","audio"]},image:{upstream:["text","image"],downstream:["text","image","video","director"]},video:{upstream:["text","image","video","audio"],downstream:["text","video"]},audio:{upstream:["text"],downstream:["video"]},director:{upstream:["image","panorama"],downstream:["image","text"]},panorama:{upstream:["image"],downstream:["director"]}},DY={upstream:["text","image","video"],downstream:["text","image","video"]};function zye(e,t){const r=e&&xj[e]||DY;return t==="left"?r.upstream:r.downstream}function MY(e,t){const r=xj[e];return!r||!r.downstream.includes(t)?"incompatible":`${e}2${t}`}function OY(e,t){return MY(e,t)!=="incompatible"}function oa(e,t){return e>0&&e>=t}function Hye(e,t){var a;const r=new Map;for(const o of e)r.set(o.id,o.type);const n=new Map;for(const o of t){const l=r.get(o.sourceId);if(l!=="image"&&l!=="video"&&l!=="audio")continue;let u=n.get(o.targetId);u||(u={img:0,vid:0,aud:0},n.set(o.targetId,u)),l==="image"?u.img++:l==="video"?u.vid++:u.aud++}const s=new Map;for(const o of e){if(o.type!=="text"&&o.type!=="image"&&o.type!=="video")continue;const l=(a=o.data)==null?void 0:a.generationParams,u=l==null?void 0:l.modelMaxConfig;if(!u)continue;const c=n.get(o.id)??{img:0,vid:0,aud:0},d=new Set;if(o.type==="text"){let m=c.img,f=c.vid;for(const p of(l==null?void 0:l.userTextAttachments)||[])p.type==="image"?m++:p.type==="video"&&f++;oa(m,Number(u.maxImagesPerRequest??0))&&d.add("image"),oa(f,Number(u.maxVideosPerRequest??0))&&d.add("video"),m>0&&d.add("video"),f>0&&d.add("image")}else if(o.type==="image"){const m=c.img+((l==null?void 0:l.userAttachments)||[]).length;oa(m,Number(u.maxReferenceImagesPerRequest??0))&&d.add("image")}else oa(c.img,Number(u.maxReferenceImagesPerRequest??0))&&d.add("image"),oa(c.vid,Number(u.maxReferenceVideosPerRequest??0))&&d.add("video"),oa(c.aud,Number(u.maxReferenceAudiosPerRequest??0))&&d.add("audio");const h=[...d].sort().join(",");h&&s.set(o.id,h)}return s}const C3=new Set;function LY(e){return C3.has(e)}function PY(e){C3.add(e)}function FY(){C3.clear()}const bj={connections:[],isDraggingConnection:!1,dragSource:null,dragTarget:null},BY=(e,t)=>({...bj,addConnection:(r,n)=>{var h,m,f,p,g,x,w,y,b,k;const{elements:s,connections:a}=t(),o=s.find(T=>T.id===r),l=s.find(T=>T.id===n);if(!o||!l||!OY(o.type,l.type)||a.some(T=>T.sourceId===r&&T.targetId===n)||r===n)return null;if(l.type==="text"&&(o.type==="image"||o.type==="video")){const T=a.filter(R=>R.targetId===n);let S=0,j=0;for(const R of T){const M=s.find(B=>B.id===R.sourceId);(M==null?void 0:M.type)==="image"?S++:(M==null?void 0:M.type)==="video"&&j++}const E=((m=(h=l.data)==null?void 0:h.generationParams)==null?void 0:m.userTextAttachments)||[];for(const R of E)R.type==="image"?S++:R.type==="video"&&j++;if(o.type==="image"&&j>0)return Qe.error(Rt.t("artCanvas.imageVideoMutexRemoveVideo")),null;if(o.type==="video"&&S>0)return Qe.error(Rt.t("artCanvas.imageVideoMutexRemoveImage")),null;const A=(p=(f=l.data)==null?void 0:f.generationParams)==null?void 0:p.modelMaxConfig;
1165if(A){const R=Number(A.maxImagesPerRequest??0),M=Number(A.maxVideosPerRequest??0);if(o.type==="image"&&oa(S,R))return Qe.error(Rt.t("artCanvas.imageLimitReached",{max:R})),null;if(o.type==="video"&&oa(j,M))return Qe.error(Rt.t("artCanvas.videoLimitReached",{max:M})),null}}if(l.type==="video"&&(o.type==="image"||o.type==="video"||o.type==="audio")){const T=a.filter(R=>R.targetId===n);let S=0,j=0,E=0;for(const R of T){const M=s.find(B=>B.id===R.sourceId);(M==null?void 0:M.type)==="image"?S++:(M==null?void 0:M.type)==="video"?j++:(M==null?void 0:M.type)==="audio"&&E++}const A=(x=(g=l.data)==null?void 0:g.generationParams)==null?void 0:x.modelMaxConfig;if(A){const R=Number(A.maxReferenceImagesPerRequest??0),M=Number(A.maxReferenceVideosPerRequest??0),B=Number(A.maxReferenceAudiosPerRequest??0);if(o.type==="image"&&oa(S,R))return Qe.error(Rt.t("artCanvas.refImageLimitReached",{max:R})),null;if(o.type==="video"&&oa(j,M))return Qe.error(Rt.t("artCanvas.refVideoLimitReached",{max:M})),null;if(o.type==="audio"&&oa(E,B))return Qe.error(Rt.t("artCanvas.refAudioLimitReached",{max:B})),null}}const c=`conn_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,d={id:c,sourceId:r,targetId:n,sourcePort:"output",targetPort:"input"};return e(T=>({connections:[...T.connections,d]})),t().collabRoomJoined&&((y=(w=t()).broadcastOp)==null||y.call(w,{type:"connection:add",connection:d})),(k=(b=t()).saveCanvasState)==null||k.call(b).catch(()=>{}),c},removeConnection:r=>{var n,s,a,o;PY(r),e(l=>({connections:l.connections.filter(u=>u.id!==r)})),t().collabRoomJoined&&((s=(n=t()).broadcastOp)==null||s.call(n,{type:"connection:delete",connectionId:r})),(o=(a=t()).saveCanvasState)==null||o.call(a).catch(()=>{})},startConnectionDrag:r=>{e({isDraggingConnection:!0,dragSource:{elementId:r,port:"output"},dragTarget:null})},updateConnectionDrag:(r,n)=>{e({dragTarget:{x:r,y:n}})},endConnectionDrag:r=>{const{dragSource:n}=t();n&&r&&t().addConnection(n.elementId,r),e({isDraggingConnection:!1,dragSource:null,dragTarget:null})},cancelConnectionDrag:()=>{e({isDraggingConnection:!1,dragSource:null,dragTarget:null})},getElementConnections:r=>t().connections.filter(n=>n.sourceId===r||n.targetId===r),clearConnections:()=>{e({connections:[]})}});function Uo(...e){return W9(B9(e))}function UY(e){const t=Math.floor(e/60),r=Math.floor(e%60);return`${t}:${r.toString().padStart(2,"0")}`}function qye(e){return e?UY(e):"--:--"}function Wye(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}function Vye(e){let t=0;for(const r of e){const n=r.codePointAt(0)||0;n>=19968&&n<=40959||n>=13312&&n<=19903||n>=63744&&n<=64255||n>=131072&&n<=173791?t+=2:t+=1}return t}function yj(e,t="id"){const r=new Set,n=[];for(const s of e){const a=s[t];r.has(a)||(r.add(a),n.push(s))}return n}function Gye(e,t){if(!e)return{width:t,height:t};const[r,n]=e.split(":"),s=Number(r),a=Number(n);if(!Number.isFinite(s)||!Number.isFinite(a)||s<=0||a<=0)return{width:t,height:t};const o=Math.max(1,Math.round(t*a/s));return{width:t,height:o}}const $Y=.1,zY=5,Kye=1.05,Yye=1.2,k1=560,Qye=720,en=k1,Ca=k1,Ym=k1/2,Xye=5;function Zye(e,t){const[r,n]=t.split(":").map(Number);return!r||!n?e:Math.round(e*n/r)}const Ms=20,Bc=100,Uc=100,Jye=50,eve=40,tve=["rgba(100, 116, 139, 0.08)","rgba(59, 130, 246, 0.08)","rgba(34, 197, 94, 0.08)","rgba(168, 85, 247, 0.08)","rgba(249, 115, 22, 0.08)","transparent"],rve=5,HY=2e3,qY=120,nve=50,iu=10,WY=4,VY=e=>new Promise(t=>{const r=new Image;xa(e)&&(r.crossOrigin="anonymous");let n=!1;const s=(a,o)=>{n||(n=!0,t({w:a,h:o}))};r.onload=()=>s(r.naturalWidth||512,r.naturalHeight||512),r.onerror=()=>s(512,512),r.src=e}),GY=e=>new Promise(t=>{const r=document.createElement("video");r.preload="metadata",r.muted=!0,xa(e)&&(r.crossOrigin="anonymous");let n=!1;const s=(a,o,l)=>{n||(n=!0,r.src="",t({w:a,h:o,duration:l}))};r.addEventListener("loadedmetadata",()=>{const a=r.duration&&isFinite(r.duration)?r.duration:0;s(r.videoWidth||512,r.videoHeight||512,a)},{once:!0}),r.addEventListener("error",()=>s(512,512,0),{once:!0}),r.src=e}),KY=async e=>{try{const r=await(await fetch(e)).arrayBuffer(),n=new AudioContext,s=await n.decodeAudioData(r),a=s.duration,o=s.getChannelData(0),l=80,u=Math.floor(o.length/l),c=Array.from({length:l},(d,h)=>{let m=0;for(let f=h*u;f<(h+1)*u&&f<o.length;f++)m=Math.max(m,Math.abs(o[f]));return m});return await n.close(),{duration:a,waveformData:c}}catch{try{const t=new Audio(e),r=await new Promise(n=>{t.addEventListener("loadedmetadata",()=>n(t.duration||0),{once:!0}),t.addEventListener("error",()=>n(0),{once:!0})});return{duration:isFinite(r)?r:0,waveformData:[]}}catch{return{duration:0,waveformData:[]}}}},YY=["placeholder","processing","progress","progressMessage"],Ba=new Map;
1165let Zi=null,ob=!1,ci=0;const yl=new Set;function sve(e,t){yl.add(`${e}:${t}`)}function Vd(e,t){const r=dg(t);r&&Ba.set(`${e}:${t.id}`,ug(r))}function ug(e){return JSON.stringify(e)}function dg(e){if(e.id.startsWith("el_")||e.id.startsWith("_placeholder_"))return null;const{processing:t,placeholder:r,resolvedUrl:n,persistenceStatus:s,...a}=e.data||{};return!!e.assetId?(delete a.url,delete a.coverUrl,delete a.thumbnailUrl,delete a.images):(typeof a.url=="string"&&(a.url=lb(a.url)),typeof a.coverUrl=="string"&&(a.coverUrl=lb(a.coverUrl)),typeof a.thumbnailUrl=="string"&&(a.thumbnailUrl=lb(a.thumbnailUrl))),{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,zIndex:e.zIndex,data:a}}function eN(e){const t=e,r=t.data||{},{processing:n,placeholder:s,resolvedUrl:a,persistenceStatus:o,...l}=r,u={type:t.type,x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation??0,zIndex:t.zIndex??0,data:l};return typeof t.assetId=="string"&&t.assetId&&(u.assetId=t.assetId),typeof t.sourceTaskId=="string"&&t.sourceTaskId&&(u.sourceTaskId=t.sourceTaskId),u}function QY(e,t){const r=`${e}:`;for(const n of Ba.keys())n.startsWith(r)&&Ba.delete(n);for(const n of t){const s=dg(n);if(!s)continue;const a=`${e}:${n.id}`;Ba.set(a,ug(s))}}function lb(e){if(!e||!e.includes("X-Amz-"))return e;try{const t=new URL(e);return[...t.searchParams.keys()].forEach(r=>{(r.startsWith("X-Amz-")||r.startsWith("x-amz-")||r==="x-id")&&t.searchParams.delete(r)}),t.searchParams.toString()?t.toString():t.origin+t.pathname}catch{return e}}const XY="art-element-id-replaced",vj={elements:[],selectedElementId:null,selectedElementIds:[],hoveredElementId:null,zoom:1,offsetX:0,offsetY:0},ZY=(e,t)=>({...vj,setSelectedElement:r=>{e({selectedElementId:r,selectedElementIds:r?[r]:[]})},setSelectedElements:r=>{const n=r.filter((s,a)=>r.indexOf(s)===a);e({selectedElementIds:n,selectedElementId:n.length?n[n.length-1]:null})},toggleSelection:r=>{e(n=>{const a=n.selectedElementIds.includes(r)?n.selectedElementIds.filter(o=>o!==r):[...n.selectedElementIds,r];return{selectedElementIds:a,selectedElementId:a.length?a[a.length-1]:null}})},moveElementsBy:(r,n,s)=>{if(n===0&&s===0||r.length===0)return;const a=new Set(r);e(o=>({elements:o.elements.map(l=>a.has(l.id)?{...l,x:l.x+n,y:l.y+s}:l)}))},setHoveredElementId:r=>{e({hoveredElementId:r})},setZoom:r=>{e({zoom:Math.max($Y,Math.min(zY,r))})},setOffset:(r,n)=>{e({offsetX:r,offsetY:n})},focusOnRect:(r,n,s,a,o=.8)=>{if(typeof window>"u")return;const l=r+s/2,u=n+a/2;e({zoom:o,offsetX:window.innerWidth/2-l*o,offsetY:window.innerHeight/2-u*o})},getNextZIndex:()=>{const{elements:r}=t();return r.length===0?1:Math.max(...r.map(n=>n.zIndex))+1},addElement:(r,n)=>{const s=n||`el_${Date.now()}_${Math.random().toString(36).slice(2,9)}`,a={...r,id:s};return e(o=>n&&o.elements.some(l=>l.id===s)?{elements:o.elements.map(l=>l.id===s?a:l)}:{elements:[...o.elements,a]}),s},adoptServerElement:(r,n)=>{var o,l;const{project:s}=t();if(!s)return!1;if(ci++,!t().elements.some(u=>u.id===r))return yl.add(`${s.id}:${n.id}`),U.delete(`/art/projects/${s.id}/elements/${n.id}`).catch(()=>{}),!1;Vd(s.id,n);const a=(t().connections||[]).some(u=>u.sourceId===r||u.targetId===r);return e(u=>({elements:(u.elements.some(d=>d.id===n.id)?u.elements.filter(d=>d.id!==n.id):u.elements).map(d=>d.id===r?{...n,x:d.x,y:d.y,width:d.width,height:d.height,rotation:d.rotation,zIndex:d.zIndex}:d),connections:(u.connections||[]).map(d=>({...d,sourceId:d.sourceId===r?n.id:d.sourceId,targetId:d.targetId===r?n.id:d.targetId})),selectedElementId:u.selectedElementId===r?n.id:u.selectedElementId,selectedElementIds:u.selectedElementIds.map(d=>d===r?n.id:d)})),a&&((l=(o=t()).saveCanvasState)==null||l.call(o).catch(()=>{})),!0},updateElement:(r,n)=>{e(s=>({elements:s.elements.map(a=>a.id===r?{...a,...n}:a)}))},deleteElement:r=>{var o,l;const{project:n,elements:s}=t(),a=s.find(u=>u.id===r);if(e(u=>({elements:u.elements.filter(c=>c.id!==r),selectedElementId:u.selectedElementId===r?null:u.selectedElementId,selectedElementIds:u.selectedElementIds.filter(c=>c!==r),connections:u.connections?u.connections.filter(c=>c.sourceId!==r&&c.targetId!==r):[]})),a&&t().collabRoomJoined&&((l=(o=t()).broadcastOp)==null||l.call(o,{type:"element:delete",elementId:r})),(a==null?void 0:a.type)==="storyboard"){const u=a.data,c=(u==null?void 0:u.taskId)||(u==null?void 0:u.pendingTaskId);c&&zA.deleteStoryboard(c).catch(()=>{})}a&&n&&!r.startsWith("el_")&&!r.startsWith("_placeholder_")&&(yl.add(`${n.id}:${r}`),U.delete(`/art/projects/${n.id}/elements/${r}`).catch(()=>{}))},refreshElements:async()=>{var n;const{project:r}=t();if(r)try{let s=null;for(let d=0;d<3;d++){if(Zi)try{await Zi}catch{}const h=ci,m=await U.get(`/art/projects/${r.id}`);if(ci===h&&!Zi){s=((n=m.data)==null?void 0:n.elements)||[];break}}if(!s)return;s=s.filter(d=>!yl.has(`${r.id}:${d.id}`));
1165const a=t().elements,o=new Map(a.map(d=>[d.id,d])),l=s.map(d=>{const h=o.get(d.id);if(!h)return d;const m=`${r.id}:${d.id}`,f=Ba.get(m);if(f!==void 0){const x=dg(h);if(x&&ug(x)!==f){const w=d.data||{},y=h.data||{},b={};return w.resolvedUrl!==void 0&&(b.resolvedUrl=w.resolvedUrl),w.persistenceStatus!==void 0&&(b.persistenceStatus=w.persistenceStatus),{...h,data:{...y,...b}}}}const p=h.data;if(!p)return d;const g={};for(const x of YY)p[x]!==void 0&&(g[x]=p[x]);return Object.keys(g).length===0?d:{...d,data:{...d.data,...g}}});for(const d of s)Vd(r.id,d);const u=new Set(s.map(d=>d.id)),c=a.filter(d=>!u.has(d.id)&&(d.id.startsWith("el_")||d.id.startsWith("_placeholder_")));e({elements:c.length?[...l,...c]:l})}catch{}},saveCanvasState:async()=>{if(Zi)return ob=!0,Zi;const r=async()=>{var d,h,m,f,p;const{project:n,elements:s,zoom:a,offsetX:o,offsetY:l}=t();if(!n)return;const c=(t().connections||[]).filter(g=>{const x=g.sourceId||"",w=g.targetId||"";return!(x.startsWith("el_temp_")||x.startsWith("_placeholder_")||w.startsWith("el_temp_")||w.startsWith("_placeholder_"))});try{const g=s.filter(j=>!j.id.startsWith("el_")&&!j.id.startsWith("_placeholder_")),x=g.map(j=>dg(j)).filter(j=>j!==null),w=new Map,y=[];for(const j of x){const E=`${n.id}:${j.id}`,A=ug(j);w.set(E,A),Ba.get(E)!==A&&y.push(j)}const b=50;for(let j=0;j<y.length;j+=b){const E=y.slice(j,j+b);try{await U.patch(`/art/projects/${n.id}/elements/batch`,{updates:E});for(const A of E){const R=`${n.id}:${A.id}`,M=w.get(R);M&&Ba.set(R,M)}}catch{for(const A of E)try{await U.patch(`/art/projects/${n.id}/elements/${A.id}`,A);const R=`${n.id}:${A.id}`,M=w.get(R);M&&Ba.set(R,M)}catch{}}}let k=c;try{const j=await U.get(`/art/projects/${n.id}`),E=((h=(d=j==null?void 0:j.data)==null?void 0:d.canvasState)==null?void 0:h.connections)??((p=(f=(m=j==null?void 0:j.data)==null?void 0:m.project)==null?void 0:f.canvasState)==null?void 0:p.connections)??[];if(Array.isArray(E)&&E.length){const A=new Set(c.map(M=>String(M.id))),R=E.filter(M=>M&&typeof M=="object"&&M.id&&!A.has(String(M.id))&&!LY(String(M.id)));R.length&&(k=[...c,...R])}}catch{}await U.patch(`/art/projects/${n.id}`,{canvasState:{zoom:a,offsetX:o,offsetY:l,connections:k,generateMode:t().generateMode}});const T=new Set(g.map(j=>j.id)),S=`${n.id}:`;for(const j of Ba.keys())j.startsWith(S)&&!T.has(j.slice(S.length))&&Ba.delete(j)}catch{}};return Zi=(async()=>{try{do ob=!1,await r(),ci++;while(ob)}finally{Zi=null}})(),Zi},saveElementPosition:async r=>{const{project:n,elements:s}=t();if(!n)return;const a=s.find(o=>o.id===r);if(a&&!(a.id.startsWith("el_")||a.id.startsWith("_placeholder_")))try{await U.patch(`/art/projects/${n.id}/elements/${a.id}`,{x:a.x,y:a.y,width:a.width,height:a.height,rotation:a.rotation,zIndex:a.zIndex}),ci++}catch{}},addServerElement:async(r,n)=>{const{project:s}=t();if(!s)return;const a=`el_temp_${Date.now()}_${Math.random().toString(36).slice(2,9)}`,o={...r,id:a};return e(l=>({elements:[...l.elements,o]})),n!=null&&n.skipFocus||t().focusOnRect(r.x,r.y,r.width,r.height),U.post(`/art/projects/${s.id}/elements`,eN(r)).then(l=>{var d,h,m,f;const u=l.data;if(!u){e(p=>({elements:p.elements.filter(g=>g.id!==a),connections:(p.connections||[]).filter(g=>g.sourceId!==a&&g.targetId!==a)}));return}if(ci++,!t().elements.some(p=>p.id===a)){yl.add(`${s.id}:${u.id}`),U.delete(`/art/projects/${s.id}/elements/${u.id}`).catch(()=>{});return}Vd(s.id,u),e(p=>{const g=(p.connections||[]).map(b=>({...b,sourceId:b.sourceId===a?u.id:b.sourceId,targetId:b.targetId===a?u.id:b.targetId})),x=p.selectedElementId===a?u.id:p.selectedElementId,w=p.selectedElementIds.map(b=>b===a?u.id:b);return{elements:(p.elements.some(b=>b.id===u.id)?p.elements.filter(b=>b.id!==u.id):p.elements).map(b=>b.id===a?{...u,x:b.x,y:b.y,width:b.width,height:b.height,rotation:b.rotation,zIndex:b.zIndex}:b),connections:g,selectedElementId:x,selectedElementIds:w}}),typeof window<"u"&&window.dispatchEvent(new CustomEvent(XY,{detail:{tempId:a,realId:u.id}})),t().collabRoomJoined&&((h=(d=t()).broadcastOp)==null||h.call(d,{type:"element:add",element:u})),(t().connections||[]).some(p=>p.sourceId===u.id||p.targetId===u.id)&&((f=(m=t()).saveCanvasState)==null||f.call(m).catch(()=>{}))}).catch(()=>{e(l=>({elements:l.elements.filter(u=>u.id!==a),connections:(l.connections||[]).filter(u=>u.sourceId!==a&&u.targetId!==a)}))}),a},addServerElementAndWait:async(r,n)=>{var l,u;const{project:s}=t();if(!s)return;const a=`_placeholder_${Date.now()}_${Math.random().toString(36).slice(2,9)}`,o={...r,id:a};e(c=>({elements:[...c.elements,o]})),n!=null&&n.skipFocus||t().focusOnRect(r.x,r.y,r.width,r.height);try{const d=(await U.post(`/art/projects/${s.id}/elements`,eN(r))).data;if(!d){e(h=>({elements:h.elements.filter(m=>m.id!==a)}));return}if(ci++,!t().elements.some(h=>h.id===a)){yl.add(`${s.id}:${d.id}`),U.delete(`/art/projects/${s.id}/elements/${d.id}`).catch(()=>{});return}return Vd(s.id,d),e(h=>{const m=(h.connections||[]).map(p=>({...p,sourceId:p.sourceId===a?d.id:p.sourceId,targetId:p.targetId===a?d.id:p.targetId}));return{elements:(h.elements.some(p=>p.id===d.id)?h.elements.filter(p=>p.id!==d.id):h.elements).map(p=>p.id===a?{...d,x:p.x,y:p.y,width:p.width,height:p.height,rotation:p.rotation,zIndex:p.zIndex}:p),connections:m,selectedElementId:h.selectedElementId===a?d.id:h.selectedElementId,selectedElementIds:h.selectedElementIds.map(p=>p===a?d.id:p)}}),t().collabRoomJoined&&((u=(l=t()).broadcastOp)==null||u.call(l,{type:"element:add",element:d})),d.id}catch{e(c=>({elements:c.elements.filter(d=>d.id!==a)}));return}},uploadAndAddElement:async(r,n,s)=>{var x,w;const{project:a}=t();if(!a)return;const o=URL.createObjectURL(r),l=`_placeholder_${Date.now()}_${Math.random().toString(36).slice(2,9)}`,u=r.type||"",c=u.startsWith("video/"),d=u.startsWith("audio/");let h,m,f,p,g;if(d){const{duration:y,waveformData:b}=await KY(o),k={assetId:"",url:o,duration:y,waveformData:b,sourceLabel:"Upload Audio",placeholder:!0};h={id:l,type:"audio",x:n,y:s,width:k1,height:120,rotation:0,zIndex:t().getNextZIndex(),data:k},m="/storage/upload/audio",f=r.name||"pasted-audio.mp3",g=(T,S)=>({assetId:S,url:T,duration:y,waveformData:b,sourceLabel:"Upload Audio"})}else if(c){const{w:y,h:b,duration:k}=await GY(o);let T=y,S=b;if(T>Ca||S>Ca){const E=Math.min(Ca/T,Ca/S);T*=E,S*=E}if(T<Ym){const E=Math.min(Ym/T,Ca/S);E>1&&(T*=E,S*=E)}const j={assetId:"",url:o,coverUrl:"",originalWidth:y,originalHeight:b,duration:k,sourceLabel:"Upload Video",placeholder:!0};h={id:l,type:"video",x:n,y:s,width:T,height:S,rotation:0,zIndex:t().getNextZIndex(),data:j},m="/storage/upload/video",f=r.name||"pasted-video.mp4",p=3e5,g=(E,A)=>({assetId:A,videoAssetId:A,url:E,coverUrl:"",originalWidth:y,originalHeight:b,duration:k,sourceLabel:"Upload Video"})}else{const{w:y,h:b}=await VY(o);let k=y,T=b;if(k>Ca||T>Ca){const j=Math.min(Ca/k,Ca/T);k*=j,T*=j}if(k<Ym){const j=Math.min(Ym/k,Ca/T);j>1&&(k*=j,T*=j)}const S={assetId:"",url:o,originalWidth:y,originalHeight:b,processing:!0};h={id:l,type:"image",x:n,y:s,width:k,height:T,rotation:0,zIndex:t().getNextZIndex(),data:S},m="/storage/upload/image",f=r.name||"pasted-image.png",g=(j,E)=>({assetId:E,url:j,originalWidth:y,originalHeight:b})}e(y=>({elements:[...y.elements,h]}
1165)),t().focusOnRect(n,s,h.width,h.height);try{const y=new FormData;y.append("file",r,f);const b=await U.post(m,y,{headers:{"Content-Type":"multipart/form-data"},...p?{timeout:p}:{}}),k=(x=b.data)==null?void 0:x.url;if(!k)throw new Error("No URL returned from upload");if(!t().elements.some(j=>j.id===l)){URL.revokeObjectURL(o);return}const S=(await U.post(`/art/projects/${a.id}/elements`,{type:h.type,x:n,y:s,width:h.width,height:h.height,rotation:0,zIndex:h.zIndex,data:g(k,((w=b.data)==null?void 0:w.id)||"")})).data;S&&!t().elements.some(j=>j.id===l)?(ci++,yl.add(`${a.id}:${S.id}`),U.delete(`/art/projects/${a.id}/elements/${S.id}`).catch(()=>{})):S?(ci++,Vd(a.id,S),e(j=>({elements:(j.elements.some(A=>A.id===S.id)?j.elements.filter(A=>A.id!==S.id):j.elements).map(A=>A.id===l?{...S,x:A.x,y:A.y,width:A.width,height:A.height,rotation:A.rotation,zIndex:A.zIndex}:A),selectedElementId:j.selectedElementId===l?S.id:j.selectedElementId,selectedElementIds:j.selectedElementIds.map(A=>A===l?S.id:A)}))):e(j=>({elements:j.elements.filter(E=>E.id!==l)})),URL.revokeObjectURL(o)}catch(y){throw e(b=>({elements:b.elements.filter(k=>k.id!==l)})),URL.revokeObjectURL(o),y}},decomposeLayers:async(r,n)=>{var u,c,d,h;const{project:s}=t();if(!s)return{count:0,warnings:[]};const a=await U.post(`/art/projects/${s.id}/decompose`,{elementId:r,...n!=null&&n.payWith?{payWith:n.payWith}:{}});if((u=a.data)!=null&&u.needsDecision&&a.data.code===40251)return await nc.getState().requestSelfPay(a.data)?t().decomposeLayers(r,{payWith:"self"}):{count:0,warnings:[]};await t().refreshElements(),e({selectedElementId:null,selectedElementIds:[],isLayerPanelOpen:!0});const o=((d=(c=a.data)==null?void 0:c.layers)==null?void 0:d.length)||0,l=((h=a.data)==null?void 0:h.warnings)||[];return{count:o,warnings:l}}}),wj={project:null,projects:[],isLoading:!1,isLoadingMore:!1,hasMore:!0,projectPage:1,error:null},JY=(e,t)=>({...wj,loadProjects:async(r,n)=>{var s;e({isLoading:!0,error:null,projectPage:1,hasMore:!0});try{const a={page:"1",limit:"20"};r&&(a.teamId=r),(s=n==null?void 0:n.search)!=null&&s.trim()&&(a.search=n.search.trim()),n!=null&&n.dateFrom&&(a.dateFrom=n.dateFrom),n!=null&&n.dateTo&&(a.dateTo=n.dateTo);const o=await U.get("/art/projects",{params:a}),{projects:l,pagination:u}=o.data;e({projects:l,isLoading:!1,projectPage:1,hasMore:u?u.page<u.totalPages:l.length>=20})}catch(a){e({error:a.message||"Failed to load projects",isLoading:!1})}},loadMoreProjects:async(r,n)=>{var u;const{isLoadingMore:s,hasMore:a,projectPage:o}=t();if(s||!a)return;const l=o+1;e({isLoadingMore:!0});try{const c={page:String(l),limit:"20"};r&&(c.teamId=r),(u=n==null?void 0:n.search)!=null&&u.trim()&&(c.search=n.search.trim()),n!=null&&n.dateFrom&&(c.dateFrom=n.dateFrom),n!=null&&n.dateTo&&(c.dateTo=n.dateTo);const d=await U.get("/art/projects",{params:c}),{projects:h,pagination:m}=d.data;e(f=>({projects:yj([...f.projects,...h]),isLoadingMore:!1,projectPage:l,hasMore:m?m.page<m.totalPages:h.length>=20}))}catch{e({isLoadingMore:!1})}},loadProject:async r=>{e({isLoading:!0,error:null,project:null,elements:[],agentMessages:[],isAgentStreaming:!1,pipelineRunId:null,pipelineRunStatus:null,pipelineNodeStatuses:[],isPipelineRunning:!1});try{const s=(await U.get(`/art/projects/${r}`)).data,a=s.canvasState||{},o=(s.elements||[]).map(d=>{var h,m;if((h=d.data)!=null&&h.processing||(m=d.data)!=null&&m.placeholder){const{processing:f,placeholder:p,...g}=d.data;return{...d,data:g}}return d}),l=new Set(o.map(d=>d.id));FY();const u=(a.connections||[]).filter(d=>l.has(d.sourceId)&&l.has(d.targetId)),c={project:s,elements:o,connections:u,zoom:a.zoom||1,offsetX:a.offsetX||0,offsetY:a.offsetY||0,generateMode:a.generateMode||"image",isLoading:!1};e(c),QY(s.id,o)}catch(n){e({error:n.message||"Failed to load project",isLoading:!1})}},createProject:async(r,n,s,a)=>{e({isLoading:!0,error:null});try{const l=(await U.post("/art/projects",{type:r,teamId:n,name:s,initialPrompt:a})).data;return e(u=>({project:l,projects:[l,...u.projects],elements:[],zoom:1,offsetX:0,offsetY:0,isLoading:!1})),l}catch(o){throw e({error:o.message||"Failed to create project",isLoading:!1}),o}},updateProject:async(r,n)=>{try{await U.patch(`/art/projects/${r}`,n),e(s=>{var a;return{project:((a=s.project)==null?void 0:a.id)===r?{...s.project,...n}:s.project,projects:s.projects.map(o=>o.id===r?{...o,...n}:o)}})}catch(s){e({error:s.message||"Failed to update project"})}},deleteProject:async r=>{try{await U.delete(`/art/projects/${r}`),e(n=>{var s;return{project:((s=n.project)==null?void 0:s.id)===r?null:n.project,projects:n.projects.filter(a=>a.id!==r)}})}catch(n){e({error:n.message||"Failed to delete project"})}},createProjectFromTemplate:async(r,n)=>{e({isLoading:!0,error:null});try{const a=(await U.post(`/art/projects/from-template/${r}`,{name:n})).data;return e(o=>({project:a,projects:[a,...o.projects],elements:a.elements||[],zoom:1,offsetX:0,offsetY:0,isLoading:!1})),a}catch(s){throw e({error:s.message||"Failed to create from template",isLoading:!1}),s}}}
1165),Ej={activeTool:"select",drawingState:{isDrawing:!1,currentPath:[],strokeColor:"#000000",strokeWidth:3},isLayerPanelOpen:!1},eQ=(e,t)=>({...Ej,setActiveTool:r=>{e({activeTool:r,selectedElementId:null,selectedElementIds:[]})},setLayerPanelOpen:r=>{e({isLayerPanelOpen:r})},setDrawingState:r=>{e(n=>({drawingState:{...n.drawingState,...r}}))},startDrawing:(r,n)=>{e(s=>({drawingState:{...s.drawingState,isDrawing:!0,currentPath:[{x:r,y:n}]}}))},continueDrawing:(r,n)=>{e(s=>({drawingState:{...s.drawingState,currentPath:[...s.drawingState.currentPath,{x:r,y:n}]}}))},finishDrawing:()=>{const{drawingState:r}=t();if(r.currentPath.length<2){e(d=>({drawingState:{...d.drawingState,isDrawing:!1,currentPath:[]}}));return}const n=r.currentPath.map(d=>d.x),s=r.currentPath.map(d=>d.y),a=Math.min(...n),o=Math.min(...s),l=Math.max(...n),u=Math.max(...s),c=r.currentPath.map(d=>({x:d.x-a,y:d.y-o}));e({drawingState:{...r,isDrawing:!1,currentPath:[]}}),t().addServerElement({type:"drawing",x:a,y:o,width:Math.max(l-a,10),height:Math.max(u-o,10),rotation:0,zIndex:t().getNextZIndex(),data:{path:c,strokeColor:r.strokeColor,strokeWidth:r.strokeWidth}},{skipFocus:!0})}});function wu(){j7.invalidateQueries({queryKey:["credits"]})}function kj(e,t={}){var n,s;const r={prompt:e.prompt,referenceContext:e.referenceContext||void 0,model:e.model||void 0,count:e.count,aspectRatio:e.aspectRatio,resolution:e.resolution||void 0,quality:e.quality||void 0,attachments:(((n=e.attachments)==null?void 0:n.length)??0)>0?e.attachments:void 0,enableWebSearch:e.enableWebSearch||void 0,cameraControl:((s=e.cameraControl)==null?void 0:s.enabled)===!0?{enabled:!0,camera:e.cameraControl.camera,lens:e.cameraControl.lens,focal:e.cameraControl.focal,aperture:e.cameraControl.aperture}:void 0};return t.addToCanvas&&(r.addToCanvas=!0),r}function Nj(e,t,r){var a;const n=e==null?void 0:e.teamId;return!n||(t==null?void 0:t.teamId)!==n||(t==null?void 0:t.billingMode)!=="owner_pays"?!1:((a=r.find(o=>o.teamId===n))==null?void 0:a.myRole)!=="owner"}function Sj(e){const t=Pi.getState();return Nj(e,t.billingConfig,t.teams)}function tQ(e){const t=Pi(n=>n.billingConfig),r=Pi(n=>n.teams);return Nj(e,t,r)}function Ac(e,t){try{localStorage.setItem(`art_params_${e}`,JSON.stringify(t))}catch{}}function jc(e){try{localStorage.setItem("art_params_global",JSON.stringify(e))}catch{}}const E2="art_camera_prefs";function rQ(){try{const e=localStorage.getItem(E2);if(!e)return null;const t=JSON.parse(e);return!t||typeof t!="object"||typeof t.enabled!="boolean"?null:{enabled:t.enabled,camera:typeof t.camera=="string"?t.camera:void 0,lens:typeof t.lens=="string"?t.lens:void 0,focal:typeof t.focal=="string"?t.focal:void 0,aperture:typeof t.aperture=="string"?t.aperture:void 0}}catch{return null}}function nQ(e){try{e?localStorage.setItem(E2,JSON.stringify(e)):localStorage.removeItem(E2)}catch{}}const Tj={isGenerating:!1,generationProgress:0,imageModels:[],isLoadingModels:!1,selectedModel:"",aspectRatio:"1:1",resolution:"1K",quality:"",imageCount:1,enableWebSearch:!1,cameraControl:rQ(),cameraPresets:null,attachments:[],generationHistory:[],generateMode:"image",generationError:null};let _a=null,Gd=null;const sQ=(e,t)=>({...Tj,addAttachment:r=>{e(n=>({attachments:[...n.attachments,r]}))},removeAttachment:r=>{e(n=>({attachments:n.attachments.filter(s=>s!==r)}))},clearAttachments:()=>{e({attachments:[]})},stopGeneration:()=>{_a&&(_a.abort(),_a=null),e(r=>({elements:r.elements.filter(n=>!n.id.startsWith("_placeholder_")),isGenerating:!1,generationProgress:0}))},generate:async(r,n,s,a)=>{var W,H;const{project:o,elements:l,selectedModel:u,aspectRatio:c,resolution:d,quality:h,imageCount:m,enableWebSearch:f}=t();if(!o)return;if(!Sj(o))try{const L=await U.get("/credits/tier"),{tier:$,credits:ee,thresholds:G}=L.data||{};if($!=="premium"){e({isGenerating:!1,generationError:`Insufficient credits. Requires at least ${(G==null?void 0:G.premium)??0} credits, current balance is ${ee??0} credits`});return}}catch{}e({isGenerating:!0,generationProgress:5});const p=s||m||WY;let g=Bc;const x=Uc;l.length>0&&(g=Math.max(...l.map($=>$.x+$.width))+Ms*3);const w=c.split(":").map(Number),y=w[0]||1,b=w[1]||1,k=en;let T,S;y>=b?(T=k,S=Math.round(k*b/y)):(S=k,T=Math.round(k*y/b));
1165const j=[],E=[],A=t().getNextZIndex(),R=Date.now();for(let L=0;L<p;L++){const $=Math.floor(L/iu),ee=L%iu,G=`_placeholder_${R}_${L}`;j.push(G),E.push({id:G,type:"image",x:g+ee*(T+Ms),y:x+$*(S+Ms),width:T,height:S,rotation:0,zIndex:A+L,data:{assetId:"",url:"",originalWidth:T,originalHeight:S,placeholder:!0,prompt:r}})}e(L=>({elements:[...L.elements,...E]}));const M=`gen_${Date.now()}`,B={id:M,prompt:r,model:u,images:[],elementIds:[],taskId:"",timestamp:new Date().toISOString(),status:"pending"};e(L=>({generationHistory:[B,...L.generationHistory]}));try{const L=await U.post(`/art/projects/${o.id}/generate`,{...kj({prompt:r,model:u,count:p,aspectRatio:c,resolution:d,quality:h||void 0,attachments:n,enableWebSearch:f,cameraControl:t().cameraControl}),...a!=null&&a.payWith?{payWith:a.payWith}:{}});if((W=L.data)!=null&&W.needsDecision&&L.data.code===40251)return e(V=>({elements:V.elements.filter(C=>!j.includes(C.id)),generationHistory:V.generationHistory.filter(C=>C.id!==M),isGenerating:!1,generationProgress:0})),await nc.getState().requestSelfPay(L.data)?t().generate(r,n,s,{payWith:"self"}):void 0;const{taskId:$,images:ee,elementIds:G,model:Q}=L.data,D=(ee==null?void 0:ee.length)>0;e(K=>({generationHistory:K.generationHistory.map(V=>V.id===M?{...V,taskId:$,images:ee||[],elementIds:G||[],model:Q,status:D?"completed":"processing"}:V),generationProgress:D?100:15})),D?(e(K=>({elements:K.elements.filter(V=>!j.includes(V.id)),isGenerating:!1,generationProgress:100})),await t().refreshElements(),wu()):$&&t().pollGenerationStatus($,M,j)}catch(L){const $=(H=L==null?void 0:L.response)==null?void 0:H.data,ee=$==null?void 0:$.requiredCredits,G=$==null?void 0:$.currentCredits,Q=ee!=null&&G!=null?Rt.t("art.toast.insufficientCredits",{required:ee,current:G}):($==null?void 0:$.message)||null;e(D=>({elements:D.elements.filter(K=>!K.id.startsWith("_placeholder_")),generationHistory:D.generationHistory.map(K=>K.id===M?{...K,status:"failed"}:K),isGenerating:!1,generationProgress:0,generationError:Q})),Q&&Qe.error(Q)}},pollGenerationStatus:async(r,n,s)=>{const a=s||[];_a==null||_a.abort();const o=new AbortController;_a=o;for(let l=0;l<qY;l++){if(o.signal.aborted)return;try{const u=await U.get(`/image/task/${r}`),{status:c,images:d,progress:h}=u.data;if(o.signal.aborted)return;if(e({generationProgress:h||Math.min(10+l*2,90)}),c==="completed"&&(d==null?void 0:d.length)>0){e(m=>({generationHistory:m.generationHistory.map(f=>f.id===n?{...f,images:d,status:"completed"}:f),elements:m.elements.filter(f=>!a.includes(f.id)),isGenerating:!1,generationProgress:100})),await t().refreshElements(),wu(),_a=null;return}if(c==="failed"){e(m=>({generationHistory:m.generationHistory.map(f=>f.id===n?{...f,status:"failed"}:f),elements:m.elements.filter(f=>!a.includes(f.id)),isGenerating:!1,generationProgress:0})),_a=null;return}}catch{if(o.signal.aborted)return}await new Promise(u=>setTimeout(u,HY))}o.signal.aborted||e(l=>({elements:l.elements.filter(u=>!a.includes(u.id)),generationHistory:l.generationHistory.map(u=>u.id===n?{...u,status:"failed"}:u),isGenerating:!1,generationProgress:0})),_a=null},loadImageModels:async()=>{var s;const{imageModels:r,isLoadingModels:n}=t();if(!n){r.length===0&&e({isLoadingModels:!0});try{const o=(await U.get("/art/models")).data.models||[],l={imageModels:o,isLoadingModels:!1},u=t().selectedModel,c=u&&o.some(d=>d.modelId===u);if((!u||!c)&&o.length>0){const d=o.find(h=>h.isDefault);l.selectedModel=(d==null?void 0:d.modelId)||((s=o[0])==null?void 0:s.modelId)||""}e(l)}catch(a){console.error("[art] loadImageModels failed:",a),e({isLoadingModels:!1})}}},setSelectedModel:r=>{const{imageModels:n,imageCount:s,aspectRatio:a,resolution:o,quality:l}=t(),u=n.find(k=>k.modelId===r),c=(u==null?void 0:u.maxCount)??4,d=s>c?c:s,h=(u==null?void 0:u.supportedResolutions)??["1K","2K","4K"],m=h.includes(o)?o:h.includes("1K")?"1K":h[0],p=((u==null?void 0:u.supportedAspectRatios)??["1:1","16:9","9:16","4:3","3:4"]).includes(a)?a:"1:1",g=u==null?void 0:u.supportedQualities,x=g!=null&&g.includes("medium")?"medium":(g==null?void 0:g[0])??"",w=g?g.includes(l)?l:x:"";e({selectedModel:r,imageCount:d,resolution:m,aspectRatio:p,quality:w});const{project:y}=t(),b={selectedModel:r,aspectRatio:p,resolution:m,quality:w,imageCount:d};y&&Ac(y.id,b),jc(b)},setAspectRatio:r=>{e({aspectRatio:r});const{project:n,selectedModel:s,resolution:a,quality:o,imageCount:l}=t(),u={selectedModel:s,aspectRatio:r,resolution:a,quality:o,imageCount:l};n&&Ac(n.id,u),jc(u)},setResolution:r=>{e({resolution:r});const{project:n,selectedModel:s,aspectRatio:a,quality:o,imageCount:l}=t(),u={selectedModel:s,aspectRatio:a,resolution:r,quality:o,imageCount:l};n&&Ac(n.id,u),jc(u)},setQuality:r=>{e({quality:r});const{project:n,selectedModel:s,aspectRatio:a,resolution:o,imageCount:l}=t(),u={selectedModel:s,aspectRatio:a,resolution:o,quality:r,imageCount:l};n&&Ac(n.id,u),jc(u)},setImageCount:r=>{e({imageCount:r});const{project:n,selectedModel:s,aspectRatio:a,resolution:o,quality:l}=t(),u={selectedModel:s,aspectRatio:a,resolution:o,quality:l,imageCount:r};n&&Ac(n.id,u),jc(u)},setEnableWebSearch:r=>{e({enableWebSearch:r});const{project:n,selectedModel:s,aspectRatio:a,resolution:o,quality:l,imageCount:u}=t(),c={selectedModel:s,aspectRatio:a,resolution:o,quality:l,imageCount:u,enableWebSearch:r};n&&Ac(n.id,c),jc(c)},setCameraControl:r=>{e({cameraControl:r}),nQ(r)},loadCameraPresets:async()=>
1165{if(!t().cameraPresets)return Gd||(Gd=(async()=>{var r,n;try{const a=(r=(await U.get("/art/camera-presets")).data)==null?void 0:r.presets;(n=a==null?void 0:a.camera)!=null&&n.length&&e({cameraPresets:a})}catch(s){console.error("[art] loadCameraPresets failed:",s)}finally{Gd=null}})(),Gd)},restoreProjectParams:()=>{const{project:r}=t();if(r)try{const n=localStorage.getItem(`art_params_${r.id}`);if(!n)return;const s=JSON.parse(n);e({...s.selectedModel?{selectedModel:s.selectedModel}:{},...s.aspectRatio?{aspectRatio:s.aspectRatio}:{},...s.resolution?{resolution:s.resolution}:{},...s.quality!=null?{quality:s.quality}:{},...s.imageCount?{imageCount:s.imageCount}:{},...s.enableWebSearch!=null?{enableWebSearch:s.enableWebSearch}:{}})}catch{}},restoreGlobalParams:()=>{try{const r=localStorage.getItem("art_params_global");if(!r)return;const n=JSON.parse(r);e({...n.selectedModel?{selectedModel:n.selectedModel}:{},...n.aspectRatio?{aspectRatio:n.aspectRatio}:{},...n.resolution?{resolution:n.resolution}:{},...n.quality!=null?{quality:n.quality}:{},...n.imageCount?{imageCount:n.imageCount}:{},...n.enableWebSearch!=null?{enableWebSearch:n.enableWebSearch}:{}})}catch{}}}),aQ="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Qm=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=aQ[r[e]&63];return t};const Cj={agentMessages:[],isAgentStreaming:!1,isLoadingHistory:!1,conversationThreads:[],activeConversationId:""};let ps=null,rr=null;function Js(e,t){if(!t.length)return;const r=new Set(t);e(n=>({elements:n.elements.filter(s=>!r.has(s.id))}))}function iQ(e){var r;const t=[];for(const n of e)n.isStreaming&&((r=n.toolAction)!=null&&r.placeholderIds)&&t.push(...n.toolAction.placeholderIds);return t}const oQ=(e,t)=>({...Cj,sendAgentMessage:async(r,n,s,a,o,l)=>{var E,A,R,M,B,W,H,L,$,ee,G;const{project:u,selectedModel:c,aspectRatio:d,resolution:h,quality:m,imageCount:f,enableWebSearch:p,activeConversationId:g}=t(),x=t().selectedElementIds,w=x&&x.length>1?null:t().selectedElementId;if(!u)return;if(!Sj(u))try{const Q=await U.get("/credits/tier"),{tier:D,credits:K,thresholds:V}=Q.data||{},C=(V==null?void 0:V.premium)??0;if(D!=="premium"){const O={id:Qm(),role:"assistant",content:`Insufficient credits. AI Design Assistant requires at least ${C} credits, current balance is ${K??0} credits. Please top up first.`,timestamp:new Date().toISOString()};e(q=>({agentMessages:[...q.agentMessages,O]}));return}}catch{}const y=Q=>{try{return new URL(Q).pathname}catch{return Q}};let b=n;if(w){const D=t().elements.find(K=>K.id===w);if((D==null?void 0:D.type)==="image"){const K=D.data,V=(K.images?K.images[K.coverIndex??0]||K.images[0]:null)||K.resolvedUrl||K.url;if(V){const C=b||[],O=y(V);C.some(ne=>y(ne)===O)||(b=[V,...C])}}}if(b&&b.length>1){const Q=new Set;b=b.filter(D=>{const K=y(D);return Q.has(K)?!1:(Q.add(K),!0)})}const k={id:Qm(),role:"user",content:r,attachments:b,selectedElementId:w||void 0,mentionAssets:o,timestamp:new Date().toISOString()},T=Qm(),S={id:T,role:"assistant",content:"",isStreaming:!0,skillInfo:{skillName:null,phase:"searching",message:"",needsClarification:!1},timestamp:new Date().toISOString()};e(Q=>
1165({agentMessages:[...Q.agentMessages,k,S],isAgentStreaming:!0})),ps==null||ps.abort();const j=new AbortController;ps=j;try{const Q={message:r,attachments:n!=null&&n.length?n:void 0,model:c||void 0,aspectRatio:d,resolution:h,quality:m||void 0,imageCount:f,enableWebSearch:p||void 0,conversationId:g||void 0,selectedElementId:w||void 0,inspirationChoice:s||void 0,skillHint:a||void 0,mentionAssets:o,payWith:l==null?void 0:l.payWith};console.log("[ArtAgent] sendAgentMessage â",{projectId:u.id,model:c,body:Q});const D=await fetch(`/api/v1/art/projects/${u.id}/chat/stream`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("token")}`},body:JSON.stringify(Q),signal:j.signal});if(!D.ok||!D.body)throw new Error(`Stream request failed: ${D.status}`);const K=D.body.getReader(),V=new TextDecoder;let C="",O="",q=null;for(;;){const{done:ne,value:he}=await K.read();if(ne||j.signal.aborted)break;C+=V.decode(he,{stream:!0});const xe=C.split(` 1166`);C=xe.pop()||"";let Oe;for(let Se=0;Se<xe.length;Se++){const we=xe[Se];if(we.startsWith("event:")){Oe=we.slice(6).trim(),console.log("[ArtAgent] SSE event type:",Oe);continue}if(!we.startsWith("data:")){we===""&&(Oe=void 0);continue}const Be=we.slice(5).trim();if(!Be)continue;let ve;try{ve=JSON.parse(Be)}catch(Ae){console.warn("[ArtAgent] SSE JSON parse failed:",Be,Ae);continue}const Ye=Oe||ve.type||"";switch(Oe=void 0,console.log("[ArtAgent] SSE event â",Ye,ve),Ye){case"needs_decision":{q=ve;break}case"thinking":e(Ae=>({agentMessages:Ae.agentMessages.map(Ee=>Ee.id===T?{...Ee,isThinking:!0,content:""}:Ee)}));break;case"content":{const Ae=ve.text||"";O+=Ae,rr&&(clearTimeout(rr),rr=null),e(Ee=>({agentMessages:Ee.agentMessages.map(Ce=>Ce.id===T?{...Ce,isThinking:!1,content:O,contentComplete:!1}:Ce)})),rr=setTimeout(()=>{const Ee=t().agentMessages.find(Ce=>Ce.id===T);if(Ee!=null&&Ee.isStreaming&&!Ee.toolAction&&Ee.plan){const Ce=t().elements,X=Ce.length>0?Math.max(...Ce.map(je=>je.zIndex))+1:1,pe=Date.now(),_e=[],Ne=(d||"1:1").split(":").map(Number),de=Ne[0]||1,be=Ne[1]||1;let ie,De;de>=be?(ie=en,De=Math.round(en*be/de)):(De=en,ie=Math.round(en*de/be));let F=Bc;const se=Uc;Ce.length>0&&(F=Math.max(...Ce.map(Ge=>Ge.x+Ge.width))+Ms*3);const ue=[];for(let je=0;je<f;je++){const Ge=Math.floor(je/iu),mt=je%iu,Ft=`_placeholder_early_${pe}_${je}`;_e.push(Ft),ue.push({id:Ft,type:"image",x:F+mt*(ie+Ms),y:se+Ge*(De+Ms),width:ie,height:De,rotation:0,zIndex:X+je,data:{assetId:"",url:"",originalWidth:ie,originalHeight:De,placeholder:!0}})}e(je=>({elements:[...je.elements,...ue]})),e(je=>({agentMessages:je.agentMessages.map(Ge=>Ge.id===T?{...Ge,contentComplete:!0,toolAction:{tool:"generate_images",status:"processing",placeholderIds:_e}}:Ge)}))}rr=null},400);break}case"generation_start":{const Ae=ve.tool;console.log("[ArtAgent] generation_start â",{tool:Ae,prompt:ve.prompt,model:ve.model});const Ee=t().agentMessages.find(de=>de.id===T),Ce=((E=Ee==null?void 0:Ee.toolAction)==null?void 0:E.placeholderIds)||[],X=t().elements,pe=X.length>0?Math.max(...X.map(de=>de.zIndex))+1:1,_e=Date.now(),Ne=[];if(Ae==="generate_video"||Ae==="image_to_video"){Ce.length>0&&Js(e,Ce);const de=(d||"16:9").split(":").map(Number),be=de[0]||16,ie=de[1]||9;let De,F;be>=ie?(De=en,F=Math.round(en*ie/be)):(F=en,De=Math.round(en*be/ie));let se=Bc;const ue=Uc;X.length>0&&(se=Math.max(...X.map(Ft=>Ft.x+Ft.width))+Ms*3);const je=`_placeholder_agent_video_${_e}_0`;Ne.push(je);const Ge={id:je,type:"video",x:se,y:ue,width:De,height:F,rotation:0,zIndex:pe,data:{assetId:"",url:"",coverUrl:"",originalWidth:De,originalHeight:F,duration:0,placeholder:!0,prompt:ve.prompt}};e(mt=>({elements:[...mt.elements,Ge]}))}else if(Ae==="generate_images"||Ae==="image_to_image")if(Ce.length>0)Ne.push(...Ce);else{const de=ve.expectedCount||f,be=(d||"1:1").split(":").map(Number),ie=be[0]||1,De=be[1]||1;let F,se;ie>=De?(F=en,se=Math.round(en*De/ie)):(se=en,F=Math.round(en*ie/De));let ue=Bc;const je=Uc;X.length>0&&(ue=Math.max(...X.map(Ft=>Ft.x+Ft.width))+Ms*3);const Ge=[];for(let mt=0;mt<de;mt++){const Ft=Math.floor(mt/iu),ur=mt%iu,ht=`_placeholder_agent_${_e}_${mt}`;Ne.push(ht),Ge.push({id:ht,type:"image",x:ue+ur*(F+Ms),y:je+Ft*(se+Ms),width:F,height:se,rotation:0,zIndex:pe+mt,data:{assetId:"",url:"",originalWidth:F,originalHeight:se,placeholder:!0,prompt:ve.prompt}})}e(mt=>({elements:[...mt.elements,...Ge]}))}else if(Ae==="generate_audio"){Ce.length>0&&Js(e,Ce);let de=Bc;const be=Uc;X.length>0&&(de=Math.max(...X.map(se=>se.x+se.width))+Ms*3);const ie=`_placeholder_agent_audio_${_e}_0`;Ne.push(ie);const De={id:ie,type:"audio",x:de,y:be,width:en,height:120,rotation:0,zIndex:pe,data:{assetId:"",url:"",duration:0,placeholder:!0,prompt:ve.prompt}};e(F=>({elements:[...F.elements,De]}))}else if(Ae==="generate_lip_sync"){Ce.length>0&&Js(e,Ce);let de=Bc;const be=Uc;X.length>0&&(de=Math.max(...X.map(se=>se.x+se.width))+Ms*3);const ie=`_placeholder_agent_lip_${_e}_0`;Ne.push(ie);const De={id:ie,type:"video",x:de,y:be,width:en,height:Math.round(en*9/16),rotation:0,zIndex:pe,data:{assetId:"",url:"",coverUrl:"",originalWidth:en,originalHeight:Math.round(en*9/16),duration:0,placeholder:!0}};e(F=>({elements:[...F.elements,De]}))}else if(["edit_image","remove_background","upscale_image"].includes(Ae)){Ce.length>0&&Js(e,Ce);const de=ve.elementId,be=de?X.find(ie=>ie.id===de):void 0;if(be){const ie=`_placeholder_agent_${_e}_0`;Ne.push(ie);const De=be.data,F={id:ie,type:"image",x:be.x+be.width+4,y:be.y,width:be.width,height:be.height,rotation:0,zIndex:pe,data:{assetId:"",url:De.url||"",originalWidth:be.width,originalHeight:be.height,processing:!0}};e(se=>
1166({elements:[...se.elements,F]}))}}e(de=>({agentMessages:de.agentMessages.map(be=>{var ie,De,F;return be.id===T?{...be,isThinking:!1,toolAction:{tool:Ae,status:"processing",prompt:ve.prompt,elementId:ve.elementId,placeholderIds:Ne,images:(ie=be.toolAction)==null?void 0:ie.images,elementIds:(De=be.toolAction)==null?void 0:De.elementIds,imageAssetIds:(F=be.toolAction)==null?void 0:F.imageAssetIds}}:be})}));break}case"generation_complete":{const Ae=ve.tool;console.log("[ArtAgent] generation_complete â",{tool:Ae,images:(A=ve.images)==null?void 0:A.length,elementIds:ve.elementIds,taskId:ve.taskId,model:ve.model});const Ee=t().agentMessages.find(X=>X.id===T),Ce=((R=Ee==null?void 0:Ee.toolAction)==null?void 0:R.placeholderIds)||[];Js(e,Ce),e(X=>({agentMessages:X.agentMessages.map(pe=>{var F,se,ue;if(pe.id!==T)return pe;const _e=((F=pe.toolAction)==null?void 0:F.images)||[],Ne=((se=pe.toolAction)==null?void 0:se.elementIds)||[],de=((ue=pe.toolAction)==null?void 0:ue.imageAssetIds)||[],be=ve.images,ie=ve.elementIds,De=be?ve.imageAssetIds??be.map(()=>null):void 0;return{...pe,toolAction:{tool:Ae,status:"completed",images:be?[..._e,...be]:_e.length>0?_e:void 0,elementIds:ie?[...Ne,...ie]:Ne.length>0?Ne:void 0,imageAssetIds:De?[...de,...De]:de.length>0?de:void 0,taskId:ve.taskId,elementId:ve.elementId,newUrl:ve.newUrl,newWidth:ve.newWidth,newHeight:ve.newHeight}}})})),await t().refreshElements();break}case"error":{const Ae=ve.message||"Unknown error";console.error("[ArtAgent] error â",Ae,ve);const Ee=t().agentMessages.find(X=>X.id===T),Ce=((M=Ee==null?void 0:Ee.toolAction)==null?void 0:M.placeholderIds)||[];Js(e,Ce),e(X=>({agentMessages:X.agentMessages.map(pe=>pe.id===T?{...pe,isThinking:!1,isStreaming:!1,content:Ae,toolAction:pe.toolAction?{...pe.toolAction,status:"failed"}:void 0}:pe),isAgentStreaming:!1}));break}case"progress":break;case"image_analysis":{const Ae=ve.phase,Ee=t().agentMessages.find(X=>X.id===T),Ce=((B=Ee==null?void 0:Ee.content)==null?void 0:B.length)||0;if(Ae==="analyzing"){const X=ve.items;e(pe=>({agentMessages:pe.agentMessages.map(_e=>{var Ne;return _e.id===T?{..._e,imageAnalysis:{phase:"analyzing",items:(X||[]).map(de=>({label:de.label})),contentSplitIndex:((Ne=_e.imageAnalysis)==null?void 0:Ne.contentSplitIndex)??Ce}}:_e})}))}else if(Ae==="item_done"){const X=ve.index,pe=ve.content,_e=ve.label;e(Ne=>({agentMessages:Ne.agentMessages.map(de=>{if(de.id!==T||!de.imageAnalysis)return de;const be=[...de.imageAnalysis.items];return be[X]&&(be[X]={label:_e,content:pe}),{...de,imageAnalysis:{...de.imageAnalysis,items:be}}})}))}else e(X=>({agentMessages:X.agentMessages.map(pe=>pe.id===T&&pe.imageAnalysis?{...pe,imageAnalysis:{...pe.imageAnalysis,phase:"done"}}:pe)}));break}case"search_images":{const Ae=ve.images;if(Ae&&Ae.length>0){const Ee=t().agentMessages.find(X=>X.id===T),Ce=((W=Ee==null?void 0:Ee.content)==null?void 0:W.length)||0;e(X=>({agentMessages:X.agentMessages.map(pe=>pe.id===T?{...pe,searchImages:Ae,searchImagesSplitIndex:pe.searchImagesSplitIndex??Ce}:pe)}))}break}case"skill_matched":{const Ae=ve.phase;e(Ee=>({agentMessages:Ee.agentMessages.map(Ce=>{var X,pe;return Ce.id===T?{...Ce,isStreaming:!0,skillInfo:{skillName:ve.skillName||((X=Ce.skillInfo)==null?void 0:X.skillName)||null,skillLabel:ve.skillLabel||((pe=Ce.skillInfo)==null?void 0:pe.skillLabel),phase:Ae,message:"",needsClarification:!1}}:Ce})}));break}case"clarification":{rr&&(clearTimeout(rr),rr=null);const Ae=t().agentMessages.find(Ee=>Ee.id===T);if(((H=Ae==null?void 0:Ae.toolAction)==null?void 0:H.status)==="processing"){const Ee=Ae.toolAction.placeholderIds||[];Js(e,Ee)}e(Ee=>({agentMessages:Ee.agentMessages.map(Ce=>Ce.id===T?{...Ce,isThinking:!1,isStreaming:!1,contentComplete:!1,toolAction:void 0,clarification:{type:ve.type,questions:ve.questions,options:ve.options,message:ve.message}}:Ce),isAgentStreaming:!1}));break}case"inspiration":{rr&&(clearTimeout(rr),rr=null);const Ae=t().agentMessages.find(Ee=>Ee.id===T);if(((L=Ae==null?void 0:Ae.toolAction)==null?void 0:L.status)==="processing"){const Ee=Ae.toolAction.placeholderIds||[];Js(e,Ee)}e(Ee=>({agentMessages:Ee.agentMessages.map(Ce=>Ce.id===T?{...Ce,isThinking:!1,isStreaming:!1,contentComplete:!1,toolAction:void 0,inspiration:{skillName:ve.skillName,proposals:ve.proposals}}:Ce),isAgentStreaming:!1}));break}case"plan":{const Ae=ve;e(Ee=>({agentMessages:Ee.agentMessages.map(Ce=>Ce.id===T?{...Ce,isThinking:!1,plan:{planId:Ae.planId,steps:Ae.steps,totalSteps:Ae.totalSteps,skillName:Ae.skillName}}:Ce)}));break}case"step_think":{const Ae=ve.stepIndex,Ee=ve.tool,Ce=t().agentMessages.find(pe=>pe.id===T),X=Ee==="web_search"?(($=Ce==null?void 0:Ce.content)==null?void 0:$.length)||0:void 0;e(pe=>({agentMessages:pe.agentMessages.map(_e=>{if(_e.id!==T)return _e;const Ne=_e.plan?{..._e.plan,steps:_e.plan.steps.map((de,be)=>be===Ae?{...de,status:"active"}:de)}:_e.plan;return{..._e,plan:Ne,activeStep:{index:Ae,phase:"think",thought:ve.thought,tool:Ee},...X!=null?{searchImagesSplitIndex:_e.searchImagesSplitIndex??X}:{}}})}));break}case"step_complete":{const Ae=ve.stepIndex,Ee=ve.status;e(Ce=>({agentMessages:Ce.agentMessages.map(X=>{var de,be;if(X.id!==T)return X;const pe=X.plan?{...X.plan,steps:X.plan.steps.map((ie,De)=>De===Ae?{...ie,status:Ee}:ie)}:X.plan,_e={stepIndex:Ae,tool:((be=(de=X.plan)==null?void 0:de.steps[Ae])==null?void 0:be.tool)||"",status:Ee},Ne=X.stepResults||[];return{...X,plan:pe,activeStep:void 0,stepResults:[...Ne,_e]}})}));break}case"done":{const Ae=ve.suggestions,Ee=ve.imageDescriptions,Ce=ve.stepResults;rr&&(clearTimeout(rr),rr=null);const X=t().agentMessages.find(de=>de.id===T),pe=(Ce==null?void 0:Ce.some(de=>de.status==="completed"))||!1;if(!pe&&((ee=X==null?void 0:X.toolAction)==null?void 0:ee.status)==="processing"){const de=X.toolAction.placeholderIds||[];Js(e,de)}const Ne=ve.threadId||t().activeConversationId;e(de=>({agentMessages:de.agentMessages.map(be=>{var ie;
1166return be.id===T?{...be,isStreaming:!1,isThinking:!1,contentComplete:!1,toolAction:!pe&&((ie=be.toolAction)==null?void 0:ie.status)==="processing"?void 0:be.toolAction,suggestions:Ae,imageDescriptions:Ee,stepResults:Ce||be.stepResults}:be}),isAgentStreaming:!1,activeConversationId:Ne})),t().loadConversationList().catch(()=>{});break}}if(q)break}if(q)break}if(q){rr&&(clearTimeout(rr),rr=null),e(he=>({agentMessages:he.agentMessages.filter(xe=>xe.id!==T&&xe.id!==k.id),isAgentStreaming:!1})),ps==null||ps.abort(),ps=null,await nc.getState().requestSelfPay(q)&&await t().sendAgentMessage(r,n,s,a,o,{payWith:"self"});return}rr&&(clearTimeout(rr),rr=null),e(ne=>({agentMessages:ne.agentMessages.map(he=>he.id===T?{...he,isStreaming:!1,isThinking:!1}:he),isAgentStreaming:!1}))}catch(Q){rr&&(clearTimeout(rr),rr=null);const D=t().agentMessages.find(C=>C.id===T),K=((G=D==null?void 0:D.toolAction)==null?void 0:G.placeholderIds)||[];if(Js(e,K),Q.name==="AbortError"){e(C=>({agentMessages:C.agentMessages.map(O=>O.id===T&&O.isStreaming?{...O,isStreaming:!1,isThinking:!1,contentComplete:!1}:O),isAgentStreaming:!1})),setTimeout(()=>{t().loadAgentHistory().catch(()=>{})},2e3);return}const V=Q.message||"Stream failed";e(C=>({agentMessages:C.agentMessages.map(O=>{var q;return O.id===T?{...O,isThinking:!1,isStreaming:!1,content:O.content||`Error: ${V}`,toolAction:((q=O.toolAction)==null?void 0:q.status)==="processing"?{...O.toolAction,status:"failed"}:O.toolAction}:O}),isAgentStreaming:!1}))}ps=null},stopAgentStream:()=>{ps==null||ps.abort(),ps=null,rr&&(clearTimeout(rr),rr=null);const r=iQ(t().agentMessages);Js(e,r),e(n=>({agentMessages:n.agentMessages.map(s=>{var a;return s.isStreaming?{...s,isStreaming:!1,isThinking:!1,contentComplete:!1,toolAction:((a=s.toolAction)==null?void 0:a.status)==="processing"?{...s.toolAction,status:"failed"}:s.toolAction}:s}),isAgentStreaming:!1}))},clearAgentChat:async()=>{const{project:r,activeConversationId:n}=t();if(e({agentMessages:[]}),r&&n)try{await U.delete(`/art/projects/${r.id}/conversations/${n}`),e({activeConversationId:""}),await t().loadConversationList()}catch(s){console.error("[ArtAgent] clearAgentChat server delete failed:",s)}},loadAgentHistory:async()=>{var s;const{project:r,activeConversationId:n}=t();if(r){e({isLoadingHistory:!0});try{const a=n?`&threadId=${n}`:"",l=((s=(await U.get(`/art/projects/${r.id}/conversations?limit=50${a}`)).data)==null?void 0:s.messages)||[];if(t().isAgentStreaming){e({isLoadingHistory:!1});return}const u=l.map(c=>({id:c.id||Qm(),role:c.role,content:c.content||"",attachments:c.attachments,toolAction:c.generationResult?(()=>{const d=c.generationResult;return{tool:d.tool||"generate_images",status:d.status||"completed",images:d.images||(d.coverUrl?[d.coverUrl]:void 0),elementIds:d.elementIds,imageAssetIds:d.imageAssetIds,taskId:d.taskId,videoUrl:d.videoUrl,videoAssetId:d.videoAssetId}})():c.toolAction?{tool:c.toolAction.tool,status:"completed",elementId:c.toolAction.elementId,newUrl:c.toolAction.newUrl}:void 0,imageAnalysis:c.imageAnalysis?(()=>{let d;try{const h=JSON.parse(c.imageAnalysis);d=Array.isArray(h)?h:[{label:"Reference Image",content:c.imageAnalysis}]}catch{d=[{label:"Reference Image",content:c.imageAnalysis}]}return{phase:"done",items:d,contentSplitIndex:c.imageAnalysisSplitIndex}})():void 0,suggestions:c.suggestions,searchImages:c.searchImages,searchImagesSplitIndex:c.searchImagesSplitIndex,mentionAssets:c.mentionAssets,timestamp:c.timestamp||new Date().toISOString()}));e({agentMessages:u,isLoadingHistory:!1})}catch{e({isLoadingHistory:!1})}}},createConversation:async()=>{e({activeConversationId:"",agentMessages:[],selectedElementId:null,selectedElementIds:[]})},switchConversation:async r=>{const{project:n}=t();n&&(e({activeConversationId:r,agentMessages:[],selectedElementId:null,selectedElementIds:[]}),await t().loadAgentHistory())},deleteConversation:async r=>{const{project:n,activeConversationId:s}=t();if(n)try{await U.delete(`/art/projects/${n.id}/conversations/${r}`),await t().loadConversationList(),s===r&&e({activeConversationId:"",agentMessages:[],selectedElementId:null,selectedElementIds:[]})}catch(a){console.error("[ArtAgent] deleteConversation failed:",a)}},loadConversationList:async()=>{const{project:r}=t();if(r)try{const s=(await U.get(`/art/projects/${r.id}/conversations/threads`)).data;e({conversationThreads:s.threads,activeConversationId:t().activeConversationId||s.activeThreadI
1166d})}catch(n){console.error("[ArtAgent] loadConversationList failed:",n)}}});function _3(e){if(e)return e.images&&e.images.length>0?e.images[e.coverIndex??0]||e.images[0]||void 0:e.resolvedUrl||e.url||void 0}function _j(e){if(e)return e.resolvedUrl||e.url||void 0}function ave(e){if(e)return e.resolvedUrl||e.url||void 0}const lQ=4e3,cQ=[.6,.25,.15],Aj=37;function uQ(e){if(!e)return"";if(!/<[^>]+>/.test(e))return e;const t=document.createElement("div");return t.innerHTML=e,(t.textContent||t.innerText||"").trim()}function dQ(e,t,r,n){const s=new Set([e]),a=[];if(n){const o=r.find(l=>l.id===e);o&&!o.id.startsWith("_placeholder_")&&a.push({element:o,depth:1})}for(const o of t){if(o.targetId!==e||s.has(o.sourceId))continue;s.add(o.sourceId);const l=r.find(u=>u.id===o.sourceId);!l||l.id.startsWith("_placeholder_")||a.push({element:l,depth:1})}return a}function hQ(e){var n,s;const{element:t,depth:r}=e;if(t.type==="text"){const a=t.data;return{id:t.id,type:"text",depth:r,text:uQ(a.content||"")}}if(t.type==="image"){const a=t.data;return{id:t.id,type:"image",depth:r,text:a.prompt||((n=a.generationParams)==null?void 0:n.prompt)||"",imageUrl:a.placeholder?void 0:_3(a)||void 0}}if(t.type==="video"){const a=t.data;return{id:t.id,type:"video",depth:r,text:a.prompt||((s=a.generationParams)==null?void 0:s.prompt)||"",videoUrl:a.placeholder?void 0:_j(a)||void 0}}if(t.type==="audio"){const a=t.data;return{id:t.id,type:"audio",depth:r,text:a.prompt||""}}return{id:t.id,type:"text",depth:r,text:""}}function mQ(e,t){if(e.length===0)return[];const r=[[],[],[]];for(const l of e)r[Math.min(l.depth-1,2)].push(l);const n=r.map((l,u)=>l.length>0?cQ[u]:0),s=n.reduce((l,u)=>l+u,0);if(s===0)return[];const a=[];let o=0;for(let l=0;l<3;l++){if(r[l].length===0)continue;const u=Math.floor(t*(n[l]/s)),c=Math.floor(u/r[l].length);for(const d of r[l]){const h=t-o;if(h<=0)break;const m=Math.min(c,h),f=d.text.length>m?d.text.slice(0,m)+"...":d.text;a.push({...d,text:f}),o+=f.length}}return a}function fQ(e,t){const r=[],n=[],s=e.filter(l=>l.type==="text"&&l.text);s.length>0&&r.push(s.map(l=>l.text).join(` 1167 1168`));for(const l of e)l.depth===1&&(l.type==="image"&&l.imageUrl?n.push({type:"image",url:l.imageUrl}):l.type==="video"&&l.videoUrl&&n.push({type:"video",url:l.videoUrl}));return r.length===0?{prompt:t,attachments:n}:{prompt:`The following are existing creative materials. Use them as established background directly â do not comment on, correct, or explain these materials. Follow the user's instructions strictly. 1169 1170${r.join(` 1171 1172`)} 1173 1174${t}`,attachments:n}}function pQ(e,t,r){const n=[];for(const l of e)l.type==="text"&&l.text&&n.push(l.text);if(n.length===0)return{prompt:t};const s=t.length,a=Math.max(100,r-s-Aj);let o=n.join("; ");return o.length>a&&(o=o.slice(0,a)+"..."),{prompt:`User description: ${t} 1175System reference: ${o}`,referenceText:o}}function Kd(e,t,r,n,s,a=!1,o){const l=dQ(e,n,s,a);if(l.length===0)return{prompt:t,upstreamCount:0};const u=l.map(hQ).filter(p=>p.text||p.imageUrl||p.videoUrl),c=u.filter(p=>p.imageUrl).sort((p,g)=>p.depth-g.depth)[0];if(r==="text"){const p=u.sort((w,y)=>w.depth-y.depth),{prompt:g,attachments:x}=fQ(p,t);return{prompt:g,referenceImageUrl:c==null?void 0:c.imageUrl,attachments:x,upstreamCount:l.length}}const d=o??lQ,h=Math.max(100,d-t.length-Aj),m=mQ(u,h).sort((p,g)=>p.depth-g.depth),f=pQ(m,t,d);return{prompt:f.prompt,referenceText:f.referenceText,referenceImageUrl:c==null?void 0:c.imageUrl,upstreamCount:l.length}}function gQ(e,t,r,n,s,a){var V,C,O,q,ne,he;const o=t.filter(xe=>xe.targetId===e),l=[],u=[],c=[];let d=0,h=0;for(const xe of o){const Oe=r.find(Se=>Se.id===xe.sourceId);if(Oe){if(Oe.type==="image"){const Se=Oe.data,we=(Se.images?Se.images[Se.coverIndex??0]||Se.images[0]:null)||Se.resolvedUrl||Se.url;we&&!Se.placeholder?l.push(we):d++}else if(Oe.type==="video"){const Se=Oe.data,we=Se.resolvedUrl||Se.url;we&&!Se.placeholder?u.push(we):h++}else if(Oe.type==="audio"){const Se=Oe.data,we=Se.resolvedUrl||Se.url;we&&!Se.placeholder&&c.push(we)}}}const m=l.length>0,f=u.length>0,p=c.length>0,g=n.find(xe=>xe.id===s),x=()=>n.find(xe=>xe.id==="seedance-2.0")||n.find(xe=>{var Oe;return(Oe=xe.id)==null?void 0:Oe.startsWith("seedance-2.")})||n.find(xe=>xe.modelFamily==="seedance-kuaikuai");let w="text",y="text2video",b=s,k=!1;if(a&&g?jj(g,a,l.length,u.length,c.length):!1)w=a,y=a==="reference"?"reference_to_video":a==="video_continuation"?"video_continuation":a==="video_edit"?"video_to_video":a==="video_reference"?"video_reference_to_video":a==="first_frame"?"image2video":"text2video";else if(m||f||p){const xe=g?y0(g,l.length,u.length,c.length):null;if(xe&&xe!=="text")w=xe,y=xe==="reference"?"reference_to_video":xe==="video_continuation"?"video_continuation":xe==="video_edit"?"video_to_video":xe==="first_frame"?"image2video":"text2video";else{const Oe=x();
1175if(Oe)w="reference",y="reference_to_video",b=Oe.id,k=!0;else{const Se=n.find(we=>y0(we,l.length,u.length,c.length)!==null);if(Se){const we=y0(Se,l.length,u.length,c.length);b=Se.id,k=!0,w=we==="text"?"reference":we,y=w==="reference"?"reference_to_video":w==="video_continuation"?"video_continuation":w==="video_edit"?"video_to_video":w==="first_frame"?"image2video":"text2video"}else w="text",y="text2video"}}}else if(d>0||h>0){const xe=g?y0(g,d,h,0):null;xe&&xe!=="text"&&(w=xe,y=xe==="reference"?"reference_to_video":xe==="video_continuation"?"video_continuation":xe==="video_edit"?"video_to_video":xe==="video_reference"?"video_reference_to_video":xe==="first_frame"?"image2video":"text2video")}const S=n.find(xe=>xe.id===b),j=(S==null?void 0:S.id)||"",E=(S==null?void 0:S.modelFamily)||"",A=j.startsWith("seedance-2.")||E==="seedance-kuaikuai"||j==="wan2.7"||j.startsWith("minimax-hailuo-3")||j.startsWith("minimax-h3-max");let R=null,M=null,B=null,W=null;const H=[],L=[],$=[],ee=[],G=[];let Q=0,D=0,K=0;switch(w==="text"&&(m||f||p)&&(Q=l.length,D=u.length,K=c.length),w){case"first_frame":{R=l[0]||null,(((C=(V=S==null?void 0:S.inputs)==null?void 0:V.first_frame)==null?void 0:C.slots)??[]).some(Se=>Se.type==="image"&&Se.role==="last_frame")&&l[1]?(M=l[1],l.length>2&&(Q=l.length-2)):l.length>1&&(Q=l.length-1),D=u.length,K=c.length;break}case"reference":{const xe=((q=(O=S==null?void 0:S.inputs)==null?void 0:O.reference)==null?void 0:q.slots)??[],Oe=xe.find(pe=>pe.type==="image"&&pe.role==="reference"),Se=xe.find(pe=>pe.type==="image"&&pe.role==="style_reference"),we=xe.filter(pe=>pe.type==="image"&&(pe.role==="reference"||pe.role==="style_reference")),Be=vi(we,"image")||(A?(S==null?void 0:S.maxReferenceImages)??9:4);let ve=0;if(Be>0&&l.length>0){const pe=Math.min(l.length,Be);if(Oe){const _e=Number(Oe.max??0),Ne=Math.min(pe,_e);for(let de=0;de<Ne;de++)H.push({id:`upstream-el-${de}-${Date.now()}`,name:`Element${de+1}`,frontalUrl:l[de],referenceUrls:[]});if(Se)for(let de=Ne;de<pe;de++)L.push(l[de])}else if(Se)for(let _e=0;_e<pe;_e++)L.push(l[_e]);else for(let _e=0;_e<pe;_e++)H.push({id:`upstream-el-${_e}-${Date.now()}`,name:`Element${_e+1}`,frontalUrl:l[_e],referenceUrls:[]});ve=pe}l.length>ve&&(Q=l.length-ve);const Ye=xe.filter(pe=>pe.type==="audio"&&pe.role==="reference"),Ae=xe.filter(pe=>pe.type==="audio"&&pe.role==="voice_clone"),Ee=vi(Ye,"audio"),Ce=vi(Ae,"audio");if(A){const pe=vi(xe,"video")||((S==null?void 0:S.maxReferenceVideos)??3);for(let _e=0;_e<u.length&&_e<pe;_e++)$.push(u[_e]);u.length>pe&&(D=u.length-pe)}else u.length>0&&(B=u[0]),u.length>1&&(D=u.length-1);let X=0;if(Ee>0){const pe=Math.min(c.length,Ee);for(let _e=0;_e<pe;_e++)ee.push(c[_e]);X+=pe}else if(Ce>0){const pe=Math.min(c.length,Ce);for(let _e=0;_e<pe;_e++)G.push(c[_e]);X+=pe}c.length>X&&(K=c.length-X);break}case"video_edit":case"video_reference":{B=u[0]||null,u.length>1&&(D=u.length-1);const xe=w,Oe=((he=(ne=S==null?void 0:S.inputs)==null?void 0:ne[xe])==null?void 0:he.slots)??[],Se=vi(Oe,"image"),we=Oe.some(ve=>ve.type==="image"&&ve.role==="reference"),Be=Oe.some(ve=>ve.type==="image"&&ve.role==="style_reference");if(Se>0&&l.length>0){const ve=Math.min(l.length,Se);if(we)for(let Ye=0;Ye<ve;Ye++)H.push({id:`upstream-el-${Ye}-${Date.now()}`,name:`Element${Ye+1}`,frontalUrl:l[Ye],referenceUrls:[]});else if(Be)for(let Ye=0;Ye<ve;Ye++)L.push(l[Ye]);else for(let Ye=0;Ye<ve;Ye++)H.push({id:`upstream-el-${Ye}-${Date.now()}`,name:`Element${Ye+1}`,frontalUrl:l[Ye],referenceUrls:[]});l.length>Se&&(Q=l.length-Se)}else Q=l.length;K=c.length;break}case"video_continuation":W=u[0]||null,u.length>1&&(D=u.length-1),Q=l.length,K=c.length;break}return{recommendedMode:w,genType:y,startFrameUrl:R,endFrameUrl:M,videoElements:H,refImageUrlsLocal:L,referenceVideoUrl:B,continuationVideoUrl:W,modelId:b,modelSwitched:k,upstreamImageUrls:l,upstreamVideoUrls:u,upstreamAudioUrls:c,canLipSync:l.length>0&&c.length>0,lipSyncImageUrl:l[0]??null,lipSyncAudioUrl:c[0]??null,audioUrl:c[0]??null,refVideoUrls:$,refAudioUrls:ee,voiceCloneUrls:G,isOmniModel:A,truncated:{images:Q,videos:D,audios:K}}}function vi(e,t){let r=0;const n=new Set;for(const s of e)s.type===t&&(s.groupKey?n.has(s.groupKey)||(n.add(s.groupKey),r+=Number(s.groupMax??s.max??0)):r+=Number(s.max??0));return r}function y0(e,t,r,n){const s=t>0,a=r>0,o=n>0;if(!s&&!a&&!o)return"text";const l=t===1&&r===0&&n===0?["first_frame","reference","video_continuation","video_reference","video_edit"]:["reference","video_continuation","video_reference","video_edit","first_frame"];for(const u of l)if(jj(e,u,t,r,n))return u;return null}function jj(e,t,r,n,s){var c;if(t==="text")return r===0&&n===0&&s===0;const a=e.inputs||{},o=((c=a==null?void 0:a[t])==null?void 0:c.slots)??[];if(o.length===0)return!1;let l=vi(o,"image");if(t==="reference"){const d=o.filter(m=>m.type==="image"&&(m.role==="reference"||m.role==="style_reference")),h=vi(d,"image");h>0&&(l=h)}return!(r>0&&r>l||n>0&&n>vi(o,"video")||s>0&&s>vi(o,"audio")||(r>0||n>0||s>0)&&n===0&&o.some(h=>h.type==="video"&&!h.optional&&!h.groupKey))}function ive(e,t,r){const n=[],s=[],a=[];for(const o of t){if(o.targetId!==e)continue;const l=r.find(u=>u.id===o.sourceId);if(l){if(l.type==="image"){const u=l.data,c=(u.images?u.images[u.coverIndex??0]||u.
1175images[0]:null)||u.resolvedUrl||u.url;c&&!u.placeholder&&n.push(c)}else if(l.type==="video"){const u=l.data,c=u.resolvedUrl||u.url;c&&!u.placeholder&&s.push(c)}else if(l.type==="audio"){const u=l.data,c=u.resolvedUrl||u.url;c&&!u.placeholder&&a.push(c)}}}return{images:n,videos:s,audios:a}}function xQ(e,t,r){const n=[];for(const s of t){if(s.targetId!==e)continue;const a=r.find(o=>o.id===s.sourceId);if(a){if(a.type==="image"){const o=a.data;!o.placeholder&&o.assetId&&n.push(o.assetId)}else if(a.type==="video"){const o=a.data,l=o.videoAssetId||o.assetId;!o.placeholder&&l&&n.push(l)}else if(a.type==="audio"){const o=a.data;!o.placeholder&&o.assetId&&n.push(o.assetId)}}}return n}function bQ(e,t,r,n){for(const s of t){if(s.targetId!==e)continue;const a=r.find(u=>u.id===s.sourceId);if(!a)continue;const o=a.data;let l;if(a.type==="image"?l=o==null?void 0:o.assetId:a.type==="video"?l=(o==null?void 0:o.videoAssetId)||(o==null?void 0:o.assetId):a.type==="audio"&&(l=o==null?void 0:o.assetId),!!l&&(n(o==null?void 0:o.url,l),n(o==null?void 0:o.resolvedUrl,l),n(o==null?void 0:o.videoUrl,l),Array.isArray(o==null?void 0:o.images)))for(const u of o.images)n(u,l)}}function yQ(e,t,r,n){return y0(e,t,r,n)!==null}function ove(e,t,r,n){return n.filter(s=>!yQ(s,e,t,r)).map(s=>s.id)}const vQ=v.forwardRef(({error:e,className:t="",...r},n)=>i.jsx("input",{ref:n,className:["w-full px-3.5 py-2.5 text-sm rounded-lg","bg-[var(--bg-secondary)] border border-ui-border text-[var(--text-primary)]","placeholder:text-[var(--text-muted)]","focus:outline-none focus:border-[var(--border-strong)] focus:ring-2 focus:ring-[var(--accent-light)]","transition-colors duration-150",e?"border-ui-status-error focus:border-ui-status-error focus:ring-red-100":"",t].filter(Boolean).join(" "),...r}));vQ.displayName="Input";const Ij=v.forwardRef(({assetId:e,url:t,posterUrl:r,crossOrigin:n,className:s,allowDeletedState:a,onError:o,...l},u)=>{const c=Yu(e,void 0,t||void 0,{stable:!0}),d=Yu(void 0,void 0,r||void 0,{stable:!0}),h=uK(),{state:m,recycleBinDaysLeft:f,reload:p}=G9(e||void 0);if(!a&&e&&(m==="in_recycle_bin"||m==="hard_deleted"))return i.jsx(K9,{data:{assetState:m,recycleBinDaysLeft:f},assetId:e,className:s,onRestored:async()=>{Si.invalidate(e),p()}});const g=c||t||"",x=h.corsDropped?void 0:n??h.applyCrossOrigin(g);return i.jsx("video",{ref:u,src:g,poster:d||r||void 0,crossOrigin:x,className:s,onError:w=>{h.onCorsError(w)||o==null||o(w)},...l},h.videoKey)});Ij.displayName="SignedVideo";const wQ=[{pattern:/^rmbg-input-/i,key:"rmbg"},{pattern:/^edit-mask-/i,key:"edit_mask"},{pattern:/^edit-input-/i,key:"edit_input"},{pattern:/^upscale-input-/i,key:"upscale"},{pattern:/^lineart-input-/i,key:"lineart"},{pattern:/^depth-input-/i,key:"depth"},{pattern:/^restore-input-/i,key:"restore"},{pattern:/^scratchRemoval-input-/i,key:"scratch"}],EQ=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;function kQ(e,t){var s;const r=e.filename||"",n=t??((a,o)=>o??a);for(const{pattern:a,key:o}of wQ)if(a.test(r)){const l=n(`assets.intermediate.${o}`,o);return`${n("assets.intermediate.prefix","å·¥å
·ä¸é´äº§ç©")}: ${l}`}if(((s=e.metadata)==null?void 0:s.transient)===!0)return n("assets.intermediate.generic","å·¥å
·ä¸é´äº§ç©");if(EQ.test(r)){const a=e.createdAt?new Date(e.createdAt).toLocaleDateString():"",o=e.source,l=o==="generated"||o==="generation"?n("assets.displayName.aiGenerated","AI çæ"):o==="upload"?n("assets.displayName.uploaded","ä¸ä¼ æä»¶"):o==="translation"?n("assets.displayName.translation","ç¿»è¯äº§ç©"):o==="fork"||o==="clone"||o==="template-clone"||o==="tv-clone"?n("assets.displayName.cloned","坿¬"):n("assets.displayName.asset","èµæº");return a?`${l} · ${a}`:l}return r}const NQ=24;function SQ({open:e,onClose:t,onSelect:r,type:n,defaultSource:s}){const{t:a}=We(),[o,l]=v.useState([]),[u,c]=v.useState(!0),d=v.useRef(1),h=v.useRef(!0),m=v.useRef(!1),f=v.useRef(null),p=v.useRef(null),g=v.useCallback(async k=>{var T;if(!m.current){m.current=!0;try{const j=(await ys.getAssets({type:n,page:k,limit:NQ,source:s})).data,E=(j.assets??[]).filter(A=>{var R;return((R=A.metadata)==null?void 0:R.transient)!==!0});l(A=>k===1?E:yj([...A,...E])),h.current=k<(((T=j.pagination)==null?void 0:T.totalPages)??1),d.current=k}catch{h.current=!1}finally{m.current=!1,c(!1)}}},[n,s]);v.useEffect(()=>
1175{e&&(l([]),c(!0),d.current=1,h.current=!0,m.current=!1,g(1))},[e,n,s,g]),v.useEffect(()=>{if(!e)return;const k=f.current,T=p.current;if(!k||!T)return;const S=new IntersectionObserver(j=>{var E;(E=j[0])!=null&&E.isIntersecting&&h.current&&!m.current&&g(d.current+1)},{root:T,threshold:0});return S.observe(k),()=>S.disconnect()},[e,g]),v.useEffect(()=>{if(!e)return;const k=T=>{T.key==="Escape"&&t()};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[e,t]);const x=k=>{r(k),t()};if(!e)return null;const y=n==="image"?Ss:n==="video"?rm:Jl,b=k=>{switch(k.type){case"image":return i.jsx("img",{src:k.url,alt:k.filename,className:"w-full h-full object-cover",loading:"lazy",crossOrigin:Hr(k.url)});case"video":return i.jsx("video",{src:k.url,preload:"metadata",muted:!0,className:"w-full h-full object-cover",crossOrigin:Hr(k.url)});case"audio":return null;default:return null}};return fn.createPortal(i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[i.jsx("div",{className:"absolute inset-0",style:{background:"rgba(0, 0, 0, 0.6)"},onClick:t}),i.jsxs("div",{className:"relative z-10 w-full max-w-2xl mx-4 rounded-2xl overflow-hidden shadow-2xl border flex flex-col",style:{background:"var(--bg-primary)",borderColor:"var(--border-default)",maxHeight:"80vh"},children:[i.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b flex-shrink-0",style:{borderColor:"var(--border-default)"},children:[i.jsx("h3",{className:"text-base font-semibold",style:{color:"var(--text-primary)"},children:a("assets.picker.title")}),i.jsx("button",{onClick:t,className:"p-1.5 rounded-lg transition-colors hover:bg-[var(--bg-tertiary)]",children:i.jsx(cr,{className:"w-5 h-5",style:{color:"var(--text-secondary)"}})})]}),i.jsxs("div",{ref:p,className:"flex-1 overflow-y-auto p-4 min-h-0",children:[u?i.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 gap-3",children:Array.from({length:12}).map((k,T)=>i.jsx("div",{className:"aspect-square rounded-lg animate-pulse",style:{background:"var(--bg-tertiary)"}},T))}):o.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[i.jsx(y,{className:"w-12 h-12 mb-3",style:{color:"var(--text-tertiary)"}}),i.jsx("p",{className:"text-sm",style:{color:"var(--text-secondary)"},children:a("assets.picker.empty")})]}):n==="audio"?i.jsx("div",{className:"space-y-2",children:o.map(k=>i.jsxs("button",{onClick:()=>x(k),className:"w-full flex items-center gap-3 p-3 rounded-lg border transition-colors hover:bg-[var(--bg-tertiary)]",style:{borderColor:"var(--border-default)"},children:[i.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:"var(--bg-tertiary)"},children:i.jsx(Jl,{className:"w-5 h-5",style:{color:"var(--text-tertiary)"}})}),i.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[i.jsx("p",{className:"text-sm font-medium truncate",style:{color:"var(--text-primary)"},children:kQ(k,a)}),i.jsxs("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:[k.mimeType||"audio",k.size>0&&` · ${(k.size/1024/1024).toFixed(1)} MB`]})]})]},k.id))}):i.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 gap-3",children:o.map(k=>i.jsxs("button",{onClick:()=>x(k),className:"group relative aspect-square rounded-lg overflow-hidden border transition-all hover:ring-2",style:{borderColor:"var(--border-default)","--tw-ring-color":"var(--accent-primary)"},children:[b(k),i.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{background:"rgba(0, 0, 0, 0.5)"},children:i.jsx("span",{className:"text-sm font-medium text-white",children:a("assets.picker.select")})})]},k.id))}),i.jsx("div",{ref:f,className:"h-1"})]})]})]}),document.body)}function TQ({open:e,onLocal:t,onLibrary:r,onCanvas:n,onVirtualPersons:s,onClose:a}){const{t:o}=We();return e?fn.createPortal(i.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",onClick:a,children:[i.jsx("div",{className:"absolute inset-0 bg-black/60"}),i.jsx("div",{className:"relative z-10 w-[280px] rounded-2xl shadow-2xl overflow-hidden",style:{background:"var(--bg-primary)"},onClick:l=>l.stopPropagation(),children:i.jsxs("div",{className:"p-2",children:[i.jsxs("button",{onClick:t,className:"w-full flex items-center gap-3 px-4 py-3.5 rounded-xl transition-colors hover:bg-[var(--bg-tertiary)]",children:[i.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{background:"rgba(99, 102, 241, 0.15)"},children:i.jsx(O9,{className:"w-[18px] h-[18px]",style:{color:"var(--accent-primary)"}})}),i.jsxs("div",{className:"text-left",children:[i.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:o("common.localUpload")}),i.jsx("p",{className:"text-xs mt-0.5",style:{color:"var(--text-tertiary)"},children:o("assets.picker.localDesc")})]})]}),i.jsx("div",{className:"mx-4 border-t",style:{borderColor:"var(--border-default)"}}),i.jsxs("button",{onClick:r,className:"w-full flex items-center gap-3 px-4 py-3.5 rounded-xl transition-colors hover:bg-[var(--bg-tertiary)]",children:[i.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{background:"rgba(16, 185, 129, 0.15)"},children:i.jsx(em,{className:"w-[18px] h-[18px]",style:{color:"#10b981"}})}),i.jsxs("div",{className:"text-left",children:[i.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:o("assets.picker.fromLibrary")}),i.jsx("p",{className:"text-xs mt-0.5",style:{color:"var(--text-tertiary)"},children:o("assets.picker.libraryDesc")})]})]}),n&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mx-4 border-t",style:{borderColor:"var(--border-default)"}}),i.jsxs("button",{onClick:n,className:"w-full flex items-center gap-3 px-4 py-3.5 rounded-xl transition-colors hover:bg-[var(--bg-tertiary)]",children:[i.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{background:"rgba(245, 158, 11, 0.15)"},children:i.jsx(r3,{className:"w-[18px] h-[18px]",style:{color:"#f59e0b"}})}),i.jsxs("div",{className:"text-left",children:[i.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:o("assets.picker.fromCanvas","ä»ç»å¸éæ©")}),i.jsx("p",{className:"text-xs mt-0.5",style:{color:"var(--text-tertiary)"},children:o("assets.picker.canvasDesc","éæ©ç»å¸ä¸çå
ç´ ")})]})]})]}),s&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mx-4 border-t",style:{borderColor:"var(--border-default)"}}),i.jsxs("button",{onClick:s,className:"w-full flex items-center gap-3 px-4 py-3.5 rounded-xl transition-colors hover:bg-[var(--bg-tertiary)]",children:[i.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{background:"rgba(168, 85, 247, 0.15)"},children:i.jsx(EV,{className:"w-[18px] h-[18px]",style:{color:"#a85
11755f7"}})}),i.jsxs("div",{className:"text-left",children:[i.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:o("virtualPerson.triggerLabel","è§è²åº")}),i.jsx("p",{className:"text-xs mt-0.5",style:{color:"var(--text-tertiary)"},children:o("virtualPerson.sourceDesc","使ç¨å·²å®¡æ ¸ç人åï¼æä¸ä¼ æ°ç")})]})]})]})]})})]}),document.body):null}function Rj(){const[e,t]=v.useState({open:!1,type:"image"}),r=v.useRef(null),n=v.useCallback((l,u)=>new Promise(c=>{r.current=c,t({open:!0,type:l,defaultSource:u})}),[]),s=v.useCallback(l=>{var u;t(c=>({...c,open:!1})),(u=r.current)==null||u.call(r,l),r.current=null},[]),a=v.useCallback(()=>{var l;t(u=>({...u,open:!1})),(l=r.current)==null||l.call(r,null),r.current=null},[]),o=v.createElement(SQ,{open:e.open,onClose:a,onSelect:s,type:e.type,defaultSource:e.defaultSource});return{openPicker:n,PickerElement:o}}function CQ(){const[e,t]=v.useState(!1),r=v.useRef(null),n=v.useCallback(()=>new Promise(a=>{r.current=a,t(!0)}),[]),s=v.useCallback(a=>{var o;(o=r.current)==null||o.call(r,a),r.current=null,t(!1)},[]);return{showSourceChoice:n,sourceChoiceOpen:e,pickSource:s}}function _Q({open:e,filter:t,excludeElementId:r,onSelect:n,onClose:s}){const{t:a}=We();if(!e)return null;const l=(()=>{const m=$n.getState().elements;return t==="audio"?m.filter(f=>{if(f.type!=="audio"||f.id===r)return!1;const p=f.data;return(p.resolvedUrl||p.url)&&!p.placeholder}).map((f,p)=>{const g=f.data;return{id:f.id,url:g.resolvedUrl||g.url,label:a("art.genStatus.audioLabel","é³é¢")+` ${p+1}`,type:"audio"}}):t==="video"?m.filter(f=>{if(f.type!=="video"||f.id===r)return!1;const p=f.data;return(p.resolvedUrl||p.url)&&!p.placeholder}).map((f,p)=>{const g=f.data;return{id:f.id,url:g.resolvedUrl||g.url,cover:g.coverUrl,label:a("art.genStatus.videoLabel","è§é¢")+` ${p+1}`,type:"video"}}):m.filter(f=>{if(f.type!=="image"||f.id===r)return!1;const p=f.data;return((p.images?p.images[p.coverIndex??0]||p.images[0]:null)||p.resolvedUrl||p.url)&&!p.placeholder}).map((f,p)=>{const g=f.data,x=(g.images?g.images[g.coverIndex??0]||g.images[0]:null)||g.resolvedUrl||g.url;return{id:f.id,url:x,label:a("art.genStatus.refImage","å¾ç")+` ${p+1}`,type:"image"}})})(),u=t==="audio"?"assets.picker.canvasAudio":t==="video"?"assets.picker.canvasVideo":"assets.picker.canvasImage",c=t==="audio"?"ç»å¸ä¸çé³é¢":t==="video"?"ç»å¸ä¸çè§é¢":"ç»å¸ä¸çå¾ç",d=t==="audio"?"assets.picker.noCanvasAudio":t==="video"?"assets.picker.noCanvasVideo":"assets.picker.noCanvasImage",h=t==="audio"?"ç»å¸ä¸æ²¡æé³é¢":t==="video"?"ç»å¸ä¸æ²¡æè§é¢":"ç»å¸ä¸æ²¡æå¾ç";return fn.createPortal(i.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",onClick:s,children:[i.jsx("div",{className:"absolute inset-0 bg-black/60"}),i.jsxs("div",{className:"relative z-10 w-[320px] max-h-[400px] rounded-2xl shadow-2xl overflow-hidden flex flex-col",style:{background:"var(--bg-primary)"},onClick:m=>m.stopPropagation(),children:[i.jsx("div",{className:"px-5 py-4 border-b",style:{borderColor:"var(--border-default)"},children:i.jsx("h3",{className:"text-sm font-semibold",style:{color:"var(--text-primary)"},children:a(u,c)})}),i.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:l.length===0?i.jsx("div",{className:"py-8 text-center",children:i.jsx("p",{className:"text-sm",style:{color:"var(--text-tertiary)"},children:a(d,h)})}):l.map(m=>i.jsxs("button",{className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors hover:bg-[var(--bg-tertiary)]",onClick:()=>{n(m.url),s()},children:[m.type==="image"?i.jsx("img",{src:m.url,alt:"",crossOrigin:Hr(m.url),className:"w-10 h-10 rounded-lg object-cover flex-shrink-0"}):m.type==="video"?i.jsx("video",{src:m.url,muted:!0,preload:"metadata",crossOrigin:Hr(m.url),className:"w-10 h-10 rounded-lg object-cover flex-shrink-0"}):i.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:"var(--bg-tertiary)"},children:i.jsxs("svg",{className:"w-5 h-5",style:{color:"var(--text-tertiary)"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M9 18V5l12-2v13"}),i.jsx("circle",{cx:"6",cy:"18",r:"3"}),i.jsx("circle",{cx:"18",cy:"16",r:"3"})]})}),i.jsx("span",{className:"text-sm truncate",style:{color:"var(--text-primary)"},children:m.label})]},m.id))})]})]}),document.body)}function AQ({size:e}){return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:e,height:e,viewBox:"0 0 16 16",children:i.jsx("g",{transform:"translate(1 1)",children:i.jsx("path",{d:"M7 0.641113C7.2515 0.641113 7.49564 0.720096 7.69922 0.864746L7.78418 0.930176L7.78906 0.934082C8.75179 1.77578 10.0859 2.39196 11.083 2.39209C11.3769 2.39209 11.6593 2.50849 11.8672 2.71631C12.0748 2.92404 12.1923 3.2058 12.1924 3.49951V7.5835C12.1923 9.18027 11.6258 10.4048 10.7178 11.3364C9.82404 12.2533 8.62182 12.8643 7.37109 13.3003L7.36719 13.3013C7.12963 13.3818 6.87152 13.3783 6.63574 13.2935C6.63189 13.2922 6.62787 13.2919 6.62402 13.2905C5.37422 12.8577 4.17415 12.2499 3.28223 11.3364C2.37326 10.4054 1.8087 9.18017 1.80859 7.5835V3.49951C1.80872 3.2058 1.92517 2.92404 2.13281 2.71631C2.34066 2.50849 2.62307 2.39209 2.91699 2.39209C3.91369 2.39195 5.25354 1.77039 6.21094 0.934082L6.21582 0.930176C6.4344 0.743601 6.71261 0.641113 7 0.641113ZM7 1.69189C6.96253 1.69189 6.92597 1.70469 6.89746 1.729C5.82515 2.66406 4.25161 3.44177 2.91699 3.44189C2.90171 3.44189 2.88688 3.4478 2.87598 3.4585C2.86515 3.46933 2.85852 3.48421 2.8584 3.49951V7.5835C2.8585 8.90294 3.31445 9.86589 4.03418 10.603C4.67647 11.2607 5.54713 11.7568 6.54395 12.1431L6.97852 12.3022L6.99121 12.3062C7.00351 12.3106 7.01686 12.3112 7.0293 12.3071C8.20335 11.8975 9.23396 11.3559 9.9668 10.604C10.6861 9.86598 11.1415 8.90289 11.1416 7.5835V3.49951C11.1415 3.48421 11.1349 3.46933 11.124 3.4585C11.1131 3.4478 11.0983 3.44189 11.083 3.44189C9.74882 3.44177 8.18115 2.67029 7.10254 1.729L7.08008 1.7124C7.05608 1.69835 7.02814 1.69189 7 1.69189ZM8.37891 5.4624C8.58392 5.25746 8.91608 5.25746 9.12109 5.4624C9.32593 5.66739 9.32593 5.9996 9.12109 6.20459L6.78809 8.5376C6.58306 8.74262 6.24995 8.74262 6.04492 8.5376L4.87891 7.37158C4.67407 7.16659 4.67407 6.83341 4.87891 6.62842C5.08383 6.42391 5.41617 6.42391 5.62109 6.62842L6.41699 7.42432L8.37891 5.4624Z",fill:"currentColor"})})})}function jQ({assetId:e,size:t="md",variant:r="absolute",className:n,tooltipPlacement:s="bottom"}){const{t:a}=We(),o=LK(e),[l,u]=v.useState(!1),[c,d]=v.useState({top:0,left:0}),h=v.useRef(null),m=v.useCallback(()=>
1175{if(h.current){const k=h.current.getBoundingClientRect(),T=s==="top"?k.top-6:k.bottom+6;d({top:T,left:k.left+k.width/2})}u(!0)},[s]),f=v.useCallback(()=>u(!1),[]);if(!o)return null;const p=t==="sm"?"w-4 h-4":"w-5 h-5",g=t==="sm"?14:16,x=t==="sm"?"w-3.5 h-3.5":"w-4 h-4";let w,y;if(o.status==="pending")w=i.jsx(kn,{className:`${x} animate-spin text-yellow-500`}),y=a("compliance.seedance2Reviewing");else if(o.status==="approved")w=i.jsx("span",{className:"text-[#007BBA]",children:i.jsx(AQ,{size:g})}),y=a("compliance.seedance2Approved");else if(o.status==="rejected")w=i.jsx(p1,{className:`${x} text-red-500`}),y=o.rejectReason?`${a("compliance.seedance2ReviewFailed")} 1176${o.rejectReason}`:a("compliance.seedance2ReviewFailed");else return null;const b=r==="absolute"?`absolute ${n??"top-0.5 right-0.5"} z-20`:"inline-flex";return i.jsxs(i.Fragment,{children:[i.jsx("span",{ref:h,className:`${b} ${p} flex items-center justify-center pointer-events-auto cursor-default`,onMouseEnter:m,onMouseLeave:f,"aria-label":y,children:w}),l&&typeof document<"u"&&fn.createPortal(i.jsx("span",{className:"fixed pointer-events-none px-2 py-1 rounded text-[11px] leading-tight text-white bg-black/85 whitespace-pre-line shadow-md max-w-xs z-[10000]",style:{top:c.top,left:c.left,transform:s==="top"?"translate(-50%, -100%)":"translateX(-50%)"},children:y}),document.body)]})}const $c=Yt.create({baseURL:"/api/v1"});$c.interceptors.request.use(e=>{const{accessToken:t}=ut.getState();return t&&(e.headers.Authorization=`Bearer ${t}`),e});const Xm={async list(){const{data:e}=await $c.get("/virtual-persons");return e},async getById(e){const{data:t}=await $c.get(`/virtual-persons/${e}`);return t},async upload(e){const t=new FormData;t.append("file",e);const{data:r}=await $c.post("/virtual-persons/upload",t,{headers:{"Content-Type":"multipart/form-data"}});return r},async delete(e){await $c.delete(`/virtual-persons/${e}`)},async revalidate(e){await $c.post(`/virtual-persons/${e}/revalidate`)}};function IQ({open:e,onClose:t,onSelect:r}){const{t:n}=We(),[s,a]=v.useState(!0),[o,l]=v.useState([]),[u,c]=v.useState(!1),d=v.useRef(null),h=v.useCallback(async()=>{var x,w;try{a(!0);const y=await Xm.list();l(y)}catch(y){Qe.error(((w=(x=y==null?void 0:y.response)==null?void 0:x.data)==null?void 0:w.message)||(y==null?void 0:y.message)||"Failed to load")}finally{a(!1)}},[]);v.useEffect(()=>{e&&h()},[e,h]),v.useEffect(()=>{if(!e||!o.some(y=>y.status==="Processing"))return;const w=setInterval(h,5e3);return()=>clearInterval(w)},[e,o,h]);const m=x=>{x.status==="Active"&&(r(x),t())},f=async x=>{var w,y;if(window.confirm(n("virtualPerson.confirmDelete","ç¡®å®å é¤è¿ä¸ªè§è²ï¼å é¤åä¸å¯æ¢å¤ã")))try{await Xm.delete(x),l(b=>b.filter(k=>k.id!==x))}catch(b){Qe.error(((y=(w=b==null?void 0:b.response)==null?void 0:w.data)==null?void 0:y.message)||(b==null?void 0:b.message))}},p=async x=>{var w,y;try{await Xm.revalidate(x),await h()}catch(b){Qe.error(((y=(w=b==null?void 0:b.response)==null?void 0:w.data)==null?void 0:y.message)||(b==null?void 0:b.message))}},g=async x=>{var b,k,T;const w=(b=x.target.files)==null?void 0:b[0];if(x.target.value="",!w)return;if(w.size>30*1024*1024){Qe.error(n("virtualPerson.fileTooLarge","æä»¶è¿å¤§ï¼æå¤§ 30MBï¼"));return}if(!["image/jpeg","image/png","image/webp","image/bmp","image/gif","image/tiff"].includes(w.type)){Qe.error(n("virtualPerson.invalidFormat","ä» æ¯æ jpg / png / webp / bmp / gif / tiff"));return}try{c(!0);const S=await Xm.upload(w);l(j=>[S,...j])}catch(S){Qe.error(((T=(k=S==null?void 0:S.response)==null?void 0:k.data)==null?void 0:T.message)||(S==null?void 0:S.message)||"Upload failed")}finally{c(!1)}};return i.jsx(pj,{open:e,onClose:t,title:n("virtualPerson.title","è§è²åº"),maxWidth:"720px",children:i.jsxs("div",{className:"p-4 md:p-6",children:[s&&o.length===0?i.jsx("div",{className:"flex items-center justify-center py-12",children:i.jsx(kn,{className:"w-6 h-6 animate-spin text-[var(--text-tertiary)]"})}):i.jsxs("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-5 gap-3",children:[i.jsx("button",{type:"button",onClick:()=>{var x;return(x=d.current)==null?void 0:x.click()},disabled:u,className:"aspect-square rounded-lg border-2 border-dashed border-ui-border hover:border-ui-accent flex items-center justify-center text-[var(--text-tertiary)] hover:text-[var(--text-primary)] transition-colors disabled:opacity-50",title:n("virtualPerson.uploadNew","ä¸ä¼ æ°è§è²"),children:u?i.jsx(kn,{className:"w-6 h-6 animate-spin"}):i.jsx(ec,{className:"w-6 h-6"})}),i.jsx("input",{ref:d,type:"file",accept:"image/jpeg,image/png,image/webp,image/bmp,image/gif,image/tiff",className:"hidden",onChange:g}),o.map(x=>i.jsx(RQ,{person:x,onClick:()=>m(x),onDelete:()=>f(x.id),onRevalidate:x.status==="Failed"?()=>p(x.id):void 0},x.id))]}),i.jsxs("div",{className:"mt-4 text-xs text-[var(--text-tertiary)] border-t border-ui-border pt-3",children:["â ",n("virtualPerson.uploadTip","ä¸ä¼ å¾çåä¼è¿è¡å å®¹å®¡æ ¸ï¼éè¿åå³å¯ç¨äºè§é¢çæãå®¡æ ¸éå¸¸å¨ 5-10 ç§å 宿ã")]})]})})}function RQ({person:e,onClick:t,onDelete:r,onRevalidate:n}){const{t:s}=We(),a=e.status==="Active",o=e.status==="Processing",l=e.status==="Failed";return i.jsxs("div",{className:`relative group aspect-square rounded-lg overflow-hidden border border-ui-border ${a?"cursor-pointer hover:border-ui-accent":"cursor-not-allowed"} transition-all`,onClick:a?t:void 0,title:l&&e.lastError?e.lastError:void 0,children:[e.coverImageUrl?i.jsx("img",{src:e.coverImageUrl,alt:"",crossOrigin:Hr(e.coverImageUrl),className:"w-full h-full object-cover",loading:"lazy"}):i.jsx("div",{className:"w-full h-full bg-[var(--bg-secondary)]"}),o&&i.jsx("div",{className:"absolute inset-0 bg-black/40 flex items-center justify-center",children:i.jsx(kn,{className:"w-5 h-5 animate-spin text-white"})}),l&&i.jsx("div",{className:"absolute inset-0 bg-black/30 flex items-center justify-center",children:i.jsx(p1,{className:"w-6 h-6 text-red-400"})}),i.jsxs("div",{className:"absolute top-1 right-1 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[n&&i.jsx("button",{onClick:u=>{u.stopPropagation(),n()},className:"w-6 h-6 flex items-center justify-center rounded bg-white/90 dark:bg-black/70 text-[var(--text-primary)] hover:bg-white",title:s("virtualPerson.revalidate","éæ°éªè¯"),children:i.jsx(tG,{className:"w-3 h-3"})}),i.jsx("button",{onClick:u=>{u.stopPropagation(),r()},className:"w-6 h-6 flex items-center justify-center rounded bg-white/90 dark:bg-black/70 text-red-600 hover:bg-white",title:s("virtualPerson.delete","å é¤"),children:i.jsx(tm,{className:"w-3 h-3"})})]})]})}const DQ=ya(e=>({dragType:null,startDrag:t=>e({dragType:t}),endDrag:()=>e({dragType:null})})),MQ={image:Ss,video:rm,film:Wo,music:Jl},k2=new Map;async function OQ(e,t){const r=t==="video"?"video":"audio";return new Promise(n=>{const s=document.createElement(r);s.preload="metadata",s.onloadedmetadata=()=>n(s.duration||0),s.onerror=()=>n(0),s.src=e})}async function LQ(e){var n;if(typeof window>"u")return null;const t=(n=window.HTMLVideoElement)==null?void 0:n.prototype;if(!(t!=null&&t.requestVideoFrameCallback))return null;const r=URL.createObjectURL(e);try{return await new Promise(s=>{const a=document.createElement("video");
1176a.muted=!0,a.playsInline=!0,a.preload="auto";let o=!1;const l=c=>{if(!o){o=!0;try{a.pause()}catch{}try{a.removeAttribute("src"),a.load()}catch{}s(c)}};a.onerror=()=>l(null);const u=setTimeout(()=>l(null),1500);a.onloadedmetadata=()=>{a.play().then(()=>{let c=null;const d=(h,m)=>{clearTimeout(u);const f=typeof(m==null?void 0:m.mediaTime)=="number"?m.mediaTime:null;if(f===null){l(null);return}if(c===null){c=f,a.requestVideoFrameCallback(d);return}const p=f-c;p>0&&Number.isFinite(p)?l(1/p):l(null)};a.requestVideoFrameCallback(d)}).catch(()=>l(null))},a.src=r})}finally{URL.revokeObjectURL(r)}}async function PQ(e,t){if(e.accept){const o=e.accept.split(",").map(u=>u.trim()).filter(Boolean),l="."+(t.name.split(".").pop()||"").toLowerCase();if(!o.includes(t.type)&&!o.some(u=>u===l))return{ok:!1,reason:"format"}}if(e.maxSizeMB&&t.size>e.maxSizeMB*1024*1024)return{ok:!1,reason:"size"};let r,n,s,a;if(e.type==="image"&&e.minDim&&!await new Promise(l=>{const u=new Image;u.onload=()=>l(u.width>=e.minDim&&u.height>=e.minDim),u.onerror=()=>l(!1),u.src=URL.createObjectURL(t)}))return{ok:!1,reason:"dim"};if(e.type==="video"||e.type==="audio"){const o=e.type==="video"?"video":"audio",l=await new Promise(u=>{const c=document.createElement(o);c.preload="metadata",c.onloadedmetadata=()=>u(c.duration),c.onerror=()=>u(0),c.src=URL.createObjectURL(t)});if(e.durRange&&(l<e.durRange[0]||l>e.durRange[1]))return{ok:!1,reason:"duration"};l>0&&(s=l)}if(e.videoDimRange&&e.type==="video"){const o=await new Promise(u=>{const c=document.createElement("video");c.preload="metadata",c.onloadedmetadata=()=>u({w:c.videoWidth,h:c.videoHeight}),c.onerror=()=>u({w:0,h:0}),c.src=URL.createObjectURL(t)}),l=Math.min(o.w,o.h);if(l===0||l<e.videoDimRange[0]||l>e.videoDimRange[1])return{ok:!1,reason:"videoDim"};r=o.w,n=o.h}if(e.videoLongEdgeMax&&e.type==="video"){let o=r??0,l=n??0;if(!o||!l){const c=await new Promise(d=>{const h=document.createElement("video");h.preload="metadata",h.onloadedmetadata=()=>d({w:h.videoWidth,h:h.videoHeight}),h.onerror=()=>d({w:0,h:0}),h.src=URL.createObjectURL(t)});o=c.w,l=c.h}const u=Math.max(o,l);if(u>0&&u>e.videoLongEdgeMax)return{ok:!1,reason:"videoLongEdge"};r==null&&o>0&&(r=o),n==null&&l>0&&(n=l)}if(e.fpsRange&&e.type==="video"){const o=await LQ(t);if(o!==null&&(o<e.fpsRange[0]||o>e.fpsRange[1]))return{ok:!1,reason:"fps"};o!==null&&(a=o)}if(e.aspectRatioRange&&(e.type==="video"||e.type==="image")){let o=r??0,l=n??0;if(!o||!l){const u=await new Promise(c=>{if(e.type==="video"){const d=document.createElement("video");d.preload="metadata",d.onloadedmetadata=()=>c({w:d.videoWidth,h:d.videoHeight}),d.onerror=()=>c({w:0,h:0}),d.src=URL.createObjectURL(t)}else{const d=new Image;d.onload=()=>c({w:d.width,h:d.height}),d.onerror=()=>c({w:0,h:0}),d.src=URL.createObjectURL(t)}});o=u.w,l=u.h}if(o>0&&l>0){const u=o/l;if(u<e.aspectRatioRange[0]||u>e.aspectRatioRange[1])return{ok:!1,reason:"aspectRatio"};r=r??o,n=n??l}}return{ok:!0,durationSec:s,width:r,height:n,fps:a}}async function FQ(e,t){var n,s,a;if(e==="image"){const o=await ys.uploadImage(t);return(n=o.data)!=null&&n.url?{url:o.data.url,assetId:o.data.id}:null}if(e==="video"){const o=await ys.uploadVideo(t);return(s=o.data)!=null&&s.url?{url:o.data.url,assetId:o.data.id}:null}const r=await ys.uploadAudio(t);return(a=r.data)!=null&&a.url?{url:r.data.url,assetId:r.data.id}:null}const A3={md:{box:"w-20 h-20",icon:"w-6 h-6",iconAudio:"w-7 h-7",label:"text-[10px] mt-1",mentionLabel:"text-[10px] py-0.5 px-1",closeBtn:"w-5 h-5 -top-1.5 -right-1.5 text-xs",closeIcon:"w-3 h-3"},sm:{box:"w-12 h-12",icon:"w-4 h-4",iconAudio:"w-4 h-4",label:"text-[9px] mt-0.5",mentionLabel:"text-[8px] py-0.5 px-0.5",closeBtn:"w-4 h-4 -top-1 -right-1 text-[9px]",closeIcon:"w-2.5 h-2.5"}},BQ="shrink-0 border-2 border-dashed rounded-xl flex flex-col items-center justify-center transition-all",UQ="border-[var(--border-default)] hover:border-[var(--theme)] cursor-pointer",$Q="border-[var(--border-default)] opacity-50 cursor-not-allowed",zQ=A3;function HQ({slot:e,items:t,onAdd:r,onRemove:n,startMentionIndex:s=0,size:a="md",onRequestUpload:o,groupRemaining:l}){const{t:u}=We(),c=v.useRef(null),d=v.useRef(null),[h,m]=v.useState(!1),[f,p]=v.useState(!1),x=DQ(H=>H.dragType)===e.type,w=MQ[e.icon]??Ss,y=u(e.labelKey),b=e.tipKey?u(e.tipKey):"",k=`${b} 1177 1178${t.length}/${e.max}`.trim(),T=zQ[a],S=async H=>{const L=await PQ(e,H);if(!L.ok){Qe.error(b||`Invalid ${e.type}`);return}m(!0);try{const $=await FQ(e.type,H).catch(()=>null);if(!$){Qe.error("Upload failed");return}k2.set($.url,H.name),r({url:$.url,fileName:H.name,role:e.role,durationSec:L.durationSec,assetId:$.assetId})}finally{m(!1)}},j=async H=>{if(e.type!=="video"&&e.type!=="audio")return;const L=await OQ(H,e.type);return L>0?L:void 0},E=()=>{h||o==null||o({slotType:e.type,triggerLocal:()=>{var H;return(H=c.current)==null?void 0:H.click()},onLibraryAsset:async H=>{H.filename&&k2.set(H.url,H.filename);const L=await j(H.url);r({url:H.url,fileName:H.filename,role:e.role,durationSec:L,assetId:H.id})},onCanvasAsset:async H=>{const L=await j(H);r({url:H,role:e.role,durationSec:L})}})},A=!h&&t.length<e.max,R=H=>{A&&H.dataTransfer.types.includes("application/x-create-drag")&&(H.preventDefault(),H.dataTransfer.dropEffect="copy")},M=H=>{A&&H.dataTransfer.types.includes("application/x-create-drag")&&(H.preventDefault(),p(!0))},B=H=>{H.currentTarget.contains(H.relatedTarget)||p(!1)},W=async H=>{if(H.preventDefault(),p(!1),!!A)try{const L=H.dataTransfer.getData("application/x-create-drag");if(!L)return;const $=JSON.parse(L);if(!($!=null&&$.url)||$.type!==e.type){Qe.error(u("video.dropTypeMismatch",{expected:u(e.labelKey)}));return}const ee=await j($.url);r({url:$.url,role:e.role,durationSec:ee})}catch{}};return i.jsxs(i.Fragment,{children:[t.slice(0,e.max).map((H,L)=>{const $=e.mention?`@${e.mention}${s+L+1}`:y;return i.jsxs("div",{className:`group/box relative ${T.box} shrink-0`,children:[i.jsxs("div",{className:"absolute inset-0 rounded-xl overflow-hidden border-2 border-solid border-[var(--theme)] bg-[var(--bg-tertiary)]",children:[e.type==="image"&&i.jsx(c3,{url:H.url,alt:"",crossOrigin:Hr(H.url),className:"w-full h-full object-cover"}),e.type==="video"&&i.jsx(Ij,{url:H.url,className:"w-full h-full object-cover",muted:!0,preload:"metadata",crossOrigin:Hr(H.url)}),e.type==="audio"&&i.jsx("div",{className:"w-full h-full flex items-center justify-center",children:i.jsx(Jl,{className:`${T.iconAudio} text-[var(--theme)]`})}),i.jsx("span",{className:`absolute bottom-0 left-0 right-0 text-center ${T.mentionLabel} bg-black/60 text-white truncate`,children:$})]}),i.jsx(jQ,{assetId:H.assetId,size:a,className:"top-0.5 left-0.5",tooltipPlacement:"top"}),i.jsx("button",{type:"button",className:`absolute ${T.closeBtn} bg-red-500 text-white rounded-full flex items-center justify-center hover:bg-red-600 z-10 opacity-0 group-hover/box:opacity-100 transition-opacity`,onClick:()=>n(L),children:i.jsx(cr,{className:T.closeIcon})})]},`${e.type}-${L}`)}),t.length<e.max&&(l===void 0||l>0)&&i.jsxs("div",{ref:d,className:`group/box relative ${T.box} shrink-0 border-2 rounded-xl flex flex-col items-center justify-center transition-all ${f?"border-solid border-sky-500 bg-sky-500/15 ring-2 ring-sky-500/40 scale-[1.03]":x?"border-dashed border-sky-500/70 bg-sky-500/5 animate-pulse":h?"border-dashed border-[var(--theme)] cursor-wait":"border-dashed border-[var(--border-default)] hover:border-[var(--theme)] cursor-pointer"}`,onClick:E,onDragOver:R,onDragEnter:M,onDragLeave:B,onDrop:W,children:[!h&&i.jsx(qQ,{text:k,anch
1178orRef:d}),h?i.jsx(kn,{className:`${T.icon} text-[var(--theme)] animate-spin`}):i.jsxs(i.Fragment,{children:[i.jsx(w,{className:`${T.icon} text-[var(--text-tertiary)]`}),i.jsx("span",{className:`${T.label} text-[var(--text-tertiary)]`,children:y})]}),i.jsx("input",{ref:c,type:"file",accept:e.accept,hidden:!0,onClick:H=>H.stopPropagation(),onChange:async H=>{var $;const L=($=H.target.files)==null?void 0:$[0];L&&await S(L),c.current&&(c.current.value="")}})]})]})}function qQ({text:e,anchorRef:t}){const[r,n]=v.useState(!1),[s,a]=v.useState(null),o=v.useRef(null),l=()=>{var g,x;const u=t.current;if(!u)return null;const c=u.getBoundingClientRect(),d=((g=o.current)==null?void 0:g.offsetHeight)||120,h=((x=o.current)==null?void 0:x.offsetWidth)||224,m=8;let f=c.top-d-m;f<4&&(f=c.bottom+m);let p=c.left;return p+h>window.innerWidth-4&&(p=window.innerWidth-h-4),p<4&&(p=4),{left:p,top:f}};return v.useEffect(()=>{const u=t.current;if(!u)return;const c=()=>{a(l()),n(!0)},d=()=>n(!1),h=()=>{o.current&&a(l())};return u.addEventListener("mouseenter",c),u.addEventListener("mouseleave",d),window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),()=>{u.removeEventListener("mouseenter",c),u.removeEventListener("mouseleave",d),window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}},[t]),v.useLayoutEffect(()=>{!r||!o.current||a(l())},[r,e]),!e||!r||!s?null:fn.createPortal(i.jsx("div",{ref:o,className:"fixed w-56 px-2.5 py-2 rounded-lg bg-[var(--bg-primary)] border border-[var(--border-default)] shadow-lg text-[11px] leading-relaxed text-[var(--text-secondary)] whitespace-pre-line pointer-events-none",style:{left:s.left,top:s.top,zIndex:9999},children:e}),document.body)}function N2(e,t){return`${e.type}:${e.role||"default"}:${t}`}function WQ({slots:e,itemsBySlot:t,onAdd:r,onRemove:n,size:s="md",hideCanvasOption:a=!1,virtualPersonPickerEnabled:o=!1}){const l=s==="sm"?"gap-1.5":"gap-2",{showSourceChoice:u,sourceChoiceOpen:c,pickSource:d}=CQ(),{openPicker:h,PickerElement:m}=Rj(),[f,p]=v.useState({open:!1,filter:"image",onSelect:null}),g=v.useRef(null),[x,w]=v.useState(!1),[y,b]=v.useState(null),k=async S=>{b(S.slotType);const j=await u();if(j==="local")S.triggerLocal();else if(j==="library"){const E=await h(S.slotType);E!=null&&E.url&&S.onLibraryAsset(E)}else j==="canvas"?p({open:!0,filter:S.slotType,onSelect:E=>{S.onCanvasAsset(E)}}):j==="virtualPersons"&&(g.current=S,w(!0))},T=new Map;for(const S of e){if(!S.groupKey||!S.groupMax)continue;const j=T.has(S.groupKey)?T.get(S.groupKey):S.groupMax;S.groupMax>j?T.set(S.groupKey,S.groupMax):T.has(S.groupKey)||T.set(S.groupKey,S.groupMax)}return e.forEach((S,j)=>{if(!S.groupKey||!T.has(S.groupKey))return;const E=(t[N2(S,j)]||[]).length;T.set(S.groupKey,T.get(S.groupKey)-E)}),i.jsxs("div",{className:`flex items-center ${l} flex-wrap`,children:[e.map((S,j)=>{const E=N2(S,j),A=t[E]||[],R=S.groupKey?T.get(S.groupKey):void 0;return i.jsx(HQ,{slot:S,items:A,size:s,groupRemaining:R,onAdd:M=>r(E,M),onRemove:M=>n(E,M),onRequestUpload:k},E)}),i.jsx(TQ,{open:c,onLocal:()=>d("local"),onLibrary:()=>d("library"),onCanvas:a?void 0:()=>d("canvas"),onVirtualPersons:o&&y==="image"?()=>d("virtualPersons"):void 0,onClose:()=>d(null)}),m,i.jsx(_Q,{open:f.open,filter:f.filter,onSelect:S=>{var j;return(j=f.onSelect)==null?void 0:j.call(f,S)},onClose:()=>p({open:!1,filter:"image",onSelect:null})}),i.jsx(IQ,{open:x,onClose:()=>{w(!1),g.current=null},onSelect:S=>{const j=S.coverImageUrl||S.sourceUrl,E=g.current;j&&E&&(S.assetId?(k2.set(j,S.name||S.assetId),rc.getState().setStatus(S.assetId,{status:"approved",compliantUrl:`asset://${S.assetId}`}),E.onLibraryAsset({url:j,id:S.assetId})):E.onLibraryAsset({url:j})),w(!1),g.current=null}})]})}const N1=new Map;function Dj(e){if(e)return N1.get(e)}function VQ(e,t){e&&t&&N1.set(e,t)}function Aa(e,t){return{url:e,role:t,assetId:N1.get(e)}}function GQ({slots:e,state:t,size:r="md",hideCanvasOption:n=!1,virtualPersonPickerEnabled:s=!1}){if(!(e!=null&&e.length))return null;const a={};return e.forEach((o,l)=>{var c,d,h,m,f,p,g,x,w,y;const u=N2(o,l);
1178o.type==="image"&&o.role==="reference"?a[u]=((c=t.elements)==null?void 0:c.items.map(b=>Aa(b.frontalUrl,"reference")))??[]:o.type==="image"&&o.role==="first_frame"?a[u]=(d=t.startFrame)!=null&&d.url?[Aa(t.startFrame.url,"first_frame")]:[]:o.type==="image"&&o.role==="last_frame"?a[u]=(h=t.endFrame)!=null&&h.url?[Aa(t.endFrame.url,"last_frame")]:[]:o.type==="video"&&o.role==="reference"?a[u]=((m=t.refVideos)==null?void 0:m.urls.map(b=>Aa(b,"reference")))??[]:o.type==="video"&&o.role==="source"?a[u]=(f=t.sourceVideo)!=null&&f.url?[Aa(t.sourceVideo.url,"source")]:[]:o.type==="video"&&o.role==="parent"?a[u]=(p=t.parentVideo)!=null&&p.url?[Aa(t.parentVideo.url,"parent")]:[]:o.type==="audio"&&o.role==="reference"?a[u]=((g=t.refAudios)==null?void 0:g.urls.map(b=>Aa(b,"reference")))??[]:o.type==="audio"&&o.role==="voice_clone"?a[u]=((x=t.voiceCloneAudios)==null?void 0:x.urls.map(b=>Aa(b,"voice_clone")))??[]:o.type==="audio"&&o.role==="driving_audio"?a[u]=(w=t.drivingAudio)!=null&&w.url?[Aa(t.drivingAudio.url,"driving_audio")]:[]:o.type==="image"&&o.role==="style_reference"?a[u]=((y=t.refImages)==null?void 0:y.urls.map(b=>Aa(b,"style_reference")))??[]:a[u]=[]}),i.jsx(WQ,{slots:e,itemsBySlot:a,size:r,hideCanvasOption:n,virtualPersonPickerEnabled:s,onAdd:(o,l)=>{var d,h,m,f,p,g,x,w,y,b,k;const[u,c]=o.split(":");if(u==="image"&&c==="reference"){const T=((d=t.elements)==null?void 0:d.items.length)??0;(h=t.elements)==null||h.add({id:`el-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,name:`Image${T+1}`,frontalUrl:l.url,referenceUrls:[]})}else u==="image"&&c==="first_frame"?(m=t.startFrame)==null||m.set(l.url):u==="image"&&c==="last_frame"?(f=t.endFrame)==null||f.set(l.url):u==="video"&&c==="reference"?(p=t.refVideos)==null||p.add(l.url):u==="video"&&c==="source"?(g=t.sourceVideo)==null||g.set(l.url,{durationSec:l.durationSec}):u==="video"&&c==="parent"?(x=t.parentVideo)==null||x.set(l.url,{durationSec:l.durationSec}):u==="audio"&&c==="reference"?(w=t.refAudios)==null||w.add(l.url):u==="audio"&&c==="voice_clone"?(y=t.voiceCloneAudios)==null||y.add(l.url):u==="audio"&&c==="driving_audio"?(b=t.drivingAudio)==null||b.set(l.url):u==="image"&&c==="style_reference"&&((k=t.refImages)==null||k.add(l.url));l.assetId&&N1.set(l.url,l.assetId)},onRemove:(o,l)=>{var d,h,m,f,p,g,x,w,y,b;const[u,c]=o.split(":");u==="image"&&c==="reference"?(d=t.elements)==null||d.removeAt(l):u==="image"&&c==="first_frame"?(h=t.startFrame)==null||h.set(null):u==="image"&&c==="last_frame"?(m=t.endFrame)==null||m.set(null):u==="video"&&c==="reference"?(f=t.refVideos)==null||f.removeAt(l):u==="video"&&c==="source"?(p=t.sourceVideo)==null||p.set(null):u==="video"&&c==="parent"?(g=t.parentVideo)==null||g.set(null):u==="audio"&&c==="reference"?(x=t.refAudios)==null||x.removeAt(l):u==="audio"&&c==="voice_clone"?(w=t.voiceCloneAudios)==null||w.removeAt(l):u==="audio"&&c==="driving_audio"?(y=t.drivingAudio)==null||y.set(null):u==="image"&&c==="style_reference"&&((b=t.refImages)==null||b.removeAt(l))}})}const _r=Yt.create({baseURL:"/api/v1",headers:{"Content-Type":"application/json"}});_r.interceptors.request.use(e=>{const{accessToken:t}=ut.getState();return t&&(e.headers.Authorization=`Bearer ${t}`),e});const ui=1e3;function Mj(e){return new Promise(t=>{if(!e)return t(null);const r=document.createElement("video");r.preload="metadata";const n=()=>{r.onloadedmetadata=null,r.onerror=null,r.src="",r.load()},s=setTimeout(()=>{n(),t(null)},1e4);r.onloadedmetadata=()=>{clearTimeout(s);const a=r.duration;n(),t(isFinite(a)&&a>0?a:null)},r.onerror=()=>{clearTimeout(s),n(),t(null)},r.src=e})}const tN={"480p":10044,"720p":21600,"1080p":48600},KQ={4:7,5:9,6:10,7:12,8:14,9:15,10:17,11:19,12:20,13:22,14:24,15:25},YQ={"seedance-2.0":{pure:{"480p":46,"720p":46,"1080p":51},edit:{"480p":28,"720p":28,"1080p":31}},"seedance-2.0-fast":{pure:{"480p":37,"720p":37},edit:{"480p":22,"720p":22}},"seedance-2.5":{pure:{"480p":70,"720p":70},edit:{"480p":42,"720p":42}}},QQ=.137;function XQ(e,t,r,n){var p,g;const s=e.startsWith("seedance-2.5")?"seedance-2.5":e.includes("fast")?"seedance-2.0-fast":"seedance-2.0",a=s!=="seedance-2.0"&&t==="1080p"?"720p":t,o=tN[a]??tN["1080p"],l=KQ[r]??Math.ceil(r*1.7),u=(n+r)*o,c=l*o,d=Math.max(u,c),h=YQ[s],m=((p=h==null?void 0:h.edit)==null?void 0:p[a])??((g=h==null?void 0:h.edit)==null?void 0:g["720p"])??28;return d*m/1e6*QQ}function Oj(e,t,r,n,s,a,o,l,u){var T,S,j,E,A,R,M,B,W,H,L,$,ee;if(!(e!=null&&e.pricePerSecond)||o==null)return null;const c=o;if(e.modelFamily==="kling-o3"&&s==="video_to_video"){if(l==null||!(l>0))return null;const G=Math.round(l),D=(((S=(T=e.priceModifiers)==null?void 0:T.type)==null?void 0:S.video_to_video)??e.pricePerSecond)*G;return Math.max(1,Math.ceil(D*c*ui))}if(e.modelFamily==="happyhorse"&&s==="video_to_video"){if(l==null||!(l>0))return null;const G=Math.round(l),Q=Math.min(G,15),D=Math.min(G,15),K=Q+D,V=r||e.defaultResolution||"1080p",C=((E=(j=e.priceModifiers)==null?void 0:j.resolution)==null?void 0:E[V])??e.pricePerSecond,O=K*C;return Math.max(1,Math.ceil(O*c*ui))}if(e.id==="grok-imagine-video"&&s==="video_continuation"){if(l==null||!(l>0))return null;const G=r==="720p"?.07:.05,Q=.01,D=Math.round(l),K=G*t+Q*D;return Math.max(1,Math.ceil(K*c*ui))}if(e.id==="grok-imagine-video"&&s==="video_to_video"){if(l==null||!(l>0))return null;const G=r==="720p"?.07:.05,Q=.01,D=Math.round(l),K=Math.min(D,8),V=G*K+Q*D;return Math.max(1,Math.ceil(V*c*ui))}if(e.id==="grok-imagine-video"&&(s==="text2video"||s==="image2video"||s==="reference_to_video")){let Q=(r==="720p"?.07:.05)*t;return s==="image2video"&&(Q+=.002),s==="reference_to_video"&&(Q+=.002*Math.max(1,u??1)),Math.max(1,Math.ceil(Q*c*ui))}if(((A=e.id)==null?void 0:A.startsWith("seedance-2."))===!0&&a===!0){if(l==null||!(l>0))return null;const G=r||e.defaultResolution||"1080p",Q=Math.ceil(l),D=XQ(e.id,G,t,Q);return Math.max(1,Math.ceil(D*c*ui))}if(((R=e.id)==null?void 0:R.startsWith("minimax-hailuo-3"))===!0){const G=r||e.defaultResolution||"2k",Q=((B=(M=e.priceModifiers)==null?void 0:M.resolution)==null?void 0:B[G])??e.pricePerSecond;let D=Q*t;if(a===!0){if(l==null||!(l>0))return null;D+=Q*Math.ceil(l)}const K=Math.max(0,(u??0)-5);return K>0&&(D+=K*.04),Math.max(1,Math.ceil(D*c*ui))}if(((W=e.id)==null?void 0:W.startsWith("minimax-h3-max"))===!0){const G=r||e.defaultResolution||"768p";let D=(((L=(H=e.priceModifiers)==null?void 0:H.resolution)==null?void 0:L[G])??e.pricePerSecond)*t;const K=Math.max(0,(u??0)-4);return K>0&&(D+=K*.02),Math.max(1,Math.ceil(D*c*ui))}let y=e.pricePerSecond;const b=e.priceModifiers;if(b)if(s&&(($=b.type)==null?void 0:$[s])!=null)y=b.type[s];else{let G=!1;if(r&&b.resolution&&(n&&b.resolution[`${r}_audio`]!=null?(y=b.resolution[`${r}_audio`],G=!0):b.resolution[r]!=null&&(y=b.resolution[r])),!G&&n!=null&&b.audio){const Q=n?"on":"off";b.audio[Q]!=null&&(y+=b.audio[Q])}}let k=t;return s==="reference_to_video"&&((ee=e.id)!=null&&ee.includes("wan"))&&a&&(k+=5),Math.max(1,Math.ceil(k*y*c*ui))}const O0={createSession:e=>_r.post("/video-agent-v2/sessions",e),getSessions:e=>_r.get("/video-agent-v2/sessions",{params:e}),getSession:e=>_r.get(`/video-agent-v2/sessions/${e}`),deleteSession:e=>_r.delete(`/video-agent-v2/sessions/${e}`),getGenerations:e=>_r.get("/video-agent-v2/generations",{params:e}),generate:e=>_r.post("/video-agent-v2/generate",e),enhancePrompt:e=>_r.post("/video-agent-v2/enhance-prompt",e),getTaskStatus:e=>_r.get(`/video-agent-v2/task/${e}`),cancelTask:e=>_r.post(`/video-agent-v2/task/${e}/cancel`),getGeneration:e=>_r.get(`/video-agent-v2/generation/${e}`),deleteGeneration:e=>_r.delete(`/video-agent-v2/generation/${e}`),downloadVideo:e=>_r.get("/video-agent-v2/download",{params:{url:e},responseType:"blob"}),getGallery:e=>_r.get("/video-agent-v2/gallery",{params:e}),mergeSession:async(e,t)=>{const{data:r}=await _r.post("/video-agent-v2/merge",{sessionId:e,videoUrls:t});return r},getMergeStatus:async e=>{const{data:t}=await _r.get(`/video-agent-v2/merge/${e}`);return t},trimVideo:(e,t,r)=>_r.post("/video/trim",{videoUrl:e,startTime:t,endTime:r},{responseType:"blob"}),getModels:e=>_r.get("/video-agent-v2/models",{params:{type:e}}),getUpscaleModels:()=>_r.get("/video-agent-v2/upscale-models"),getPendingGenerations:e=>_r.get("/video-agent-v2/generations/pending",{params:e?{source:e}:void 0}),getProjectGenerations:e=>_r.get(`/video-agent-v2/generations/project/${e}`)},lve=Object.freeze(Object.defineProperty({__proto__:null,estimateVideoCredits:Oj,probeVideoDurationSec:Mj,videoGenApi:O0},Symbol.toStringTag,{value:"Module"}));function j3(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var dc=j3();function Lj(e){dc=e}var wl={exec:()=>null};function Pt(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(s,a)=>
vendor: 4,373 bytes, line 1178
1178{let o=typeof a=="string"?a:a.source;return o=o.replace(qn.caret,"$1"),r=r.replace(s,o),n},getRegex:()=>new RegExp(r,t)};return n}var ZQ=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),qn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},JQ=/^(?:[ \t]*(?:\n|$))+/,eX=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tX=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,nm=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rX=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,I3=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Pj=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Fj=Pt(Pj).replace(/bull/g,I3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nX=Pt(Pj).replace(/bull/g,I3).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),R3=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,sX=/^[^\n]+/,D3=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,aX=Pt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",D3).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),iX=Pt(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,I3).getRegex(),S1="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",M3=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,oX=Pt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>
1178)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",M3).replace("tag",S1).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Bj=Pt(R3).replace("hr",nm).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",S1).getRegex(),lX=Pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Bj).getRegex(),O3={blockquote:lX,code:eX,def:aX,fences:tX,heading:rX,hr:nm,html:oX,lheading:Fj,list:iX,newline:JQ,paragraph:Bj,table:wl,text:sX},rN=Pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",nm).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",S1).getRegex(),cX={...O3,lheading:nX,table:rN,paragraph:Pt(R3).replace("hr",nm).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rN).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",S1).getRegex()},uX={...O3,html:Pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",M3).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:wl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pt(R3).replace("hr",nm).replace("heading",` *#{1,6} *[^ 1179]`).replace("lheading",Fj).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},dX=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hX=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Uj=/^( {2,}|\\)\n(?!\s*$)/,mX=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T1=/[\p{P}\p{S}]/u,L3=/[\s\p{P}\p{S}]/u,$j=/[^\s\p{P}\p{S}]/u,fX=Pt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,L3).getRegex(),zj=/(?!~)[\p{P}\p{S}]/u,pX=/(?!~)[\s\p{P}\p{S}]/u,gX=/(?:[^\s\p{P}\p{S}]|~)/u,Hj=/(?![*_])[\p{P}\p{S}]/u,xX=/(?![*_])[\s\p{P}\p{S}]/u,bX=/(?:[^\s\p{P}\p{S}]|[*_])/u,yX=Pt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ZQ?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),qj=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vX=Pt(qj,"u").replace(/punct/g,T1).getRegex(),wX=Pt(qj,"u").replace(/punct/g,zj).getRegex(),Wj="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",EX=Pt(Wj,"gu").replace(/notPunctSpace/g,$j).replace(/punctSpace/g,L3).replace(/punct/g,T1).getRegex(),kX=Pt(Wj,"gu").replace(/notPunctSpace/g,gX).replace(/punctSpace/g,pX).replace(/punct/g,zj).getRegex(),NX=Pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$j).replace(/punctSpace/g,L3).replace(/punct/g,T1).getRegex(),SX=Pt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Hj).getRegex(),TX="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",CX=Pt(TX,"gu").replace(/notPunctSpace/g,bX).replace(/punctSpace/g,xX).replace(/punct/g,Hj).getRegex(),_X=Pt(/\\(punct)/,"gu").replace(/punct/g,T1).getRegex(),AX=Pt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),jX=Pt(M3).replace("(?:-->|$)","-->").getRegex(),IX=Pt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",jX).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),hg=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,RX=Pt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",hg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vj=Pt(/^!?\[(label)\]\[(ref)\]/).replace("label",hg).replace("ref",D3).getRegex(),Gj=Pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",D3).getRegex(),DX=Pt("reflink|nolink(?!\\()","g").replace("reflink",Vj).replace("nolink",Gj).getRegex(),nN=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,P3={_backpedal:wl,anyPunctuation:_X,autolink:AX,blockSkip:yX,br:Uj,code:hX,del:wl,delLDelim:wl,delRDelim:wl,emStrongLDelim:vX,emStrongRDelimAst:EX,emStrongRDelimUnd:NX,escape:dX,link:RX,nolink:Gj,punctuation:fX,reflink:Vj,reflinkSearch:DX,tag:IX,text:mX,url:wl},MX={...P3,link:Pt(/^!?\[(label)\]\((.*?)\)/).replace("label",hg).getRegex(),reflink:Pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",hg).getRegex()},S2={...P3,emStrongRDelimAst:kX,emStrongLDelim:wX,delLDelim:SX,delRDelim:CX,url:Pt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",nN).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Pt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",nN).getRegex()},OX={...S2,br:Pt(Uj).replace("{2,}","*").getRegex(),text:Pt(S2.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Zm={normal:O3,gfm:cX,pedantic:uX},Yd={normal:P3,gfm:S2,breaks:OX,pedantic:MX},LX={"&":"&","<":"<",">":">",'"':""","'":"'"},sN=e=>LX[e];function Ia(e,t){if(t){if(qn.escapeTest.test(e))return e.replace(qn.escapeReplace,sN)}else if(qn.escapeTestNoEncode.test(e))return e.replace(qn.escapeReplaceNoEncode,sN);return e}function aN(e){try{e=encodeURI(e).replace(qn.percentDecode,"%")}catch{return null}return e}function iN(e,t){var a;let r=e.replace(qn.findPipe,(o,l,u)=>{let c=!1,d=l;for(;--d>=0&&u[d]==="\\";)c=!c;return c?"|":" |"}),n=r.split(qn.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(qn.slashPipe,"|");return n}function Qd(e,t,r){let n=e.length;if(n===0)return"";let s=0;for(;s<n&&e.charAt(n-s-1)===t;)s++;return e.slice(0,n-s)}function PX(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function FX(e,t=0){let r=t,n="";for(let s of e)if(s===" "){let a=4-r%4;n+=" ".repeat(a),r+=a}else n+=s,r++;return n}function oN(e,t,r,n,s){let a=t.href,o=t.title||null,l=e[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,u}function BX(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let s=n[1];return t.split(` 1180`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[l]=o;return l.length>=s.length?a.slice(s.length):a}).join(` 1181`)}var mg=class{constructor(e){nt(this,"options");nt(this,"rules");nt(this,"lexer");this.options=e||dc}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Qd(r,` 1182`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=BX(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=Qd(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Qd(t[0],` 1183`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=Qd(t[0],` 1184`).split(` 1185`),n="",s="",a=[];for(;r.length>0;){let o=!1,l=[],u;
vendor: 11,051 bytes, lines 1185-1204
1185for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))l.push(r[u]),o=!0;else if(!o)l.push(r[u]);else break;r=r.slice(u);let c=l.join(` 1186`),d=c.replace(this.rules.other.blockquoteSetextReplace,` 1187 $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n} 1188${c}`:c,s=s?`${s} 1189${d}`:d;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=h,r.length===0)break;let m=a.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let f=m,p=f.raw+` 1190`+r.join(` 1191`),g=this.blockquote(p);a[a.length-1]=g,n=n.substring(0,n.length-f.raw.length)+g.raw,s=s.substring(0,s.length-f.text.length)+g.text;break}else if((m==null?void 0:m.type)==="list"){let f=m,p=f.raw+` 1192`+r.join(` 1193`),g=this.list(p);a[a.length-1]=g,n=n.substring(0,n.length-m.raw.length)+g.raw,s=s.substring(0,s.length-f.raw.length)+g.raw,r=p.substring(a.at(-1).raw.length).split(` 1194`);continue}}return{type:"blockquote",raw:n,tokens:a,text:s}}}list(e){var r,n;let t=this.rules.block.list.exec(e);if(t){let s=t[1].trim(),a=s.length>1,o={type:"list",raw:"",ordered:a,start:a?+s.slice(0,-1):"",loose:!1,items:[]};s=a?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=a?s:"[*+-]");let l=this.rules.other.listItemRegex(s),u=!1;for(;e;){let d=!1,h="",m="";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let f=FX(t[2].split(` 1195`,1)[0],t[1].length),p=e.split(` 1196`,1)[0],g=!f.trim(),x=0;if(this.options.pedantic?(x=2,m=f.trimStart()):g?x=t[1].length+1:(x=f.search(this.rules.other.nonSpaceChar),x=x>4?1:x,m=f.slice(x),x+=t[1].length),g&&this.rules.other.blankLine.test(p)&&(h+=p+` 1197`,e=e.substring(p.length+1),d=!0),!d){let w=this.rules.other.nextBulletRegex(x),y=this.rules.other.hrRegex(x),b=this.rules.other.fencesBeginRegex(x),k=this.rules.other.headingBeginRegex(x),T=this.rules.other.htmlBeginRegex(x),S=this.rules.other.blockquoteBeginRegex(x);for(;e;){let j=e.split(` 1198`,1)[0],E;if(p=j,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),E=p):E=p.replace(this.rules.other.tabCharGlobal," "),b.test(p)||k.test(p)||T.test(p)||S.test(p)||w.test(p)||y.test(p))break;if(E.search(this.rules.other.nonSpaceChar)>=x||!p.trim())m+=` 1199`+E.slice(x);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(f)||k.test(f)||y.test(f))break;m+=` 1200`+p}g=!p.trim(),h+=j+` 1201`,e=e.substring(j.length+1),f=E.slice(x)}}o.loose||(u?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(u=!0)),o.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),o.raw+=h}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d of o.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),((r=d.tokens[0])==null?void 0:r.type)==="text"||((n=d.tokens[0])==null?void 0:n.type)==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}}let h=this.rules.other.listTaskCheckbox.exec(d.raw);if(h){let m={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};d.checked=m.checked,o.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=m.raw+d.tokens[0].raw,d.tokens[0].text=m.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(m)):d.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):d.tokens.unshift(m)}}if(!o.loose){let h=d.tokens.filter(f=>f.type==="space"),m=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=m}}if(o.loose)for(let d of o.items){d.loose=!0;for(let h of d.tokens)h.type==="text"&&(h.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:s}}}table(e){var o;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=iN(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(o=t[3])!=null&&o.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(` 1202`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let l of n)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<r.length;l++)a.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:a.align[l]});for(let l of s)a.rows.push(iN(l,a.header.length).map((u,c)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[c]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===` 1203`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=Qd(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=PX(t[2],"()");if(a===-2)return;if(a>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],s=a[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),oN(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[n.toLowerCase()];if(!s){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return oN(r,s,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,a,o,l=s,u=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+s);(n=c.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(o=[...a].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&s%3&&!((s+o)%3)){u+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+u);let d=[...n[0]][0].length,h=e.slice(0,s+n.index+d+o);if(Math.min(s,o)%2){let f=h.slice(1,-1);return{type:"em",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}let m=h.slice(2,-2);return{type:"strong",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,a,o,l=s,u=this.rules.inline.delRDelim;for(u.lastIndex=0,t=t.slice(-1*e.length+s);(n=u.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a||(o=[...a].length,o!==s))continue;if(n[3]||n[4]){l+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l);let c=[...n[0]][0].length,d=e.slice(0,s+n.index+c+o),h=d.slice(s,-s);return{type:"del",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let n,s;if(t[2]==="@")n=t[0],s="mailto:"+n;else{let a;do a=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(a!==t[0]);n=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},la=class T2{constructor(t){nt(this,"tokens");nt(this,"options");nt(this,"state");nt(this,"inlineQueue");nt(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||dc,this.options.tokenizer=this.options.tokenizer||new mg,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:qn,block:Zm.normal,inline:Yd.normal};this.options.pedantic?(r.block=Zm.pedantic,r.inline=Yd.pedantic):this.options.gfm&&(r.block=Zm.gfm,this.options.breaks?r.inline=Yd.breaks:r.inline=Yd.gfm),this.tokenizer.rules=r}static get rules(){return{block:Zm,inline:Yd}}static lex(t,r){return new T2(r).lex(t)}static lexInline(t,r){return new T2(r).inlineTokens(t)}lex(t){t=t.replace(qn.carriageReturn,` 1204`),this.blockTokens(t,this.tokens);for(let r=0;
vendor: 12,027 bytes, lines 1204-1235
1204r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){var s,a,o;for(this.options.pedantic&&(t=t.replace(qn.tabCharGlobal," ").replace(qn.spaceLine,""));t;){let l;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(c=>(l=c.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let c=r.at(-1);l.raw.length===1&&c!==void 0?c.raw+=` 1205`:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` 1206`)?"":` 1207`)+l.raw,c.text+=` 1208`+l.text,this.inlineQueue.at(-1).src=c.text):r.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` 1209`)?"":` 1210`)+l.raw,c.text+=` 1211`+l.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},r.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let u=t;if((o=this.options.extensions)!=null&&o.startBlock){let c=1/0,d=t.slice(1),h;this.options.extensions.startBlock.forEach(m=>{h=m.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(u=t.substring(0,c+1))}if(this.state.top&&(l=this.tokenizer.paragraph(u))){let c=r.at(-1);n&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(` 1212`)?"":` 1213`)+l.raw,c.text+=` 1214`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(l),n=u.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(` 1215`)?"":` 1216`)+l.raw,c.text+=` 1217`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(l);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var u,c,d,h,m;let n=t,s=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)f.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)a=s[2]?s[2].length:0,n=n.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((c=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:c.call({lexer:this},n))??n;let o=!1,l="";for(;t;){o||(l=""),o=!1;let f;if((h=(d=this.options.extensions)==null?void 0:d.inline)!=null&&h.some(g=>(f=g.call({lexer:this},t,r))?(t=t.substring(f.raw.length),r.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let g=r.at(-1);f.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=f.raw,g.text+=f.text):r.push(f);continue}if(f=this.tokenizer.emStrong(t,n,l)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.del(t,n,l)){t=t.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),r.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),r.push(f);continue}let p=t;if((m=this.options.extensions)!=null&&m.startInline){let g=1/0,x=t.slice(1),w;this.options.extensions.startInline.forEach(y=>{w=y.call({lexer:this},x),typeof w=="number"&&w>=0&&(g=Math.min(g,w))}),g<1/0&&g>=0&&(p=t.substring(0,g+1))}if(f=this.tokenizer.inlineText(p)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(l=f.raw.slice(-1)),o=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=f.raw,g.text+=f.text):r.push(f);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},fg=class{constructor(e){nt(this,"options");nt(this,"parser");this.options=e||dc}space(e){return""}code({text:e,lang:t,escaped:r}){var a;let n=(a=(t||"").match(qn.notSpaceStart))==null?void 0:a[0],s=e.replace(qn.endingNewline,"")+` 1218`;return n?'<pre><code class="language-'+Ia(n)+'">'+(r?s:Ia(s,!0))+`</code></pre> 1219`:"<pre><code>"+(r?s:Ia(s,!0))+`</code></pre> 1220`}blockquote({tokens:e}){return`<blockquote> 1221${this.parser.parse(e)}</blockquote> 1222`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}> 1223`}hr(e){return`<hr> 1224`}list(e){let t=e.ordered,r=e.start,n="";for(let o=0;o<e.items.length;o++){let l=e.items[o];n+=this.listitem(l)}let s=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+s+a+`> 1225`+n+"</"+s+`> 1226`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li> 1227`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p> 1228`}table(e){let t="",r="";for(let s=0;s<e.header.length;s++)r+=this.tablecell(e.header[s]);t+=this.tablerow({text:r});let n="";for(let s=0;s<e.rows.length;s++){let a=e.rows[s];r="";for(let o=0;o<a.length;o++)r+=this.tablecell(a[o]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table> 1229<thead> 1230`+t+`</thead> 1231`+n+`</table> 1232`}tablerow({text:e}){return`<tr> 1233${e}</tr> 1234`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}> 1235`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ia(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),s=aN(e);if(s===null)return n;e=s;let a='<a href="'+e+'"';return t&&(a+=' title="'+Ia(t)+'"'),a+=">"+n+"</a>",a}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let s=aN(e);if(s===null)return Ia(r);e=s;let a=`<img src="${e}" alt="${Ia(r)}"`;return t&&(a+=` title="${Ia(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ia(e.text)}},F3=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},ca=class C2{constructor(t){nt(this,"options");nt(this,"renderer");nt(this,"textRenderer");this.options=t||dc,this.options.renderer=this.options.renderer||new fg,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new F3}static parse(t,r){return new C2(r).parse(t)}static parseInline(t,r){return new C2(r).parseInline(t)}parse(t){var n,s;let r="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[o.type]){let u=o,c=this.options.extensions.renderers[u.type].call({parser:this},u);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){r+=c||"";continue}}let l=o;switch(l.type){case"space":{r+=this.renderer.space(l);break}case"hr":{r+=this.renderer.hr(l);break}case"heading":{r+=this.renderer.heading(l);break}case"code":{r+=this.renderer.code(l);break}case"table":{r+=this.renderer.table(l);break}case"blockquote":{r+=this.renderer.blockquote(l);break}case"list":{r+=this.renderer.list(l);break}case"checkbox":{r+=this.renderer.checkbox(l);break}case"html":{r+=this.renderer.html(l);break}case"def":{r+=this.renderer.def(l);break}case"paragraph":{r+=this.renderer.paragraph(l);break}case"text":{r+=this.renderer.text(l);break}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}parseInline(t,r=this.renderer){var s,a;let n="";for(let o=0;o<t.length;o++){let l=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[l.type]){let c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){n+=c||"";continue}}let u=l;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"checkbox":{n+=r.checkbox(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{let c='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},Lf,v0=(Lf=class{constructor(t){nt(this,"options");nt(this,"block");this.options=t||dc}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?la.lex:la.lexInline}provideParser(){return this.block?ca.parse:ca.parseInline}},nt(Lf,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),nt(Lf,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Lf),UX=class{constructor(...t){nt(this,"defaults",j3());nt(this,"options",this.setOptions);nt(this,"parse",this.parseMarkdown(!0));nt(this,"parseInline",this.parseMarkdown(!1));nt(this,"Parser",ca);nt(this,"Renderer",fg);nt(this,"TextRenderer",F3);nt(this,"Lexer",la);nt(this,"Tokenizer",mg);nt(this,"Hooks",v0);this.use(...t)}walkTokens(t,r){var s,a;let n=[];for(let o of t)switch(n=n.concat(r.call(this,o)),o.type){case"table":{let l=o;for(let u of l.header)n=n.concat(this.walkTokens(u.tokens,r));for(let u of l.rows)for(let c of u)n=n.concat(this.walkTokens(c.tokens,r));break}case"list":{let l=o;n=n.concat(this.walkTokens(l.items,r));break}default:{let l=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[l.type]?this.defaults.extensions.childTokens[l.type].forEach(u=>{let c=l[u].flat(1/0);n=n.concat(this.walkTokens(c,r))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...l){let u=a.renderer.apply(this,l);return u===!1&&(u=o.apply(this,l)),u}:r.renderers[a.name]=a.renderer}
1235if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),n.renderer){let a=this.defaults.renderer||new fg(this.defaults);for(let o in n.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let l=o,u=n.renderer[l],c=a[l];a[l]=(...d)=>{let h=u.apply(a,d);return h===!1&&(h=c.apply(a,d)),h||""}}s.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new mg(this.defaults);for(let o in n.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let l=o,u=n.tokenizer[l],c=a[l];a[l]=(...d)=>{let h=u.apply(a,d);return h===!1&&(h=c.apply(a,d)),h}}s.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new v0;for(let o in n.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let l=o,u=n.hooks[l],c=a[l];v0.passThroughHooks.has(o)?a[l]=d=>{if(this.defaults.async&&v0.passThroughHooksRespectAsync.has(o))return(async()=>{let m=await u.call(a,d);return c.call(a,m)})();let h=u.call(a,d);return c.call(a,h)}:a[l]=(...d)=>{if(this.defaults.async)return(async()=>{let m=await u.apply(a,d);return m===!1&&(m=await c.apply(a,d)),m})();let h=u.apply(a,d);return h===!1&&(h=c.apply(a,d)),h}}s.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(l){let u=[];return u.push(o.call(this,l)),a&&(u=u.concat(a.call(this,l))),u}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return la.lex(t,r??this.defaults)}parser(t,r){return ca.parse(t,r??this.defaults)}parseMarkdown(t){return(r,n)=>{let s={...n},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let l=a.hooks?await a.hooks.preprocess(r):r,u=await(a.hooks?await a.hooks.provideLexer():t?la.lex:la.lexInline)(l,a),c=a.hooks?await a.hooks.processAllTokens(u):u;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let d=await(a.hooks?await a.hooks.provideParser():t?ca.parse:ca.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(d):d})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let l=(a.hooks?a.hooks.provideLexer():t?la.lex:la.lexInline)(r,a);a.hooks&&(l=a.hooks.processAllTokens(l)),a.walkTokens&&this.walkTokens(l,a.walkTokens);let u=(a.hooks?a.hooks.provideParser():t?ca.parse:ca.parseInline)(l,a);return a.hooks&&(u=a.hooks.postprocess(u)),u}catch(l){return o(l)}}}onError(t,r){return n=>{if(n.message+=` 1236Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Ia(n.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(n);throw n}}},sc=new UX;function Gt(e,t){return sc.parse(e,t)}Gt.options=Gt.setOptions=function(e){return sc.setOptions(e),Gt.defaults=sc.defaults,Lj(Gt.defaults),Gt};Gt.getDefaults=j3;Gt.defaults=dc;Gt.use=function(...e){return sc.use(...e),Gt.defaults=sc.defaults,Lj(Gt.defaults),Gt};Gt.walkTokens=function(e,t){return sc.walkTokens(e,t)};Gt.parseInline=sc.parseInline;Gt.Parser=ca;Gt.parser=ca.parse;Gt.Renderer=fg;Gt.TextRenderer=F3;Gt.Lexer=la;Gt.lexer=la.lex;Gt.Tokenizer=mg;Gt.Hooks=v0;Gt.parse=Gt;Gt.options;Gt.setOptions;Gt.use;Gt.walkTokens;Gt.parseInline;ca.parse;la.lex;const Kj={groupExecutions:{}};function $X(e,t){const r=new Set(e.map(c=>c.id)),n=t.filter(c=>r.has(c.sourceId)&&r.has(c.targetId)),s=new Map,a=new Map;for(const c of e)s.set(c.id,0),a.set(c.id,[]);for(const c of n)a.get(c.sourceId).push(c.targetId),s.set(c.targetId,(s.get(c.targetId)||0)+1);const o=c=>c==="text"?0:c==="image"?1:c==="video"?2:3,l=[];let u=e.filter(c=>(s.get(c.id)||0)===0).sort((c,d)=>o(c.type)-o(d.type));for(;u.length>0;){l.push(u);const c=[];for(const d of u)for(const h of a.get(d.id)||[]){const m=(s.get(h)||1)-1;if(s.set(h,m),m===0){const f=e.find(p=>p.id===h);f&&c.push(f)}}u=c.sort((d,h)=>o(d.type)-o(h.type))}return l}function cb(e){return e.replace(/@\[([^\]]*)\]\(attachment:[^)]*\)/g,"$1").trim()}const zX=new Set(["Upload Image","ä¸ä¼ å¾ç"]),HX=new Set(["AI Generated","AI çæ"]);function qX(e,t){const r=e.data,n=r==null?void 0:r.generationParams,s=!!(n!=null&&n.prompt),a=HX.has(r==null?void 0:r.sourceLabel),o=t.some(l=>l.targetId===e.id);if(zX.has(r==null?void 0:r.sourceLabel))return"input";if(e.type==="text"){const u=(e.data.content||"").replace(/<[^>]*>/g,"").trim();return s?"generator":u.length>0?"input":"empty"}if(e.type==="image"){const l=e.data;return s||a&&o?"generator":_3(l)&&!l.placeholder?"input":"empty"}if(e.type==="video"){const l=e.data;return s||a&&o?"generator":_j(l)&&!l.placeholder?"input":"empty"}return"input"}const WX=(e,t)=>{const r=new Map,n=(l,u,c)=>{e(d=>{const h=d.groupExecutions[l];if(!h)return d;const m=[...h.plan];return m[u]={...m[u],...c},{groupExecutions:{...d.groupExecutions,[l]:{...h,plan:m}}}})};async function s(l,u,c){var E,A,R;const d=t(),h=(E=l.data)==null?void 0:E.generationParams;let m=cb((h==null?void 0:h.prompt)||"");if(!m){const M=Kd(l.id,"Generate related text based on upstream content","text",d.connections,d.elements);if(M.upstreamCount>0)m=M.prompt;else return}const f=Kd(l.id,m,"text",d.connections,d.elements),p=(h==null?void 0:h.model)||"";d.updateElement(l.id,{data:{...l.data,content:"",processing:!0}});const{accessToken:g}=ut.getState(),x=(A=d.project)==null?void 0:A.id;if(!x)throw new Error("No project");const w=await fetch(`/api/v1/art/projects/${x}/text/stream`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${g}`},body:JSON.stringify({message:f.prompt,model:p||void 0,...c?{payWith:c}:{}}),signal:u});if(!w.ok)throw new Error(`HTTP ${w.status}`);const y=(R=w.body)==null?void 0:R.getReader();if(!y)throw new Error("No response body");const b=new TextDecoder;let k="",T="",S=null;for(;;){const{done:M,value:B}=await y.read();if(M)break;k+=b.decode(B,{stream:!0});const W=k.split(` 1237`);k=W.pop()||"";for(const H of W){if(!H.startsWith("data: "))continue;const L=H.slice(6);if(L!=="[DONE]")try{const $=JSON.parse(L);if($.needsDecision){S=$;break}if($.error)throw new Error($.error);if($.content){T+=$.content;const ee=Gt.parse(T,{async:!1,breaks:!0}),G=t().elements.find(Q=>Q.id===l.id);G&&t().updateElement(l.id,{data:{...G.data,content:ee,processing:!1}})}}catch($){if($!=null&&$.message&&!$.message.includes("JSON"))throw $}}if(S)break}if(S){if(await nc.getState().requestSelfPay(S)){await s(l,u,"self");return}throw new Error(Rt.t("selfPay.generationSkipped","Generation skipped"))}const j=t().elements.find(M=>M.id===l.id);j&&t().updateElement(l.id,{data:{...j.data,processing:!1}}),wu()}async function a(l,u,c){var ee,G,Q,D,K,V,C;const d=t(),h=l.data,m=h.generationParams,f=(m==null?void 0:m.model)||d.selectedModel||void 0,p=d.imageModels.find(O=>O.modelId===f),g=p==null?void 0:p.maxPromptLength;let x=cb((m==null?void 0:m.prompt)||h.prompt||""),w;if(x)w=Kd(l.id,x,"image",d.connections,d.elements,!1,g).referenceText;else{const O=Kd(l.id,"","image",d.connections,d.elements,!1,g);
1237if(O.upstreamCount>0)x=O.referenceText||"";else return}const y=[];for(const O of d.connections.filter(q=>q.targetId===l.id)){const q=d.elements.find(ne=>ne.id===O.sourceId);if((q==null?void 0:q.type)==="image"){const ne=q.data,he=_3(ne);he&&!ne.placeholder&&!y.includes(he)&&y.push(he)}}for(const O of(m==null?void 0:m.userAttachments)||[])y.includes(O)||y.push(O);d.updateElement(l.id,{data:{...h,placeholder:!0,prompt:x}});const b=d.project;if(!b)throw new Error("No project");const k=(m==null?void 0:m.model)||d.selectedModel||void 0,T=await U.post(`/art/projects/${b.id}/generate`,{...kj({prompt:x,referenceContext:w,model:k,count:(m==null?void 0:m.count)||1,aspectRatio:(m==null?void 0:m.aspectRatio)||"1:1",resolution:(m==null?void 0:m.resolution)||void 0,quality:(m==null?void 0:m.quality)||void 0,attachments:y,enableWebSearch:(m==null?void 0:m.enableWebSearch)||void 0,cameraControl:m==null?void 0:m.cameraControl}),...c?{payWith:c}:{}});if((ee=T.data)!=null&&ee.needsDecision&&T.data.code===40251){if(await nc.getState().requestSelfPay(T.data))return a(l,u,"self");throw new Error(Rt.t("selfPay.generationSkipped","Generation skipped"))}const S=T.data;let j=Array.isArray(S==null?void 0:S.images)?[...S.images]:[],E=Array.isArray(S==null?void 0:S.assetIds)?[...S.assetIds]:[];const A=S==null?void 0:S.taskId;if(j.length===0&&A)for(let O=0;O<120;O++){if(u.aborted)throw new Error("Aborted");await new Promise(q=>setTimeout(q,3e3));try{const q=await U.get(`/image/task/${A}`);if(((G=q.data)==null?void 0:G.status)==="completed"&&((D=(Q=q.data)==null?void 0:Q.images)==null?void 0:D.length)>0){j=q.data.images,E=q.data.assetIds??E;break}if(((K=q.data)==null?void 0:K.status)==="failed")throw new Error(((V=q.data)==null?void 0:V.error)||"Image generation failed")}catch(q){if((C=q==null?void 0:q.message)!=null&&C.includes("failed")||(q==null?void 0:q.message)==="Aborted")throw q}}const R=j[0],M=E[0];if(!R)throw new Error("No image URL in response");const B=await new Promise(O=>{const q=new Image;q.crossOrigin="anonymous",q.onload=()=>O({w:q.naturalWidth,h:q.naturalHeight}),q.onerror=()=>O({w:0,h:0}),q.src=R}),W=t().elements.find(O=>O.id===l.id),H=(W==null?void 0:W.width)||l.width,L=B.w>0?Math.round(H*B.h/B.w):(W==null?void 0:W.height)||l.height,$=j.length>1;d.updateElement(l.id,{width:H,height:L,...M?{assetId:M}:{},data:{...h,...M?{assetId:M}:{assetId:""},url:R,images:$?j:void 0,imagesAssetIds:$?E:void 0,coverIndex:0,originalWidth:B.w||h.originalWidth,originalHeight:B.h||h.originalHeight,placeholder:!1,prompt:x,sourceLabel:"AI Generated",resolvedUrl:void 0,persistenceStatus:void 0,generationParams:{...m,prompt:x,model:k||"",attachments:y.length>0?y:void 0}}}),wu()}async function o(l,u){var je,Ge,mt,Ft,ur;const c=t(),d=l.data,h=d.generationParams,m=cb((h==null?void 0:h.prompt)||d.prompt||"");if(!m)return;let f=[];try{f=(await O0.getModels()).data||[]}catch{}const p=(h==null?void 0:h.model)||"",g=f.find(ht=>ht.id===p),x=Kd(l.id,m,"video",c.connections,c.elements,!1,g==null?void 0:g.maxPromptLength),w=gQ(l.id,c.connections,c.elements,f,p),y=w.modelSwitched?w.modelId:p;if(y.endsWith("-kuaikuai")){const ht=[];for(const Re of(h==null?void 0:h.videoElements)||[]){Re!=null&&Re.frontalUrl&&ht.push(Re.frontalUrl);for(const on of(Re==null?void 0:Re.referenceUrls)||[])on&&ht.push(on)}for(const Re of[h==null?void 0:h.startFrameUrl,h==null?void 0:h.endFrameUrl,h==null?void 0:h.referenceVideoUrl,h==null?void 0:h.referenceImageUrl,h==null?void 0:h.audioUrl,h==null?void 0:h.continuationVideoUrl])Re&&ht.push(Re);for(const Re of[h==null?void 0:h.referenceVideoUrls,h==null?void 0:h.referenceAudioUrls,h==null?void 0:h.voiceCloneUrls,h==null?void 0:h.referenceImageUrlsLocal])for(const on of Re||[])on&&ht.push(on);const Qt=ht.map(Re=>Dj(Re)).filter(Re=>!!Re),Nt=xQ(l.id,c.connections,c.elements);bQ(l.id,c.connections,c.elements,VQ);const Jt=Array.from(new Set([...Qt,...Nt]));console.log(`[CF] execVideo.gate entry model=${y} inlineUrls=${ht.length} inlineIds=${Qt.length} upstreamIds=${Nt.length} merged=${Jt.length}`);try{const on=(await tj(Jt,ht)).map(In=>In.assetId);if(on.length===0)console.log("[CF] execVideo.gate PASS (no Asset matched, third-party url fallback)");else{const ms=(await rj(on)).filter(Rr=>Rr.status==="rejected");if(ms.length>0){const Rr=ms[0].rejectReason||"";throw console.warn(`[CF] execVideo.gate REJECTED reason="${Rr}"`),new Error(Rr?`${Rt.t("compliance.sendBlockedRejected")}ï¼${Rr}`:Rt.t("compliance.sendBlockedRejected"))}console.log("[CF] execVideo.gate PASS (all approved)")}}catch(Re){throw(Re==null?void 0:Re.message)==="compliance:timeout"?(console.warn("[CF] execVideo.gate ERROR TIMEOUT"),new Error(Rt.t("compliance.sendBlockedTimeout"))):(Ge=(je=Re==null?void 0:Re.message)==null?void 0:je.startsWith)!=null&&Ge.call(je,Rt.t("compliance.sendBlockedRejected"))?Re:(console.warn(`[CF] execVideo.gate ERROR NETWORK/SERVICE msg="${(Re==null?void 0:Re.message)||Re}"`),new Error(Rt.t("compliance.sendBlockedRejected")))}}const b=f.find(ht=>
1237ht.id===y),k=(b==null?void 0:b.modelFamily)==="kling-o3",T=y.startsWith("wan"),S=y.startsWith("seedance-2."),j=w.modelSwitched?w.recommendedMode:(h==null?void 0:h.videoInputMode)||w.recommendedMode,E=j==="video_continuation",A=j==="first_frame"||j==="reference",R=new Set(w.upstreamImageUrls),M=new Set(w.upstreamVideoUrls),B=new Set(w.upstreamAudioUrls),W=(ht,Qt)=>ht?Qt.size===0?!0:Qt.has(ht):!1,H=(ht,Qt,Nt)=>!Array.isArray(ht)||ht.length===0?!1:Nt.size===0?!0:ht.some(Jt=>{const Re=Qt(Jt);return!!Re&&Nt.has(Re)}),L=h==null?void 0:h.startFrameUrl,$=A?W(L,R)?L:w.startFrameUrl||void 0:void 0,ee=h==null?void 0:h.endFrameUrl,G=A||E?W(ee,R)?ee:w.endFrameUrl||void 0:void 0,Q=j==="video_edit"&&(h==null?void 0:h.referenceImageUrl)||void 0,D=h==null?void 0:h.referenceVideoUrl,K=h==null?void 0:h.continuationVideoUrl,V=j==="video_edit"||j==="video_reference"||j==="reference"?W(D,M)?D:w.referenceVideoUrl||void 0:E?W(K,M)?K:w.continuationVideoUrl||void 0:void 0,C=h==null?void 0:h.videoElements,O=j==="reference"||k&&(j==="video_edit"||j==="video_reference")?H(C,ht=>ht==null?void 0:ht.frontalUrl,R)?C:w.videoElements:[],q=h==null?void 0:h.referenceVideoUrls,ne=j==="reference"?H(q,ht=>ht,M)?q:w.refVideoUrls:[],he=h==null?void 0:h.referenceAudioUrls,xe=j==="reference"?H(he,ht=>ht,B)?he:w.refAudioUrls:[],Oe=h==null?void 0:h.voiceCloneUrls,Se=j==="reference"&&Array.isArray(Oe)?Oe:[],we=h==null?void 0:h.referenceImageUrlsLocal,Be=(k&&(j==="video_edit"||j==="video_reference"||j==="reference")||(b==null?void 0:b.modelFamily)==="happyhorse"&&j==="video_edit")&&Array.isArray(we)?we:[],ve=h==null?void 0:h.audioUrl,Ye=!w.isOmniModel&&j!=="reference"&&!E?W(ve,B)?ve:w.audioUrl||void 0:void 0,Ae=E?W(K,M)?K:w.continuationVideoUrl||void 0:void 0,Ee=h==null?void 0:h.continuationClipDuration,Ce=typeof Ee=="number"&&Ee>0?Ee:void 0,X=(h==null?void 0:h.duration)??5,pe=(h==null?void 0:h.aspectRatio)||"16:9",_e=(h==null?void 0:h.resolution)||"1080p",Ne=(h==null?void 0:h.audioEnabled)??!0,de=!!(h!=null&&h.watermark),be=!!(h!=null&&h.promptExtend),ie=(h==null?void 0:h.keepAudio)??!0,De=!!(h!=null&&h.useWebSearch),F=j==="first_frame"?G?"start_end_frame":"image2video":j==="video_edit"?"video_to_video":j==="video_reference"?"video_reference_to_video":j==="video_continuation"?"video_continuation":j==="reference"?"reference_to_video":"text2video";c.updateElement(l.id,{data:{...d,placeholder:!0,processing:!0,prompt:m}});const ue=(ur=(await O0.generate({type:F,prompt:x.prompt,model:y||void 0,aspectRatio:pe,resolution:_e,duration:E&&Ce?Math.max(X,Ce+1):X,startFrameUrl:$,endFrameUrl:G,referenceImageUrl:Q,audioUrl:Ye,generateAudio:Ye?void 0:j!=="video_edit"?Ne:void 0,...(j==="video_edit"||j==="video_reference")&&{keepAudio:ie},...j==="video_reference"&&{v2vEndpoint:"reference"},referenceVideoUrl:V,...j==="reference"&&w.isOmniModel&&ne.length>0&&{referenceVideoUrls:ne},...T&&{promptExtend:be},...w.isOmniModel&&de&&{watermark:!0},...j==="reference"&&T&&(b==null?void 0:b.supportsVoiceClone)&&Se.length>0&&{referenceVoiceUrls:Se},...j==="reference"&&S&&xe.length>0&&{referenceAudioUrls:xe},...S&&j==="text"&&De&&{useWebSearch:!0},...Be.length>0&&{referenceImageUrls:Be},...(k&&j==="video_edit"||E)&&Ce&&{sourceVideoDuration:Math.round(Ce)},...E&&Ae&&{continuationSegmentUrls:[Ae],continuationSegmentDurations:Ce?[Math.round(Ce)]:void 0},elements:O.length>0?O.map(ht=>({frontal_image_url:ht.frontalUrl,reference_image_urls:Array.isArray(ht.referenceUrls)&&ht.referenceUrls.length>0?ht.referenceUrls:void 0})):void 0,teamId:((mt=c.project)==null?void 0:mt.teamId)||void 0,projectId:((Ft=c.project)==null?void 0:Ft.id)||void 0})).data)==null?void 0:ur.taskId;if(!ue)throw new Error("No taskId returned");for(let ht=0;ht<360;ht++){await new Promise(Jt=>setTimeout(Jt,3e3));const Nt=(await O0.getTaskStatus(ue)).data;if(Nt.status==="completed"&&Nt.videoUrl){const Jt=t().elements.find(Wr=>Wr.id===l.id),Re=(Jt==null?void 0:Jt.width)||l.width,[on,In]=pe.split(":").map(Number),ms=on&&In?Math.round(Re*In/on):(Jt==null?void 0:Jt.height)||l.height,Rr=Nt.videoAssetId,Qs=Nt.coverAssetId;c.updateElement(l.id,{width:Re,height:ms,...Rr?{assetId:Rr}:{},data:{...d,...Rr?{assetId:Rr,videoAssetId:Rr}:{assetId:"",videoAssetId:""},...Qs?{coverAssetId:Qs}:{coverAssetId:""},url:Nt.videoUrl,coverUrl:Nt.coverUrl||"",originalWidth:Re,originalHeight:ms,placeholder:!1,processing:!1,prompt:m,model:y,resolvedUrl:void 0,persistenceStatus:void 0,generationParams:{...h,prompt:m,model:y,aspectRatio:pe,resolution:_e,duration:X,audioEnabled:Ne}}}),wu();return}if(Nt.status==="failed")throw new Error(Nt.error||"Video generation failed")}throw new Error("Video generation timed out")}return{...Kj,executeGroup:async l=>{var y,b,k;const u=t();if((y=u.groupExecutions[l])!=null&&y.isRunning)return;const c=u.elements.find(T=>T.id===l);if(!c||c.type!=="group")return;const h=c.data.childIds||[];if(h.length===0)return;const m=h.map(T=>u.elements.find(S=>S.id===T)).filter(T=>!!T&&["text","image","video"].includes(T.type));if(m.length===0)return;const f=$X(m,u.connections),g=f.flat().map(T=>({elementId:T.id,type:T.type,status:"pending"})),x=new Map(g.map((T,S)=>[T.elementId,S])),w=new AbortController;r.set(l,w),e(T=>({groupExecutions:{...T.groupExecutions,[l]:{isRunning:!0,plan:g,currentIndex:0}}}));for(const T of f){if(w.signal.aborted)break;const S=[];for(const j of T){const E=x.get(j.id);if(E==null)continue;if(w.signal.aborted){n(l,E,{status:"skipped"});continue}e(B=>{const W=B.groupExecutions[l];return W?{groupExecutions:{...B.groupExecutions,[l]:{...W,currentIndex:E}}}:B});const A=t().elements.find(B=>B.id===j.id);if(!A){n(l,E,{status:"skipped",error:"Element not found"});continue}const R=qX(A,t().connections);if(R==="input"){n(l,E,{status:"completed"});continue}if(R==="empty"){n(l,E,{status:"skipped",error:"No prompt"});continue}n(l,E,{status:"running"});const M=(async()=>{var B;try{A.type==="text"?await s(A,w.signal):A.type==="image"?await a(A,w.signal):A.type==="video"&&await o(A,w.signal),n(l,E,{status:"completed"})}catch(W){const H=t().elements.find(Q=>Q.id===A.id);H&&t().updateElement(A.id,{data:{...H.data,placeholder:!1,processing:!1}});const L=(B=W==null?void 0:W.response)==null?void 0:B.data,$=L==null?void 0:L.requiredCredits,ee=L==null?void 0:L.currentCredits,G=$!=null&&ee!=null?Rt.t("art.toast.insufficientCredits",{required:$,current:ee}):(L==null?void 0:L.message)||(W==null?void 0:W.message)||"Unknown error";n(l,E,{status:"failed",error:G})}})();S.push(M)}await Promise.all(S)}(k=(b=t()).saveCanvasState)==null||k.call(b).catch(()=>{}),e(T=>{const S=T.groupExecutions[l];return S?{groupExecutions:{...T.groupExecutions,[l]:{...S,isRunning:!1}}}:T}),r.delete(l)},cancelGroupExecution:l=>{var u;(u=r.get(l))==null||u.abort(),r.delete(l),e(c=>{const d=c.groupExecutions[l];return d?{groupExecutions:{...c.groupExecutions,[l]:{...d,isRunning:!1}}}:c})}}},Yj={onlineUsers:new Map,myAccess:null,myAccessResolved:!1,elementLocks:new Map,collabRoomJoined:!1,collabProjectId:null,isCommentMode:!1},VX=(e,t)=>{const r=[];let n=null;const s=()=>{n&&(clearTimeout(n),n=null)};return{...Yj,canEdit:()=>{if(Hk)return!1;const{myAccess:a,myAccessResolved:o}=t();return o?a?a.role==="editor"||a.role==="manager":!1:!0},canComment:()=>{if(Hk)return!1;const{myAccess:a,myAccessResolved:o}=t();return o?a?a.role==="editor"||a.role==="manager":!1:!0},isOwner:()=>{const{myAccess:a,myAccessResolved:o}=t();return o?a?a.role==="manager":!1:!0},joinCollabRoom:(a,o)=>{U.get(`/art/projects/${a}/my-role`).then(y=>{const b=y.data;b!=null&&b.role?e({myAccess:{role:b.role,teamId:b.teamId},myAccessResolved:!0}):e({myAccess:null,myAccessResolved:!0})}).catch(()=>{e({myAccess:null,myAccessResolved:!0})});const l=()=>Tt.emit("collab:join",{projectId:a,groupElementId:o});Tt.connected&&l();const u=Tt.on("connect",l);r.push(u),e({collabRoomJoined:!0,collabProjectId:a});const c=Tt.on("collab:presence",y=>{const b=(y==null?void 0:y.data)||y;t()._handlePresence(b)}),d=Tt.on("collab:cursor",y=>{const b=(y==null?void 0:y.data)||y;t()._handleRemoteCursor(b)}),h=Tt.on("collab:select",y=>{const b=(y==null?void 0:y.data)||y;t()._handleRemoteSelect(b)}),m=Tt.on("collab:editing",y=>{const b=(y==null?void 0:y.data)||y;t()._handleRemoteEditing(b)}),f=Tt.on("collab:op",y=>{const b=(y==null?void 0:y.data)||y;t()._handleRemoteOp(b)}),p=Tt.on("collab:lock:status",y=>{const b=(y==null?void 0:y.data)||y;t()._handleLockStatus(b)}),g=Tt.on("collab:kicked",y=>{const b=(y==null?void 0:y.data)||y;t().leaveCollabRoom(),typeof window<"u"&&Je(async()=>{const{default:k}=await Promise.resolve().then(()=>dA);return{default:k}},void 0).then(({default:k})=>{k.error((b==null?void 0:b.reason)==="removed"?Rt.t("collab.toast.removed"):Rt.t("collab.toast.accessChanged"))})}),x=Tt.on("canvas:changed",y=>{const b=(y==null?void 0:y.data)||y;t()._handleCanvasChanged(b)}),w=Tt.on("canvas:run",y=>{const b=(y==null?void 0:y.data)||y;t()._handleCanvasRun(b)});r.push(c,d,h,m,f,p,g,x,w)},leaveCollabRoom:()=>
1237{const a=t().collabProjectId;a&&Tt.emit("collab:leave",{projectId:a}),r.forEach(o=>o()),r.length=0,s(),e({collabRoomJoined:!1,collabProjectId:null,onlineUsers:new Map,elementLocks:new Map,myAccess:null,myAccessResolved:!1})},broadcastCursor:(a,o)=>{const l=t().collabProjectId;l&&Tt.emit("collab:cursor",{projectId:l,x:a,y:o})},broadcastSelect:a=>{const o=t().collabProjectId;o&&Tt.emit("collab:select",{projectId:o,elementId:a})},broadcastEditing:(a,o)=>{const l=t().collabProjectId;l&&Tt.emit("collab:editing",{projectId:l,elementId:a,editing:o})},broadcastOp:a=>{const o=t().collabProjectId;o&&Tt.emit("collab:op",{projectId:o,op:a})},requestLock:a=>{const o=t().collabProjectId;o&&Tt.emit("collab:lock:request",{projectId:o,elementId:a})},releaseLock:a=>{const o=t().collabProjectId;o&&Tt.emit("collab:lock:release",{projectId:o,elementId:a})},isElementLocked:a=>t().elementLocks.has(a),getElementLockOwner:a=>t().elementLocks.get(a)||null,setCommentMode:a=>e({isCommentMode:a}),_handlePresence:a=>{const o=new Map;for(const l of a.users||[])o.set(l.userId,{userId:l.userId,name:l.name,avatarUrl:l.avatarUrl,color:l.color,lastSeen:Date.now()});e({onlineUsers:o})},_handleRemoteCursor:a=>{e(o=>{const l=new Map(o.onlineUsers),u=l.get(a.userId);return u&&l.set(a.userId,{...u,cursor:{x:a.x,y:a.y},lastSeen:Date.now()}),{onlineUsers:l}})},_handleRemoteSelect:a=>{e(o=>{const l=new Map(o.onlineUsers),u=l.get(a.userId);return u&&l.set(a.userId,{...u,selectedElementId:a.elementId,lastSeen:Date.now()}),{onlineUsers:l}})},_handleRemoteEditing:a=>{e(o=>{const l=new Map(o.onlineUsers),u=l.get(a.userId);return u&&l.set(a.userId,{...u,editingElementId:a.editing?a.elementId:null,lastSeen:Date.now()}),{onlineUsers:l}})},_handleRemoteOp:a=>{var c,d;const o=a.op;if(!o)return;const l=t(),{elements:u}=l;switch(o.type){case"element:move":{u.find(m=>m.id===o.elementId)&&l.updateElement(o.elementId,{x:o.x,y:o.y});break}case"element:resize":{u.find(m=>m.id===o.elementId)&&l.updateElement(o.elementId,{width:o.width,height:o.height});break}case"element:update":{o.elementId&&o.changes&&l.updateElement(o.elementId,o.changes);break}case"element:delete":{o.elementId&&l.deleteElement(o.elementId);break}case"element:add":{o.element&&l.addElement(o.element,o.element.id);break}case"element:batch_move":{if(o.moves)for(const h of o.moves)l.updateElement(h.elementId,{x:h.x,y:h.y});break}case"connection:add":{o.connection&&((c=l.addConnection)==null||c.call(l,o.connection.sourceId,o.connection.targetId));break}case"connection:delete":{o.connectionId&&((d=l.removeConnection)==null||d.call(l,o.connectionId));break}}},_handleLockStatus:a=>{e(o=>{const l=new Map(o.elementLocks);return a.locked&&a.lockedBy?l.set(a.elementId,{userId:a.lockedBy.userId,name:a.lockedBy.name}):l.delete(a.elementId),{elementLocks:l}})},_handleCanvasChanged:a=>{var l;const o=t();!(a!=null&&a.projectId)||a.projectId!==((l=o.project)==null?void 0:l.id)||(s(),n=setTimeout(()=>{var u,c;n=null,(c=(u=t()).refreshElements)==null||c.call(u)},300))},_handleCanvasRun:a=>{var u;const o=t();if(!(a!=null&&a.projectId)||a.projectId!==((u=o.project)==null?void 0:u.id))return;const l=a.runId;if(l){if(a.event==="run:started"){if(o.isPipelineRunning&&o.pipelineRunId&&o.pipelineRunId!==l)return;e({pipelineRunId:l,pipelineRunStatus:"running",pipelineNodeStatuses:[],isPipelineRunning:!0});return}if(o.pipelineRunId===l){if(a.event==="node:status"&&a.nodeId){e(c=>{const d=c.pipelineNodeStatuses;return{pipelineNodeStatuses:d.some(m=>m.nodeId===a.nodeId)?d.map(m=>m.nodeId===a.nodeId?{...m,status:a.status,...a.error?{error:a.error}:{}}:m):[...d,{nodeId:a.nodeId,type:a.nodeType||"",status:a.status,...a.error?{error:a.error}:{}}]}});return}a.event==="run:finished"&&(e({pipelineRunStatus:a.runStatus||"completed",isPipelineRunning:!1}),o._handleCanvasChanged({projectId:a.projectId}))}}}}},Qj={pipelineRunId:null,pipelineRunStatus:null,pipelineNodeStatuses:[],isPipelineRunning:!1},GX=(e,t)=>({...Qj,estimatePipeline:async()=>{const{project:r}=t();if(!r)throw new Error("No project loaded");return(await U.post(`/art/projects/${r.id}/run`,{confirmed:!1})).data},startPipeline:async()=>{const{project:r}=t();if(!r)throw new Error("No project loaded");const s=(await U.post(`/art/projects/${r.id}/run`,{confirmed:!0})).data;return e({pipelineRunId:s.runId,pipelineRunStatus:s.status,pipelineNodeStatuses:s.nodeStatuses,isPipelineRunning:s.status==="running"}),t().pollPipeline(s.runId),s},pollPipeline:async r=>{const{project:n}=t();if(!n)return;const s=180,a=2e3;for(let o=0;o<s;o++){if(await new Promise(l=>setTimeout(l,a)),t().pipelineRunId!==r)return;try{const l=await U.get(`/art/projects/${n.id}/runs/${r}`),{status:u,nodeStatuses:c}=l.data;if(t().pipelineRunId!==r)return;if(e({pipelineRunStatus:u,pipelineNodeStatuses:c,isPipelineRunning:u==="running"}),await t().refreshElements(),u!=="running"){e({isPipelineRunning:!1}),wu();return}}catch(l){console.error("[art] Failed to poll pipeline run:",l)}}t().pipelineRunId===r&&e({isPipelineRunning:!1})}}),KX={...wj,...vj,...Ej,...Tj,...Cj,...bj,...Kj,...Yj,...Qj},$n=ya()((...e)=>({...JY(...e),...ZY(...e),...eQ(...e),...sQ(...e),...oQ(...e),...BY(...e),...WX(...e),...VX(...e),...GX(...e),reset:()=>{const[t,r]=e,{projects:n,imageModels:s}=r();t({...KX,projects:n,imageModels:s})}}));function YX({modelId:e,count:t=1,quality:r,resolution:n,aspectRatio:s,refImageCount:a=0,featureKey:o="image_gen"}){const{models:l,defaultMarkup:u}=kh(o),{models:c}=kh("image_edit"),d=ut(f=>f.isAuthenticated),h=ga({queryKey:["credits"],queryFn:()=>d1.getBalance(),staleTime:3e4,enabled:d});return v.useMemo(()=>{var R,M,B;if(!e||l.length===0||u==null)return{estimate:null,insufficient:!1,perImage:null};let f=l.find(W=>W.canonicalId===e);if(a>0){const W=`${e}-edit`,H=c.find(L=>L.canonicalId===W);H!=null&&H.primaryChannel&&(f=H)}if(!(f!=null&&f.primaryChannel))return{estimate:null,insufficient:!1,perImage:null};const p=f.primaryChannel;if(p.pricingModel!=="per_image")return{estimate:null,insufficient:!1,perImage:null};let g=p.fixedPrice??.02;
1237const x=p.priceModifiers;if(x)if(r!=null&&x.quality){let W="";if(s&&s!=="1:1"){const[$,ee]=s.split(":").map(Number);$&&ee&&(W=$>ee?"_landscape":"_portrait")}const H=`${r}${W}`,L=`${r}_wide`;W&&x.quality[H]!=null?g=x.quality[H]:W&&x.quality[L]!=null?g=x.quality[L]:x.quality[r]!=null&&(g=x.quality[r])}else n!=null&&((R=x.resolution)==null?void 0:R[n])!=null&&(g=x.resolution[n]);const w=1e3,y=(M=x==null?void 0:x.referenceImage)==null?void 0:M.perImage,b=y!=null&&a>0?y*a:0,k=Math.max(1,Math.ceil((g*t+b)*u*w)),T=Math.max(1,Math.ceil(g*u*w)),S=(B=h.data)==null?void 0:B.data,j=((S==null?void 0:S.credits)??0)-((S==null?void 0:S.frozenCredits)??0),E=(S==null?void 0:S.creditFloor)??0,A=!h.isLoading&&j-k<E;return{estimate:k,insufficient:A,perImage:T}},[e,t,r,n,s,a,l,c,u,h.data,h.isLoading])}const dp=["21:9","3:1","16:9","4:3","3:2","1:1","9:16","3:4","2:3","5:4","4:5"],Xj=["0.5K","1K","2K","4K"],QX=["low","medium","high","xhigh","max"],ub={low:{key:"art.qualityLow",fallback:"ä½"},medium:{key:"art.qualityMedium",fallback:"ä¸"},high:{key:"art.qualityHigh",fallback:"é«"},xhigh:{key:"art.qualityXhigh",fallback:"è¶
é«"},max:{key:"art.qualityMax",fallback:"æè´"}},db={low:{key:"art.qualityTipLow",fallback:"ä½ç»è´¨ · æå¿«ãæç积å"},medium:{key:"art.qualityTipMedium",fallback:"ä¸ç»è´¨ · 平衡ç»è´¨ä¸ç§¯å"},high:{key:"art.qualityTipHigh",fallback:"é«ç»è´¨ · æå渲ææä½³ï¼ç§¯åæ¶èè¾å¤"},xhigh:{key:"art.qualityTipXhigh",fallback:"è¶
é«ç»è´¨ · ç»èæ´éå©ï¼ç§¯å约为ãé«ãç 1.8 å"},max:{key:"art.qualityTipMax",fallback:"æè´ç»è´¨ · åºå¾ä¸éï¼ç§¯å约为ãé«ãç 4 å"}},Zj=(e,t)=>ub[t]?e(ub[t].key,ub[t].fallback):t,XX=(e,t)=>db[t]?e(db[t].key,db[t].fallback):"",ZX=[1,2,3,4];function JX({ratio:e,active:t}){const[r,n]=e.split(":").map(Number),s=r/n,a=32;let o,l;return s>=1?(o=a,l=Math.round(a/s)):(l=a,o=Math.round(a*s)),o=Math.max(o,10),l=Math.max(l,10),i.jsx("div",{className:`rounded border-[1.5px] ${t?"border-primary bg-primary/10":"border-muted-foreground/40"}`,style:{width:o,height:l}})}function eZ({models:e,selectedModel:t,aspectRatio:r,resolution:n,quality:s,imageCount:a,hideImageCount:o,onAspectRatioChange:l,onResolutionChange:u,onQualityChange:c,onImageCountChange:d}){const{t:h}=We(),[m,f]=v.useState(!1),p=v.useRef(null),g=v.useRef(null),x=e.find(T=>T.modelId===t),w=(x==null?void 0:x.maxCount)??4,y=x==null?void 0:x.supportedQualities,b=(()=>{if(!x){if(e.length===0)return new Set(dp);const T=new Set;return e.forEach(S=>(S.supportedAspectRatios||dp).forEach(j=>T.add(j))),T}return new Set(x.supportedAspectRatios||dp)})(),k=(()=>{if(!x){if(e.length===0)return new Set(Xj);const T=new Set;return e.forEach(S=>(S.supportedResolutions||["1K"]).forEach(j=>T.add(j))),T}return new Set(x.supportedResolutions||["1K"])})();return v.useEffect(()=>{if(!m)return;const T=S=>{const j=S.target;p.current&&!p.current.contains(j)&&g.current&&!g.current.contains(j)&&f(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[m]),i.jsxs(i.Fragment,{children:[i.jsxs("button",{ref:p,onClick:()=>f(T=>!T),className:"flex items-center gap-1 w-fit h-8 px-2.5 text-xs bg-accent/50 hover:bg-accent rounded-lg transition-colors",children:[i.jsxs("span",{className:"text-muted-foreground whitespace-nowrap",children:[y?Zj(h,s):n," · ",r,!o&&w>1?` · Ã${a}`:""]}),i.jsx(dn,{className:`w-3 h-3 transition-transform ${m?"rotate-180":""}`})]}),m&&fn.createPortal(i.jsx(Jj,{ref:g,anchorRef:p,aspectRatio:r,resolution:n,quality:s,imageCount:a,hideImageCount:o,maxCount:w,supportedRatios:b,supportedResolutions:k,supportedQualities:y,onAspectRatioChange:l,onResolutionChange:u,onQualityChange:c,onImageCountChange:d}),document.body)]})}const Jj=v.forwardRef(({anchorRef:e,aspectRatio:t,resolution:r,quality:n,imageCount:s,hideImageCount:a,maxCount:o,supportedRatios:l,supportedResolutions:u,supportedQualities:c,onAspectRatioChange:d,onResolutionChange:h,onQualityChange:m,onImageCountChange:f},p)=>{const{t:g}=We(),[x,w]=v.useState({position:"fixed",visibility:"hidden"}),y=v.useRef(null);return v.useEffect(()=>{const b=()=>{var M,B;if(!e.current)return;const k=e.current.getBoundingClientRect(),T=((M=y.current)==null?void 0:M.offsetHeight)||300,S=((B=y.current)==null?void 0:B.offsetWidth)||256,j=4,E=k.top,A=window.innerHeight-k.bottom,R=k.left+S>window.innerWidth?window.innerWidth-S-j:k.left;E>=T+j?w({position:"fixed",left:R,bottom:window.innerHeight-k.top+j,zIndex:9999}):A>=T+j?w({position:"fixed",left:R,top:k.bottom+j,zIndex:9999}):E>=A?w({position:"fixed",left:R,top:j,maxHeight:E-j,overflowY:"auto",zIndex:9999}):w({position:"fixed",left:R,top:k.bottom+j,maxHeight:A-j,overflowY:"auto",zIndex:9999})};return requestAnimationFrame(b),window.addEventListener("scroll",b,!0),window.addEventListener("resize",b),()=>{window.removeEventListener("scroll",b,!0),window.removeEventListener("resize",b)}},[e]),i.jsx("div",{ref:p,style:x,children:i.jsxs("div",{ref:y,className:"w-64 p-3 border border-border rounded-lg shadow-xl bg-white dark:bg-zinc-900 space-y-3",children:[c?i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:g("art.quality","ç»è´¨")}),i.jsx("div",{className:"grid grid-cols-3 gap-1.5",children:QX.map(b=>{const k=c.includes(b),T=n===b,S=XX(g,b);return i.jsx("button",{onClick:()=>k&&m(b),disabled:!k,title:S,className:`py-1.5 text-xs rounded-md border transition-colors ${T?"border-primary bg-primary/5 text-primary font-medium":k?"border-border hover:bg-accent text-foreground":"border-border/50 text-muted-foreground
1237/30 cursor-not-allowed"}`,children:Zj(g,b)},b)})})]}):i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:g("art.resolution","å辨ç")}),i.jsx("div",{className:"flex gap-1.5",children:Xj.map(b=>{const k=u.has(b),T=r===b;return i.jsx("button",{onClick:()=>k&&h(b),disabled:!k,className:`flex-1 py-1.5 text-xs rounded-md border transition-colors ${T?"border-primary bg-primary/5 text-primary font-medium":k?"border-border hover:bg-accent text-foreground":"border-border/50 text-muted-foreground/30 cursor-not-allowed"}`,children:b},b)})})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:g("art.size","尺寸")}),i.jsx("div",{className:"grid grid-cols-4 gap-1.5",children:dp.map(b=>{const k=t===b,T=l.has(b);return i.jsxs("button",{onClick:()=>T&&d(b),disabled:!T,className:`flex flex-col items-center justify-center gap-1.5 py-2.5 rounded-md border transition-colors ${k?"border-primary bg-primary/5":T?"border-border hover:bg-accent":"border-border/50 opacity-30 cursor-not-allowed"}`,children:[i.jsx(JX,{ratio:b,active:k}),i.jsx("span",{className:`text-[10px] ${k?"text-primary font-medium":"text-muted-foreground"}`,children:b})]},b)})})]}),o>1&&!a&&i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:g("art.imageCount","æ°é")}),i.jsx("div",{className:"flex gap-1.5",children:ZX.map(b=>{const k=b<=o,T=s===b;return i.jsx("button",{onClick:()=>k&&f(b),disabled:!k,className:`flex-1 py-1.5 text-xs rounded-md border transition-colors ${T?"border-primary bg-primary/5 text-primary font-medium":k?"border-border hover:bg-accent text-foreground":"border-border/50 text-muted-foreground/30 cursor-not-allowed"}`,children:b},b)})})]})]})})});Jj.displayName="ParamsPanelPortal";const lN=636,cN=340,uN=["camera","lens","focal","aperture"];function Jm(e){var t,r;return((t=e.find(n=>n.default))==null?void 0:t.key)??((r=e[0])==null?void 0:r.key)}function tZ(e){return{enabled:!1,camera:Jm(e.camera),lens:Jm(e.lens),focal:Jm(e.focal),aperture:Jm(e.aperture)}}function rZ({className:e}){return i.jsx("img",{src:"/camera-presets/trigger-icon.png",alt:"",draggable:!1,className:e,"aria-hidden":!0})}function nZ({className:e}){return i.jsxs("svg",{viewBox:"0 0 48 48",fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeLinecap:"round",className:e,"aria-hidden":!0,children:[i.jsx("rect",{x:"19",y:"15",width:"24",height:"19",rx:"2.5",strokeWidth:"2",fill:"currentColor",fillOpacity:"0.06"}),i.jsx("path",{d:"M24 21h7M24 24.5h7M24 28h7",strokeWidth:"1.4"}),i.jsx("circle",{cx:"37.5",cy:"24.5",r:"2.6",strokeWidth:"1.4"}),i.jsx("path",{d:"M23.5 15v-3.2c0-1.8 1.4-3.2 3.2-3.2h9.6c1.8 0 3.2 1.4 3.2 3.2V15",strokeWidth:"2"}),i.jsx("rect",{x:"11.5",y:"16.5",width:"7.5",height:"5",rx:"1.4",strokeWidth:"1.8"}),i.jsx("path",{d:"M11.5 17.5h-2.6a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h2.6",strokeWidth:"1.6"}),i.jsx("rect",{x:"9.5",y:"24",width:"9.5",height:"8.5",rx:"1.4",strokeWidth:"1.8"}),i.jsx("path",{d:"M12.5 25.5v5.5M15 25.5v5.5M17.5 25.5v5.5",strokeWidth:"1.2"}),i.jsx("path",{d:"M9.5 24.8 4 22.6v11.3l5.5-2.2",strokeWidth:"1.8",fill:"
1237currentColor",fillOpacity:"0.06"})]})}function sZ({className:e}){return i.jsxs("svg",{viewBox:"0 0 48 48",fill:"none",stroke:"currentColor",className:e,"aria-hidden":!0,children:[i.jsx("circle",{cx:"24",cy:"24",r:"21",strokeWidth:"2"}),i.jsx("circle",{cx:"24",cy:"24",r:"18.2",strokeWidth:"2.6",strokeDasharray:"1.8 3.4",opacity:"0.85"}),i.jsx("circle",{cx:"24",cy:"24",r:"13.5",strokeWidth:"1.6"}),i.jsx("circle",{cx:"24",cy:"24",r:"9",strokeWidth:"1.4",fill:"currentColor",fillOpacity:"0.18"}),i.jsx("circle",{cx:"24",cy:"24",r:"4",fill:"currentColor",fillOpacity:"0.5",stroke:"none"}),i.jsx("path",{d:"M17.8 20.2a8 8 0 0 1 4.6-3.6",strokeWidth:"1.6",strokeLinecap:"round",opacity:"0.9"})]})}function dN({dim:e,item:t,size:r}){const n=r==="main"?"h-14 max-w-[96px] object-contain":"h-8 max-w-[64px] object-contain",s=r==="main"?"w-12 h-12":"w-6 h-6";if(t.image)return i.jsx("img",{src:t.image,alt:t.name,className:n,draggable:!1});if(e==="focal"){const a=t.name.replace(/mm$/i,"");return i.jsx("span",{className:r==="main"?"text-3xl font-semibold leading-none":"text-base font-medium leading-none",children:a})}return e==="camera"?i.jsx(nZ,{className:s}):e==="aperture"?i.jsx(gV,{className:r==="main"?"w-11 h-11":"w-6 h-6",strokeWidth:1.5}):i.jsx(sZ,{className:r==="main"?"w-11 h-11":"w-6 h-6"})}function aZ({value:e,onChange:t,disabled:r=!1}){const{t:n}=We(),[s,a]=v.useState(!1),[o,l]=v.useState(null),u=v.useRef(null),c=v.useRef(null),d=$n(A=>A.cameraPresets),h=$n(A=>A.loadCameraPresets),[m,f]=v.useState({}),p=v.useRef({});v.useEffect(()=>{d||h()},[d,h]),v.useEffect(()=>{s&&u.current?(l(u.current.getBoundingClientRect()),f({})):l(null)},[s]),v.useEffect(()=>{if(!s)return;const A=M=>{var W,H;const B=M.target;(W=u.current)!=null&&W.contains(B)||(H=c.current)!=null&&H.contains(B)||a(!1)},R=M=>{M.key==="Escape"&&a(!1)};return document.addEventListener("mousedown",A),document.addEventListener("keydown",R),()=>{document.removeEventListener("mousedown",A),document.removeEventListener("keydown",R)}},[s]);const g=v.useMemo(()=>{if(!d)return e;const A=tZ(d);return e?{enabled:e.enabled,camera:e.camera??A.camera,lens:e.lens??A.lens,focal:e.focal??A.focal,aperture:e.aperture??A.aperture}:A},[e,d]),x=v.useRef(null);v.useEffect(()=>{x.current=null},[g]);const w=v.useCallback(A=>{const R=x.current??g;if(!R)return;const M=A(R);x.current=M,t(M)},[g,t]),y=v.useCallback((A,R)=>{d&&(f(M=>({...M,[A]:R>0?1:-1})),w(M=>{const B=d[A],H=(Math.max(0,B.findIndex(L=>L.key===M[A]))+R+B.length)%B.length;return{...M,[A]:B[H].key}}))},[d,w]),b=v.useCallback((A,R)=>{const M=performance.now();M-(p.current[A]||0)<140||(p.current[A]=M,y(A,R>0?1:-1))},[y]),k=v.useCallback(A=>{w(R=>({...R,enabled:A}))},[w]),T=(e==null?void 0:e.enabled)===!0,S=v.useMemo(()=>!T||!d||!g?n("art.cameraControl","æåæº"):uN.map(R=>{var M;return(M=d[R].find(B=>B.key===g[R]))==null?void 0:M.name}).filter(Boolean).join(" · "),[T,d,g,n]),j=(()=>{if(!o)return null;const A=o.top,R=window.innerHeight-o.bottom,B=A<cN&&R>A?o.bottom+4:Math.max(8,o.top-cN-4),W=Math.max(8,Math.min(o.left,window.innerWidth-lN-8));return{top:B,left:W}})(),E={camera:n("art.cameraColumnCamera","ç¸æº"),lens:n("art.cameraColumnLens","é头"),focal:n("art.cameraColumnFocal","ç¦è·"),aperture:n("art.cameraColumnAperture","å
å")};return i.jsxs(i.Fragment,{children:[i.jsxs("button",{ref:u,type:"button",disabled:r,onClick:()=>{r||a(A=>!A)},title:S,"aria-label":n("art.cameraControl","æåæº"),className:`relative flex items-center justify-center w-8 h-8 rounded-lg transition-colors shrink-0 ${r?"opacity-50 cursor-not-allowed bg-accent/50 text-muted-foreground":T?"bg-[var(--theme)]/15 text-[var(--theme)] hover:bg-[var(--theme)]/25":"bg-accent/50 hover:bg-accent text-muted-foreground"}`,children:[i.jsx(rZ,{className:"w-[18px] h-[18px]"}),T&&!r&&i.jsx("span",{className:"absolute top-0.5 right-0.5 w-1.5 h-1.5 rounded-full bg-[var(--theme)]"})]}),s&&!r&&j&&fn.createPortal(i.jsxs("div",{ref:c,style:{position:"fixed",top:j.top,left:j.left,width:lN,maxWidth:"calc(100vw - 16px)",zIndex:9999},className:"flex flex-col border border-border rounded-xl shadow-xl bg-white dark:bg-[#1e1e1e] select-none",children:[i.jsxs("div",{className:"flex items-center justify-between pl-5 pr-3 h-12 shrink-0",children:[i.jsx("span",{className:"text-sm font-medium text-foreground",children:n("art.cameraControl","æåæº")}),i.jsx("button",{type:"button",onClick:()=>a(!1),className:"flex items-center justify-center w-7 h-7 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",children:i.jsx(cr,{className:"w-4 h-4"})})]}),d?i.jsx("div",{className:"flex items-stretch px-4 pt-1 pb-2",children:uN.map((A,R)=>{const M=d[A],B=Math.max(0,M.findIndex(G=>G.key===(g==null?void 0:g[A]))),W=M[B],H=M[(B-1+M.length)%M.length];if(!W)return null;const L=m[A],$=L===1?"animate-dial-in-up":L===-1?"animate-dial-in-down":"",ee=L===1?"animate-dial-ghost-up":L===-1?"animate-dial-ghost-down":"";return i.jsxs("div",{className:"relative flex-1 min-w-0 flex flex-col items-center",children:[R>0&&i.jsx("span",{className:"absolute left-0 top-[76px] h-24 w-px bg-border","aria-hidden":!0}),i.jsx("button",{type:"button",onClick:()=>y(A,-1),className:"flex items-center justify-center w-7 h-6 text-muted-foreground
1237/70 hover:text-foreground transition-colors","aria-label":`${E[A]} prev`,children:i.jsx(d9,{className:"w-3.5 h-3.5"})}),i.jsx("button",{type:"button",onClick:()=>y(A,-1),className:"flex items-center justify-center h-9 mb-1 opacity-25 hover:opacity-50 transition-opacity text-foreground overflow-hidden",tabIndex:-1,children:i.jsx("span",{className:`flex items-center justify-center ${ee}`,children:i.jsx(dN,{dim:A,item:H,size:"ghost"})},H.key)}),i.jsxs("div",{onWheel:G=>b(A,G.deltaY),className:"flex flex-col items-center w-[108px] h-[104px] rounded-lg border border-border bg-zinc-50 dark:bg-white/[0.04] text-foreground overflow-hidden",children:[i.jsx("span",{className:"pt-2 pb-1 text-xs text-muted-foreground",children:E[A]}),i.jsx("span",{className:`flex-1 flex items-center justify-center w-full pb-2 px-2 ${$}`,children:i.jsx(dN,{dim:A,item:W,size:"main"})},W.key)]}),i.jsx("button",{type:"button",onClick:()=>y(A,1),className:"flex items-center justify-center w-7 h-6 mt-2 text-muted-foreground/70 hover:text-foreground transition-colors","aria-label":`${E[A]} next`,children:i.jsx(dn,{className:"w-3.5 h-3.5"})}),i.jsx("span",{className:`pt-1 pb-1 text-xs text-muted-foreground max-w-[120px] truncate ${A==="focal"?"":$}`,children:A==="focal"?"mm":W.name},A==="focal"?"mm":W.key)]},A)})}):i.jsx("div",{className:"flex items-center justify-center h-48 text-xs text-muted-foreground",children:n("common.loading","å è½½ä¸...")}),i.jsxs("div",{className:"flex items-center justify-end gap-2 px-5 pb-4 pt-1 shrink-0",children:[i.jsx("span",{className:"text-xs text-muted-foreground",children:T?n("art.cameraSwitchOn","å¼å¯"):n("art.cameraSwitchOff","å
³é")}),i.jsx("button",{type:"button",onClick:()=>k(!T),disabled:!d,className:`relative w-9 h-5 rounded-full transition-colors ${T?"bg-[var(--theme)]":"bg-zinc-300 dark:bg-zinc-600"}`,children:i.jsx("div",{className:`absolute top-0.5 w-4 h-4 rounded-full bg-white shadow transition-transform ${T?"translate-x-[18px]":"translate-x-0.5"}`})})]})]}),document.body)]})}const hN=["21:9","16:9","4:3","3:2","1:1","2:3","3:4","9:16","4:5","5:4","9:21"],iZ=10;function oZ({ratio:e,active:t}){const[r,n]=e.split(":").map(Number),s=r/n,a=32;let o,l;return s>=1?(o=a,l=Math.round(a/s)):(l=a,o=Math.round(a*s)),o=Math.max(o,10),l=Math.max(l,10),i.jsx("div",{className:`rounded border-[1.5px] ${t?"border-primary bg-primary/10":"border-muted-foreground/40"}`,style:{width:o,height:l}})}function lZ(e){var s;if(!e)return[{value:5,label:"5s"}];if((s=e.durationSteps)!=null&&s.length)return e.durationSteps.map(a=>({value:a,label:`${a}s`}));const t=e.minDuration||2,r=e.maxDuration||10,n=[];for(let a=t;a<=r;a++)n.push({value:a,label:`${a}s`});return n}function cZ({models:e,selectedModel:t,aspectRatio:r,duration:n,resolution:s,audioEnabled:a,onAspectRatioChange:o,onDurationChange:l,onResolutionChange:u,onAudioEnabledChange:c,promptExtend:d,onPromptExtendChange:h,watermark:m,onWatermarkChange:f,minDurationOverride:p,maxDurationOverride:g,videoInputMode:x,useWebSearch:w,onUseWebSearchChange:y,keepAudio:b,onKeepAudioChange:k,sourceVideoDuration:T}){const[S,j]=v.useState(!1),E=v.useRef(null),A=v.useRef(null),R=e.find(Q=>Q.id===t),M=t==="grok-imagine-video"&&x==="video_continuation",B=t==="grok-imagine-video"&&x==="video_edit",W=((t==null?void 0:t.includes("wan"))??!1)&&(x==="first_frame"||x==="video_continuation"),H=[],L=(R==null?void 0:R.modelFamily)==="happyhorse"&&(x==="first_frame"||x==="video_edit");!M&&!B&&!W&&!L&&H.push(r);const $=(R==null?void 0:R.modelFamily)==="kling-o3"&&x==="video_edit",ee=(R==null?void 0:R.modelFamily)==="happyhorse"&&x==="video_edit";$?T&&T>0&&H.push(`${Math.round(T)}s`):!B&&!ee&&H.push(`${n}s`),!M&&(R!=null&&R.supportedResolutions)&&R.supportedResolutions.length>=1&&H.push(s);const G=H.join(" · ");return v.useEffect(()=>{if(!S)return;const Q=D=>{const K=D.target;E.current&&!E.current.contains(K)&&A.current&&!A.current.contains(K)&&j(!1)};return document.addEventListener("mousedown",Q),()=>document.removeEventListener("mousedown",Q)},[S]),i.jsxs(i.Fragment,{children:[i.jsxs("button",{ref:E,onClick:()=>j(Q=>!Q),className:"flex items-center gap-1 w-fit h-8 px-2.5 text-xs bg-accent/50 hover:bg-accent rounded-lg transition-colors",children:[i.jsx("span",{className:"text-muted-foreground whitespace-nowrap",children:G}),i.jsx(dn,{className:`w-3 h-3 transition-transform ${S?"rotate-180":""}`})]}),S&&fn.createPortal(i.jsx(eI,{ref:A,anchorRef:E,model:R,aspectRatio:r,duration:n,resolution:s,audioEnabled:a,onAspectRatioChange:o,onDurationChange:l,onResolutionChange:u,onAudioEnabledChange:c,promptExtend:d,onPromptExtendChange:h,watermark:m,onWatermarkChange:f,isWanModel:t.includes("wan"),isGrok:t==="grok-imagine-video",minDurationOverride:p,maxDurationOverride:g,videoInputMode:x,useWebSearch:w,onUseWebSearchChange:y,keepAudio:b,onKeepAudioChange:k}),document.body)]})}
1237const eI=v.forwardRef(({anchorRef:e,model:t,aspectRatio:r,duration:n,resolution:s,audioEnabled:a,onAspectRatioChange:o,onDurationChange:l,onResolutionChange:u,onAudioEnabledChange:c,promptExtend:d,onPromptExtendChange:h,watermark:m,onWatermarkChange:f,isWanModel:p,isGrok:g,minDurationOverride:x,maxDurationOverride:w,videoInputMode:y,useWebSearch:b,onUseWebSearchChange:k,keepAudio:T,onKeepAudioChange:S},j)=>{var V,C,O,q;const{t:E}=We(),[A,R]=v.useState({position:"fixed",visibility:"hidden"}),M=v.useRef(null),B=new Set((V=t==null?void 0:t.supportedAspectRatios)!=null&&V.length?t.supportedAspectRatios:hN),W=lZ(t),H=g&&y==="reference"?iZ:null,L=g&&y==="video_continuation";let $=x&&!L?W.filter(ne=>ne.value>x):W;H!=null&&($=$.filter(ne=>ne.value<=H)),L&&($=$.filter(ne=>ne.value>=2&&ne.value<=10)),w!=null&&($=$.filter(ne=>ne.value<=w));const ee=(t==null?void 0:t.supportedResolutions)||[],G=ee.length>=1,Q=ee.length===1,D=(t==null?void 0:t.supportsAudio)!==!1,K=(t==null?void 0:t.modelFamily)==="kling-o3"&&y==="video_edit";return v.useEffect(()=>{const ne=()=>{var Ye,Ae;if(!e.current)return;const he=e.current.getBoundingClientRect(),xe=((Ye=M.current)==null?void 0:Ye.offsetHeight)||400,Oe=((Ae=M.current)==null?void 0:Ae.offsetWidth)||280,Se=4,we=he.top,Be=window.innerHeight-he.bottom,ve=he.left+Oe>window.innerWidth?window.innerWidth-Oe-Se:he.left;we>=xe+Se?R({position:"fixed",left:ve,bottom:window.innerHeight-he.top+Se,zIndex:9999}):Be>=xe+Se?R({position:"fixed",left:ve,top:he.bottom+Se,zIndex:9999}):we>=Be?R({position:"fixed",left:ve,top:Se,maxHeight:we-Se,overflowY:"auto",zIndex:9999}):R({position:"fixed",left:ve,top:he.bottom+Se,maxHeight:Be-Se,overflowY:"auto",zIndex:9999})};return requestAnimationFrame(ne),window.addEventListener("scroll",ne,!0),window.addEventListener("resize",ne),()=>{window.removeEventListener("scroll",ne,!0),window.removeEventListener("resize",ne)}},[e]),i.jsx("div",{ref:j,style:A,children:i.jsxs("div",{ref:M,className:"w-72 p-3 border border-border rounded-lg shadow-xl bg-white dark:bg-zinc-900 space-y-3",children:[!(g&&(y==="video_edit"||y==="video_continuation"))&&!((((C=t==null?void 0:t.id)==null?void 0:C.includes("wan"))??!1)&&(y==="first_frame"||y==="video_continuation"))&&!((t==null?void 0:t.modelFamily)==="happyhorse"&&(y==="first_frame"||y==="video_edit"))&&i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:E("art.size","尺寸")}),i.jsx("div",{className:"grid grid-cols-3 gap-1.5",children:hN.filter(ne=>B.has(ne)).map(ne=>{const he=r===ne;return i.jsxs("button",{onClick:()=>o(ne),className:`flex flex-col items-center justify-center gap-1.5 py-2.5 rounded-md border transition-colors ${he?"border-primary bg-primary/5":"border-border hover:bg-accent"}`,children:[i.jsx(oZ,{ratio:ne,active:he}),i.jsx("span",{className:`text-[10px] ${he?"text-primary font-medium":"text-muted-foreground"}`,children:ne})]},ne)})})]}),!(g&&y==="video_edit")&&!K&&!((t==null?void 0:t.modelFamily)==="happyhorse"&&y==="video_edit")&&i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:E("art.video.duration","æ¶é¿")}),i.jsx("div",{className:"flex flex-wrap gap-1.5",children:$.map(ne=>{const he=n===ne.value;return i.jsx("button",{onClick:()=>l(ne.value),className:`px-3 py-1.5 text-xs rounded-md border transition-colors ${he?"border-primary bg-primary/5 text-primary font-medium":"border-border hover:bg-accent text-foreground"}`,children:ne.label},ne.value)})})]}),G&&!(g&&y==="video_continuation")&&i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:E("art.resolution","å辨ç")}),i.jsx("div",{className:"flex gap-1.5",children:ee.map(ne=>{const he=s===ne;return i.jsx("button",{disabled:Q,onClick:()=>{Q||u(ne)},className:`flex-1 py-1.5 text-xs rounded-md border transition-colors ${he?"border-primary bg-primary/5 text-primary font-medium":"border-border hover:bg-accent text-foreground"} ${Q?"cursor-not-allowed opacity-70":""}`,title:Q?E("video.resolutionFixedTip",{res:ne,defaultValue:"æ¤æ¨¡åå辨çåºå®ä¸º {{res}}"}):void 0,children:ne},ne)})})]}),D&&y!=="video_edit"&&i.jsx("div",{children:i.jsxs("button",{onClick:()=>c(!a),className:`w-full flex items-center gap-2 px-3 py-2 rounded-md border transition-colors ${a?"border-primary bg-primary/5 text-primary":"border-border hover:bg-accent text-foreground"}`,children:[a?i.jsx(Ku,{className:"w-3.5 h-3.5"}):i.jsx(vG,{className:"w-3.5 h-3.5 text-muted-foreground"}),i.jsx("span",{className:"text-xs",children:E("art.video.autoAudio","èªå¨é
é³")})]})}),(p||(((O=t==null?void 0:t.id)==null?void 0:O.startsWith("seedance-2."))??!1))&&(h||f)&&i.jsxs("div",{className:"flex gap-1.5",children:[p&&h&&i.jsx("button",{onClick:()=>h(!d),className:`flex-1 flex items-center justify-center gap-1.5 px-3 py-2 text-xs rounded-md border transition-colors ${d?"border-primary bg-primary/5 text-primary font-medium":"border-border hover:bg-accent text-foreground"}`,children:E("video.promptExtend","æºè½æ¹å")}),f&&i.jsx("button",{onClick:()=>f(!m),className:`flex-1 flex items-center justify-center gap-1.5 px-3 py-2 text-xs rounded-md border transition-colors ${m?"border-primary bg-primary/5 text-primary font-medium":"border-border hover:bg-accent text-foreground"}`,children:E("video.watermark","æ°´å°")})]}),(((q=t==null?void 0:t.id)==null?void 0:q.startsWith("seedance-2."))??!1)&&y==="text"&&k&&i.jsx("button",{onClick:()=>k(!b),className:`w-full flex items-center justify-center gap-1.5 px-3 py-2 text-xs rounded-md border transition-colors ${b?"border-primary bg-primary/5 text-primary font-medium":"border-border hover:bg-accent text-foreground"}`,title:E("video.useWebSearchTip","Let the model search the internet for up-to-date facts (Seedance 2.0 text-to-vi
1237deo only)"),children:E("video.useWebSearch","èç½æç´¢")}),y==="video_edit"&&!g&&S&&i.jsx("button",{onClick:()=>S(!T),className:`w-full flex items-center justify-center gap-1.5 px-3 py-2 text-xs rounded-md border transition-colors ${T?"border-primary bg-primary/5 text-primary font-medium":"border-border hover:bg-accent text-foreground"}`,title:E("video.keepAudioTip","ç¼è¾è§é¢æ¶ä¿çåè§é¢ç声é³è½¨é"),children:E("video.keepAudio","ä¿çå声")})]})})});eI.displayName="VideoParamsPanelPortal";const Jr=ya()(Dw(e=>({model:"",duration:5,aspectRatio:"16:9",resolution:"720p",audioEnabled:!0,promptExtend:!1,watermark:!1,useWebSearch:!1,keepAudio:!0,setModel:t=>e({model:t}),setDuration:t=>e({duration:t}),setAspectRatio:t=>e({aspectRatio:t}),setResolution:t=>e({resolution:t}),setAudioEnabled:t=>e({audioEnabled:t}),setPromptExtend:t=>e({promptExtend:t}),setWatermark:t=>e({watermark:t}),setUseWebSearch:t=>e({useWebSearch:t}),setKeepAudio:t=>e({keepAudio:t})}),{name:"canvas-video-params",version:1,partialize:e=>({model:e.model,duration:e.duration,aspectRatio:e.aspectRatio,resolution:e.resolution,audioEnabled:e.audioEnabled,promptExtend:e.promptExtend,watermark:e.watermark,useWebSearch:e.useWebSearch,keepAudio:e.keepAudio})})),uZ={image:Ss,video:Wo,audio:Jl};function dZ({onLocalUpload:e,onCanvasSelect:t,excludeElementId:r,disabled:n,isUploading:s,label:a="",size:o="sm",canvasFilter:l="image",hideCanvasOption:u=!1,renderTrigger:c}){const{t:d}=We(),[h,m]=v.useState(!1),[f,p]=v.useState(!1),{openPicker:g,PickerElement:x}=Rj(),w=A3[o],y=uZ[l]||Ss,b=n||s,k=()=>{n||s||m(!0)},T=()=>{m(!1),p(!1)},S=()=>{T(),e()},j=async()=>{T();const M=await g(l==="video"?"video":l==="audio"?"audio":"image");M&&t(M.url,{assetId:M.id})},E=()=>{m(!1),p(!0)},A=()=>{const R=$n.getState().elements;return l==="audio"?R.filter(M=>{if(M.type!=="audio"||M.id===r)return!1;const B=M.data;return(B.resolvedUrl||B.url)&&!B.placeholder}).map((M,B)=>{const W=M.data;return{id:M.id,url:W.resolvedUrl||W.url,assetId:M.assetId||void 0,cover:void 0,label:d("art.genStatus.audioLabel","é³é¢")+` ${B+1}`,type:"audio"}}):l==="video"?R.filter(M=>{if(M.type!=="video"||M.id===r)return!1;const B=M.data;return(B.resolvedUrl||B.url)&&!B.placeholder}).map((M,B)=>{const W=M.data;return{id:M.id,url:W.resolvedUrl||W.url,assetId:W.videoAssetId||M.assetId||void 0,cover:W.coverUrl,label:d("art.genStatus.videoLabel","è§é¢")+` ${B+1}`,type:"video"}}):R.filter(M=>{if(M.type!=="image"||M.id===r)return!1;const B=M.data;return((B.images?B.images[B.coverIndex??0]||B.images[0]:null)||B.resolvedUrl||B.url)&&!B.placeholder}).map((M,B)=>{const W=M.data,H=(W.images?W.images[W.coverIndex??0]||W.images[0]:null)||W.resolvedUrl||W.url;return{id:M.id,url:H,assetId:M.assetId||W.assetId||void 0,cover:void 0,label:d("art.genStatus.refImage","å¾ç")+` ${B+1}`,type:"image"}})};return i.jsxs(i.Fragment,{children:[c?c(k):i.jsx("button",{onClick:k,disabled:b,className:`${w.box} ${BQ} ${b?$Q:UQ}`,title:a,children:s?i.jsx(kn,{className:`${w.icon} animate-spin text-[var(--text-tertiary)]`}):i.jsxs(i.Fragment,{children:[i.jsx(y,{className:`${l==="audio"?w.iconAudio:w.icon} text-[var(--text-tertiary)]`}),i.jsx("span",{className:`${w.label} text-[var(--text-tertiary)]`,children:a})]})}),h&&i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:T,children:[i.jsx("div",{className:"absolute inset-0 bg-black/60"}),i.jsx("div",{className:"relative z-10 w-[280px] rounded-2xl shadow-2xl overflow-hidden",style:{background:"var(--bg-primary)"},onClick:R=>R.stopPropagation(),children:i.jsxs("div",{className:"p-2",children:[i.jsxs("button",{onClick:S,className:"w-full flex items-center gap-3 px-4 py-3 rounded-xl transition-colors hover:bg-[var(--bg-tertiary)]",children:[i.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{background:"rgba(99, 102, 241, 0.15)"},children:i.jsx(O9,{className:"w-[18px] h-[18px]",style:{color:"var(--accent-primary)"}})}),i.jsxs("div",{className:"text-left",children:[i.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:d("common.localUpload","æ¬å°ä¸ä¼ ")}),i.jsx("p",{className:"text-xs mt-0.5",style:{color:"var(--text-tertiary)"},children:d("assets.picker.localDesc","ä»çµèéæ©æä»¶")})]})]}),i.jsx("div",{className:"mx-4 border-t",style:{borderColor:"var(--border-default)"}}),i.jsxs("button",{onClick:j,className:"w-full flex items-center gap-3 px-4 py-3 rounded-xl transition-colors hover:bg-[var(--bg-tertiary)]",children:[i.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{background:"rgba(16, 185, 129, 0.15)"},children:i.jsx(em,{className:"w-[18px] h-[18px]",style:{color:"#10b981"}})}),i.jsxs("div",{className:"text-left",children:[i.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:d("assets.picker.fromLibrary")}),i.jsx("p",{className:"text-xs mt-0.5",style:{color:"var(--text-tertiary)"},children:d("assets.picker.libraryDesc","ä»å·²æèµæºä¸éæ©")})]})]}),!u&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"mx-4 border-t",style:{borderColor:"var(--border-default)"}}),i.jsxs("button",{onClick:E,className:"w-full flex items-center gap-3 px-4 py-3 rounded-xl transition-colors hover:bg-[var(--bg-tertiary)]",children:[i.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{background:"rgba(245, 158, 11, 0.15)"},children:i.jsx(r3,{className:"w-[18px] h-[18px]",style:{color:"#f59e0b"}})}),i.jsxs("div",{className:"text-left",children:[i.jsx("p",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:d("assets.picker.fromCanvas","ä»ç»å¸éæ©")}),i.jsx("p",{className:"text-xs mt-0.5",style:{color:"var(--text-tertiary)"},children:d("assets.picker.canvasDesc","éæ©ç»å¸ä¸çå
ç´ ")})]})]})]})]})})]}),f&&i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:T,children:[i.jsx("div",{className:"absolute inset-0 bg-black/60"}),i.jsxs("div",{className:"relative z-10 w-[320px] max-h-[400px] rounded-2xl shadow-2xl overflow-hidden flex flex-col",style:{background:"var(--bg-primary)"},onClick:R=>R.stopPropagation(),children:[i.jsx("div",{className:"px-5 py-4 border-b",style:{borderColor:"var(--border-default)"},children:i.jsx("h3",{className:"text-sm font-semibold",style:{color:"var(--text-primary)"},children:l==="audio"?d("assets.picker.canvasAudio","ç»å¸ä¸çé³é¢"):l==="video"?d("assets.picker.canvasVideo","ç»å¸ä¸çè§é¢"):d("assets.picker.canvasImage","ç»å¸ä¸çå¾ç")}
1237)}),i.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:(()=>{const R=A();return R.length===0?i.jsx("div",{className:"py-8 text-center",children:i.jsx("p",{className:"text-sm",style:{color:"var(--text-tertiary)"},children:l==="audio"?d("assets.picker.noCanvasAudio","ç»å¸ä¸æ²¡æé³é¢"):l==="video"?d("assets.picker.noCanvasVideo","ç»å¸ä¸æ²¡æè§é¢"):d("assets.picker.noCanvasImage","ç»å¸ä¸æ²¡æå¾ç")})}):R.map(M=>i.jsxs("button",{className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors hover:bg-[var(--bg-tertiary)]",onClick:()=>{t(M.url,{assetId:M.assetId,coverUrl:M.cover}),T()},children:[M.type==="image"?i.jsx("img",{src:M.url,alt:"",crossOrigin:Hr(M.url),className:"w-10 h-10 rounded-lg object-cover flex-shrink-0"}):M.type==="video"?i.jsx("video",{src:M.url,muted:!0,preload:"metadata",crossOrigin:Hr(M.url),className:"w-10 h-10 rounded-lg object-cover flex-shrink-0"}):i.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:"var(--bg-tertiary)"},children:i.jsxs("svg",{className:"w-5 h-5",style:{color:"var(--text-tertiary)"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"M9 18V5l12-2v13"}),i.jsx("circle",{cx:"6",cy:"18",r:"3"}),i.jsx("circle",{cx:"18",cy:"16",r:"3"})]})}),i.jsx("span",{className:"text-sm truncate",style:{color:"var(--text-primary)"},children:M.label})]},M.id))})()})]})]}),x]})}function mN({url:e,type:t="image",size:r="sm",onRemove:n,mentionLabel:s,emphasized:a=!0,crossOrigin:o=!1}){const l=A3[r],u=a?"border-[var(--theme)]":"border-[var(--border-default)]";return i.jsxs("div",{className:`group/box relative ${l.box} shrink-0`,children:[i.jsxs("div",{className:`absolute inset-0 rounded-xl overflow-hidden border-2 border-solid ${u} bg-[var(--bg-tertiary)]`,children:[t==="image"&&i.jsx("img",{src:e,alt:"",crossOrigin:o?"anonymous":Hr(e),className:"w-full h-full object-cover"}),t==="video"&&i.jsx("video",{src:e,className:"w-full h-full object-cover",muted:!0,preload:"metadata",crossOrigin:o?"anonymous":Hr(e)}
1237),t==="audio"&&i.jsx("div",{className:"w-full h-full flex items-center justify-center",children:i.jsx(Jl,{className:`${l.iconAudio} text-[var(--theme)]`})}),s&&i.jsx("span",{className:`absolute bottom-0 left-0 right-0 text-center ${l.mentionLabel} bg-black/60 text-white truncate`,children:s})]}),i.jsx("button",{type:"button",onClick:n,className:`absolute ${l.closeBtn} bg-red-500 text-white rounded-full flex items-center justify-center hover:bg-red-600 z-10 opacity-0 group-hover/box:opacity-100 transition-opacity`,children:i.jsx(cr,{className:l.closeIcon})})]})}function hZ({items:e,activeIndex:t,onSelect:r,anchorEl:n}){const s=v.useRef(null),a=v.useRef(null),[o,l]=v.useState(null);v.useLayoutEffect(()=>{if(!n){l(null);return}const m=()=>{const f=n.getBoundingClientRect();l({left:f.left,top:f.top-8,width:f.width})};return m(),window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),()=>{window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m)}},[n,e.length]),v.useEffect(()=>{var m;(m=a.current)==null||m.scrollIntoView({block:"nearest"})},[t]);const u=[];let c=null;e.forEach((m,f)=>{(!c||c.category!==m.category)&&(c={category:m.category,items:[]},u.push(c)),c.items.push({item:m,globalIndex:f})});const d=m=>{const f=m.label.toLowerCase();return f.startsWith("audio")?i.jsx("div",{className:"w-8 h-8 rounded bg-sky-500/20 text-sky-600 flex items-center justify-center",children:i.jsx(Jl,{className:"w-4 h-4"})}):f.startsWith("video")?i.jsx("div",{className:"w-8 h-8 rounded bg-sky-500/20 text-sky-600 flex items-center justify-center",children:i.jsx(Wo,{className:"w-4 h-4"})}):m.thumbnail?i.jsx("img",{src:m.thumbnail,alt:"",crossOrigin:Hr(m.thumbnail),className:"w-8 h-8 rounded object-cover shrink-0"}):m.type==="attachment"?i.jsx(Ss,{className:"w-4 h-4 text-muted-foreground"}):f.includes("shape")||f.includes("å½¢ç¶")?i.jsx(dG,{className:"w-4 h-4 text-muted-foreground"}):f.includes("ellipse")||f.includes("æ¤å")?i.jsx(kV,{className:"w-4 h-4 text-muted-foreground"}):f.includes("line")||f.includes("线æ¡")?i.jsx(N9,{className:"w-4 h-4 text-muted-foreground"}):f.includes("drawing")||f.includes("ç»ç¬")?i.jsx(C9,{className:"w-4 h-4 text-muted-foreground"}):i.jsx(yG,{className:"w-4 h-4 text-muted-foreground"})},h=()=>i.jsx(i.Fragment,{children:u.map(m=>i.jsxs("div",{children:[i.jsx("div",{className:"px-3 py-1 text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:m.category}),m.items.map(({item:f,globalIndex:p})=>i.jsxs("button",{ref:p===t?a:void 0,onMouseDown:g=>{g.preventDefault(),r(f)},className:`w-full px-3 py-1.5 flex items-center gap-2 text-left text-sm transition-colors ${p===t?"bg-accent":"hover:bg-accent/50"}`,children:[i.jsx("div",{className:"w-8 h-8 flex items-center justify-center shrink-0",children:d(f)}),i.jsx("span",{className:"truncate",children:f.label})]},f.id))]},m.category))});return n&&o?fn.createPortal(i.jsx("div",{ref:s,style:{position:"fixed",left:o.left,top:o.top,width:o.width,transform:"translateY(-100%)",zIndex:9999},className:"py-1 border border-border rounded-xl shadow-xl max-h-52 overflow-y-auto bg-card",children:h()}),document.body):i.jsx("div",{ref:s,className:"absolute left-0 bottom-full z-[100] w-full mb-1 py-1 border border-border rounded-xl shadow-xl max-h-52 overflow-y-auto bg-card",children:h()})}function mZ(e){const[t,r]=v.useState(!1),[n,s]=v.useState(""),[a,o]=v.useState(0),[l,u]=v.useState(0),[c,d]=v.useState({}),h=v.useMemo(()=>{if(!n)return e;const y=n.toLowerCase();return e.filter(b=>b.label.toLowerCase().includes(y))},[e,n]),m=v.useCallback((y,b)=>{let k=-1;for(let T=b-1;T>=0;T--){const S=y[T];if(S==="@"){k=T;break}if(S===" "||S===` 1238`)break}k>=0?(u(k),s(y.slice(k+1,b)),o(0),r(!0)):r(!1)},[]),f=v.useCallback((y,b)=>{const k=b.slice(0,l),T=b.slice(l+1+n.length),S=`@${y.label}`,j=k+S+T,E=k.length+S.length;return d(A=>({...A,[y.label]:{type:y.type,id:y.id}})),r(!1),s(""),{text:j,cursorPos:E}},[l,n]),p=v.useCallback(y=>{if(!t)return{handled:!1};if(y.key==="Escape")return y.preventDefault(),r(!1),{handled:!0};if(h.length>0){if(y.key==="ArrowDown")return y.preventDefault(),o(b=>(b+1)%h.length),{handled:!0};if(y.key==="ArrowUp")return y.preventDefault(),o(b=>(b-1+h.length)%h.length),{handled:!0};if(y.key==="Enter")return y.preventDefault(),{handled:!0,selectedItem:h[a]}}return{handled:!1}},[t,h,a]),g=v.useCallback(y=>{let b=y;for(const[k,T]of Object.entries(c))b=b.split(`@${k}`).join(`@[${k}](${T.type}:${T.id})`);return b},[c]),x=v.useCallback(()=>{r(!1),s("")},[]),w=v.useCallback(()=>{d({})},[]);return{showMention:t,filteredItems:h,mentionIndex:a,mentionMap:c,onTextChange:m,insertMention:f,handleMentionKeyDown:p,resolveMentions:g,closeMention:x,clearMentionMap:w}}function fZ(e,t,r,n){const[s,a]=v.useState(void 0),[o,l]=v.useState(!1),u=v.useRef(new Map),c=[];e==="reference"?(r&&c.push(...r),t&&c.push(t)):e==="video_edit"&&t?c.push(t):e==="video_continuation"&&n&&c.push(n);const d=c.join("|");return v.useEffect(()=>{if(c.length===0){a(void 0),l(!1);return}const h=15;if(c.every(p=>u.current.has(p))){const p=c.reduce((g,x)=>g+Math.min(u.current.get(x)??0,h),0);a(p>0?p:void 0),l(!1);return}l(!0);let f=!1;return(async()=>{let p=0;for(const g of c){let x=u.current.get(g);if(x==null){const w=await Mj(g);w!=null&&w>0&&(u.current.set(g,w),x=w)}x!=null&&(p+=Math.min(x,h))}f||(a(p>0?p:void 0),l(!1))})(),()=>{f=!0}},[d]),{duration:s,isProbing:o}}function pZ(e,t){const r=v.useRef(!0);v.useEffect(()=>{if(e){if(r.current){r.current=!1;return}for(const n of t)n()}},[e])}function gZ(e,t){if(!e||e.validated!==!0)return{isValid:!0,issues:[]};const r=e.slots;if(!r||r.length===0)return{isValid:!0,issues:[]};const n=[];for(const a of r)a.optional||a.groupKey||fN(a,t)===0&&n.push({slot:a,reason:"slot_required"});const s=new Map;for(const a of r)a.groupKey&&(s.has(a.groupKey)||s.set(a.groupKey,[]),s.get(a.groupKey).push(a));for(const a of s.values()){const o=a.reduce((c,d)=>c+fN(d,t),0);a.some(c=>c.groupRequired===!0)&&o===0&&n.push({slot:a[0],reason:"group_required",groupSlots:a});const u=Math.max(0,...a.map(c=>c.groupMax??0));u>0&&o>u&&n.push({slot:a[0],reason:"group_exceeds_max",groupSlots:a,groupMax:u,groupCurrent:o})}return{isValid:n.length===0,issues:n}}function xZ(e,t){if(t.reason==="slot_required")return e("video.toast.requiredField",{field:e(t.slot.labelKey)});if(t.reason==="group_required"){const r=(t.groupSlots??[t.slot]).map(n=>e(n.labelKey)).join(" / ");return e("video.toast.requiredOneOf",{fields:r})}if(t.reason==="group_exceeds_max"){const r=(t.groupSlots??[t.slot]).map(n=>e(n.labelKey)).join(" / ");return e("video.toast.groupExceedsMax",{fields:r,max:t.groupMax,current:t.groupCurrent})}return""}function fN(e,t){var r,n,s,a,o;switch(e.role){case"first_frame":return t.startFrameUrl?1:0;case"last_frame":return t.endFrameUrl?1:0;case"source":return t.referenceVideoUrl?1:0;case"parent":return t.continuationVideoUrl?1:0;case"driving_audio":return t.audioUrl?1:0;case"voice_clone":return(t.referenceVoiceUrl?1:0)+(((r=t.referenceVoiceUrls)==null?void 0:r.length)??0);case"reference":return e.type==="image"?((n=t.elements)==null?void 0:n.length)??0:e.type==="video"?((s=t.referenceVideoUrls)==null?void 0:s.length)??0:e.type==="audio"?((a=t.referenceAudioUrls)==null?void 0:a.length)??0:0;case"style_reference":return((o=t.referenceImageUrls)==null?void 0:o.length)??0;default:return 0}}const pg=[{groupKey:"basic",groupZh:"åºç¡åºå®",groupEn:"Basic / Fixed",items:[{key:"static",labelZh:"åºå®æºä½",labelEn:"Static",promptZh:"éå¤´ä¿æå®å ¨åº
1238å®ï¼æºä½ä¸å¨ã䏿䏿ï¼ç»é¢ç¨³å®åç°ä¸»ä½ï¼æå¾å§ç»ä¸å"},{key:"pan_left",labelZh:"é头左æ",labelEn:"Pan Left",promptZh:"æå½±æºæºä½ä¿æä¸å¨ï¼é头沿水平轴å左平稳ææï¼Pan Leftï¼ï¼è§è§ç¼ç¼æ«åç»é¢å·¦ä¾§ï¼åç°å·¦ä¾§çç¯å¢ä¸ä¸»ä½"},{key:"pan_right",labelZh:"é头峿",labelEn:"Pan Right",promptZh:"æå½±æºæºä½ä¿æä¸å¨ï¼é头沿水平轴åå³å¹³ç¨³ææï¼Pan Rightï¼ï¼è§è§ç¼ç¼æ«åç»é¢å³ä¾§ï¼åç°å³ä¾§çç¯å¢ä¸ä¸»ä½"},{key:"tilt_up",labelZh:"é头䏿",labelEn:"Tilt Up",promptZh:"é头ä»ä½å¤ç¼ç¼åä¸ä»°æï¼Tilt Upï¼ï¼è§è§ç±å°é¢æä½ç¹éæ¸æ¬åå°å¤©ç©ºæé«å¤ï¼å¼ºè°é«åº¦ä¸ç©ºé´çºµæ·±"},{key:"tilt_down",labelZh:"é头䏿",labelEn:"Tilt Down",promptZh:"é头ä»é«å¤ç¼ç¼åä¸ä¿¯æï¼Tilt Downï¼ï¼è§è§ç±å¤©ç©ºæé«ç¹éæ¸è½å°å°é¢ï¼åç°èªä¸èä¸ç空é´è¿æ¸¡"}]},{groupKey:"dolly",groupZh:"æ¨æ",groupEn:"Dolly",items:[{key:"dolly_in",labelZh:"é头æ¨è¿",labelEn:"Dolly In",promptZh:"æå½±æºæ´ä½æ²¿å
è½´å䏻使¨è¿ï¼Dolly Inï¼ï¼éè§å缩ï¼ä¸»ä½å¨ç»é¢ä¸éæ¸æ¾å¤§ï¼å¨å´ç¯å¢éæ¥èå"},{key:"dolly_out",labelZh:"é头æè¿",labelEn:"Dolly Out",promptZh:"æå½±æºæ´ä½æ²¿å
è½´å忤éï¼Dolly Outï¼ï¼ä¸»ä½å¨ç»é¢ä¸éæ¸åå°ï¼å¨å´ç¯å¢ä¸ç©ºé´å
³ç³»éæ¥å±å¼"},{key:"push_follow",labelZh:"è·éæ¨è¿",labelEn:"Push Follow",promptZh:"æå½±æºè´´è¿ä¸»ä½æç»å忍è¿ï¼ä¸»ä½å¨ç»é¢ä¸ç¨³å®å±
ä¸ï¼èæ¯ååå¿«ééå»ï¼è¥é 代å
¥æä¸å¨å¿"}]},{groupKey:"zoom",groupZh:"åç¦",groupEn:"Zoom",items:[{key:"zoom_in",labelZh:"åç¦æ¨è¿",labelEn:"Zoom In",promptZh:"æå½±æºæºä½ä¸å¨ï¼éè¿å
å¦åç¦å°ç¦è·æé¿ï¼Zoom Inï¼ï¼ä¸»ä½å¨ç»é¢ä¸å¹³ç¨³æ¾å¤§ï¼éè§å
³ç³»ä¿æä¸å"},{key:"zoom_out",labelZh:"åç¦æè¿",labelEn:"Zoom Out",promptZh:"æå½±æºæºä½ä¸å¨ï¼éè¿å
å¦åç¦å°ç¦è·ç¼©çï¼Zoom Outï¼ï¼ä¸»ä½å¨ç»é¢ä¸å¹³ç¨³ç¼©å°ï¼è§éèå´ä¸ææ©å±"}]},{groupKey:"orbit",groupZh:"ç¯ç»",groupEn:"Orbit",items:[{key:"orbit_left",labelZh:"å·¦ç¯ç»",labelEn:"Orbit Left",promptZh:"æå½±æºå´ç»ä¸»ä½æ²¿å¼§å½¢è½¨ééæ¶éç¯ç»ææï¼Orbit Leftï¼ï¼ä¸»ä½å§ç»ä¿æå¨ç»é¢ä¸å¿ï¼èæ¯éæºä½æµç
åå"},{key:"orbit_right",labelZh:"å³ç¯ç»",labelEn:"Orbit Right",promptZh:"æå½±æºå´ç»ä¸»ä½æ²¿å¼§å½¢è½¨é顺æ¶éç¯ç»ææï¼Orbit Rightï¼ï¼ä¸»ä½å§ç»ä¿æå¨ç»é¢ä¸å¿ï¼èæ¯éæºä½æµç
åå"},{key:"orbit_360",labelZh:"360 度ç¯ç»",labelEn:"Orbit 360",promptZh:"æå½±æºå´ç»ä¸»ä½å®æä¸æ´å 360 度æµç
ç¯ç»ï¼ä¸»ä½å§ç»å±
ä¸ï¼èæ¯åç°å®æ´ç空é´å
³ç³»ï¼å¯æå±ç¤ºæ"},{key:"semi_arc",labelZh:"ååå¼§ç§»",labelEn:"Semi Arc",promptZh:"æå½±æºæ²¿åå弧轨迹ä»ä¸ä¾§æ»è¡å°å¦ä¸ä¾§ï¼Semi Arcï¼ï¼å´ç»ä¸»ä½åç°çº¦ 180 度çè§è§ååï¼å¼ºè°ç©ºé´ç«ä½æ"}]},{groupKey:"crane",groupZh:"åé",groupEn:"Crane",items:[{key:"crane_up",labelZh:"é头åé«",labelEn:"Crane Up",promptZh:"æå½±æºæ´ä½æ²¿åç´æ¹åå䏿¬åï¼Crane Up / Boom Upï¼ï¼æºä½ç±ä½å°é«ï¼å±ç°ä¸»ä½å¨å´ç空é´ä¸é«åº¦å
³ç³»"},{key:"crane_down",labelZh:"é头éä½",labelEn:"Crane Down",promptZh:"æå½±æºæ´ä½æ²¿åç´æ¹ååä¸éè½ï¼Crane Down / Boom Downï¼ï¼æºä½ç±é«å°ä½ï¼éæ¥è´´è¿ä¸»ä½ä¸å°é¢"},{key:"arc_crane",labelZh:"å¼§å½¢åé",labelEn:"Arc Crane",promptZh:"æå½±æºæ²¿å¼§å½¢è½¨è¿¹åæ¶å®æåéä¸å¹³ç§»ï¼Arc Craneï¼ï¼ç©ºé´æå¤åååï¼åç°çµå½±çº§çæµç
è¿å¨"}]},{groupKey:"tracking",groupZh:"è·æ",groupEn:"Tracking",items:[{key:"track_front",labelZh:"åè·é",labelEn:"Track Front",promptZh:"æå½±æºä½äºä¸»ä½åæ¹å¹¶ä¿æçè·ï¼é主ä½åè¿æç»åéè·æï¼Tracking Frontï¼ï¼ä¸»ä½å§ç»æ£å¯¹é头ï¼èæ¯å¿«éååæµæ·"},{key:"track_back",labelZh:"åè·é",labelEn:"Track Back",promptZh:"æå½±æºä½äºä¸»ä½åæ¹å¹¶ä¿æçè·ï¼é主ä½åè¿æç»ååè·æï¼Tracking Backï¼ï¼ä¸»ä½èå½±å±
ä¸ï¼å¸¦æ¥å¼ºç代å
¥æ"},{key:"track_side",labelZh:"ä¾§è·é",labelEn:"Track Side",promptZh:"æå½±æºä½äºä¸»ä½ä¾§é¢å¹¶ä¿æç
1238è·ï¼é主ä½è¡è¿åæ¥æ¨ªåå¹³ç§»è·æï¼Tracking Sideï¼ï¼åç°ä¾§é¢è½®å»ä¸åè¿èå¥"},{key:"pov",labelZh:"第ä¸äººç§° POV",labelEn:"POV",promptZh:"第ä¸äººç§°ä¸»è§è§è§ï¼POVï¼ï¼é头模æä¸»ä½ç¼ççä½ç½®ä¸å¨ä½ï¼åæ¹ç¯å¢é主ä½å¨ä½èªç¶æå¨ï¼å¸¦æ¥æ²æµ¸ä½éª"}]},{groupKey:"handheld",groupZh:"ææ / 稳å®å¨",groupEn:"Handheld / Steadicam",items:[{key:"handheld",labelZh:"æææå¨",labelEn:"Handheld",promptZh:"æææå½±ï¼Handheldï¼é£æ ¼ï¼é头带æèªç¶ç轻微æå¨ä¸ä¸è§åæå¨ï¼å¸¦æ¥çå®ã纪å½çè¬çä¸´åºæ"},{key:"steadicam",labelZh:"稳å®å¨è·é",labelEn:"Steadicam",promptZh:"稳å®å¨è·éè¿å¨ï¼Steadicamï¼ï¼é头å¨å¤æç¯å¢ä¸ä¿æä¸æ»æµç
ç平移ä¸åéï¼è¿å¨è½¨è¿¹è¿è´¯ï¼å 乿 æå¨"}]},{groupKey:"special",groupZh:"ç¹æ® / çµå½±çº§",groupEn:"Special / Cinematic",items:[{key:"vertigo",labelZh:"å¸åºæ¯å
åç¦",labelEn:"Vertigo",promptZh:"ç»å
¸å¸åºæ¯å
åç¦ææï¼Dolly Zoom / Vertigo Effectï¼ï¼æå½±æºå忍è¿çåæ¶åç¦æè¿ï¼ä¸»ä½å¤§å°ä¸åãèæ¯éè§å§çå缩ï¼å¶é ç©ææ"},{key:"dutch_angle",labelZh:"è·å
°è§å¾æ",labelEn:"Dutch Angle",promptZh:"è·å
°è§å¾ææå¾ï¼Dutch Angleï¼ï¼æå½±æºæ²¿å
è½´æ´ä½å¾æçº¦ 15 è³ 30 度ï¼ç»é¢åç°å¾æå°å¹³çº¿ï¼è¥é ç´§å¼ ä¸å¤±è¡¡çæ
绪"},{key:"worms_eye",labelZh:"è¶
ä½è§åº¦ä»°æ",labelEn:"Worm's Eye",promptZh:"è¶
ä½è§åº¦ä»°æï¼Worm's Eye Viewï¼ï¼æå½±æºå ä¹è´´è¿å°é¢åä¸ä»°è§ä¸»ä½ï¼ä¸»ä½æ¾å¾é«å¤§ãå
·æåè¿«æä¸å²è¯æ"},{key:"birds_eye",labelZh:"é¸ç°ä¿¯æ",labelEn:"Bird's Eye",promptZh:"é¸ç°ä¿¯æè§è§ï¼Bird's Eye Viewï¼ï¼æå½±æºä»æé«å¤åç´å䏿æï¼åç°å®æ´ç©ºé´å¸å±ä¸å 使å¾"},{key:"subtle_shake",labelZh:"é头轻微æå¨",labelEn:"Subtle Shake",promptZh:"éå¤´ä¿æåºæ¬ç¨³å®ï¼å å é常ç»å¾®çèªç¶æå¨ï¼Subtle Shakeï¼ï¼å¸¦æ¥çå®å¼å¸æä½ä¸å¹²æ°ä¸»ä½æ¸
æ°åº¦"},{key:"bullet_time",labelZh:"åå¼¹æ¶é´",labelEn:"Bullet Time",promptZh:"åå¼¹æ¶é´ææï¼Bullet Timeï¼ï¼å´ç»ä¸»ä½ç 360 度é«éè¿½è¸ªï¼æ¶é´æåº¦æ¾æ
¢åç°å»ç»æï¼ä¸»ä½å¨ä½è¢«å®æ ¼ãé头æ¥éè¿å¨"},{key:"slider_truck",labelZh:"æ»è½¨å¹³ç§»",labelEn:"Slider Truck",promptZh:"æ»è½¨å¹³ç§»è¿éï¼Slider / Truckï¼ï¼æå½±æºæ²¿æ°´å¹³ç´çº¿è½¨é平稳横移ï¼åæ¯ä¸èæ¯åç°æ¸
æ°çè§å·®å
³ç³»"}]}],bZ=pg.reduce((e,t)=>{for(const r of t.items)e[r.key]=r;return e},{}),tI=[{d:"M839.8 364.5h-75.5S732 256.7 645.7 256.7h-86.2c-86.2 0-118.6 107.8-118.6 107.8H279.2c-59.3 0-107.8 48.5-107.8 107.8v301.9c0 59.3 48.5 107.8 107.8 107.8h560.6c59.3 0 107.8-48.5 107.8-107.8V472.3c0.1-59.3-48.5-107.8-107.8-107.8z",opacity:.35},{d:"M538 450.8c59.4 0 107.8 48.4 107.8 107.8S597.4 666.4 538 666.4 430.2 618 430.2 558.6 478.5 450.8 538 450.8m0-64.7c-95.3 0-172.5 77.2-172.5 172.5S442.7 731.1 538 731.1s172.5-77.2 172.5-172.5S633.2 386.1 538 386.1z"},{d:"M775.2 299.8h-75.5S667.4 192 581.1 192h-86.2c-86.2 0-118.6 107.8-118.6 107.8H214.5c-59.3 0-107.8 48.5-107.8 107.8v301.9c0 59.3 48.5 107.8 107.8 107.8h560.6c59.3 0 107.8-48.5 107.8-107.8V407.6c0.1-59.3-48.4-107.8-107.7-107.8z m43.1 409.7c0 23.4-19.7 43.1-43.1 43.1H214.5c-23.4 0-43.1-19.7-43.1-43.1V407.6c0-23.4 19.7-43.1 43.1-43.1h161.7c28.2 0 53.3-18.8 61.8-45.7 0.2-0.6 21.3-62.2 56.8-62.2H581c35.5 0 56.6 61.5 56.6 61.7 8.2 27.4 33.4 46.1 62 46.1h75.5c23.4 0 43.1 19.7 43.1 43.1v302z"},{d:"M764.4 386.1h-43.1c-11.9 0-21.6 9.7-21.6 21.6s9.7 21.6 21.6 21.6h43.1c11.9 0 21.6-9.7 21.6-21.6s-9.8-21.6-21.6-21.6zM300.8 235.1h-64.7c-11.9 0-21.6 9.7-21.6 21.6v21.6h107.8v-21.6c0-11.9-9.7-21.6-21.5-21.6z"}];function hve({className:e,size:t}){return i.jsx("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,className:e,fill:"
1238currentColor",children:tI.map((r,n)=>i.jsx("path",{d:r.d,opacity:r.opacity},n))})}function yZ(e=12,t="display:inline-block;vertical-align:-2px;margin-right:3px"){const r=tI.map(n=>`<path d="${n.d}"${n.opacity!==void 0?` opacity="${n.opacity}"`:""}/>`).join("");return`<svg viewBox="0 0 1024 1024" width="${e}" height="${e}" fill="currentColor" style="${t}">${r}</svg>`}const Xd="bg-sky-500/10 text-sky-600 border border-sky-500/40",vZ={"emotion-open":"bg-violet-500/20 text-violet-600 border border-violet-500/25","emotion-close":"bg-violet-500/20 text-violet-600 border border-violet-500/25",interjection:"bg-amber-500/15 text-amber-600 border border-amber-500/25",pause:"bg-primary/15 text-primary border border-primary/25",camera:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/40","mention-image":Xd,"mention-video":Xd,"mention-audio":Xd,"mention-element":Xd,"mention-name":Xd},wZ="inline-flex items-center gap-1 px-1 py-1 mx-0.5 -mt-0.5 rounded text-[13px] font-medium cursor-pointer select-none",EZ="display:inline-flex;align-items:center;justify-content:center;width:13px;height:13px;background:rgba(14,165,233,0.22);border-radius:3px;vertical-align:middle;flex-shrink:0",ef='viewBox="0 0 24 24" width="10" height="10" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" style="display:block"';function Zd(e){let t;return e==="image"?t=`<svg ${ef}><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>`:e==="video"?t=`<svg ${ef}><path d="m22 8-6 4 6 4V8Z"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>`:e==="audio"?t=`<svg ${ef}><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg>`:t=`<svg ${ef}><circle cx="12" cy="12" r="4"/><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"/></svg>`,`<span style="${EZ}">${t}</span>`}function hb(e){return`<img src="${kZ(e)}" alt="" style="width:13px;height:13px;border-radius:3px;object-fit:cover;display:block;flex-shrink:0" />`}function pN(e){return e.replace(/[&<>]/g,t=>({"&":"&","<":"<",">":">"})[t])}function kZ(e){return e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}const NZ=/\[camera:[a-z_0-9]+\]|\[\/([a-zA-Z]+)\]|\[([a-zA-Z]+)\]|\([a-z ]+\)|<#[\d.]+#>|@(?:image|video|audio)\s+\d+|@(?:Image|Video|Audio|Element)\d+|@[^\s@\[\]<>]+(?:\s+\d+)?/g;function SZ(e){return e.startsWith("[camera:")?"camera":e.startsWith("[/")?"emotion-close":e.startsWith("[")?"emotion-open":e.startsWith("(")?"interjection":/^@(?:Image\d+|image\s+\d+)$/.test(e)?"mention-image":/^@(?:Video\d+|video\s+\d+)$/.test(e)?"mention-video":/^@(?:Audio\d+|audio\s+\d+)$/.test(e)?"mention-audio":/^@(?:Element\d+|element\s+\d+)$/.test(e)?"mention-element":e.startsWith("@")?"mention-name":"pause"}function TZ(e,t,r){var c,d,h,m,f,p,g,x,w;if(e==="mention-image"){const y=parseInt(((c=t.match(/\d+/))==null?void 0:c[0])??"0",10),b=(d=r==null?void 0:r.images)==null?void 0:d.find(S=>S.index===y),k=b==null?void 0:b.thumb,T=(b==null?void 0:b.url)??(b==null?void 0:b.thumb);return{iconHtml:k?hb(k):Zd("image"),tipKind:T?"image":void 0,tipUrl:T}}if(e==="mention-video"){const y=parseInt(((h=t.match(/\d+/))==null?void 0:h[0])??"0",10),b=(m=r==null?void 0:r.videos)==null?void 0:m.find(T=>T.index===y),k=b==null?void 0:b.url;return{iconHtml:Zd("video"),tipKind:k?"video":void 0,tipUrl:k}}if(e==="mention-audio"){const y=parseInt(((f=t.match(/\d+/))==null?void 0:f[0])??"0",10),b=(p=r==null?void 0:r.audios)==null?void 0:p.find(T=>T.index===y),k=b==null?void 0:b.url;return{iconHtml:Zd("audio"),tipKind:k?"audio":void 0,tipUrl:k}}if(e==="mention-element"){const y=parseInt(((g=t.match(/\d+/))==null?void 0:g[0])??"0",10),b=(x=r==null?void 0:r.elements)==null?void 0:x.find(S=>S.index===y),k=b==null?void 0:b.thumb,T=(b==null?void 0:b.url)??(b==null?void 0:b.thumb);return{iconHtml:k?hb(k):Zd("image"),tipKind:T?"image":void 0,tipUrl:T}}const n=t.slice(1),s=(w=r==null?void 0:r.names)==null?void 0:w[n],a=s==null?void 0:s.thumb,o=(s==null?void 0:s.url)??(s==null?void 0:s.thumb),l=(s==null?void 0:s.type)??(a?"image":void 0);return{iconHtml:a&&(l==="image"||l===void 0)?hb(a):Zd(l??"name"),tipKind:o&&(l==="image"||l==="video"||l==="audio")?l:void 0,tipUrl:o}}function tf(e,t,r){var o;if(e.innerHTML="",!t)return;const n=new RegExp(NZ.source,"g");let s=0,a;for(;(a=n.exec(t))!==null;){a.index>s&&gN(e,t.slice(s,a.index));const l=SZ(a[0]),u=document.createElement("span");if(u.contentEditable="false",u.dataset.tag=a[0],u.dataset.tagType=l,u.className=`${wZ} ${vZ[l]}`,u.style.lineHeight="inherit",l==="camera"){const c=(o=a[0].match(/\[camera:([a-z_0-9]+)\]/))==null?void 0:o[1];if(c?bZ[c]:void 0){const h=pN(Rt.t(`cameraMotion.${c}.label`));u.style.verticalAlign="middle",u.innerHTML=`${yZ(13,"display:block")}<span style="display:inline-flex;align-items:center;line-height:1">${h}</span>`}else u.textContent=a[0]}else if(l.startsWith("mention-")){const{iconHtml:c,tipKind:d,tipUrl:h}=TZ(l,a[0],r);u.style.verticalAlign="middle",u.dataset.mentionKind=d??"none",h&&(u.dataset.mentionUrl=h),u.innerHTML=`${c}<span style="display:inline-flex;align-items:center;line-height:1">${pN(a[0].replace(/^@/,""))}</span>`}else u.textContent=a[0];e.appendChild(u),s=a.index+a[0].length}s<t.length&&gN(e,t.slice(s))}function gN(e,t){t.split(` 1239`).forEach((n,s)=>{s>0&&e.appendChild(document.createElement("br")),n&&e.appendChild(document.createTextNode(n))})}function Jd(e){let t="";
1239function r(n,s){if(n.nodeType===Node.TEXT_NODE)t+=n.textContent||"";else if(n instanceof HTMLBRElement)t+=` 1240`;else if(n instanceof HTMLElement&&n.dataset.tag)t+=n.dataset.tag;else{for(const a of n.childNodes)r(a,!1);!s&&n instanceof HTMLDivElement&&t.length>0&&!t.endsWith(` 1241`)&&(t+=` 1242`)}}return r(e,!0),t}function xN(e,t,r){let n=0,s=!1;function a(l){if(l.nodeType===Node.TEXT_NODE)n+=(l.textContent||"").length;else if(l instanceof HTMLBRElement)n+=1;else if(l instanceof HTMLElement&&l.dataset.tag)n+=l.dataset.tag.length;else for(const u of l.childNodes)a(u)}function o(l){if(s)return!0;if(l===t){if(l.nodeType===Node.TEXT_NODE)n+=r;else for(let u=0;u<r&&u<l.childNodes.length;u++)a(l.childNodes[u]);return s=!0,!0}if(l.nodeType===Node.TEXT_NODE)n+=(l.textContent||"").length;else if(l instanceof HTMLBRElement)n+=1;else if(l instanceof HTMLElement&&l.dataset.tag)n+=l.dataset.tag.length;else for(const u of l.childNodes)if(o(u))return!0;return!1}return o(e),n}function hl(e){const t=window.getSelection();if(!t||t.rangeCount===0)return null;const r=t.getRangeAt(0);if(!e.contains(r.startContainer))return null;const n=xN(e,r.startContainer,r.startOffset),s=r.collapsed?n:xN(e,r.endContainer,r.endOffset);return{start:n,end:s}}function rf(e,t){let r=0;function n(a){if(a.nodeType===Node.TEXT_NODE){const o=(a.textContent||"").length;if(r+o>=t)return{node:a,offset:t-r};r+=o}else if(a instanceof HTMLBRElement){if(r>=t){const o=a.parentNode;return{node:o,offset:Array.from(o.childNodes).indexOf(a)}}r+=1}else if(a instanceof HTMLElement&&a.dataset.tag){const o=a.dataset.tag.length;if(r+o>=t){const l=a.parentNode;return{node:l,offset:Array.from(l.childNodes).indexOf(a)+1}}r+=o}else for(const o of a.childNodes){const l=n(o);if(l)return l}return null}const s=n(e);if(s){const a=window.getSelection();if(a){const o=document.createRange();o.setStart(s.node,s.offset),o.collapse(!0),a.removeAllRanges(),a.addRange(o)}}}function CZ(e,t){const r=window.getSelection();if(!r||r.rangeCount===0||!r.isCollapsed)return null;const{startContainer:n,startOffset:s}=r.getRangeAt(0);if(t==="before"){if(n.nodeType===Node.TEXT_NODE&&s===0){const a=n.previousSibling;if(a instanceof HTMLElement&&a.dataset.tag)return a}else if((n===e||n.nodeType===Node.ELEMENT_NODE)&&s>0){const a=n.childNodes[s-1];if(a instanceof HTMLElement&&a.dataset.tag)return a}}else if(n.nodeType===Node.TEXT_NODE&&s===(n.textContent||"").length){const a=n.nextSibling;if(a instanceof HTMLElement&&a.dataset.tag)return a}else if(n===e||n.nodeType===Node.ELEMENT_NODE){const a=n.childNodes[s];if(a instanceof HTMLElement&&a.dataset.tag)return a}return null}function _Z({tip:e,onEnter:t,onLeave:r}){const[n,s]=v.useState(e.kind==="audio");v.useEffect(()=>{s(e.kind==="audio")},[e.url,e.kind]);const a=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,l=320,u=320,c=6,d=e.rect.top,h=o-e.rect.bottom,m=d>=180||d>=h,f=Math.max(8,Math.min(a-l-8,e.rect.left)),p=m?{bottom:Math.max(8,o-e.rect.top+c)}:{top:Math.min(o-8,e.rect.bottom+c)};return fn.createPortal(i.jsxs("div",{onMouseEnter:t,onMouseLeave:r,className:"fixed z-[9999] rounded-lg border border-sky-500/40 bg-[var(--bg-primary)] shadow-xl overflow-hidden",style:{left:f,maxWidth:l,...p},children:[e.kind==="image"&&i.jsxs("div",{className:"relative flex items-center justify-center",style:{minWidth:120,minHeight:80},children:[!n&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i.jsx("div",{className:"w-6 h-6 border-2 border-sky-500 border-t-transparent rounded-full animate-spin"})}),i.jsx("img",{src:e.url,alt:"",crossOrigin:Hr(e.url),onLoad:()=>s(!0),style:{display:n?"block":"none",maxWidth:`${l}px`,maxHeight:`${u}px`,objectFit:"contain"}})]}),e.kind==="video"&&i.jsxs("div",{className:"relative flex items-center justify-center",style:{minWidth:220,minHeight:140},children:[!n&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i.jsx("div",{className:"w-6 h-6 border-2 border-sky-500 border-t-transparent rounded-full animate-spin"})}),i.jsx("video",{src:e.url,crossOrigin:Hr(e.url),autoPlay:!0,muted:!0,loop:!0,playsInl
1242ine:!0,preload:"auto",onLoadedData:()=>s(!0),style:{display:n?"block":"none",maxWidth:`${l}px`,maxHeight:`${u}px`,objectFit:"contain"}})]}),e.kind==="audio"&&i.jsx("audio",{src:e.url,autoPlay:!0,controls:!0,style:{display:"block",minWidth:280,padding:8}})]}),document.body)}const rI=v.memo(v.forwardRef(function({value:t,onChange:r,onTagClick:n,onCameraTagClick:s,placeholder:a,disabled:o,onFocus:l,onKeyDown:u,containerRef:c,mentionAssets:d},h){const{i18n:m}=We(),f=m.language||"en",p=v.useRef(null),g=v.useRef(!1),x=v.useRef(t),w=v.useRef(null),y=v.useRef(null),b=v.useRef(d),[k,T]=v.useState(null),S=v.useRef(!1),j=v.useRef(!1),E=v.useRef(null),A=v.useCallback(()=>{E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{!S.current&&!j.current&&T(null)},120)},[]),R=v.useCallback(()=>{E.current&&(clearTimeout(E.current),E.current=null)},[]);v.useEffect(()=>(c&&(c.current=p.current),()=>{c&&(c.current=null)}),[c]),v.useImperativeHandle(h,()=>({insertText(C){const O=p.current;if(!O)return;const q=hl(O)??y.current,ne=(q==null?void 0:q.start)??x.current.length,he=(q==null?void 0:q.end)??ne,xe=ne!==he,Oe=x.current,Se=/^\[[a-zA-Z]+\]$/.test(C);if(Se&&!xe)return;if(Se){const ve=/\[([a-zA-Z]+)\][\s\S]*?\[\/\1\]/g;let Ye;for(;(Ye=ve.exec(Oe))!==null;)if(ne<Ye.index+Ye[0].length&&he>Ye.index)return}let we,Be;if(Se){const Ye=`[/${C.slice(1,-1)}]`;we=Oe.slice(0,ne)+C+Oe.slice(ne,he)+Ye+Oe.slice(he),Be=he+C.length+Ye.length}else we=Oe.slice(0,ne)+C+Oe.slice(he),Be=ne+C.length;w.current=Be,r(we,Be)},getHasSelection(){const C=p.current;if(!C)return!1;let O=hl(C);if((!O||O.start===O.end)&&(O=y.current),!O||O.start===O.end)return!1;const q=/\[([a-zA-Z]+)\][\s\S]*?\[\/\1\]/g;let ne;for(;(ne=q.exec(x.current))!==null;)if(O.start<ne.index+ne[0].length&&O.end>ne.index)return!1;return!0},focus(C){const O=p.current;if(O){if(C!==void 0){const q=()=>{const ne=p.current;ne&&(rf(ne,Math.min(C,x.current.length)),ne.focus())};Jd(O)===x.current?q():requestAnimationFrame(q);return}O.focus()}}})),v.useEffect(()=>{p.current&&(tf(p.current,t,b.current),x.current=t)},[]),v.useEffect(()=>{var O;const C=p.current;if(C){if(g.current){g.current=!1,x.current=t;return}if(t!==x.current){const q=w.current,ne=q===null?((O=hl(C))==null?void 0:O.start)??null:null;tf(C,t,b.current),q!==null?(rf(C,Math.min(q,t.length)),w.current=null,C.focus()):ne!==null&&document.activeElement===C&&rf(C,Math.min(ne,t.length)),x.current=t}}},[t]),v.useEffect(()=>{var q;b.current=d;const C=p.current;if(!C)return;const O=((q=hl(C))==null?void 0:q.start)??null;tf(C,x.current,d),O!==null&&document.activeElement===C&&rf(C,Math.min(O,x.current.length))},[d,f]);const M=v.useCallback(()=>{const C=p.current;if(!C||document.activeElement!==C)return;const O=hl(C);O&&(y.current=O)},[]),B=v.useCallback(()=>{var ne;const C=p.current;if(!C)return;g.current=!0;const O=Jd(C);x.current=O,M();const q=((ne=hl(C))==null?void 0:ne.start)??O.length;r(O,q)},[r,M]),W=v.useCallback(C=>{C.preventDefault();const O=C.clipboardData.getData("text/plain");document.execCommand("insertText",!1,O)},[]),H=v.useCallback(C=>{const q=C.target.closest("span[data-tag]");if(!q)return;const ne=p.current;if(!ne)return;const he=q.dataset.tag,xe=q.dataset.tagType,Oe=Jd(ne);if(xe==="emotion-open"||xe==="emotion-close"){const Se=he.replace(/[\[\]\/]/g,""),Be=new RegExp(`\\[${Se}\\][\\s\\S]*?\\[\\/${Se}\\]`).exec(Oe);Be&&n({type:"emotion",start:Be.index,end:Be.index+Be[0].length,value:Se})}else if(xe==="interjection"){const Se=Oe.indexOf(he);Se>=0&&n({type:"interjection",start:Se,end:Se+he.length,value:he})}else if(xe==="pause"){const Se=Oe.indexOf(he);Se>=0&&n({type:"pause",start:Se,end:Se+he.length,value:he})}else if(xe==="camera"&&s){const Se=/\[camera:([a-z_0-9]+)\]/.exec(he);if(Se){const we=Oe.indexOf(he);we>=0&&s({key:Se[1],start:we,end:we+he.length,rect:q.getBoundingClientRect()})}}},[n,s]),L=v.useCallback(C=>{const q=C.target.closest("span[data-tag]");if(!q)return;const ne=q.dataset.mentionKind,he=q.dataset.mentionUrl;!ne||ne==="none"||!he||(S.current=!0,R(),T({kind:ne,url:he,rect:q.getBoundingClientRect()}))},[R]),$=v.useCallback(C=>{const q=C.target.closest("span[data-tag]");if(!q)return;const ne=C.relatedTarget;ne&&q.contains(ne)||(S.current=!1,A())},[A]),ee=v.useCallback(()=>{j.current=!0,R()},[R]),G=v.useCallback(()=>{j.current=!1,A()},[A]),Q=v.useCallback(C=>{var xe;const O=p.current;if(!O)return!1;const q=CZ(O,C.key==="Backspace"?"before":"after");if(!q)return!1;C.preventDefault();const ne=q.dataset.tagType;if(ne==="emotion-open"||ne==="emotion-close"){const Se=q.dataset.tag.replace(/[\[\]\/]/g,""),we=Array.from(O.querySelectorAll("span[data-tag]"));for(const Be of we)(Be.dataset.tag===`[${Se}]`||Be.dataset.tag===`[/${Se}]`)&&Be.remove()}else q.remove();g.current=!0;const he=Jd(O);return x.current=he,r(he,((xe=hl(O))==null?void 0:xe.start)??he.length),!0},[r]),D=v.useCallback(C=>{C.stopPropagation(),!((C.key==="Backspace"||C.key==="Delete")&&Q(C))&&(u==null||u(C))},[Q,u]),K=v.useCallback(()=>{var q;const C=p.current;if(!C)return;const O=Jd(C);O!==x.current&&(x.current=O,r(O,((q=y.current)==null?void 0:q.start)??O.length)),tf(C,O,b.current)},[r]),V=!t||!t.trim();return i.jsxs("div",{className:"relative",children:[V&&i.jsx("div",{className:"absolute inset-0 pointer-events-none text-muted-foreground
1242/50 text-sm leading-relaxed pt-0.5",children:a}),i.jsx("div",{ref:p,contentEditable:!o,suppressContentEditableWarning:!0,className:"w-full bg-transparent outline-none text-sm leading-relaxed overflow-y-auto pt-0.5",style:{minHeight:"3.5em",maxHeight:"18em",wordBreak:"break-word",whiteSpace:"pre-wrap"},onInput:B,onPaste:W,onClick:H,onMouseOver:L,onMouseOut:$,onKeyUp:M,onMouseUp:M,onBlur:K,onFocus:l,onKeyDown:D}),k&&i.jsx(_Z,{tip:k,onEnter:ee,onLeave:G})]})})),bN={messages:[],currentPage:0,hasMore:!0,isLoadingHistory:!1,isInitialLoad:!0,creationType:"video",inputMode:"text",startFrameUrl:null,startFrameFile:null,endFrameUrl:null,endFrameFile:null,prompt:"",model:"",aspectRatio:"16:9",resolution:"720p",duration:5,audioEnabled:!0,keepAudio:!0,seed:null,isDraftMode:!1,referenceVideoUrl:null,referenceImageUrl:null,referenceImageFile:null,referenceVoiceUrl:null,elements:[],referenceAudioUrls:[],referenceAudioFiles:[],refVideos:[],refImages:[],parentGenerationId:null,parentGenerationIds:[],useWebSearch:!1,isMultiShotMode:!1,multiPromptShots:[],activeTaskIds:[],showCreationDropdown:!1,showModelDropdown:!1,models:[],gallery:[]},gi=ya()(Dw((e,t)=>({...bN,setMessages:r=>{const n=new Set,s=r.filter(a=>n.has(a.id)?!1:(n.add(a.id),!0));e({messages:s})},addMessage:r=>e(n=>n.messages.some(s=>s.id===r.id)?n:{messages:[...n.messages,r]}),updateMessage:(r,n)=>e(s=>({messages:s.messages.map(a=>a.id===r?{...a,...n,metadata:{...a.metadata,...n.metadata}}:a)})),removeMessages:r=>e(n=>({messages:n.messages.filter(s=>!r.includes(s.id))})),prependMessages:r=>e(n=>{const s=new Set(n.messages.map(o=>o.id));return{messages:[...r.filter(o=>!s.has(o.id)),...n.messages]}}),setCurrentPage:r=>e({currentPage:r}),setHasMore:r=>e({hasMore:r}),setIsLoadingHistory:r=>e({isLoadingHistory:r}),setIsInitialLoad:r=>e({isInitialLoad:r}),setCreationType:r=>e({creationType:r}),setInputMode:r=>e({inputMode:r}),setStartFrame:(r,n)=>e({startFrameUrl:r,startFrameFile:n??null}),setEndFrame:(r,n)=>e({endFrameUrl:r,endFrameFile:n??null}),clearFrames:()=>e({startFrameUrl:null,startFrameFile:null,endFrameUrl:null,endFrameFile:null}),setPrompt:r=>e({prompt:r}),setModel:r=>e({model:r}),setAspectRatio:r=>e({aspectRatio:r}),setResolution:r=>e({resolution:r}),setDuration:r=>e({duration:r}),setAudioEnabled:r=>e({audioEnabled:r}),setKeepAudio:r=>e({keepAudio:r}),setSeed:r=>e({seed:r}),setIsDraftMode:r=>e({isDraftMode:r}),prefillFromGeneration:r=>e({prompt:r.prompt,model:r.model,aspectRatio:r.aspectRatio||"16:9",duration:r.duration,seed:r.seed??null,startFrameUrl:r.startFrameUrl||null,endFrameUrl:r.endFrameUrl||null,inputMode:r.startFrameUrl?"first_frame":"text"}),setReferenceVideoUrl:r=>e({referenceVideoUrl:r}),setReferenceImage:(r,n)=>e({referenceImageUrl:r,referenceImageFile:n??null}),setReferenceVoiceUrl:r=>e({referenceVoiceUrl:r}),addElement:r=>e(n=>({elements:[...n.elements,r]})),removeElement:r=>e(n=>({elements:n.elements.filter(s=>s.id!==r)})),updateElement:(r,n)=>e(s=>({elements:s.elements.map(a=>a.id===r?{...a,...n}:a)})),clearElements:()=>e({elements:[]}),setReferenceAudioUrls:r=>e({referenceAudioUrls:r}),addReferenceAudio:(r,n)=>e(s=>({referenceAudioFiles:[...s.referenceAudioFiles,r],referenceAudioUrls:[...s.referenceAudioUrls,n]})),removeReferenceAudio:r=>e(n=>({referenceAudioFiles:n.referenceAudioFiles.filter((s,a)=>a!==r),referenceAudioUrls:n.referenceAudioUrls.filter((s,a)=>a!==r)})),setRefVideos:r=>e({refVideos:r}),addRefVideo:r=>e(n=>({refVideos:[...n.refVideos,r]})),removeRefVideoAt:r=>e(n=>({refVideos:n.refVideos.filter((s,a)=>a!==r)})),clearRefVideos:()=>e({refVideos:[]}),setRefImages:r=>e({refImages:r.slice(0,4)}),addRefImage:r=>e(n=>({refImages:n.refImages.length<4?[...n.refImages,r]:n.refImages})),removeRefImageAt:r=>e(n=>({refImages:n.refImages.filter((s,a)=>a!==r)})),clearRefImages:()=>e({refImages:[]}),setParentGenerationId:r=>e({parentGenerationId:r}),setParentGenerationIds:r=>e({parentGenerationIds:r.slice(0,3)}),setUseWebSearch:r=>e({useWebSearch:r}),setIsMultiShotMode:r=>e({isMultiShotMode:r}),setMultiPromptShots:r=>e({multiPromptShots:r.slice(0,10)}),addMultiPromptShot:r=>e(n=>({multiPromptShots:n.multiPromptShots.length<10?[...n.multiPromptShots,r]:n.multiPromptShots})),updateMultiPromptShot:(r,n)=>e(s=>({multiPromptShots:s.multiPromptShots.map((a,o)=>o===r?{prompt:n}:a)})),removeMultiPromptShot:r=>e(n=>({multiPromptShots:n.multiPromptShots.filter((s,a)=>a!==r)})),addActiveTask:r=>e(n=>({activeTaskIds:n.activeTaskIds.includes(r)?n.activeTaskIds:[...n.activeTaskIds,r]})),removeActiveTask:r=>e(n=>({activeTaskIds:n.activeTaskIds.filter(s=>s!==r)})),setShowCreationDropdown:r=>e({showCreationDropdown:r}),setShowModelDropdown:r=>e({showModelDropdown:r}),closeAllDropdowns:()=>e({showCreationDropdown:!1,showModelDropdown:!1}),setModels:r=>e({models:r}),setGallery:r=>e({gallery:r}),getGenerationType:()=>{switch(t().inputMode){case"video_edit":return"video_to_video";case"video_reference":return"video_reference_to_video";case"reference":return"reference_to_video";case"video_continuation":return"video_continuation";case"first_frame":return t().endFrameUrl?"start_end_frame":"image2video";default:return"text2video"}},getCreditsNeeded:()=>{const r=t(),n=r.models.find(a=>a.id===r.model),s=(n==null?void 0:n.credits)||50;return r.isDraftMode?Math.ceil(s/2):s},reset:()=>e({...bN}),clearSession:()=>e({messages:[],currentPage:0,hasMore:!0,isInitialLoad:!0,prompt:"",activeTaskIds:[],seed:null,isDraftMode:!1,elements:[],referenceVoiceUrl:null})}),{name:"video-gen-store",version:5,migrate:(e,t)=>
1242{if(t<2){const{sessionId:r,frameMode:n,showFrameModeDropdown:s,...a}=e;let o="text";(n==="start_frame"||n==="start_end_frame")&&(o="first_frame"),e={...a,inputMode:o,keepAudio:!0,currentPage:0,hasMore:!0,isInitialLoad:!0}}return t<3&&(e.referenceAudioUrls=[],e.referenceAudioFiles=[],e.parentGenerationId=null),t<4&&e.inputMode==="omni_reference"&&(e.inputMode="reference"),e},partialize:e=>({model:e.model,aspectRatio:e.aspectRatio,resolution:e.resolution,duration:e.duration,audioEnabled:e.audioEnabled,keepAudio:e.keepAudio,isDraftMode:e.isDraftMode,inputMode:e.inputMode,startFrameUrl:e.startFrameUrl,endFrameUrl:e.endFrameUrl,referenceVideoUrl:e.referenceVideoUrl,referenceImageUrl:e.referenceImageUrl,referenceVoiceUrl:e.referenceVoiceUrl,elements:e.elements,prompt:e.prompt,referenceAudioUrls:e.referenceAudioUrls,refVideos:e.refVideos,refImages:e.refImages,parentGenerationId:e.parentGenerationId})}));let gg=null;function AZ(e,t){e&&(gg={handle:e,index:t})}function _2(){gg=null}function jZ(e){return gg?(gg.handle.insertText(e),!0):!1}function IZ({size:e="md",maxShots:t=10,className:r="",mentionAssets:n}){const{t:s}=We(),a=gi(p=>p.isMultiShotMode),o=gi(p=>p.multiPromptShots),l=gi(p=>p.setIsMultiShotMode),u=gi(p=>p.addMultiPromptShot),c=gi(p=>p.updateMultiPromptShot),d=gi(p=>p.removeMultiPromptShot),h=v.useRef([]);v.useEffect(()=>(a||_2(),()=>_2()),[a]);const m=p=>{p.preventDefault();const g=!a;l(g),g&&o.length===0&&u({prompt:""})},f=e==="sm"?{gap:"mt-2",pad:"px-2.5 py-1.5",text:"text-[11px]",iconSm:"w-3 h-3",badge:"w-5 h-5 text-[10px]",panel:"p-2 space-y-2"}:{gap:"mt-3",pad:"px-3 py-2",text:"text-xs",iconSm:"w-3.5 h-3.5",badge:"w-6 h-6 text-[11px]",panel:"p-3 space-y-2.5"};return i.jsxs("details",{className:`${f.gap} ${r}`,open:a,children:[i.jsxs("summary",{className:`list-none cursor-pointer flex items-center justify-between gap-2 ${f.pad} rounded-lg bg-[var(--bg-tertiary)] hover:bg-[var(--bg-hover)] border border-[var(--border-default)] transition-colors select-none`,onClick:m,children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Wo,{className:`${f.iconSm} text-[var(--theme)]`}),i.jsx("span",{className:`${f.text} font-medium text-[var(--text-primary)]`,children:s("video.multiShot.toggle","åé头模å¼ï¼Kling ä¸å±ï¼")}),a&&o.length>0&&i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-[var(--theme)]/15 text-[var(--theme)] font-semibold tabular-nums",children:o.length})]}),i.jsx(dn,{className:`${f.iconSm} text-[var(--text-tertiary)] transition-transform ${a?"rotate-180":""}`})]}),a&&i.jsxs("div",{className:`mt-2 rounded-lg bg-[var(--bg-tertiary)]/40 border border-[var(--border-default)] ${f.panel}`,children:[i.jsx("p",{className:"text-[11px] text-[var(--text-tertiary)] leading-relaxed",children:s("video.multiShot.hint","æ¯ä¸ªé头䏿®µç¬ç« promptï¼æé¡ºåºæ¼æ¥æå®æ´è§é¢")}),o.map((p,g)=>i.jsxs("div",{className:"group/shot flex items-start gap-2",children:[i.jsx("div",{className:`shrink-0 ${f.badge} rounded-full bg-[var(--theme)]/10 text-[var(--theme)] font-semibold flex items-center justify-center mt-1.5 tabular-nums`,children:g+1}),i.jsx("div",{className:"flex-1 min-w-0 px-2.5 py-1 border border-[var(--border-default)] rounded-md bg-[var(--bg-primary)] focus-within:border-[var(--theme)] focus-within:ring-1 focus-within:ring-[var(--theme)]/20 transition-colors",children:i.jsx(rI,{ref:x=>{h.current[g]=x},value:p.prompt,onChange:x=>c(g,x),onTagClick:()=>{},onCameraTagClick:()=>{},onFocus:()=>AZ(h.current[g],g),placeholder:s("video.multiShot.shotPlaceholder","æè¿°è¯¥é头ç»é¢..."),mentionAssets:n})}),o.length>1&&i.jsx("button",{onClick:()=>d(g),className:"shrink-0 w-7 h-7 flex items-center justify-center rounded-md opacity-0 group-hover/shot:opacity-100 hover:bg-red-500/10 text-[var(--text-tertiary)] hover:text-red-500 transition-all mt-1",title:s("video.multiShot.removeShot","å é¤"),children:i.jsx(tm,{className:"w-3.5 h-3.5"})})]},g)),i.jsxs("div",{className:"flex items-center justify-between pt-1",children:[o.length<t?i.jsxs("button",{onClick:()=>u({prompt:""}),className:"flex items-center gap-1 text-[11px] px-2.5 py-1.5 rounded-md border border-dashed border-[var(--border-default)] hover:border-[var(--theme)] hover:bg-[var(--theme)]/5 text-[var(--text-secondary)] hover:text-[var(--theme)] transition-colors",children:[i.jsx(ec,{className:"w-3 h-3"}),s("video.multiShot.addShot","æ·»å é头")]}):i.jsx("span",{className:"text-[10px] text-[var(--text-tertiary)]",children:s("video.multiShot.maxReached","已达ä¸é")}),i.jsxs("span",{className:"text-[10px] text-[var(--text-tertiary)] tabular-nums",children:[o.length," / ",t]})]})]})]})}const yN=360,mb=420;function RZ({onInsert:e,buttonSize:t="md",className:r="",disabled:n=!1,disabledReason:s}){const{t:a,i18n:o}=We(),l=(o.language||"en").startsWith("zh"),[u,c]=v.useState(!1),[d,h]=v.useState(""),[m,f]=v.useState(null),p=v.useRef(null),g=v.useRef(null);v.useEffect(()=>{u&&p.current?f(p.current.getBoundingClientRect()):f(null)},[u]),v.useEffect(()=>{if(!u)return;const j=A=>{var M,B;const R=A.target;(M=p.current)!=null&&M.contains(R)||(B=g.current)!=null&&B.contains(R)||c(!1)},E=A=>{A.key==="Escape"&&c(!1)};return document.addEventListener("mousedown",j),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",j),document.removeEventListener("keydown",E)}},[u]);const x=v.useCallback(j=>{e(`[camera:${j.key}]`),c(!1),h("")},[e]),w=v.useMemo(()=>{const j=d.trim().toLowerCase();return j?pg.map(E=>({...E,items:E.items.filter(A=>A.labelZh.toLowerCase().includes(j)||A.labelEn.toLowerCase().includes(j))})).filter(E=>E.items.length>0):pg},[d]),y=t==="sm"?"h-7 px-2 text-[11px] gap-1":"h-8 px-2.5 text-xs gap-1.5",b=a("video.cameraMotion.title",l?"è¿é":"Camera Move"),k=a("video.cameraMotion.searchPlaceholder",l?"æç´¢è¿é / Search camera move":"Search camera move"),T=a("video.cameraMotion.noMatch",l?"æªæ¾å°å¹é
çè¿é":"No matching camera move"),S=(()=>
1242{if(!m)return null;const j=m.top,E=window.innerHeight-m.bottom,R=j<mb&&E>j?m.bottom+4:Math.max(8,m.top-mb-4),M=Math.max(8,Math.min(m.left,window.innerWidth-yN-8));return{top:R,left:M}})();return i.jsxs("div",{className:`relative shrink-0 ${r}`,children:[i.jsxs("button",{ref:p,type:"button",disabled:n,onClick:()=>{n||c(j=>!j)},className:`inline-flex items-center rounded-lg border transition-colors ${y} ${n?"opacity-50 cursor-not-allowed bg-background border-border text-foreground":u?"bg-emerald-500/10 text-emerald-600 border-emerald-500/40":"bg-background border-border hover:bg-accent text-foreground"}`,title:n&&s||b,children:[i.jsx(NV,{className:t==="sm"?"w-3 h-3":"w-3.5 h-3.5"}),i.jsx("span",{className:"hidden md:inline",children:b})]}),u&&!n&&S&&fn.createPortal(i.jsxs("div",{ref:g,style:{position:"fixed",top:S.top,left:S.left,width:yN,maxHeight:mb,zIndex:1e4,scrollbarWidth:"thin"},className:"overflow-y-auto bg-[var(--bg-primary)] border border-ui-border rounded-lg shadow-xl",children:[i.jsx("div",{className:"sticky top-0 bg-[var(--bg-primary)] border-b border-ui-border px-3 py-2 z-[1]",children:i.jsx("input",{type:"text",value:d,onChange:j=>h(j.target.value),placeholder:k,className:"w-full px-2.5 py-1.5 text-xs bg-[var(--bg-tertiary)] border border-ui-border rounded-md outline-none focus:border-emerald-500/50 text-[var(--text-primary)] placeholder:text-[var(--text-tertiary)]",autoFocus:!0})}),i.jsxs("div",{className:"p-2.5 space-y-3",children:[w.length===0&&i.jsx("div",{className:"text-xs text-[var(--text-tertiary)] text-center py-6",children:T}),w.map(j=>i.jsxs("div",{children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[var(--text-tertiary)] mb-1.5 px-0.5",children:a(`cameraMotion.${j.groupKey}.group`)}),i.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:j.items.map(E=>i.jsx("button",{type:"button",onClick:()=>x(E),title:l?E.promptZh:a(`cameraMotion.${E.key}.label`),className:"group relative flex items-center px-2.5 py-1.5 text-left text-xs rounded-md bg-background border border-border hover:bg-emerald-500/10 hover:border-emerald-500/40 hover:text-emerald-600 transition-colors",children:i.jsx("span",{className:"truncate",children:a(`cameraMotion.${E.key}.label`)})},E.key))})]},j.groupKey))]})]}),document.body)]})}const vN=320,fb=420;function DZ({open:e,anchorRect:t,currentKey:r,onReplace:n,onDelete:s,onClose:a}){const o=v.useRef(null),{t:l,i18n:u}=We(),c=(u.language||"en").startsWith("zh");if(v.useEffect(()=>{if(!e)return;const p=x=>{o.current&&!o.current.contains(x.target)&&a()},g=x=>{x.key==="Escape"&&a()};return document.addEventListener("mousedown",p),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",g)}},[e,a]),!e||!t)return null;const m=window.innerHeight-t.bottom<fb&&t.top>fb?Math.max(8,t.top-fb-4):t.bottom+4,f=Math.max(8,Math.min(t.left,window.innerWidth-vN-8));return fn.createPortal(i.jsxs("div",{ref:o,style:{position:"fixed",top:m,left:f,width:vN,zIndex:1e4},className:"bg-[var(--bg-primary)] border border-ui-border rounded-lg shadow-xl max-h-[420px] overflow-y-auto",children:[i.jsxs("div",{className:"sticky top-0 bg-[var(--bg-primary)] border-b border-ui-border px-3 py-2 flex items-center justify-between z-[1]",children:[i.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:c?"ä¿®æ¹è¿é":"Edit camera move"}),i.jsxs("button",{type:"button",onClick:()=>{s(),a()},className:"flex items-center gap-1 text-xs text-red-500 hover:text-red-600",children:[i.jsx(tm,{className:"w-3 h-3"}),i.jsx("span",{children:c?"å é¤":"Delete"})]})]}),i.jsx("div",{className:"p-2 space-y-3",children:pg.map(p=>i.jsxs("div",{children:[i.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[var(--text-tertiary)] mb-1 px-0.5",children:l(`cameraMotion.${p.groupKey}.group`)}),i.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:p.items.map(g=>i.jsx("button",{type:"button",onClick:()=>{n(g.key),a()},title:c?g.promptZh:void 0,className:`text-left text-xs px-2.5 py-1.5 rounded-md border transition-colors truncate ${r
1242===g.key?"bg-emerald-500/20 border-emerald-500/60 text-emerald-600 font-medium":"bg-background border-border hover:bg-emerald-500/10 hover:border-emerald-500/40 hover:text-emerald-600"}`,children:l(`cameraMotion.${g.key}.label`)},g.key))})]},p.groupKey))})]}),document.body)}function nI(e){return e!=null&&e.length?e.map(t=>({prompt:t.prompt.trim()})).filter(t=>t.prompt.length>0):[]}function MZ(e,t){const r=nI(e);if(r.length===0)return"";const n=s=>t?t("video.klingShotLabel",{n:s,defaultValue:`[Shot ${s}]`}):`[Shot ${s}]`;return r.map((s,a)=>`${n(a+1)} ${s.prompt}`).join(` 1243`)}const nf=5e3;function OZ({context:e,onSubmit:t,isBusy:r=!1,onStop:n,canvasContext:s,injectedPrompt:a,onInjectedPromptConsumed:o,injectedAttachments:l,onInjectedAttachmentsConsumed:u,activeSkill:c,onActiveSkillChange:d,isEditable:h=!0}){var X5,Z5,J5,eE,tE,rE;const{t:m}=We(),{tier:f,credits:p,thresholds:g}=Eh(),x=$n(oe=>oe.project),w=tQ(x),y=f!=="premium"&&!w,[b,k]=v.useState(!1),{imageModels:T,selectedModel:S,loadImageModels:j,setSelectedModel:E,isLoadingModels:A,aspectRatio:R,resolution:M,quality:B,imageCount:W,setAspectRatio:H,setResolution:L,setQuality:$,setImageCount:ee,enableWebSearch:G,setEnableWebSearch:Q,cameraControl:D,setCameraControl:K}=$n(),V=v.useMemo(()=>{if(e!=="workspace"||!(s!=null&&s.selectedElementId))return{assetId:null,rawUrl:void 0};const oe=s.elements.find(er=>er.id===s.selectedElementId);if(!oe||oe.type!=="image")return{assetId:null,rawUrl:void 0};const Ie=oe.data,ke=(Ie.images?Ie.images[Ie.coverIndex??0]||Ie.images[0]:null)||Ie.resolvedUrl||Ie.url||void 0;return{assetId:oe.assetId||Ie.assetId||null,rawUrl:ke}},[e,s]),C=Yu(V.assetId,void 0,V.rawUrl),O=v.useMemo(()=>S.includes("nano-banana"),[S]),[q,ne]=v.useState(""),[he,xe]=v.useState([]),[Oe,Se]=v.useState(!1),[we,Be]=v.useState(!1),ve=v.useMemo(()=>{let oe=he.length;if(e==="workspace"&&(s!=null&&s.selectedElementId)){const Ie=s.elements.find(ke=>ke.id===s.selectedElementId);if((Ie==null?void 0:Ie.type)==="image"){const ke=Ie.data,Xe=(ke.images?ke.images[ke.coverIndex??0]||ke.images[0]:null)||ke.resolvedUrl||ke.url;Xe&&!he.includes(Xe)&&(oe+=1)}}return oe},[he,e,s]),{estimate:Ye}=YX({modelId:S,count:W,quality:B??void 0,resolution:M??void 0,aspectRatio:R??void 0,refImageCount:ve,featureKey:"image_gen"}),Ae=v.useRef(null),Ee=v.useRef(null),Ce=v.useRef(null),[X,pe]=v.useState(null),_e=v.useRef({}),Ne=$n(oe=>oe.generateMode||"image"),de=v.useCallback(oe=>{const Ie=$n.getState().generateMode||"image";_e.current[Ie]={input:q,attachments:he};const ke=_e.current[oe];ke?(ne(ke.input),xe(ke.attachments)):(ne(""),xe([])),$n.setState({generateMode:oe}),oe!=="image"&&(d==null||d(null)),$n.getState().saveCanvasState().catch(()=>{})},[q,he,d]),[be,ie]=v.useState(!1),De=v.useRef(null);v.useEffect(()=>{if(!be)return;const oe=Ie=>{De.current&&!De.current.contains(Ie.target)&&ie(!1)};return document.addEventListener("mousedown",oe),()=>document.removeEventListener("mousedown",oe)},[be]);const[F,se]=v.useState([]),ue=Jr(oe=>oe.model),je=Jr(oe=>oe.setModel),Ge=Jr(oe=>oe.duration),mt=Jr(oe=>oe.setDuration),Ft=Jr(oe=>oe.aspectRatio),ur=Jr(oe=>oe.setAspectRatio),ht=Jr(oe=>oe.resolution),Qt=Jr(oe=>oe.setResolution),Nt=Jr(oe=>oe.audioEnabled),Jt=Jr(oe=>oe.setAudioEnabled),[Re,on]=v.useState("text"),[In,ms]=v.useState(null),[Rr,Qs]=v.useState(null),[Wr,pm]=v.useState(null),[kr,Gi]=v.useState(null),[Nr,yc]=v.useState([]),[ni,kd]=v.useState(null),Nd=Jr(oe=>oe.promptExtend),ox=Jr(oe=>oe.setPromptExtend),fs=Jr(oe=>oe.watermark),si=Jr(oe=>oe.setWatermark),[ln,vc]=v.useState([]),[Zr,wc]=v.useState([]),[Dr,Ec]=v.useState([]),gm=oe=>Ec(Ie=>Ie.length>=5?Ie:[...Ie,oe]),xm=oe=>Ec(Ie=>Ie.filter((ke,Xe)=>Xe!==oe)),[Na,bm]=v.useState(null),[ot,ae]=v.useState(0),[$e,at]=v.useState(null),[Ot,Mr]=v.useState([]),gr=Jr(oe=>oe.useWebSearch),gn=Jr(oe=>oe.setUseWebSearch),Rs=Jr(oe=>oe.keepAudio),Ki=Jr(oe=>oe.setKeepAudio);v.useEffect(()=>{j()},[j]),v.useEffect(()=>{Ne==="video"&&F.length===0&&O0.getModels().then(oe=>{const Ie=oe.data||[];if(se(Ie),!(ue&&Ie.some(Xe=>Xe.id===ue))){const Xe=Ie.find(er=>er.isDefault)||Ie[0];Xe&&(je(Xe.id),Xe.defaultResolution&&Qt(Xe.defaultResolution))}}).catch(()=>{})},[Ne]);const lt=F.find(oe=>oe.id===ue),Vt=((X5=lt==null?void 0:lt.id)==null?void 0:X5.startsWith("seedance-2."))??!1,ai=(((Z5=lt==null?void 0:lt.id)==null?void 0:Z5.startsWith("minimax-hailuo-3"))||((J5=lt==null?void 0:lt.id)==null?void 0:J5.startsWith("minimax-h3-max")))??!1,xn=(ue==null?void 0:ue.includes("wan"))??!1,Xs=(lt==null?void 0:lt.modelFamily)==="kling-o3",q5=gi(oe=>oe.isMultiShotMode),OO=gi(oe=>oe.multiPromptShots),W5=Xs&&Re==="text"&&q5,V5=Ne==="video"&&Xs&&Re==="text"&&q5&&OO.some(oe=>oe.prompt.trim().length>0),ym=(tE=(eE=lt==null?void 0:lt.inputs)==null?void 0:eE[Re])==null?void 0:tE.slots,LO=!!(ym!=null&&ym.length);pZ(ue,[()=>on("text"),()=>ms(null),()=>Qs(null),()=>pm(null),()=>Gi(null),()=>yc([]),()=>vc([]),()=>wc([]),()=>Mr([]),()=>kd(null),()=>Ec([]),()=>bm(null)]),v.useEffect(()=>{var ke;if(!lt)return;if((ke=lt.durationSteps)!=null&&ke.length){const Xe=lt.durationSteps;if(!Xe.includes(Ge)){const er=Xe.reduce((St,ct)=>Math.abs(ct-Ge)<Math.abs(St-Ge)?ct:St);mt(er)}}else{const Xe=lt.minDuration||2,er=lt.maxDuration||10;Ge<Xe&&mt(Xe),Ge>er&&mt(er)}const oe=lt.supportedAspectRatios;oe!=null&&oe.length&&!oe.includes(Ft)&&ur(oe.includes("16:9")?"16:9":oe[0]);const Ie=lt.supportedResolutions;Ie!=null&&Ie.length&&!Ie.includes(ht)&&Qt(lt.defaultResolution||Ie[0])},[lt]);const Sd=v.useMemo(()=>{var Xe;const oe=[{value:"text",label:m("video.modeText","æçè§é¢")}],Ie=lt==null?void 0:lt.inputs,ke=er=>!!(Ie!=null&&Ie[er]);if(ke("first_frame")&&oe.push({value:"first_frame",label:lt!=null&<.supportsEndFrame?m("video.modeStartEndFrame","é¦å°¾å¸§"):m("video.modeFirstFrame","é¦å¸§")}),!Vt&&!xn&&ke("video_edit")&&oe.push({value:"video_edit",label:m("video.modeVideoEdit","è§é¢ç¼è¾")}),!Vt&&!xn&&ke("video_continuation")&&oe.push({value:"video_continuation",label:m("video.modeContinuation","è§é¢ç»å")}),ke("reference")){const er=((Xe=Ie==null?void 0:Ie.reference)==null?void 0:Xe.slots)??[],St=er.some(tr=>(tr==null?void 0:tr.type)==="video"),ct=er.some(tr=>(tr==null?void 0:tr.type)==="image"),dt=St&&ct?"video.modeReference":St?"video.modeReferenceVideo":"video.modeReferenceImage";oe.push({value:"reference",label:m(dt,"åè")})}return!Vt&&ke("video_reference")&&oe.push({value:"video_reference",label:m("video.modeVideoReference","è§é¢åè")}),oe},[lt,m,Vt]);v.useEffect(()=>{Sd.length>0&&!Sd.some(oe=>oe.value===Re)&&on("text")},[Sd]),v.useEffect(()=>{a!=null&&(ne(a),o==null||o())},[a]),v.useEffect(()=>{l!=null&&l.length&&(xe(oe=>[...oe,...l]),u==null||u())},[l]);
1243const PO=v.useCallback(async oe=>{var er,St;const Ie=(er=oe.target.files)==null?void 0:er[0];if(!Ie)return;const ke=T.find(ct=>ct.modelId===S),Xe=(ke==null?void 0:ke.maxReferenceImages)??5;if(!(Xe===0||he.length>=Xe)){Se(!0);try{const ct=new FormData;ct.append("file",Ie);const tr=(St=(await U.post("/storage/upload/image",ct,{headers:{"Content-Type":"multipart/form-data"}})).data)==null?void 0:St.url;tr&&xe(wm=>[...wm,tr])}catch{}finally{Se(!1),Ae.current&&(Ae.current.value="")}}},[he,T,S]),lx=v.useMemo(()=>Re==="first_frame"?Rr?"start_end_frame":"image2video":Re==="video_edit"?"video_to_video":Re==="video_reference"?"video_reference_to_video":Re==="video_continuation"?"video_continuation":Re==="reference"?"reference_to_video":"text2video",[Re,Rr]),{defaultMarkup:G5}=kh("video_gen"),{duration:Td}=fZ(Re,Wr,ln,Na),FO=v.useMemo(()=>{if(!lt)return null;const oe=Re==="video_edit"||Re==="video_reference"?!1:Nt,Ie=Re==="reference"&&(ln.length>0||!!Wr)||Re==="video_edit"&&!!Wr||Re==="video_reference"&&!!Wr||Re==="video_continuation"&&!!Na,ke=Re==="reference"?Nr.reduce((Xe,er)=>{var St;return Xe+(er.frontalUrl?1:0)+(((St=er.referenceUrls)==null?void 0:St.length)??0)},0)+Zr.length:0;return Oj(lt,Ge,ht,oe,lx,Ie,G5,Td,ke)},[lt,Ge,ht,Nt,Re,lx,G5,ln,Wr,Na,Td,Nr,Zr]),vm=v.useMemo(()=>{const oe=T.find(Ie=>Ie.modelId===S);return(oe==null?void 0:oe.maxReferenceImages)??5},[S,T]),BO=v.useMemo(()=>xY(T),[T]),K5=v.useMemo(()=>bY(F),[F]),UO=v.useMemo(()=>{if(Ne==="image"||Ne==="direct_image"){const oe=[];return e==="workspace"&&(s!=null&&s.selectedElementId)&&V.rawUrl&&oe.push({id:V.rawUrl,type:"attachment",label:m("art.agent.mentionSelectedImage","ç»å¸éä¸å¾ç"),thumbnail:C||V.rawUrl,category:m("art.agent.mentionCanvas","ç»å¸")}),he.forEach((Ie,ke)=>{oe.some(Xe=>Xe.id===Ie)||oe.push({id:Ie,type:"attachment",label:`Element ${ke+1}`,thumbnail:Ie,category:m("art.agent.mentionUploads","ä¸ä¼ ")})}),oe}if(Ne==="video"){const oe=[];if(Xs&&Re==="reference")return Nr.forEach((ke,Xe)=>{oe.push({id:ke.id,type:"element",label:`Element${Xe+1}`,thumbnail:ke.frontalUrl,category:m("video.mention.element","å
ç´ ")})}),Zr.forEach((ke,Xe)=>{oe.push({id:`img-${Xe}`,type:"attachment",label:`Image${Xe+1}`,thumbnail:ke,category:m("video.mention.image","å¾ç")})}),oe;if((lt==null?void 0:lt.id)==="grok-imagine-video"&&Re==="reference")return Nr.forEach((ke,Xe)=>{oe.push({id:ke.id,type:"element",label:`Image${Xe+1}`,thumbnail:ke.frontalUrl,category:m("video.mention.image","å¾ç")})}),oe;const Ie=(lt==null?void 0:lt.modelFamily)==="happyhorse";return Ie&&Re==="reference"?(Nr.forEach((ke,Xe)=>{oe.push({id:ke.id,type:"element",label:`Image${Xe+1}`,thumbnail:ke.frontalUrl,category:m("video.mention.image","å¾ç")})}),oe):Ie&&Re==="video_edit"?(Zr.forEach((ke,Xe)=>{oe.push({id:`img-${Xe}`,type:"attachment",label:`Image${Xe+1}`,thumbnail:ke,category:m("video.mention.image","å¾ç")})}),oe):Xs&&(Re==="video_edit"||Re==="video_reference")?(Wr&&oe.push({id:"vid-src",type:"element",label:"Video1",thumbnail:Wr,category:m("video.mention.video","è§é¢")}),Nr.forEach((ke,Xe)=>{oe.push({id:ke.id,type:"element",label:`Element${Xe+1}`,thumbnail:ke.frontalUrl,category:m("video.mention.element","å
ç´ ")})}),Zr.forEach((ke,Xe)=>{oe.push({id:`img-${Xe}`,type:"attachment",label:`Image${Xe+1}`,thumbnail:ke,category:m("video.mention.image","å¾ç")})}),oe):(xn||Vt||ai?(Nr.forEach((ke,Xe)=>{oe.push({id:ke.id,type:"element",label:`Image${Xe+1}`,thumbnail:ke.frontalUrl,category:m("art.agent.videoElementCategory","è§é¢å
ç´ ")})}
1243),ln.forEach((ke,Xe)=>{oe.push({id:`refvid-${Xe}`,type:"element",label:`Video${Xe+1}`,thumbnail:ke,category:m("art.agent.videoElementCategory","è§é¢å
ç´ ")})}),(Vt||ai)&&Ot.forEach((ke,Xe)=>{oe.push({id:`refaudio-${Xe}`,type:"element",label:`Audio${Xe+1}`,category:m("art.agent.videoElementCategory","è§é¢å
ç´ ")})}),xn&&Re==="reference"&&Dr.forEach((ke,Xe)=>{oe.push({id:`voice-${Xe}`,type:"element",label:`Audio${Xe+1}`,category:m("art.agent.videoElementCategory","è§é¢å
ç´ ")})})):Nr.forEach((ke,Xe)=>{oe.push({id:ke.id,type:"element",label:ke.name||m("art.agent.videoElementLabel","å
ç´ {{idx}}",{idx:Xe+1}),thumbnail:ke.frontalUrl,category:m("art.agent.videoElementCategory","è§é¢å
ç´ ")})}),oe)}return[]},[Ne,Re,he,Nr,ln,Zr,Wr,Ot,Dr,xn,Vt,ai,Xs,e,s==null?void 0:s.selectedElementId,V.rawUrl,C,m]),Jn=mZ(UO),cx=v.useMemo(()=>{const oe={};let Ie=[],ke=[],Xe=[];if(Ne==="image"||Ne==="direct_image"){if(e==="workspace"&&(s!=null&&s.selectedElementId)&&V.rawUrl){const St=m("art.agent.mentionSelectedImage","ç»å¸éä¸å¾ç");oe[St]={thumb:C||V.rawUrl,url:V.rawUrl,type:"image"}}he.forEach((St,ct)=>{oe[`Element ${ct+1}`]={thumb:St,url:St,type:"image"}})}else if(Ne==="video"){const St=(lt==null?void 0:lt.modelFamily)==="happyhorse";St&&Re==="reference"?Ie=Nr.map((ct,dt)=>({index:dt+1,thumb:ct.frontalUrl,url:ct.frontalUrl})):St&&Re==="video_edit"?Ie=Zr.map((ct,dt)=>({index:dt+1,thumb:ct,url:ct})):Xs?(Ie=Zr.map((dt,tr)=>({index:tr+1,thumb:dt,url:dt})),ke=(Re==="video_edit"||Re==="video_reference")&&Wr?[{index:1,thumb:Wr,url:Wr}]:ln.map((dt,tr)=>({index:tr+1,thumb:dt,url:dt}))):xn||Vt||ai?(Ie=Nr.map((ct,dt)=>({index:dt+1,thumb:ct.frontalUrl,url:ct.frontalUrl})),ke=ln.map((ct,dt)=>({index:dt+1,thumb:ct,url:ct})),(Vt||ai)&&(Xe=Ot.map((ct,dt)=>({index:dt+1,url:ct}))),xn&&Re==="reference"&&Dr.length>0&&(Xe=Dr.map((ct,dt)=>({index:dt+1,url:ct})))):(lt==null?void 0:lt.id)==="grok-imagine-video"&&Re==="reference"?Ie=Nr.map((ct,dt)=>({index:dt+1,thumb:ct.frontalUrl,url:ct.frontalUrl})):Nr.forEach(ct=>{ct.name&&(oe[ct.name]={thumb:ct.frontalUrl,url:ct.frontalUrl,type:"image"})})}const er=Xs?Nr.map((St,ct)=>({index:ct+1,thumb:St.frontalUrl,url:St.frontalUrl})):void 0;return{images:Ie,videos:ke,audios:Xe,elements:er,names:oe}},[Ne,Re,he,Nr,ln,Zr,Ot,Dr,xn,Vt,ai,Xs,e,s==null?void 0:s.selectedElementId,V.rawUrl,C,m]),$O=v.useCallback(oe=>{const Ie=oe.target.value;ne(Ie),Jn.onTextChange(Ie,oe.target.selectionStart??Ie.length)},[Jn]),zO=v.useCallback((oe,Ie)=>{ne(oe),Jn.onTextChange(oe,Ie)},[Jn]),Y5=v.useCallback(oe=>{const{text:Ie,cursorPos:ke}=Jn.insertMention(oe,q);ne(Ie),requestAnimationFrame(()=>{var Xe;(Xe=Ce.current)==null||Xe.focus(ke)})},[Jn,q]),HO=oe=>{const Ie=Jn.handleMentionKeyDown(oe);if(Ie.handled){Ie.selectedItem&&Y5(Ie.selectedItem);return}oe.key==="Enter"&&!oe.shiftKey&&!oe.nativeEvent.isComposing&&(oe.preventDefault(),Q5())},Q5=async()=>{var Xe,er;if(r||we||!q.trim()&&!V5)return;if(y){k(!0);return}if(h===!1){Qe.error(m("art.noAddProjectPermission","æ æ·»å é¡¹ç®æé"));return}if(Ne==="video"){{const St=gZ((Xe=lt==null?void 0:lt.inputs)==null?void 0:Xe[Re],{startFrameUrl:In,endFrameUrl:Rr,referenceVideoUrl:Wr,continuationVideoUrl:Na,elements:Nr,referenceVideoUrls:ln,referenceImageUrls:Zr,referenceAudioUrls:Ot,referenceVoiceUrls:Dr,audioUrl:ni});if(!St.isValid){Qe.error(xZ(m,St.issues[0]));return}}if(ue!=null&&ue.endsWith("-kuaikuai")){const St=[];for(const dt of[In,Rr,Wr,kr,Na,ni])dt&&St.push(dt);for(const dt of[ln,Ot,Dr,Zr])for(const tr of dt||[])tr&&St.push(tr);for(const dt of Nr||[]){dt!=null&&dt.frontalUrl&&St.push(dt.frontalUrl);for(const tr of(dt==null?void 0:dt.referenceUrls)||[])tr&&St.push(tr)}const ct=St.map(dt=>Dj(dt)).filter(dt=>!!dt);if(console.log(`[CF] ArtGenerationInputArea.gate entry model=${ue} inlineUrls=${St.length} inlineAssetIds=${ct.length}`),St.length>0){Be(!0);try{const tr=(await tj(ct,St)).map(wm=>wm.assetId);if(tr.length>0){const ux=(await rj(tr)).filter(Cd=>Cd.status==="rejected");if(ux.length>0){const Cd=ux[0].rejectReason||"";console.warn(`[CF] ArtGenerationInputArea.gate REJECTED reason="${Cd}"`),Qe.error(Cd?`${m("compliance.sendBlockedRejected")}ï¼${Cd}`:m("compliance.sendBlockedRejected")),Be(!1);return}console.log("[CF] ArtGenerationInputArea.gate PASS (all approved)")}else console.log("[CF] ArtGenerationInputArea.gate PASS (no Asset matched, third-party url fallback)")}catch(dt){const tr=(dt==null?void 0:dt.message)==="compliance:timeout";console.warn(`[CF] ArtGenerationInputArea.gate ERROR ${tr?"TIMEOUT":"NETWORK/SERVICE"} msg="${(dt==null?void 0:dt.message)||dt}"`),Qe.error(m(tr?"compliance.sendBlockedTimeout":"compliance.sendBlockedRejected")),Be(!1);return}}}}const ke={prompt:Ne==="image"?Jn.resolveMentions(q.trim()):q.trim(),generateMode:Ne,attachments:he.length>0?he:void 0,mentionAssets:cx};if(e==="workspace"&&(s!=null&&s.selectedElementId)){const St=s.elements.find(ct=>ct.id===s.selectedElementId);if((St==null?void 0:St.type)==="image"){const ct=St.data,dt=(ct.images?ct.images[ct.coverIndex??0]||ct.images[0]:null)||ct.resolvedUrl||ct.url;dt&&!((er=ke.attachments)!=null&&er.includes(dt))&&(ke.attachments=[...ke.attachments||[],dt])}}if(Ne==="image"||Ne==="direct_image")ke.model=S,ke.aspectRatio=R,ke.resolution=M||void 0,ke.quality=B||void 0,ke.imageCount=W,ke.enableWebSearch=G||void 0,ke.cameraControl
1243=D??void 0,c&&(ke.skillHint=c.skillName);else if(Ne==="video"&&(ke.videoModel=ue||void 0,ke.videoAspectRatio=Ft,ke.videoResolution=ht||void 0,ke.videoDuration=Ge,ke.audioEnabled=Nt,ke.videoInputMode=Re,ke.videoGenType=lx,ke.startFrameUrl=In||void 0,ke.endFrameUrl=Rr||void 0,ke.referenceVideoUrl=Wr||void 0,ke.referenceImageUrl=kr||void 0,ke.audioUrl=ni||void 0,ke.promptExtend=Nd,ke.watermark=fs,ke.keepAudio=Rs,ke.voiceCloneUrls=Dr.length>0?Dr:void 0,ke.refVideos=ln.length>0?ln:void 0,ke.continuationVideoUrl=Na||void 0,ke.continuationParentId=$e||void 0,ke.continuationClipDuration=ot||void 0,Nr.length>0&&(ke.elements=Nr.map(ct=>({frontal_image_url:ct.frontalUrl,reference_image_urls:ct.referenceUrls.length>0?ct.referenceUrls:void 0}))),Vt&&(Ot.length>0&&(ke.referenceAudioUrls=Ot),Re==="text"&&gr&&(ke.useWebSearch=!0)),(Xs&&(Re==="video_edit"||Re==="video_reference"||Re==="reference")||(lt==null?void 0:lt.modelFamily)==="happyhorse"&&Re==="video_edit")&&Zr.length>0&&(ke.referenceImageUrls=Zr),Re==="video_reference"&&(ke.v2vEndpoint="reference"),(Xs&&Re==="video_edit"||Re==="video_continuation")&&Td&&(ke.sourceVideoDuration=Math.round(Td)),ue!=null&&ue.startsWith("kling-o3"))){const ct=gi.getState(),dt=nI(ct.multiPromptShots);ct.isMultiShotMode&&dt.length>0&&Re==="text"&&(ke.multiPromptShots=dt,ke.shotType="customize",ke.prompt||(ke.prompt=MZ(dt,m)))}Be(!0);try{await t(ke),ne(""),xe([]),Jn.closeMention(),Jn.clearMentionMap()}catch{}finally{Be(!1)}},qO=v.useMemo(()=>{var oe,Ie;if(!h)return m("art.noAddProjectPermission","æ æ·»å é¡¹ç®æé");if(Ne==="video"){const ke=(Ie=(oe=lt==null?void 0:lt.inputs)==null?void 0:oe[Re])==null?void 0:Ie.placeholderKey;return ke?m(ke):Re==="video_continuation"?m("video.placeholderContinuation","æè¿°è§é¢æ¥ä¸æ¥åççå
容..."):Re==="reference"&&xn?m("video.placeholderWanReference","ä¸ä¼ åèå¾çåè§é¢ï¼è¾å
¥ @ éæ©ç´ æå¼ç¨..."):Re==="reference"?m("video.placeholderElements","ç¨ @Element1 å¼ç¨ä¸ä¼ çåèå
ç´ ..."):Re==="first_frame"&&xn?m("video.placeholderFirstFrameWithEnd","ä¸ä¼ é¦å¸§å尾帧å¾çï¼æè¿°ä¸é´çè¿æ¸¡ææ..."):Re==="first_frame"?m("video.placeholderFirstFrame","æè¿°é¦å¸§å¾çåç»çå¨ä½ååå..."):xn?m("video.placeholderWanT2V","æè¿°è§é¢ç»é¢ï¼ä¸ä¼ é³é¢åèªå¨çæé
é³..."):m("video.promptPlaceholder","æè¿°ä½ æ³è¦çæçè§é¢å
容...")}return Ne==="direct_image"?m("art.agent.directImagePlaceholder","æè¿°è¦çæçå¾ç..."):c&&c.skillName&&m(`art.agent.skill.${c.skillName}Placeholder`,"")||m("art.agent.inputPlaceholder","æè¿°ä½ ç设计æè®©æç¼è¾å¾ç...")},[h,Ne,Re,xn,c,m]);return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:`shrink-0 ${e==="workspace"?"border-t border-border":""}`,children:i.jsxs("div",{className:"relative",children:[Jn.showMention&&Jn.filteredItems.length>0&&i.jsx(hZ,{items:Jn.filteredItems,activeIndex:Jn.mentionIndex,onSelect:Y5}),i.jsxs("div",{className:"bg-card border border-border rounded-2xl shadow-sm overflow-visible",children:[(Ne==="image"||Ne==="direct_image")&&(c||he.length>0||e==="workspace"&&(s==null?void 0:s.selectedElementId)&&((rE=s.elements.find(oe=>oe.id===s.selectedElementId))==null?void 0:rE.type)==="image"||vm>0&&he.length<vm)&&i.jsxs("div",{className:"px-4 pt-2 pb-1 flex items-center gap-2 overflow-x-auto",children:[vm>0&&he.length<vm&&i.jsx(dZ,{onLocalUpload:()=>{var oe;return(oe=Ae.current)==null?void 0:oe.click()},onCanvasSelect:oe=>{he.includes(oe)||xe(Ie=>[...Ie,oe])},disabled:Oe,isUploading:Oe,label:m("art.agent.mentionImage","å¾ç"),hideCanvasOption:e==="standalone"}),e==="workspace"&&(s==null?void 0:s.selectedElementId)&&V.rawUrl&&i.jsx(mN,{url:C||V.rawUrl,onRemove:()=>$n.getState().setSelectedElement(null)}),he.map((oe,Ie)=>i.jsx(mN,{url:oe,onRemove:()=>xe(ke=>ke.filter((Xe,er)=>er!==Ie))},oe)),c&&Ne==="image"&&i.jsxs("span",{className:"ml-auto inline-flex items-center gap-1 h-6 px-2 rounded-full text-[11px] font-medium bg-blue-500/10 text-blue-600 border border-blue-500/20 dark:text-blue-400 dark:bg-blue-400/10 dark:border-blue-400/20 shrink-0",children:[c.icon,c.label,i.jsx("button",{onClick:()=>{d==null||d(null),ne("")},className:"ml-0.5 hover:text-blue-400 transition-colors",children:i.jsx(cr,{className:"w-2.5 h-2.5"})})]})]}),Ne==="video"&&Sd.length>1&&i.jsxs("div",{className:"px-4 pt-2 pb-0",children:[i.jsx("div",{className:"flex gap-1 mb-2",children:Sd.map(oe=>i.jsx("button",{onClick:()=>on(oe.value),className:`px-2.5 py-1 text-xs rounded-md transition-colors ${Re===oe.value?"bg-primary text-primary-foreground font-medium":"bg-muted/50 hover:bg-muted text-muted-foreground"}`,children:oe.label},oe.value))}),LO&&i.jsx("div",{className:"flex items-center gap-1.5 mb-2 pt-2 -mt-2 overflow-x-auto",children:i.jsx(GQ,{slots:ym,size:"sm",hideCanvasOption:e==="standalone",virtualPersonPickerEnabled:(ue==null?void 0:ue.endsWith("-kuaikuai"))??!1,state:{startFrame:{url:In,set:ms},endFrame:{url:Rr,set:Qs},elements:{items:Nr,add:oe=>yc(Ie=>[...Ie,oe]),removeAt:oe=>yc(Ie=>Ie.filter((ke,Xe)=>Xe!==oe))},sourceVideo:{url:Wr,set:pm},refVideos:{urls:ln,add:oe=>vc(Ie=>[...Ie,oe]),removeAt:oe=>vc(Ie=>Ie.filter((ke,Xe)=>Xe!==oe))},refAudios:{urls:Ot,add:oe=>Mr(Ie=>[...Ie,oe]),removeAt:oe=>Mr(Ie=>Ie.filter((ke,Xe)=>Xe!==oe))},refImages:{urls:Zr,add:oe=>wc(Ie=>[...Ie,oe].slice(0,4)),removeAt:oe=>wc(Ie=>Ie.filter((ke,Xe)=>Xe!==oe))},parentVideo:{url:Na,set:(oe,Ie)=>
1243{if(bm(oe),at(null),!oe)ae(0);else if(Ie!=null&&Ie.durationSec){const ke=Math.ceil(Ie.durationSec);ae(ke),Ge<=ke&&mt(ke+1)}}},voiceCloneAudios:{urls:Dr,add:gm,removeAt:xm},drivingAudio:{url:ni,set:oe=>kd(oe)}}})}),Xs&&Ne==="video"&&Re==="text"&&i.jsx("div",{className:"mb-2",children:i.jsx(IZ,{size:"sm",mentionAssets:cx})})]}),i.jsxs("div",{className:"px-4 pt-2 pb-2",children:[i.jsx(rI,{ref:Ce,value:q,onChange:zO,onTagClick:()=>{},onCameraTagClick:pe,onKeyDown:HO,onFocus:_2,disabled:!h||W5,placeholder:W5?m("video.multiShot.mainPromptDisabled","已忢å°åé头模å¼ï¼è¯·å¨ä¸æ¹å¡«åæ¯ä¸ªé头ç prompt"):qO,mentionAssets:cx}),i.jsx("textarea",{ref:Ee,value:q,onChange:$O,className:"sr-only","aria-hidden":"true",tabIndex:-1,maxLength:nf}),q.length>nf*.8&&i.jsxs("span",{className:`input-char-counter ${q.length>=nf?"error":"warning"}`,children:[q.length.toLocaleString(),"/",nf.toLocaleString()]})]}),i.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-2.5 min-w-0",children:[i.jsxs("div",{ref:De,className:"relative shrink-0",children:[i.jsxs("button",{onClick:()=>ie(oe=>!oe),className:"h-8 px-2 text-xs bg-[var(--bg-tertiary)] border border-ui-border rounded-lg hover:bg-[var(--bg-hover)] transition-colors font-medium text-[var(--text-primary)] flex items-center gap-1.5",children:[Ne==="image"?i.jsx(wn,{className:"w-3.5 h-3.5"}):Ne==="direct_image"?i.jsx(Ss,{className:"w-3.5 h-3.5"}):i.jsx(i.Fragment,{children:i.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.934a.5.5 0 0 0-.777-.416L16 11"}),i.jsx("rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"})]})}),Ne==="image"?"Design Agent":Ne==="direct_image"?m("art.genStatus.modeImage","å¾ç"):m("art.genStatus.modeVideo","è§é¢")]}),be&&i.jsx("div",{className:"absolute left-0 bottom-full mb-1 z-[100] bg-[var(--bg-primary)] border border-ui-border rounded-lg shadow-lg overflow-hidden min-w-[120px] w-max py-1",children:[{mode:"image",label:"Design Agent",icon:i.jsx(wn,{className:"w-4 h-4"})},{mode:"direct_image",label:m("art.genStatus.imageGenerator","å¾ççæå¨"),icon:i.jsx(Ss,{className:"w-4 h-4"})},{mode:"video",label:m("art.genStatus.videoGenerator","è§é¢çæå¨"),icon:i.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.934a.5.5 0 0 0-.777-.416L16 11"}),i.jsx("rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"})]})}].map(({mode:oe,label:Ie,icon:ke})=>i.jsxs("button",{onClick:()=>{de(oe),ie(!1)},className:`w-full px-3 py-2 text-xs text-left transition-colors flex items-center gap-2 whitespace-nowrap ${Ne===oe?"bg-accent font-medium text-[var(--text-primary)]":"hover:bg-[var(--bg-hover)] text-[var(--text-secondary)]"}`,children:[ke,Ie]},oe))})]}),(Ne==="image"||Ne==="direct_image")&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"min-w-0 shrink w-fit",children:i.jsx(w2,{items:BO,showDescription:!0,value:S,onChange:E,externalLoading:A,compact:!0,hideChevron:!0})}),i.jsx(eZ,{models:T,selectedModel:S,aspectRatio:R,resolution:M,quality:B,imageCount:W,hideImageCount:Ne==="image",onAspectRatioChange:H,onResolutionChange:L,onQualityChange:$,onImageCountChange:ee}),i.jsx(aZ,{value:D,onChange:K}),Ne==="image"&&O&&i.jsxs("button",{type:"button",onClick:()=>Q(!G),className:"inline-flex items-center gap-1 h-8 shrink-0",children:[i.jsx(Tn,{className:"w-3.5 h-3.5 text-[var(--text-tertiary)]"}),i.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:m("art.webSearchLabel","å
¨ç½")}),i.jsx("div",{className:`relative w-9 h-5 rounded-full transition-colors ${G?"bg-[var(--theme)]":"bg-zinc-300 dark:bg-zinc-600"}`,children:i.jsx("div",{className:`absolute top-0.5 w-4 h-4 rounded-full bg-white shadow transition-transform ${G?"translate-x-[18px]":"translate-x-0.5"}`})})]})]}),Ne==="video"&&i.jsxs(i.Fragment,{children:[i.jsx(RZ,{onInsert:oe=>{var Ie;jZ(oe)||(Ie=Ce.current)==null||Ie.insertText(oe)}}),i.jsx("div",{className:"min-w-0 shrink w-fit",children:i.jsx(w2,{items:K5,showDescription:!0,value:ue,onChange:je,externalLoading:F.length===0,compact:!0,hideChevron:!0,disabledIds:ni?K5.filter(oe=>oe.id!=="wan2.7").map(oe=>oe.id):void 0})}),i.jsx(cZ,{models:F,selectedModel:ue,aspectRatio:Ft,duration:Ge,sourceVideoDuration:Td,resolution:ht,audioEnabled:Nt,onAspectRatioChange:ur,onDurationChange:mt,onResolutionChange:Qt,onAudioEnabledChange:Jt,promptExtend:Nd,onPromptExtendChange:ox,watermark:fs,onWatermarkChange:si,minDurationOverride:Re==="video_continuation"&&ot>0?ot:void 0,maxDurationOverride:xn&&Re==="reference"&&ln.length>0?10:void 0,videoInputMode:Re,useWebSearch:gr,onUseWebSearchChange:gn,keepAudio:Rs,onKeepAudioChange:Ki})]}),i.jsx("div",{className:"ml-auto flex items-center gap-1.5 shrink-0",children:r||we?i.jsx("button",{onClick:n,disabled:!n,className:`h-8 px-3 rounded-lg flex items-center justify-center transition-all text-xs ${n?"bg-destructive text-destructive-foreground hover:bg-destructive/90 cursor-pointer":"bg-muted text-muted-foreground cursor-wait"}`,children:n?i.jsx(mG,{className:"w-4 h-4"}):i.jsx(kn,{className:"w-4 h-4 animate-spin"})}):(()=>{const oe=!!q.trim()||V5,Ie=Ne==="direct_image"?Ye:Ne==="video"?FO:null;return i.jsx("button",{onClick:Q5,disabled:!h||!y&&!oe,title:h?void 0:m("art.noAddProjectPermission","æ æ·»å é¡¹ç®æé"),className:`${Ie!=null?"h-8 px-2.5":"w-8 h-8"} flex items-center justify-center gap-1 rounded-lg transition-all shrink-0 text-xs ${!h||y?"bg-muted text-muted-foreground opacity-50 cursor-not-allowed":oe?"bg-[var(--theme)] text-white hover:bg-[var(--theme-hover)]":"bg-[var(--theme-medium)] text-[var(--text-muted)] curs
1243or-not-allowed"}`,children:Ie!=null?`~${Ie}`:i.jsx(Gu,{className:"w-4 h-4"})})})()})]})]})]})}),i.jsx("input",{ref:Ae,type:"file",accept:"image/*",onChange:PO,className:"hidden"}),i.jsx(up,{open:b,onClose:()=>k(!1),requiredCredits:g.premium,currentCredits:p}),i.jsx(DZ,{open:!!X,anchorRect:(X==null?void 0:X.rect)??null,currentKey:X==null?void 0:X.key,onReplace:oe=>{X&&ne(q.slice(0,X.start)+`[camera:${oe}]`+q.slice(X.end))},onDelete:()=>{if(!X)return;const oe=q.slice(0,X.start)+q.slice(X.end);ne(oe.replace(/[ \t]{2,}/g," ").trim())},onClose:()=>pe(null)})]})}const LZ=[{id:"logo_design",icon:p9,labelKey:"art.types.logoDesign",label:"Logo Design"},{id:"product_photo",icon:Jh,labelKey:"art.types.productPhoto",label:"Product Photo"},{id:"brand_kit",icon:w1,labelKey:"art.types.brandKit",label:"Brand Kit"},{id:"social_carousel",icon:UV,labelKey:"art.types.socialCarousel",label:"Social Carousel"},{id:"ecommerce_design",icon:o3,labelKey:"art.types.ecommerceDesign",label:"E-Commerce"},{id:"ai_painting",icon:S9,labelKey:"art.types.aiPainting",label:"AI Painting"}],PZ={logo_design:[{label:"Translation App Logo",prompt:"Design a logo for translation software Transor, 3D metallic finish, blue-silver color scheme, stylized T lettermark, dark background",emoji:"ð",thumbnail:"https://uniai-public.uniai.one/art-templates/logo-1.png"},{label:"AI Brand Badge Logo",prompt:"Design a logo for UniAI, neural network brain graphic, 3D ring badge, blue-purple neon glow, transparent background",emoji:"â¨",thumbnail:"https://uniai-public.uniai.one/art-templates/logo-2.png"},{label:"AI Wordmark Logo",prompt:"Design a wordmark logo for UniAI, brain shape integrated into letterforms, purple-blue gradient, white background, flat modern style",emoji:"ð",thumbnail:"https://uniai-public.uniai.one/art-templates/logo-3.png"}],social_carousel:[{label:"Coffee Brewing Tutorial Carousel",prompt:"Coffee brewing tutorial, 6-page social media carousel, minimalist style, warm tones",emoji:"â",thumbnail:"https://uniai-public.uniai.one/art-templates/carousel-1.png"},{label:"Singapore Travel Guide Carousel",prompt:"Singapore travel guide, 5-page carousel, Art Deco style, navy blue and gold color scheme",emoji:"âï¸",thumbnail:"https://uniai-public.uniai.one/art-templates/carousel-2.png"},{label:"Workout Tutorial Carousel",prompt:"Home workout exercise tutorial, 4-page social media carousel, bold orange-black theme, with photos and tips",emoji:"ðï¸",thumbnail:"https://uniai-public.uniai.one/art-templates/carousel-3.png"}],product_photo:[{label:"Design a Bauhaus-inspired poster.",prompt:"Make a poster for a music festival in the Bauhaus style. Use a limited color palette of pink, red, and cream. Abstract geometric shapes representing sound waves. Minimalist vertical text.",emoji:"ð¨",thumbnail:"https://uniai-public.uniai.one/art-templates/design-1.png"},{label:"Brainstorm beautiful interiors.",prompt:"Generate 1 different interiors - different furniture pieces, colors, space - in the same style and mood.",emoji:"ðï¸",thumbnail:"https://uniai-public.uniai.one/art-templates/design-2.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/1b38eec5-8177-4210-b914-a52a4c1d3687.webp",name:"Interior"}]},{label:"Anime character material",prompt:"Generate a three-view of a Japanese anime beautiful girl",emoji:"ð¦",thumbnail:"https://uniai-public.uniai.one/art-templates/design-3.png"}],brand_kit:[{label:"Hang your logo on the sweatshirt.",prompt:"A photo of a multi-view studio product made of a pale blue sweatshirt with the logo embroidered on the front. The sweatshirt should appear authentic, well-lit and minimalist, placed against a neutral background. Embroidery should use black thread, straight and discreet. @Element 1",emoji:"â¨",thumbnail:"https://uniai-public.uniai.one/art-templates/branding-1.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/5f69a19a-236a-454c-a327-aa9c5d31fd11.png",name:"Logo"}]},{label:"Make a stunning holiday campaign for your brand.",prompt:"Top-down flat lay of a luxury necklace resting on deep black velvet. The velvet surface rises in soft waves and folds, partially wrapping around the chain, creating dramatic depth and contrast. Fine fabric fibers are visible in macro detail, forming a rich three-dimensional texture. Controlled studio lighting from above creates strong yet refined shadows, enhancing the contrast between the matte fabric and the reflective metal. High-end jewelry campaign, dramatic lighting, premium black and gold aesthetic, ultra sharp macro photography. @Element 1",emoji:"ð",thumbnail:"https://uniai-public.uniai.one/art-templates/branding-2.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/2fa95bf3-2d74-4ea6-9c72-c68ef18e574a.jpg",name:"Necklace"}]},{label:"Place your ad on a street billboard.",prompt:"@Element 1 the sidew
1243alk board display @Element 2 this exact ice cream image.",emoji:"ð¦",thumbnail:"https://uniai-public.uniai.one/art-templates/branding-3.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/77e5855c-7031-475e-8a7f-e2982ee7a83c.jpeg",name:"Board"},{url:"https://uniai-public.uniai.one/showcase/22f2b971-aba0-47b8-bb4c-a6934a04d0b5.jpg",name:"Ice Cream"}]}],ai_painting:[{label:"From sketch to endless illustration styles.",prompt:"Make this sketch into a 2D illustration in an anime style @Element 1",emoji:"âï¸",thumbnail:"https://uniai-public.uniai.one/art-templates/illustration-1.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/7031619c-069a-4ad4-8623-03a0da5f8731.png",name:"Sketch"}]},{label:"Compose a surrealist painting from random objects.",prompt:"@Element 1 @Element 2 @Element 3 @Element 4 @Element 5 @Element 6 @Element 7 @Element 8 @Element 9 Use these objects to generate a surrealist painting; use them however you like.",emoji:"ð¨",thumbnail:"https://uniai-public.uniai.one/art-templates/illustration-2.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/c4e9c4ca-d783-4380-93cd-5ec00aecc9a4.png",name:"Spoon"},{url:"https://uniai-public.uniai.one/showcase/4b38fa99-c930-42c4-bc0e-27e74201b05f.jpg",name:"Umbrella"},{url:"https://uniai-public.uniai.one/showcase/9ccdc4c6-45c4-44b8-9780-45766a7bfb7a.png",name:"Coca-Cola"},{url:"https://uniai-public.uniai.one/showcase/588cfaed-a19a-4caa-8b67-0eac38
1243c6ea0f.png",name:"Egg"},{url:"https://uniai-public.uniai.one/showcase/16581872-107f-4730-8bdb-3e47c0709bd6.jpg",name:"Cherry"},{url:"https://uniai-public.uniai.one/showcase/f2c8eaa2-57ca-4e02-8234-4c3c4b55eb19.png",name:"Hat"},{url:"https://uniai-public.uniai.one/showcase/15564baf-acf3-4c56-b986-5efcfec4bd68.png",name:"Box"},{url:"https://uniai-public.uniai.one/showcase/c808c455-89f9-4a67-847c-7a5f7a11b29a.png",name:"Stool"},{url:"https://uniai-public.uniai.one/showcase/fa50b684-55cb-445d-87e1-97f94c460287.jpg",name:"Bunny"}]},{label:"Create seamless patterns for any surface.",prompt:"Generate 3 seamless ditsy floral patterns.",emoji:"ð¸",thumbnail:"https://uniai-public.uniai.one/art-templates/illustration-3.png"}],ecommerce_design:[{label:"Show your clothing on a model.",prompt:"Let the model @Element 2 wear this outfit @Element 1 maintain the @Element 3 position.",emoji:"ð",thumbnail:"https://uniai-public.uniai.one/art-templates/ecommerce-1.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/277722ca-cea7-4cb0-afd5-20b665c02328.png",name:"Coat"},{url:"https://uniai-public.uniai.one/showcase/8a81cc81-c959-4a29-a612-6d35f77ee612.jpeg",name:"Model"},{url:"https://uniai-public.uniai.one/showcase/3873def6-7de0-4d3d-babb-a33fe8fc21b2.png",name:"Pose"}]},{label:"Style your product for social media.",prompt:"Generate 5 minimalist, creative stylized lifestyle images for this ceramic dish. @Element 1",emoji:"ð¸",thumbnail:"https://uniai-public.uniai.one/art-templates/ecommerce-2.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/fd75d01d-93fa-4a6c-b147-6e8805cee339.jpg",name:"Dish"}]},{label:"Generate ad graphics for your product.",prompt:"A clean, @Element 2 minimalist, and modern ad poster for this perfume product. The bottle is centered in the lower half of the image. The background is a smooth vertical gradient that transitions from a light yellow at the bottom to a pastel bright butter yellow at the top. The poster includes @Element 1 the logo in white, and minimalist, small white sans serif text at the top: '20% Off Our Signature Scent'",emoji:"ð¯",thumbnail:"https://uniai-public.uniai.one/art-templates/ecommerce-3.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/96d03518-946f-4bcd-acaa-4339b94ef100.jpeg",name:"Logo"},{url:"https://uniai-public.uniai.one/showcase/7f83707d-b1e0-48ea-96ec-d7275113d48d.png",name:"Perfume"}]}],"nano-banana-pro":[{label:"Generate a furniture shop landing page.",prompt:"Generate a landing page for a furniture shop called UniAI, Neo Brutalism style. These are the product images:",emoji:"ðï¸",thumbnail:"https://uniai-public.uniai.one/art-templates/nano-banana-pro-1.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/7d0bfaa3-a76a-432b-bb21-81baa70bc1d0.png",name:"Chair"},{url:"https://uniai-public.uniai.one/showcase/2792139e-18d8-4fde-b51c-42b2c0facd0d.png",name:"Nightstand"},{url:"https://uniai-public.uniai.one/showcase/1f800457-dac6-4faa-af2e-c176540ed433.png",name:"Beanbag"},{url:"https://uniai-public.uniai.one/showcase/dad6385c-f9cf-445e-908e-5f8824cf558e.png",name:"Table"},{url:"https://uniai-public.uniai.one/showcase/ea3cad12-323e-4e38-a3b0-209cfb08d840.png",name:"Stool"}]},{label:"Solve a complex math problem on the white board.",prompt:"A vintage 1970s comic book page depicting a multi-panel superhero story sequence. The art style is classic hand-drawn comic illustration with bold outlines and a vibrant but slightly faded color palette, including visible Ben-Day dots. The comic strip features Wonder Woman in her iconic costume, alongside two men in suits, set against the backdrop of New York City. The narrative shows Wonder Woman rescuing the men from their boring 9-to-5 office jobs. The page is laid out in a traditional comic panel grid, complete with speech bubbles, narration boxes, creating a nostalgic, adventurous, and quirky retro feel.",emoji:"ð¬",thumbnail:"https://uniai-public.uniai.one/art-templates/nano-banana-pro-2.png"},{label:"Generate professional engineering drawings.",prompt:"A professional CAD drawing of this object. @Element 1 Isometric view, white lines on professional high quality blue background; line weights and line types follow conventions; add dimension lines and annotations.",emoji:"ð",thumbnail:"https://uniai-public.uniai.one/art-templates/nano-banana-pro-3.png",referenceImages:[{url:"https://uniai-public.uniai.one/showcase/5cbb64b6-a1e4-4274-9887-57418ce6c900.jpg",name:"G63"}]}]};function FZ({tpl:e,onClick:t}){const[r,n]=v.useState(!1),[s,a]=v.useState(!1);return i.jsxs("button",{onClick:t,className:"group flex flex-col text-left bg-card border border-border rounded-xl overflow-hidden hover:border-primary/50 hover:shadow-md transition-all duration-200",children:[e.thumbnail&&!s?i.jsx("img",{src:e.thumbnail,alt:e.label,className:`block w-full max-h-[137.3px] object-cover transition-all duration-500 ${r?"opacity-100 scale-100":"opacity-0 scale-105"} group-hover:scale-105`,loading:"lazy",onLoad:()=>n(!0),onError:()=>a(!0)}):i.jsx("div",{className:"aspect-[4/3] bg-muted/50 flex items-center justify-center text-5xl",children:e.emoji}),i.jsxs("div",{className:"p-3",children:[e.response&&i.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed mb-2 line-clamp-2",children:e.response}),i.jsx("p",{className:"text-xs text-muted-foreground leading-snug",children:e.label})]})]})}function sI({onSubmit:e,className:t,showQuickActions:r=!0}){const{t:n}=We(),{requireAuth:s}=RY(),{selectedModel:a,setSelectedModel:o,aspectRatio:l,setAspectRatio:u,createProject:c}=$n(),d=Pi(A=>A.currentTeamId),h=Pi(A=>A.canAddProjectInCurrentTeam()),m=$n(A=>A.generateMode||"image"),[f,p]=v.useState(""),g=v.useRef(null),[x,w]=v.useState(!1),[y,b]=v.useState(),[k,T]=v.useState(),S=A=>{var R;
1243b(A.prompt||A.label),(R=A.referenceImages)!=null&&R.length?T(A.referenceImages.map(M=>M.url)):T(void 0)},j=async A=>{if(!s())throw new Error("Auth required");w(!0);try{const R={logo_design:"design",product_photo:"design",brand_kit:"branding",social_carousel:"design",ecommerce_design:"ecommerce",ai_painting:"illustration"}[f]||"design",M=await c(R,d??void 0,void 0,A.prompt||void 0),B={...A};f&&!B.skillHint&&(B.skillHint=f),e(M,B)}finally{w(!1)}},E=f?PZ[f]||[]:[];return i.jsxs("div",{className:t,children:[i.jsx(OZ,{context:"standalone",onSubmit:j,isBusy:x,injectedPrompt:y,onInjectedPromptConsumed:()=>b(void 0),injectedAttachments:k,onInjectedAttachmentsConsumed:()=>T(void 0),isEditable:h}),r&&i.jsx("div",{className:"flex flex-wrap justify-center gap-2 mt-5",children:m==="image"?LZ.map(A=>{const R=A.icon,M=f===A.id;return i.jsxs("button",{onClick:()=>{f===A.id?(p(""),g.current&&(o(g.current.model),u(g.current.aspectRatio),g.current=null)):(f||(g.current={model:a,aspectRatio:l}),p(A.id))},className:`flex items-center gap-1.5 px-4 py-2 rounded-full text-sm border transition-colors ${M?"border-blue-500/30 text-blue-600 bg-blue-500/5 dark:text-blue-400 dark:border-blue-400/30 dark:bg-blue-400/5":"border-border text-muted-foreground hover:border-foreground
1243/30 hover:text-foreground"}`,children:[i.jsx(R,{className:"w-4 h-4"}),i.jsx("span",{children:n(A.labelKey,A.label)})]},A.id)}):m==="direct_image"?[{label:n("art.agent.imageTag.sunset","æ¥è½é£æ¯ç»"),prompt:"A breathtaking sunset landscape with golden clouds, mountains and a serene lake reflection",icon:i.jsx(Tn,{className:"w-4 h-4"})},{label:n("art.agent.imageTag.cyberpunk","èµåæå
åå¸"),prompt:"Neon-lit cyberpunk cityscape at night with holographic advertisements and flying vehicles",icon:i.jsx(wn,{className:"w-4 h-4"})},{label:n("art.agent.imageTag.watercolor","水彩è±å"),prompt:"Elegant watercolor painting of blooming peonies and roses with soft pastel tones",icon:i.jsx(S9,{className:"w-4 h-4"})},{label:n("art.agent.imageTag.petPortrait","å® ç©åç"),prompt:"Studio portrait of a cute golden retriever wearing a bow tie, soft lighting, professional photography",icon:i.jsx(Jh,{className:"w-4 h-4"})},{label:n("art.agent.imageTag.foodPhoto","ç¾é£ç¹å"),prompt:"Close-up food photography of a gourmet dish with fresh ingredients, warm lighting, appetizing presentation",icon:i.jsx(o3,{className:"w-4 h-4"})},{label:n("art.agent.imageTag.futuristic","æªæ¥å»ºç"),prompt:"Futuristic architectural masterpiece with organic curves, glass facades and lush vertical gardens",icon:i.jsx(p9,{className:"w-4 h-4"})}].map(A=>i.jsxs("button",{onClick:()=>b(A.prompt),className:"flex items-center gap-1.5 px-4 py-2 rounded-full text-sm border transition-colors border-border text-muted-foreground hover:border-foreground
1243/30 hover:text-foreground",children:[A.icon,i.jsx("span",{children:A.label})]},A.label)):[{label:n("art.agent.videoTag.sunrise","æ¥åºå»¶æ¶"),prompt:"Timelapse of a stunning sunrise over the ocean, golden light gradually illuminating the water surface"},{label:n("art.agent.videoTag.nature","èªç¶é£å
"),prompt:"Cinematic aerial shot slowly flying over lush green mountains with clouds drifting through valleys"},{label:n("art.agent.videoTag.product","产åå±ç¤º"),prompt:"Smooth 360-degree rotation of a sleek product on a minimalist white surface with soft studio lighting"},{label:n("art.agent.videoTag.particle","ç²åå¨ç»"),prompt:"Abstract colorful particles flowing and swirling in space, forming dynamic shapes with glowing trails"},{label:n("art.agent.videoTag.character","è§è²å¨ç»"),prompt:"A 3D character walking confidently through a futuristic city street, dynamic camera following"},{label:n("art.agent.videoTag.food","ç¾é£å¶ä½"),prompt:"Close-up slow motion of chocolate being poured over a dessert, rich and appetizing food cinematography"}].map(A=>i.jsx("button",{onClick:()=>b(A.prompt),className:"flex items-center gap-1.5 px-4 py-2 rounded-full text-sm border transition-colors border-border text-muted-foreground hover:border-foreground
1243/30 hover:text-foreground",children:i.jsx("span",{children:A.label})},A.label))}),r&&i.jsx("div",{className:"mt-8 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 items-start",children:E.map((A,R)=>i.jsx(FZ,{tpl:A,onClick:()=>S(A)},R))})]})}function wa({data:e}){const t=JSON.stringify(e);return i.jsx(Tw,{children:i.jsx("script",{type:"application/ld+json",children:t})})}const ac="https://www.uniai.ai",A2=`${ac}/logos/uniai-512.png`;function BZ(){return{"@context":"https://schema.org","@type":"Organization",name:"UniAI",url:ac,logo:A2,sameAs:["https://twitter.com/uniai","https://github.com/uniai"]}}function UZ(e="en"){return{"@context":"https://schema.org","@type":"WebSite",name:"UniAI",url:`${ac}/${e}`,potentialAction:{"@type":"SearchAction",target:`${ac}/${e}/blog?q={search_term_string}`,"query-input":"required name=search_term_string"}}}function hc(e){const t={"@context":"https://schema.org","@type":"SoftwareApplication",name:e.name,description:e.description,url:`${ac}/${e.lang}`,applicationCategory:e.applicationCategory??"ProductivityApplication",operatingSystem:e.operatingSystem??"macOS, Windows, Android, Web",offers:{"@type":"Offer",price:e.price??"0",priceCurrency:e.priceCurrency??"USD"}};return e.ratingValue&&e.ratingCount&&(t.aggregateRating={"@type":"AggregateRating",ratingValue:e.ratingValue,ratingCount:e.ratingCount}),t}function B3(e){return{"@context":"https://schema.org","@type":e.type??"Article",headline:e.headline,description:e.description,datePublished:e.datePublished,dateModified:e.dateModified??e.datePublished,image:e.image??A2,author:{"@type":"Organization",name:e.authorName??"UniAI"},publisher:{"@type":"Organization",name:"UniAI",logo:{"@type":"ImageObject",url:A2}},mainEntityOfPage:{"@type":"WebPage","@id":`${ac}/${e.lang}${e.pathSuffix}`}}}function al(e,t){return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.map((r,n)=>({"@type":"ListItem",position:n+1,name:r.name,item:`${ac}/${t}${r.path}`}))}}const qt=e=>new Promise(t=>setTimeout(t,e));async function L0(e,t,r=24,n){e.textContent="";const s=document.createElement("span");s.className="cxw__caret",e.appendChild(document.createTextNode("")),e.appendChild(s);for(const a of t){if(n&&!n())return;s.insertAdjacentText("beforebegin",a),await qt(r)}s.remove()}const $Z={plan:wn,search:Tn,exec:D9,write:Qr,done:u9,model:yV,ratio:CV,count:b1,avatar:zl,audio:Ku,film:Wo},pb=[{kind:"card",card:0,artifact:null,icons:["plan","search","exec","write","done"]},{kind:"plugin",plugin:0,artifact:"image",icons:["model","ratio","count","done"]},{kind:"plugin",plugin:1,artifact:"video",icons:["avatar","audio","film","done"]},{kind:"card",card:2,artifact:null,icons:["plan","exec","write","done"]}],wN=[{nameKey:"pgCreative",descKey:"pgCreativeDesc",logo:"/logos/uniai.png"},{nameKey:"pgHeygen",descKey:"pgHeygenDesc",logo:null}];function zZ(){const{t:e}=We(),t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),s=v.useRef(null),[a,o]=v.useState(null),[l,u]=v.useState(null),[c,d]=v.useState(null),h=[{Icon:Tn,title:e("home.codexHero.cardResearchT"),desc:e("home.codexHero.cardResearchD")},{Icon:bl,title:e("home.codexHero.cardSlidesT"),desc:e("home.codexHero.cardSlidesD")},{Icon:ng,title:e("home.codexHero.cardDataT"),desc:e("home.codexHero.cardDataD")},{Icon:em,title:e("home.codexHero.cardFilesT"),desc:e("home.codexHero.cardFilesD")}];v.useEffect(()=>{let b=!0;const k=()=>b,T=t.current,S=r.current,j=n.current,E=s.current;if(!T||!S||!j||!E)return;const A=T.querySelector(".cxw__main");if(!A)return;const R=e("home.codexHero.taskPrompts",{returnObjects:!0}),M=e("home.codexHero.taskSteps",{returnObjects:!0}),B=e("home.codexHero.composerPh"),W=L=>{const $=L.getBoundingClientRect(),ee=A.getBoundingClientRect();E.style.opacity="1",E.style.transform=`translate(${$.left-ee.left+$.width/2}px,${$.top-ee.top+$.height/2}px)`};return(async()=>{for(await qt(900);b;)for(let L=0;L<pb.length;L++){if(!b)return;const $=pb[L],ee=M[L]||[];if(o(null),u(null),d(null),S.classList.remove("typing"),S.textContent=B,await qt(520),!b)return;if($.kind==="card"){const G=T.querySelectorAll(".cxw__card")[$.card];if(G){if(W(G),await qt(600),!b)return;G.classList.add("hot")}if(await qt(320),!b||(S.classList.add("typing"),S.textContent="",await L0(S,R[L]||B,24,k),!b)||(await qt(280),!b))return;G==null||G.classList.remove("hot")}else{if(S.classList.add("typing"),S.textContent="",await L0(S,"@",80,k),!b||(u($.plugin),await qt(260),!b))return;const G=T.querySelector(".cxw__pickitem.on");if(G&&(W(G),await qt(820),!b)||(d($.plugin),u(null),S.textContent="",E.style.opacity="0",await qt(300),!b)||(await L0(S,R[L]||B,24,k),!b))return;await qt(260)}if(j.classList.add("pulse"),await qt(520),!b||(j.classList.remove("pulse"),E.style.opacity="0",!b)||(o({taskIdx:L,revealed:0,active:-1,artifact:!1,done:!1}),S.classList.remove("typing"),S.textContent=B,await qt(460),!b))return;for(let G=0;G<ee.length;G++){if(!b)return;o(D=>D&&{...D,revealed:G+1,active:G});const Q=$.icons[G]==="exec";if(await qt(Q?1150:780),!b)return;o(D=>D&&{...D,active:-1}),$.artifact&&G===ee.length-2&&(o(D=>D&&{...D,artifact:!0}),await qt(220)),await qt(150)}if(!b||(o(G=>G&&{...G,done:!0}),await qt($.artifact?2400:1800),!b))return}})(),()=>{b=!1}},[e]);const m=a?pb[a.taskIdx]:null,f=a?e("home.codexHero.taskSteps",{returnObjects:!0})[a.taskIdx]||[]:[],p=a?e("home.codexHero.taskVals",{returnObjects:!0})[a.taskIdx]||[]:[],g=e("home.codexHero.taskCmds",{returnObjects:!0}),x=e("home.codexHero.taskFinal",{returnObjects:!0}),w=b=>{const k=wN[b];return i.jsxs("span",{className:"cxw__pluginchip",children:[k.logo?i.jsx("img",{src:k.logo,alt:""}):i.jsx("span",{className:"cxw__pgtile",children:i.jsx(Wo,{})}),e(`home.codexHero.${k.nameKey}`)]})},y=(b,k)=>i.jsx("div",{className:`cxw__art cxw__art--${b==="image"?"img":"vid"}${k?" big":""}`,children:b==="video"&&i.jsx("span",{className:"cxw__artplay",children:i.jsx(i3,{})})});return i.jsx("section",{className:"cxhero",ref:t,children:i.jsxs("div",{className:"cxhero__inner",children:[i.jsxs("div",{className:"cxhero__header reveal-on-scroll",children:[i.jsxs("div",{className:"cxhero__headtext",children:[i.jsxs("h2",{className:"cxhero__h1",children:[e("home.codexHero.title")," ",i.jsx("span",{className:"ac",children:e("home.codexHero.titleAccent")})]}),i.jsx("p",{className:"cxhero__sub",children:e("home.codexHero.subtitle")})]}),i.jsx("div",{className:"cxhero__actions",children:i.jsx("div",{className:"cxhero__btns",children:i.jsxs("a",{href:"https://uniai-public.uniai.one/downloads/UniAI-0.1.24-arm64.dmg",download:!0,className:"cx-btn cx-btn--primary cx-btn--lg",children:[i.jsx(ag,{className:"w-4 h-4"}),e("home.codexHero.download")]})})})]}),i.jsxs("div",{className:"cxw reveal-on-scroll rv-d1",id:"cx-window",children:[i.jsxs("div",{className:"cxw__bar",children:[i.jsxs("div",{className:"cxw__lights",children:[i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{})]}),i.jsx("span",{className:"cxw__bartitle",children:e("home.codexHero.appTopTitle")}),i.jsx(c2,{className:"cxw__barinfo w-4 h-4"})]}),i.jsxs("div",{className:`cxw__body${a!=null&&a.artifact?" preview":""}`,children:[i.jsxs("aside",{className:"cxw__side",children:[i.jsxs("div",{className:"cxw__nav on",children:[i.jsx(uG,{}),e("home.codexHero.appNewChat")]}),i.jsxs("div",{className:"cxw__nav",children:[i.jsx(_9,{}),e("home.codexHero.appPlugins")]}),i.jsxs("div",{className:"cxw__nav",children:[i.jsx(Ti,{}),e("home.codexHero.appAutomation")]}),i.jsxs("div",{className:"cxw__nav",children:[i.jsx(yh,{}),e("home.codexHero.appSearch")]}),i.jsxs("div",{className:"cxw__navhead",children:[e("home.codexHero.appProjects"),i.jsx(Gs,{className:"w-3 h-3"})]}),i.jsxs("div",{className:"cxw__navhead",children:[e("home.codexHero.appChats"),i.jsx(Gs,{className:"w-3 h-3"})]}),i.jsx("div",{className:"cxw__spacer"}),i.jsxs("div",{className:"cxw__nav",children:[i.jsx(og,{}
1243),e("home.codexHero.appSettings")]})]}),i.jsxs("div",{className:"cxw__main",children:[i.jsx("span",{className:"cxw__fakecur",ref:s,children:i.jsx("svg",{width:"18",height:"18",viewBox:"0 0 16 16",children:i.jsx("path",{d:"M1 1l4.5 13 2-5.5 5.5-2z",fill:"#fff",stroke:"#000",strokeWidth:"1"})})}),i.jsxs("div",{className:`cxw__convo${a?" running":""}`,children:[i.jsxs("div",{className:"cxw__empty",children:[i.jsxs("div",{className:"cxw__hero",children:[i.jsx("span",{className:"ac",children:e("home.codexHero.heroA")}),i.jsx("span",{children:e("home.codexHero.heroB")}),i.jsx("span",{className:"ac",children:e("home.codexHero.heroC")}),i.jsx("span",{className:"cxw__beta",children:"BETA"})]}),i.jsx("p",{className:"cxw__herosub",children:e("home.codexHero.heroSub")}),i.jsx("div",{className:"cxw__cards",children:h.map(b=>i.jsxs("div",{className:"cxw__card",children:[i.jsx("div",{className:"ic",children:i.jsx(b.Icon,{})}),i.jsx("b",{children:b.title}),i.jsx("span",{children:b.desc})]},b.title))})]}),a&&m&&i.jsxs("div",{className:"cxw__run",children:[i.jsx("div",{className:"cxw__msg",children:e("home.codexHero.taskPrompts",{returnObjects:!0})[a.taskIdx]}),i.jsxs("div",{className:"cxw__agent",children:[i.jsx("img",{src:"/logos/uniai.png",alt:"UniAI",className:"cxw__agentlogo"}),i.jsx("span",{className:"cxw__agentname",children:"UniAI Agent"}),i.jsx("span",{className:`cxw__agentstate${a.done?" done":""}`,children:a.done?e("home.codexHero.runDone"):e("home.codexHero.runWorking")})]}),i.jsx("div",{className:"cxw__steps",children:f.slice(0,a.revealed).map((b,k)=>{const T=$Z[m.icons[k]]??u9,S=k===a.active?"active":"done",j=p[k],E=m.icons[k]==="exec";return i.jsxs("div",{className:`cxw__step ${S}`,children:[i.jsxs("div",{className:"cxw__steprow",children:[i.jsxs("span",{className:"cxw__stepstatus",children:[i.jsx("i",{className:"spin"}),i.jsx(Fr,{className:"chk"})]}),i.jsx("span",{className:"cxw__stepicon",children:i.jsx(T,{})}),i.jsx("span",{className:"cxw__steplabel",children:b}),j?i.jsx("span",{className:"cxw__stepval",children:j}):null]}),E&&g[a.taskIdx]?i.jsx("div",{className:"cxw__stepterm",children:g[a.taskIdx]}):null]},k)})}),a.artifact&&m.artifact&&i.jsx("div",{className:"cxw__inlineart",children:y(m.artifact,!1)}),a.done&&x[a.taskIdx]?i.jsx("div",{className:"cxw__final",children:x[a.taskIdx]}):null]})]}),i.jsxs("div",{className:"cxw__composer",children:[l!==null&&i.jsxs("div",{className:"cxw__picker",children:[i.jsx("div",{className:"cxw__pickhint",children:e("home.codexHero.pluginsLabel")}),wN.map((b,k)=>i.jsxs("div",{className:`cxw__pickitem${l===k?" on":""}`,children:[b.logo?i.jsx("img",{src:b.logo,alt:"",className:"cxw__pickicon"}):i.jsx("span",{className:"cxw__pgtile",children:i.jsx(Wo,{})}),i.jsx("span",{className:"cxw__pickname",children:e(`home.codexHero.${b.nameKey}`)}),i.jsx("span",{className:"cxw__pickdesc",children:e(`home.codexHero.${b.descKey}`)})]},b.nameKey))]}),i.jsxs("div",{className:"cxw__cline",children:[c!==null&&w(c),i.jsx("div",{className:"ph",ref:r,children:e("home.codexHero.composerPh")})]}),i.jsxs("div",{className:"row",children:[i.jsx("span",{className:"cxw__chip",children:i.jsx(ec,{})}),i.jsxs("span",{className:"cxw__chip cxw__chip--opt",children:[i.jsx(aG,{}),e("home.codexHero.composerPermission")]}),i.jsxs("span",{className:"cxw__chip cxw__chip--opt",children:[i.jsx(AV,{}),e("home.codexHero.composerWorkspace")]}),i.jsx("span",{style:{flex:1}}),i.jsx("span",{className:"cxw__chip",children:"GPT-5.5"}),i.jsx("span",{className:"cxw__mic",children:i.jsx(y1,{className:"w-4 h-4"})}),i.jsx("span",{className:"cxw__send",ref:n,children:i.jsx(c9,{className:"w-4 h-4"})})]})]})]}),(a==null?void 0:a.artifact)&&(m==null?void 0:m.artifact)&&i.jsxs("div",{className:"cxw__preview",children:[i.jsxs("div",{className:"cxw__pvhead",children:[i.jsx(n3,{className:"cxw__pvgrid"}),i.jsx("span",{className:"cxw__pvid",children:"c751d613-86a0-4390-81f4-323f3fa4d"}),i.jsx("span",{className:"cxw__pvcount",children:"1 / 1"}),i.jsx("span",{className:"cxw__pvsp"}),i.jsx(ag,{className:"cxw__pvic"}),i.jsx(BV,{className:"cxw__pvic"}),i.jsx(w9,{className:"cxw__pvic"}),i.jsx(cr,{className:"cxw__pvic"})]}),i.jsx("div",{className:"cxw__pvbody",children:y(m.artifact,!0)}),i.jsxs("div",{className:"cxw__pvfoot",children:[i.jsx(N9,{className:"cxw__pvic"}),i.jsx("span",{className:"cxw__pvzoom",children:"100%"}),i.jsx(ec,{className:"cxw__pvic"})]})]})]})]})]})})}const EN=960,kN=540,wi={ref1:{x:40,y:92,w:158,h:108},ref2:{x:40,y:300,w:158,h:108},img:{x:432,y:168,w:226,h:176},vid:{x:728,y:196,w:196,h:130}},$o={cx:320,cy:252,r:22},gb=e=>({x:e.x+e.w,y:e.y+e.h/2}),NN=e=>({x:e.x,y:e.y+e.h/2}),SN={x:$o.cx-$o.r,y:$o.cy}
1243,HZ={x:$o.cx+$o.r,y:$o.cy};function qZ(e,t){const r=t.x-e.x,n=t.y-e.y,s=Math.abs(n),a=Math.min(Math.abs(r)*.4,150),o=s>100?n*.15:0;return`M ${e.x} ${e.y} C ${e.x+a} ${e.y+o}, ${t.x-a} ${t.y-o}, ${t.x} ${t.y}`}const WZ=[{id:"r1p",from:gb(wi.ref1),to:SN},{id:"r2p",from:gb(wi.ref2),to:SN},{id:"pi",from:HZ,to:NN(wi.img)},{id:"iv",from:gb(wi.img),to:NN(wi.vid)}],TN=[500,380,380,680,1900,2e3,2400];function VZ(){const{t:e}=We(),{lang:t}=Ut(),r=t||"en",n=Er(),s=$n(k=>k.createProject),a=Pi(k=>k.currentTeamId),o=ut(k=>k.isAuthenticated),[l,u]=v.useState(0),[c,d]=v.useState(!1),h=async()=>{if(!c){if(!o){n(`/${r}/login?redirect=${encodeURIComponent(`/${r}/app/design`)}`);return}d(!0);try{const k=await s("design",a??void 0,void 0,void 0);n(`/${r}/app/design/${k.id}`)}catch{}finally{d(!1)}}};v.useEffect(()=>{let k=!0;return(async()=>{for(;k;)for(let T=0;T<TN.length&&k;T++)u(T),await qt(TN[T])})(),()=>{k=!1}},[]);const m=l>=1,f=l>=2,p=l>=3,g=l<4?"hidden":l===4?"gen":"done",x=l<5?"hidden":l===5?"gen":"done",w={r1p:l>=3,r2p:l>=3,pi:l>=4,iv:l>=5},y={r1p:l===4,r2p:l===4,pi:l===4,iv:l===5},b=k=>({x:k.x,y:k.y,width:k.w,height:k.h});return i.jsx("section",{className:"cxhero cvhero",children:i.jsxs("div",{className:"cxhero__inner",children:[i.jsxs("div",{className:"cxhero__header reveal-on-scroll",children:[i.jsxs("div",{className:"cxhero__headtext",children:[i.jsxs("h2",{className:"cxhero__h1",children:[e("home.canvasHero.title")," ",i.jsx("span",{className:"ac",children:e("home.canvasHero.titleAccent")})]}),i.jsx("p",{className:"cxhero__sub",children:e("home.canvasHero.subtitle")})]}),i.jsx("div",{className:"cxhero__actions",children:i.jsx("div",{className:"cxhero__btns",children:i.jsxs("button",{type:"button",onClick:h,disabled:c,className:"cx-btn cx-btn--lg canvas-cta group disabled:opacity-70",children:[c?i.jsx("span",{className:"w-4 h-4 rounded-full border-2 border-white/40 border-t-white animate-spin"}):i.jsx(wn,{className:"w-5 h-5"}),e("home.canvasHero.cta"),!c&&i.jsx(fr,{className:"w-4 h-4 transition-transform group-hover:translate-x-1"})]})})})]}),i.jsxs("div",{className:"cxw cvw reveal-on-scroll rv-d1",children:[i.jsxs("div",{className:"cxw__bar",children:[i.jsxs("div",{className:"cxw__lights",children:[i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{})]}),i.jsx("span",{className:"cxw__bartitle",children:e("home.canvasHero.appTitle")})]}),i.jsx("div",{className:"cvstage",children:i.jsxs("svg",{className:"cvstage__svg",viewBox:`0 0 ${EN} ${kN}`,preserveAspectRatio:"xMidYMid meet",children:[i.jsxs("defs",{children:[i.jsx("pattern",{id:"cv-dots",width:"28",height:"28",patternUnits:"userSpaceOnUse",children:i.jsx("circle",{cx:"1.4",cy:"1.4",r:"1.3",className:"cvstage__dot"})}),i.jsxs("linearGradient",{id:"cv-flow-grad",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[i.jsx("stop",{offset:"0%",stopColor:"#818cf8",stopOpacity:.2}),i.jsx("stop",{offset:"50%",stopColor:"#6366f1",stopOpacity:.95}),i.jsx("stop",{offset:"100%",stopColor:"#818cf8",stopOpacity:.2})]})]}),i.jsx("rect",{x:"0",y:"0",width:EN,height:kN,fill:"url(#cv-dots)"}),WZ.map(k=>{if(!w[k.id])return null;const T=qZ(k.from,k.to),S=y[k.id];return i.jsxs("g",{className:"cvconn",children:[i.jsx("path",{d:T,fill:"none",stroke:"#94a3b8",strokeWidth:S?0:1.2,strokeDasharray:"6 3",vectorEffect:"non-scaling-stroke",style:{opacity:S?0:1}}),S&&i.jsxs(i.Fragment,{children:[i.jsx("path",{d:T,fill:"none",stroke:"#6366f1",strokeWidth:4,opacity:.16,strokeLinecap:"round",vectorEffect:"non-scaling-stroke"}),i.jsx("path",{d:T,fill:"none",stroke:"#818cf8",strokeWidth:2,opacity:.45,strokeLinecap:"round",vectorEffect:"non-scaling-stroke"}),i.jsx("path",{d:T,fill:"none",stroke:"url(#cv-flow-grad)",strokeWidth:2.4,strokeLinecap:"round",strokeDasharray:"12 20",vectorEffect:"non-scaling-stroke",className:"cvflow"})]})]},k.id)}),p&&i.jsx("foreignObject",{x:$o.cx-42,y:$o.cy-42,width:84,height:84,children:i.jsxs("div",{className:"cvplus-wrap",children:[i.jsx("span",{className:"cvplus__ring"}),i.jsx("span",{className:"cvplus",children:i.jsx(ec,{className:"w-4 h-4"})}),i.jsx("span",{className:"cvplus__badge",children:"2"})]})}),m&&i.jsx("foreignObject",{...b(wi.ref1),children:i.jsx(CN,{label:e("home.canvasHero.nRef"),thumb:"a"})}),f&&i.jsx("foreignObject",{...b(wi.ref2),children:i.jsx(CN,{label:e("home.canvasHero.nRef"),thumb:"b"})}),g!=="hidden"&&i.jsx("foreignObject",{...b(wi.img),children:i.jsxs("div",{className:"cvnode cvnode--img",children:[i.jsxs("div",{className:"cvnode__bar",children:[i.jsx(wn,{className:"cvnode__ic"}),i.jsx("span",{className:"cvnode__label",children:e(g==="gen"?"home.canvasHero.genImage":"home.canvasHero.nImage")})]}),i.jsx("div",{className:"cvnode__body",children:g==="gen"?i.jsx("div",{className:"cvnode__mesh"}):i.jsx("div",{className:"cvnode__thumb cvnode__thumb--hero"})})]})}),x!=="hidden"&&i.jsx("foreignObject",{...b(wi.vid),children:i.jsxs("div",{className:"cvnode cvnode--vid",children:[i.jsxs("div",{className:"cvnode__bar",children:[i.jsx(rm,{className:"cvnode__ic"}),i.jsx("span",{className:"cvnode__label",children:e(x==="gen"?"home.canvasHero.genVideo":"home.canvasHero.nVideo")})]}),i.jsx("div",{className:"cvnode__body",children:x==="gen"?i.jsx("div",{className:"cvnode__mesh",children:i.jsxs("span",{className:"cvnode__pill",children:[i.jsx("span",{className:"cvnode__spin"}),e("home.canvasHero.genVideo")]})}):i.jsx("div",{className:"cvnode__thumb cvnode__thumb--vid",children:i.jsx("span",{className:"cvnode__play",children:i.jsx(i3,{className:"w-4 h-4"})})})})]})})]})})]})]})})}function CN({label:e,thumb:t}){return i.jsxs("div",{className:"cvnode cvnode--ref",children:[i.jsxs("div",{className:"cvnode__bar",children:[i.jsx(Ss,{className:"cvnode__ic"}),i.jsx("span",{className:"cvnode__label",children:e})]}),i.jsx("div",{className:"cvnode__body",children:i.jsx("div",{className:`cvnode__thumb cvnode__thumb--${t}`})})]})}function C1(e=2e3){const{t}=We(),[r,n]=v.useState(!1),s=v.useRef();return{copy:v.useCallback(async o=>{try{await navigator.clipboard.writeText(o),n(!0),Qe.success(t("common.copied")),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>n(!1),e)}catch{Qe.error(t("common.copyFailed"))}},[t,e]),copied:r}}function sf({text:e}){const{t}=We(),{copy:r,copied:n}=C1();return i.jsxs("div",{className:"clipromo__cmd",children:[i.jsx("code",{className:"clipromo__cmdtext",children:e}),i.jsxs("button",{type:"button",className:"clipromo__copy",onClick:()=>r(e),"aria-label":t("home.cliPromo.copy"),children:[n?i.jsx(Fr,{className:"w-3.5 h-3.5"}):i.jsx(b1,{className:"w-3.5 h-3.5"}),i.jsx("span",{children:t("home.cliPromo.copy")})]})]})}function GZ(){const{t:e}=We(),{lang:t}=Ut(),r=t||"en",[n,s]=v.useState("agent"),[a,o]=v.useState("idle"),l=v.useRef(null),u=e("home.cliPromo.manualSteps",{returnObjects:!0});return v.useEffect(()=>{let c=!0;const d=()=>c,h=l.current;if(!h)return;const m=e("home.cliPromo.termCmd");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){h.textContent=m,o("done");return}return(async()=>{for(await qt(700);c;)if(o("typing"),h.textContent="",await qt(420),!c||(await L0(h,m,22,d),!c)||(await qt(520),!c)||(o("generating"),await qt(1900),!c)||(o("done"),await qt(4400),!c)||(o("idle"),h.textContent=m,await qt(700),!c))return})(),()=>{c=!1}},[e]),i.jsx("section",{className:"clihero",children:i.jsxs("div",{className:"clihero__inner",children:[i.jsxs("div",{className:"cxhero__header reveal-on-scroll",children:[i.jsxs("div",{className:"cxhero__headtext",children:[i.jsxs("h2",{className:"cxhero__h1",children:[e("home.cliPromo.title")," ",i.jsx("span",{className:"ac",children:e("home.cliPromo.titleAccent")})]}),i.jsx("p",{className:"cxhero__sub",children:e("home.cliPromo.subtitle")})]}),i.jsx("div",{className:"cxhero__actions",children:i.jsx("div",{className:"cxhero__btns",children:i.jsxs(Ke,{to:`/${r}/docs/uniai-cli-guide`,className:"cx-btn cx-btn--ghost cx-btn--lg",children:[i.jsx(sg,{className:"w-4 h-4"}),e("home.cliPromo.ctaDocs")]})})})]}),i.jsxs("div",{className:"clipromo reveal-on-scroll rv-d1",children:[i.jsxs("div",{className:"clipromo__card",children:[i.jsxs("div",{className:"clipromo__tabs",role:"group","aria-label":e("home.cliPromo.tabsLabel"),children:[i.jsxs("button",{type:"button","aria-pressed":n==="agent",className:`clipromo__tab${n==="agent"?" on":""}`,onClick:()=>s("agent"),children:[i.jsx(Kw,{className:"w-4 h-4"}),e("home.cliPromo.tabAgent")]}),i.jsxs("button",{type:"button","aria-pressed":n==="manual",className:`clipromo__tab${n==="manual"?" on":""}`,onClick:()=>s("manual"),children:[i.jsx(D9,{className:"w-4 h-4"}),e("home.cliPromo.tabManual")]})]}),n==="agent"?i.jsxs("div",{className:"clipromo__steps",children:[i.jsxs("div",{className:"clipromo__step",children:[i.jsx("span",{className:"clipromo__num",children:"1"}),i.jsxs("div",{className:"clipromo__stepbody",children:[i.jsx("div",{className:"clipromo__steplabel",children:e("home.cliPromo.step1Label")}),i.jsx(sf,{text:e("home.cliPromo.step1Cmd")})]})]}),i.jsxs("div",{className:"clipromo__step",children:[i.jsx("span",{className:"clipromo__num",children:"2"}),i.jsxs("div",{className:"clipromo__stepbody",children:[i.jsxs(Ke,{to:`/${r}
1243/app/profile?tab=security`,className:"clipromo__getkey",children:[i.jsx(PV,{className:"w-3.5 h-3.5"}),e("home.cliPromo.step2GetKey"),i.jsx(Gs,{className:"w-3.5 h-3.5"})]}),i.jsx("div",{className:"clipromo__steplabel",children:e("home.cliPromo.step2Label")}),i.jsx(sf,{text:e("home.cliPromo.step2Cmd")})]})]}),i.jsxs("div",{className:"clipromo__step",children:[i.jsx("span",{className:"clipromo__num",children:"3"}),i.jsxs("div",{className:"clipromo__stepbody",children:[i.jsx("div",{className:"clipromo__steplabel",children:e("home.cliPromo.step3Label")}),i.jsx(sf,{text:e("home.cliPromo.step3Cmd")})]})]})]}):i.jsx("div",{className:"clipromo__steps",children:u.map((c,d)=>i.jsxs("div",{className:"clipromo__step",children:[i.jsx("span",{className:"clipromo__num",children:d+1}),i.jsxs("div",{className:"clipromo__stepbody",children:[i.jsx("div",{className:"clipromo__steplabel",children:c.label}),i.jsx(sf,{text:c.cmd})]})]},d))}),i.jsxs("div",{className:"clipromo__note",children:[i.jsx(A9,{className:"w-3.5 h-3.5"}),e("home.cliPromo.agentsNote")]})]}),i.jsxs("div",{className:"clipromo__term",children:[i.jsxs("div",{className:"cxw__bar",children:[i.jsxs("div",{className:"cxw__lights",children:[i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{})]}),i.jsx("span",{className:"cxw__bartitle",children:e("home.cliPromo.termTitle")})]}),i.jsxs("div",{className:"clipromo__termbody",children:[i.jsxs("div",{className:"clipromo__line",children:[i.jsx("span",{className:"clipromo__dollar",children:"$"}),i.jsx("span",{className:"clipromo__typed",ref:l,children:e("home.cliPromo.termCmd")})]}),(a==="generating"||a==="done")&&i.jsx("div",{className:`clipromo__status${a==="done"?" done":""}`,children:a==="done"?i.jsxs(i.Fragment,{children:[i.jsx(Fr,{className:"clipromo__okic w-4 h-4"}),e("home.cliPromo.termDone")]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"clipromo__spinner"}),e("home.cliPromo.termGenerating")]})}),a==="done"&&i.jsx("div",{className:"clipromo__grid",children:Array.from({length:4}).map((c,d)=>i.jsx("div",{className:"clipromo__shot",style:{animationDelay:`${d*70}ms`},children:i.jsx(iG,{})},d))}),i.jsxs("div",{className:"clipromo__line clipromo__line--end",children:[i.jsx("span",{className:"clipromo__dollar",children:"$"}),a!=="typing"&&i.jsx("span",{className:"cxw__caret"})]})]})]})]})]})})}function KZ({className:e="w-9 h-9"}){return i.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L10.43 15a3.01 3.01 0 003.07.84l-2.67 4.62c-.26.02-.54.04-.83.04zm4.5-4.5c-.52.9-1.43 1.53-2.5 1.53s-1.98-.63-2.5-1.53c-.52-.9-.52-2.07 0-2.97.52-.9 1.43-1.53 2.5-1.53s1.98.63 2.5 1.53c.52.9.52 2.07 0 2.97zm3.81-1.6h-5.47a3.01 3.01 0 00-.15-3.17l2.67-4.62C19.95 7.53 22 9.55 22 12c0 .69-.1 1.36-.29 2h-.1l.1-.1z"})})}function aI({className:e="w-4 h-4"}){return i.jsxs("svg",{className:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[i.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"#fff"}),i.jsx("path",{fill:"#EA4335",d:"M12,12 L21.17,5.93 A11,11 0 0,0 2.83,5.93 Z"}),i.jsx("path",{fill:"#34A853",d:"M12,12 L2.16,7.09 A11,11 0 0,0 11.33,22.98 Z"}),i.jsx("path",{fill:"#FBBC05",d:"M12,12 L12.67,22.98 A11,11 0 0,0 21.84,7.09 Z"}),i.jsx("circle",{cx:"12",cy:"12",r:"4.8",fill:"#fff"}),i.jsx("circle",{cx:"12",cy:"12",r:"3.9",fill:"#4285F4"})]})}function iI({className:e="w-4 h-4"}){return i.jsx("img",{src:"/logos/firefox.svg",className:e,alt:"Firefox"})}const xg={chrome:"https://chromewebstore.google.com/detail/uniai-ai-assistant/bcfinpcijciogcnbaemahlklgmfopmon",firefox:"https://addons.mozilla.org/en-US/firefox/addon/uniai-all-in-one-ai-assistant/"};function YZ(){const{t:e}=We(),t=v.useRef(null),r=v.useRef(null),n=v.useRef(null),s=v.useRef(null),a=[{Icon:lp,label:e("home.extHero.toolWeb")},{Icon:kG,label:e("home.extHero.toolYoutube")},{Icon:dd,label:e("home.extHero.toolEmail")},{Icon:I9,label:e("home.extHero.toolGrammar")},{Icon:Qr,label:e("home.extHero.toolSummary")}
1243,{Icon:Jh,label:e("home.extHero.toolScreenshot")}];return v.useEffect(()=>{let o=!0;const l=()=>o,u=t.current,c=r.current,d=n.current,h=s.current;if(!u||!c||!d||!h)return;const m=u.querySelector(".extsb__main");if(!m)return;const f=Array.from(u.querySelectorAll(".extsb__tool")),p=Array.from(u.querySelectorAll(".extw__scene")),g=e("home.extHero.inputPrompts",{returnObjects:!0}),x=e("home.extHero.inputPh"),w=[0,1,2,3];return p.forEach((b,k)=>b.classList.toggle("on",k===0)),(async()=>{for(await qt(1e3);o;)for(let b=0;b<g.length;b++){if(!o)return;p.forEach((T,S)=>T.classList.toggle("on",S===b));const k=f[w[b]];if(k){const T=k.getBoundingClientRect(),S=m.getBoundingClientRect();if(h.style.opacity="1",h.style.transform=`translate(${T.left-S.left+T.width/2}px,${T.top-S.top+T.height/2}px)`,await qt(640),!o)return;k.classList.add("hot")}if(await qt(360),!o||(c.classList.add("typing"),await L0(c,g[b]||x,28,l),!o))return;await qt(320),d.classList.add("pulse"),await qt(520),d.classList.remove("pulse"),await qt(680),k&&k.classList.remove("hot"),c.classList.remove("typing"),c.textContent=x,h.style.opacity="0",await qt(340)}})(),()=>{o=!1}},[e]),i.jsx("section",{className:"exthero",ref:t,children:i.jsxs("div",{className:"exthero__inner",children:[i.jsxs("div",{className:"cxhero__header reveal-on-scroll",children:[i.jsxs("div",{className:"cxhero__headtext",children:[i.jsxs("h2",{className:"cxhero__h1",children:[e("home.extHero.title")," ",i.jsx("span",{className:"ac",children:e("home.extHero.titleAccent")})]}),i.jsx("p",{className:"cxhero__sub",children:e("home.extHero.subtitle")})]}),i.jsx("div",{className:"cxhero__actions",children:i.jsxs("div",{className:"cxhero__btns",children:[i.jsxs("a",{href:xg.chrome,target:"_blank",rel:"noopener noreferrer",className:"cx-btn cx-btn--primary cx-btn--lg",children:[i.jsx(aI,{className:"w-5 h-5"}),e("home.extHero.addChrome")]}),i.jsxs("a",{href:xg.firefox,target:"_blank",rel:"noopener noreferrer",className:"cx-btn cx-btn--ghost cx-btn--lg",children:[i.jsx(iI,{className:"w-5 h-5"}),e("home.extHero.addFirefox")]})]})})]}),i.jsxs("div",{className:"extw reveal-on-scroll rv-d1",children:[i.jsxs("div",{className:"extw__chrome",children:[i.jsxs("div",{className:"extw__lights",children:[i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{})]}),i.jsxs("div",{className:"extw__tab",children:[i.jsx("span",{className:"fav"}),e("home.extHero.pageTitle")]}),i.jsxs("div",{className:"extw__url",children:[i.jsx(Ts,{className:"w-3 h-3"}),"example.com/article"]}),i.jsx("div",{className:"extw__ext",children:i.jsx("span",{className:"extw__extbtn on",children:i.jsx(_9,{className:"w-4 h-4"})})})]}),i.jsxs("div",{className:"extw__body",children:[i.jsxs("div",{className:"extw__page",children:[i.jsxs("div",{className:"extw__scene exsc--article","data-scene":"0",children:[i.jsxs("div",{className:"exsc__site",children:[i.jsxs("span",{className:"exsc__sitebrand",children:[i.jsx("span",{className:"exsc__sitelogo",children:"V"}),e("home.extHero.s0Site")]}),i.jsxs("span",{className:"exsc__sitenav",children:[i.jsx("span",{children:"Tech"}),i.jsx("span",{children:"AI"}),i.jsx("span",{children:"Science"})]})]}),i.jsxs("div",{className:"exsc__bi exsc__bi--h",children:[i.jsx("p",{className:"exsc__bi-o",children:e("home.extHero.s0hO")}),i.jsx("p",{className:"exsc__bi-t",children:e("home.extHero.s0hT")})]}),i.jsxs("div",{className:"exsc__bi",children:[i.jsx("p",{className:"exsc__bi-o",children:e("home.extHero.s0p1O")}),i.jsx("p",{className:"exsc__bi-t",children:e("home.extHero.s0p1T")})]}),i.jsxs("div",{className:"exsc__bi",children:[i.jsx("p",{className:"exsc__bi-o",children:e("home.extHero.s0p2O")}),i.jsx("p",{className:"exsc__bi-t",children:e("home.extHero.s0p2T")})]}),i.jsxs("div",{className:"exsc__bi",children:[i.jsx("p",{className:"exsc__bi-o",children:e("home.extHero.s0p3O")}),i.jsx("p",{className:"exsc__bi-t",children:e("home.extHero.s0p3T")})]})]}),i.jsxs("div",{className:"extw__scene exsc--video","data-scene":"1",children:[i.jsxs("div",{className:"exsc__yt",children:[i.jsxs("div",{className:"exsc__stage",children:[i.jsx("span",{className:"exsc__beam exsc__beam--l"}),i.jsx("span",{className:"exsc__beam exsc__beam--r"}),i.jsxs("div",{className:"exsc__screen",children:[i.jsx("span",{className:"exsc__screenttl",children:e("home.extHero.s1Slide")}),i.jsxs("span",{className:"exsc__eq",children:[i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{})]})]}),i.jsx("span",{className:"exsc__speaker"}),i.jsx("span",{className:"exsc__floor"})]}),i.jsxs("div",{className:"exsc__captions",children:[i.jsx("span",{className:"exsc__capen",children:e("home.extHero.s1SubEn")}),i.jsx("span",{className:"exsc__capzh",children:e("home.extHero.s1SubZh")})]}),i.jsxs("div",{className:"exsc__ytbar",children:[i.jsx("div",{className:"exsc__ytprog",children:i.jsx("i",{})}),i.jsxs("div",{className:"exsc__ytctrls",children:[i.jsx(GV,{className:"exsc__ytic"}),i.jsx(lG,{className:"exsc__ytic"}),i.jsx(Ku,{className:"exsc__ytic"}),i.jsx("span",{className:"exsc__yttime",children:e("home.extHero.s1Time")}),i.jsx("span",{className:"exsc__ytsp"}),i.jsx("span",{className:"exsc__cc",children:e("home.extHero.s1Cc")}),i.jsx(og,{className:"exsc__ytic"}),i.jsx(w9,{className:"exsc__ytic"})]})]})]}),i.jsx("div",{className:"exsc__vtitle",children:e("home.extHero.s1Title")}),i.jsxs("div",{className:"exsc__vchannel",children:[i.jsx("span",{className:"exsc__chav"}),e("home.extHero.s1Channel")," · ",e("home.extHero.s1Views")]})]}),i.jsxs("div",{className:"extw__scene exsc--email","data-scene":"2",children:[i.jsxs("div",{className:"exsc__gmail",children:[i.jsxs("div",{className:"exsc__gsub",children:[e("home.extHero.s2Subject"),i.jsx("span",{className:"exsc__glabel",children:e("home.extHero.s2Label")})]}),i.jsxs("div",{className:"exsc__ghead",children:[i.jsx("span",{className:"exsc__gav",children:"SC"}),i.jsxs("div",{className:"exsc__gfrom",children:[i.jsx("b",{children:e("home.extHero.s2Sender")}),i.jsx("span",{children:e("home.extHero.s2Email")})]}),i.jsx("span",{className:"exsc__gtime",children:e("home.extHero.s2Time")})]}),i.jsx("div",{className:"exsc__gto",children:e("home.extHero.s2To")}),i.jsx("p",{className:"exsc__gbody",children:e("home.extHero.s2Body")})]}),i.jsxs("div",{className:"exsc__reply",children:[i.jsxs("div",{className:"exsc__replyhead",children:[i.jsxs("span",{className:"tag",children:[i.jsx(wn,{}),e("home.extHero.s2Tag")]}),i.jsxs("span",{className:"exsc__tones",children:[i.jsx("span",{className:"on",children:e("home.extHero.s2Tone1")}),i.jsx("span",{children:e("home.extHero.s2Tone2")})]})]}),i.jsx("p",{children:e("home.extHero.s2Reply")}),i.jsxs("div",{className:"exsc__replybar",children:[i.jsxs("button",{className:"exsc__rbtn exsc__rbtn--primary",children:[i.jsx(Gu,{}),e("home.extHero.s2Send")]}),i.jsxs("button",{className:"exsc__rbtn",children:[i.jsx(JV,{}),e("home.extHero.s2Regen")]})]})]})]}),i.jsxs("div",{className:"extw__scene exsc--grammar","data-scene":"3",children:[i.jsxs("div",{className:"exsc__doc",children:[i.jsxs("div",{className:"exsc__docchrome",children:[i.jsxs("span",{className:"exsc__docttl",children:[i.jsx(Qr,{className:"w-3.5 h-3.5"}),e("home.extHero.s3Doc")]}),i.jsxs("span",{className:"exsc__docstat",children:[i.jsx("b",{children:"3"})," ",e("home.extHero.s3Issues")]})]}),i.jsxs("p",{className:"exsc__doctext",children:[e("home.extHero.s3D0"),i.jsx("u",{className:"exsc__err gr",children:e("home.extHero.s3E1")}),e("home.extHero.s3D1"),i.jsx("u",{className:"exsc__err sp",children:e("home.extHero.s3E2")}),e("home.extHero.s3D2"),i.jsx("u",{className:"exsc__err gr",children:e("home.extHero.s3E3")}),e("home.extHero.s3D3")]})]}),i.jsxs("div",{className:"exsc__gcards",children:[i.jsxs("div",{className:"exsc__gcard",children:[i.jsx("span",{className:"exsc__gctype gr",children:e("home.extHero.s3C1Type")}),i.jsxs("div",{className:"exsc__gcrow",children:[i.jsx("span",{className:"bad",children:e("home.extHero.s3C1Bad")}),i.jsx(fr,{}),i.jsx("span",{className:"good",children:e("home.extHero.s3C1Good")})]}),i.jsx("p",{className:"exsc__gcdesc",children:e("home.extHero.s3C1Desc")})]}),i.jsxs("div",{className:"exsc__gcard",children:[i.jsx("span",{className:"exsc__gctype sp",children:e("home.extHero.s3C2Type")}),i.jsxs("div",{className:"exsc__gcrow",children:[i.jsx("span",{className:"bad",children:e("home.extHero.s3C2Bad")}),i.jsx(fr,{}),i.jsx("span",{className:"good",children:e("home.extHero.s3C2Good")})]}),i.jsx("p",{className:"exsc__gcdesc",children:e("home.extHero.s3C2Desc")})]})]})]})]}),i.jsxs("div",{className:"extsb",children:[i.jsxs("div",{className:"extsb__col",children:[i.jsxs("div",{className:"extsb__head",children:[i.jsx("img",{src:"/logos/uniai.png",alt:"UniAI",className:"extsb__logo"}),i.jsx("span",{className:"extsb__title",children:e("home.extHero.sbTitle")}),i.jsxs("span",{className:"extsb__login",children:[i.jsx(Vu,{className:"w-3.5 h-3.5"}),"Login"]})]}),i.jsxs("div",{className:"extsb__main",children:[i.jsx("span",{className:"extsb__cur",ref:s,children:i.jsx("svg",{width:"18",height:"18",viewBox:"0 0 16 16",children:i.jsx("path",{d:"M1 1l4.5 13 2-5.5 5.5-2z",fill:"#fff",stroke:"#000",strokeWidth:"1"})})}),i.jsx("div",{className:"extsb__wicon",children:i.jsx("img",{src:"/logos/uniai.png",alt:"UniAI"})}),i.jsx("div",{className:"extsb__welcome",children:e("home.extHero.welcome")}),i.jsx("div",{className:"extsb__wsub",children:e("home.extHero.welcomeSub")}),i.jsx("div",{className:"extsb__tools",children:a.map(o=>i.jsxs("div",{className:"extsb__tool",children:[i.jsx("div",{className:"ic",children:i.jsx(o.Icon,{})}),i.jsx("span",{children:o.label})]},o.label))})]}),i.jsxs("div",{className:"extsb__input",children:[i.jsx("div",{className:"extsb__p
1243h",ref:r,children:e("home.extHero.inputPh")}),i.jsxs("div",{className:"extsb__bar",children:[i.jsx("span",{className:"extsb__t",children:i.jsx(a3,{className:"w-4 h-4"})}),i.jsxs("span",{className:"extsb__toggle",children:[i.jsx(Tn,{className:"w-3 h-3"}),"Web",i.jsx("span",{className:"sw"})]}),i.jsxs("span",{className:"extsb__toggle on",children:[i.jsx(Gw,{className:"w-3 h-3"}),"Memo",i.jsx("span",{className:"sw"})]}),i.jsx("button",{className:"extsb__send",ref:n,"aria-label":"send",children:i.jsx(c9,{className:"w-4 h-4"})})]})]}),i.jsx("div",{className:"extsb__modelbar",children:i.jsxs("span",{className:"extsb__model",children:[i.jsx("span",{className:"lo"}),"Claude 3.5 â¾"]})})]}),i.jsxs("div",{className:"extsb__nav",children:[i.jsx("span",{className:"extsb__navi on",children:i.jsx(Vu,{})}),i.jsx("span",{className:"extsb__navi",children:i.jsx(n3,{})}),i.jsx("span",{className:"extsb__navi",children:i.jsx(Ti,{})}),i.jsx("span",{className:"extsb__navi",children:i.jsx(Ss,{})}),i.jsx("span",{className:"extsb__navi",children:i.jsx(Ku,{})}),i.jsx("span",{className:"extsb__navi",children:i.jsx(rm,{})}),i.jsx("span",{className:"extsb__navsp"}),i.jsx("span",{className:"extsb__navi",children:i.jsx(hG,{})}),i.jsx("span",{className:"extsb__navi",children:i.jsx(og,{})})]})]})]})]})]})})}function QZ(){const{t:e}=We(),t=e("home.faq.items",{returnObjects:!0})||[],[r,n]=v.useState(!1),s=v.useRef(null),[a,o]=v.useState(0);return v.useEffect(()=>{if(!s.current)return;const l=new IntersectionObserver(u=>{u.forEach(c=>{c.isIntersecting&&(n(!0),l.disconnect())})},{threshold:.12,rootMargin:"0px 0px -60px 0px"});return l.observe(s.current),()=>l.disconnect()},[]),i.jsx("section",{id:"faq",ref:s,className:`transition-all duration-700 ease-out ${r?"opacity-100 translate-y-0":"opacity-0 translate-y-6"}`,children:i.jsxs("div",{className:"max-w-[760px] mx-auto px-6 py-14 md:py-28",children:[i.jsxs("div",{className:"text-center mb-10 md:mb-14",children:[i.jsx("h2",{className:"text-[34px] md:text-[44px] font-semibold tracking-tight text-ui-text-primary leading-[1.08] mb-3",children:e("home.faq.title")}),i.jsxs("p",{className:"text-ui-text-tertiary text-[15px]",children:[e("home.faq.desc"),i.jsx("a",{href:"mailto:[email protected]",className:"text-ui-text-primary font-medium hover:text-[var(--theme)] transition-colors",children:e("home.faq.contactUs")})]})]}),i.jsx("div",{className:"space-y-3",children:t.map((l,u)=>{const c=a===u;return i.jsxs("div",{className:`rounded-2xl border transition-all duration-200 ${c?"border-ui-border-strong bg-ui-bg-secondary shadow-[0_6px_24px_-12px_rgba(0,0,0,.18)]":"border-ui-border bg-ui-bg-card hover:border-ui-border-strong"}`,children:[i.jsxs("button",{type:"button",onClick:()=>o(c?-1:u),"aria-expanded":c?"true":"false",className:"w-full flex items-center justify-between gap-5 px-6 py-5 text-left",children:[i.jsx("span",{className:"text-[16px] font-medium text-ui-text-primary",children:l.q}),i.jsx(dn,{className:`flex-none w-5 h-5 transition-transform duration-300 ${c?"rotate-180 text-[var(--theme)]":"text-ui-text-tertiary"}`})]}),i.jsx("div",{className:`grid transition-[grid-template-rows] duration-300 ease-out ${c?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:i.jsx("div",{className:"overflow-hidden",children:i.jsx("div",{className:"px-6 pb-6 text-[15px] text-ui-text-secondary leading-[1.7]",children:l.a})})})]},u)})})]})})}function XZ(){const{t:e}=We(),{lang:t}=Ut(),r=t||"en",[n,s]=v.useState("chat");return v.useEffect(()=>{$t.getState().setActiveTab("chat")},[]),v.useEffect(()=>{const a=document.querySelectorAll(".reveal-on-scroll"),o=new IntersectionObserver(l=>l.forEach(u=>{u.isIntersecting&&(u.target.classList.add("revealed"),o.unobserve(u.target))}),{threshold:.12,rootMargin:"0px 0px -8% 0px"});return a.forEach(l=>o.observe(l)),()=>o.disconnect()},[]),i.jsxs("div",{className:"homepage-root min-h-screen bg-[var(--bg-primary)]",children:[i.jsx(pn,{title:e("seo.homeTitle"),description:e("seo.homeDesc"),path:"/"}),i.jsx(wa,{data:[BZ(),UZ(r)]}),i.jsx("section",{className:"relative overflow-hidden bg-[var(--bg-primary)] pt-24 pb-4 md:pt-32 md:pb-14",children:i.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-6 text-center",children:[i.jsxs("h1",{className:"text-4xl md:text-6xl font-bold tracking-tight text-[var(--text-primary)] mb-4 md:whitespace-nowrap reveal-on-scroll rv-d1",children:[e("home.title")," ",i.jsx("span",{className:"bg-gradient-to-r from-indigo-400 via-indigo-500 to-indigo-600 bg-clip-text text-transparent",children:e("home.titleGradient")})]}),i.jsx("p",{className:"text-lg md:text-xl text-[var(--text-secondary)] mb-10 max-w-xl mx-auto reveal-on-scroll rv-d1",children:e("home.subtitle")}),i.jsx("div",{className:"mb-4 md:mb-6 text-left max-w-3xl mx-auto reveal-on-scroll rv-d2",children:n==="art"?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"inline-flex items-center gap-1 mb-2",children:[i.jsxs("button",{onClick:()=>
1243{$t.getState().setActiveTab("chat"),s("chat")},className:"flex items-center gap-1.5 px-4 py-1.5 rounded-full text-sm font-medium transition-all text-muted-foreground hover:text-foreground hover:bg-secondary/50",children:[i.jsx(E9,{className:"w-4 h-4"}),i.jsx("span",{children:"Chat"})]}),i.jsxs("button",{onClick:()=>{$t.getState().setActiveTab("agent"),s("chatAgent")},className:"flex items-center gap-1.5 px-4 py-1.5 rounded-full text-sm font-medium transition-all text-muted-foreground hover:text-foreground hover:bg-secondary/50",children:[i.jsx(Kw,{className:"w-4 h-4"}),i.jsx("span",{children:"Agent"})]}),i.jsxs("button",{className:"flex items-center gap-1.5 px-4 py-1.5 rounded-full text-sm font-medium transition-all bg-secondary text-foreground",children:[i.jsx(w1,{className:"w-4 h-4"}),i.jsx("span",{children:"Design Agent"})]})]}),i.jsx(sI,{onSubmit:(a,o)=>{localStorage.setItem(`art_auto_generate_${a.id}`,JSON.stringify(o)),window.open(`/${r}/app/design/${a.id}`,"_blank")}})]}):i.jsx(IY,{onSend:(a,o,l)=>{localStorage.setItem("homepage_message",a),o!=null&&o.length&&localStorage.setItem("homepage_files",JSON.stringify(o)),l&&localStorage.setItem("homepage_template",JSON.stringify(l)),window.open(`/${r}/app/chat`,"_blank")},onArtAgentClick:()=>s("art")})})]})}),i.jsx(VZ,{}),i.jsx(zZ,{}),i.jsx(GZ,{}),i.jsx(YZ,{}),i.jsx(QZ,{})]})}const af={free:0,basic:1,plus:2,pro:3,max:4},ZZ=.001,JZ={free:["pricing.feat.freeModels","pricing.feat.basicChat"],basic:["pricing.feat.allModels"],plus:["pricing.feat.prioritySupport"],pro:["pricing.feat.apiAccess"],max:["pricing.feat.dedicatedSupport"]};function eJ(){const{t:e}=We(),{lang:t}=Ut(),r=Er(),[n,s]=Gh(),a=t||"en",o=ut(X=>X.isAuthenticated),[l,u]=v.useState(n.get("tab")==="subscription"?"subscription":"purchase"),[c,d]=v.useState(!0),[h,m]=v.useState(null),[f,p]=v.useState(!1),[g,x]=v.useState(!1),[w,y]=v.useState(null),[b,k]=v.useState(1e4),[T,S]=v.useState([]),[j,E]=v.useState(!0),[A,R]=v.useState(null),[M,B]=v.useState(null),[W,H]=v.useState(!1),[L,$]=v.useState(!1);v.useEffect(()=>{(async()=>{try{const pe=await lo.getPublicPlans();S(pe.data.plans||[])}catch(pe){console.error("Failed to fetch pricing data:",pe)}finally{E(!1)}})()},[]),v.useEffect(()=>{o&&lo.getSubscription().then(X=>R(X.data.subscription||null)).catch(()=>{})},[o]),v.useEffect(()=>{n.get("success")==="true"?(Qe.success(e("pricing.toast.subscriptionSuccess")),s({},{replace:!0})):n.get("canceled")==="true"?(Qe(e("pricing.toast.canceled")),s({},{replace:!0})):n.get("purchase")==="success"&&(Qe.success(e("pricing.toast.purchaseSuccess")),s({},{replace:!0}))},[n,s,e]);const ee=(()=>{if(!A||A.plan==="free"||A.status!=="active")return 0;const X=T.find(pe=>pe.id===A.plan);return(X==null?void 0:X.topupBonusPercent)??0})(),G=Math.round(1e3*(1+ee/100)),Q=b/G,D=Math.ceil(b/G*100),K=D<100,V=async()=>{if(!o){r(`/${a}/login?redirect=/${a}/pricing`);return}if(!(D<100)){p(!0);try{const X=await lo.purchaseCredits({amountUsdCents:D,successUrl:`${window.location.origin}/${a}/pricing?purchase=success`,cancelUrl:`${window.location.origin}/${a}/pricing?canceled=true`});window.location.href=X.data.url}catch(X){console.error("Purchase failed:",X),Qe.error(e("pricing.toast.error")),p(!1)}}},C=async()=>{if(!o){r(`/${a}/login?redirect=/${a}/pricing`);return}if(!(D<100)){x(!0);try{const X=await HA.purchaseCredits(D);window.location.href=X.data.checkoutUrl}catch(X){console.error("Crypto purchase failed:",X),Qe.error(e("pricing.toast.error")),x(!1)}}},O=async X=>{if(X!=="free"){if(!o){r(`/${a}/login?redirect=/${a}/pricing`);return}y(X);try{const pe=await lo.createCheckout({plan:X,interval:c?"yearly":"monthly",successUrl:`${window.location.origin}/${a}/pricing?success=true`,cancelUrl:`${window.location.origin}/${a}/pricing?canceled=true`});window.location.href=pe.data.url}catch(pe){console.error("Checkout failed:",pe),Qe.error(e("pricing.toast.error")),y(null)}}},q=async(X,pe)=>{var _e,Ne;H(!0);try{const de=await lo.changeSubscription({newPlan:X,newInterval:pe});R(de.data.subscription||null),B(null),(M==null?void 0:M.direction)==="upgrade"?Qe.success(e("pricing.toast.upgradeSuccess")):Qe.success(e("pricing.toast.changeScheduled"))}catch(de){Qe.error(((Ne=(_e=de.response)==null?void 0:_e.data)==null?void 0:Ne.message)||e("pricing.toast.error"))}finally{H(!1)}},ne=async()=>{var X,pe;$(!0);try{const _e=await lo.cancelPendingChange();R(_e.data.subscription||null),Qe.success(e("pricing.toast.pendingCanceled"))}catch(_e){Qe.error(((pe=(X=_e.response)==null?void 0:X.data)==null?void 0:pe.message)||e("pricing.toast.error"))}finally{$(!1)}},he=X=>{if(X==="free")return;if(!o){r(`/${a}/login?redirect=/${a}/pricing`);return}if(!(A&&A.plan!=="free"&&A.status==="active")){O(X);return}const _e=af[A.plan]??0,Ne=af[X]??0,de=c?"yearly":"monthly",be=X===A.plan,ie=de===(A.interval||"monthly");if(be&&ie)return;let De;Ne>_e?De="upgrade":Ne<_e?De="downgrade":De="switch",B({planId:X,interval:de,direction:De})},xe=e("pricing.faq.items",{returnObjects:!0}),Oe=e("pricing.credits.unified.features",{returnObjects:!0}),Se=e("pricing.transfer.features",{returnObjects:!0}),we=e("pricing.packs.benefits",{returnObjects:!0}),Be=e("pricing.comparison.subscription.features",{returnObjects:!0}),ve=e("pricing.comparison.packs.features",{returnObjects:!0}),Ye={free:{name:e("pricing.plans.free.name"),desc:e("pricing.plans.free.desc")},basic:{name:e("pricing.plans.basic.name"),desc:e("pricing.plans.basic.desc")},plus:{name:e("pricing.plans.plus.name"),desc:e("pricing.plans.plus.desc"),popular:e("pricing.plans.plus.popular")},pro:{name:e("pricing.plans.pro.name"),desc:e("pricing.plans.pro.desc")},max:{name:e("pricing.plans.max.name"),desc:e("pricing.plans.max.desc"),bestValue:e("pricing.plans.max.bestValue")}},Ae=X=>
1243X.toLocaleString(),Ee=T.filter(X=>X.id!=="free"&&X.id!=="ultra").map(X=>{const pe=Ye[X.id]||{},_e=X.id==="plus",Ne=X.id==="max",de=X.credits*ZZ,be=X.monthlyPrice/100,ie=X.yearlyPrice/100/12,De=de>0?Math.round((1-be/de)*100):0,F=de>0?Math.round((1-ie/de)*100):0,se=Math.round(1e3*(1+X.topupBonusPercent/100)),ue=c?X.yearlyPrice/100/12:X.monthlyPrice/100,je=c?F:De;return{id:X.id,name:pe.name||X.name,desc:pe.desc||"",struckUsd:de,actualPrice:ue,offPercent:je,offMonthly:De,offYearly:F,rawCredits:X.credits,credits:Ae(X.credits),features:X.features,cta:e("pricing.cta.subscribe"),popular:_e,bestValue:Ne,badge:_e?pe.popular:Ne?pe.bestValue:void 0,topupBonusPercent:X.topupBonusPercent,topupRate:se,yearlyTotal:X.yearlyPrice/100,monthlyTotal:X.monthlyPrice/100}}),Ce=()=>i.jsxs("div",{className:"p-8 rounded-[28px] bg-ui-bg-primary border border-ui-border animate-pulse",children:[i.jsx("div",{className:"h-6 w-20 bg-ui-bg-tertiary rounded mb-2"}),i.jsx("div",{className:"h-4 w-32 bg-ui-bg-tertiary rounded mb-5"}),i.jsx("div",{className:"h-12 w-24 bg-ui-bg-tertiary rounded mb-5"}),i.jsx("div",{className:"h-16 bg-ui-bg-secondary rounded-xl mb-5"}),i.jsx("div",{className:"space-y-3 mb-6",children:[1,2,3,4].map(X=>i.jsx("div",{className:"h-4 bg-ui-bg-tertiary rounded w-full"},X))}),i.jsx("div",{className:"h-10 bg-ui-bg-tertiary rounded-xl"})]});return i.jsxs("div",{style:{paddingTop:"var(--header-height)"},children:[i.jsx(pn,{title:e("seo.pricingTitle"),description:e("seo.pricingDesc"),path:"/pricing"}
1243),i.jsx(wa,{data:hc({lang:a,name:"UniAI",description:e("seo.pricingDesc")})}),i.jsx("section",{className:"pt-8 pb-4 text-center bg-ui-bg-primary",children:i.jsxs("div",{className:"container",children:[i.jsx("h1",{className:"text-3xl md:text-4xl font-extrabold mb-2 text-ui-text-primary tracking-tight",children:e("pricing.title")}),i.jsx("p",{className:"text-base max-w-xl mx-auto mb-5 text-ui-text-secondary leading-relaxed",children:e("pricing.subtitle")}),i.jsxs("div",{className:"inline-flex items-center p-1 rounded-2xl bg-ui-bg-secondary border border-ui-border",children:[i.jsxs("button",{onClick:()=>{u("subscription"),s({tab:"subscription"},{replace:!0})},className:`flex items-center gap-2 px-6 py-2.5 rounded-xl font-semibold transition-all cursor-pointer ${l==="subscription"?"text-white shadow-sm":"text-ui-text-secondary hover:text-ui-text-primary hover:bg-ui-bg-tertiary"}`,style:l==="subscription"?{background:"var(--theme)"}:void 0,children:[i.jsx(Jx,{className:"w-4 h-4"}),e("pricing.tabs.subscription")]}),i.jsxs("button",{onClick:()=>{u("purchase"),s({},{replace:!0})},className:`flex items-center gap-2 px-6 py-2.5 rounded-xl font-semibold transition-all cursor-pointer ${l==="purchase"?"text-white shadow-sm":"text-ui-text-secondary hover:text-ui-text-primary hover:bg-ui-bg-tertiary"}`,style:l==="purchase"?{background:"var(--theme)"}:void 0,children:[i.jsx(Zx,{className:"w-4 h-4"}),e("pricing.tabs.purchase")]})]})]})}),l==="subscription"&&i.jsx("section",{className:"pt-6 pb-16 bg-ui-bg-primary",children:i.jsxs("div",{className:"container",children:[i.jsx("div",{className:"max-w-3xl mx-auto mb-8 p-4 rounded-xl text-center bg-ui-bg-secondary border border-ui-border",children:i.jsx("p",{className:"text-sm font-medium text-ui-text-secondary",children:e("pricing.subscriptionBanner")})}),i.jsxs("div",{className:"flex items-center justify-center gap-3 mb-12",children:[i.jsx("span",{className:`text-sm font-medium ${c?"text-ui-text-secondary":"font-semibold text-ui-text-primary"}`,children:e("pricing.toggle.monthly")}),i.jsx("button",{onClick:()=>d(!c),className:`w-14 h-7 rounded-full relative transition-colors ${c?"bg-[var(--theme)]":"bg-ui-bg-tertiary"}`,children:i.jsx("span",{className:"absolute top-[3px] left-[3px] w-[22px] h-[22px] rounded-full bg-white transition-transform",style:{transform:c?"translateX(26px)":"translateX(0)",boxShadow:"var(--shadow-sm)"}})}),i.jsx("span",{className:`text-sm font-medium ${c?"font-semibold text-ui-text-primary":"text-ui-text-secondary"}`,children:e("pricing.toggle.yearly")}),i.jsx("span",{className:"px-2.5 py-1 text-xs font-semibold rounded-full bg-[rgba(16,185,129,0.1)] text-ui-status-success",children:e("pricing.toggle.save")})]}),(A==null?void 0:A.pendingChange)&&i.jsx("div",{className:"max-w-5xl mx-auto mb-8",children:i.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4 flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(bh,{className:"w-5 h-5 text-blue-600"}),i.jsxs("div",{children:[i.jsxs("p",{className:"text-sm font-medium text-blue-900",children:[e("pricing.pendingChange.title")," ",i.jsx("span",{className:"capitalize",children:A.pendingChange.plan})," ",A.pendingChange.interval]}),i.jsxs("p",{className:"text-xs text-blue-700",children:[e("pricing.pendingChange.effectiveDate")," ",new Date(A.pendingChange.effectiveDate).toLocaleDateString()]})]})]}),i.jsxs("button",{onClick:ne,disabled:L,className:"px-3 py-1.5 text-sm text-blue-700 border border-blue-300 rounded-lg hover:bg-blue-100 disabled:opacity-50 flex items-center gap-1",children:[L?i.jsx(kn,{className:"w-3 h-3 animate-spin"}):i.jsx(cr,{className:"w-3 h-3"}),e("pricing.pendingChange.cancel")]})]})}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 max-w-6xl mx-auto",children:j?i.jsxs(i.Fragment,{children:[i.jsx(Ce,{}),i.jsx(Ce,{}),i.jsx(Ce,{}),i.jsx(Ce,{})]}):Ee.map((X,pe)=>i.jsxs("div",{className:`relative p-6 rounded-[28px] transition-all bg-ui-bg-primary border flex flex-col ${X.popular?"border-[var(--theme)]":X.bestValue?"border-ui-border-strong":"border-ui-border"}`,style:{boxShadow:X.popular?"0 8px 32px rgba(99, 102, 241, 0.15)":"none"},children:[X.badge&&i.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 px-4 py-1.5 text-xs font-semibold rounded-full text-white whitespace-nowrap",style:{background:X.popular?"var(--theme)":"#059669"},children:X.badge}),i.jsx("h3",{className:"text-lg font-bold mb-1 text-ui-text-primary",children:X.name}),i.jsx("p",{className:"text-xs mb-4 text-ui-text-secondary",children:X.desc}),i.jsxs("div",{className:"mb-1",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsxs("span",{className:"text-sm line-through text-ui-text-tertiary",children:["$",X.struckUsd%1===0?X.struckUsd.toFixed(0):X.struckUsd.toFixed(2)]}),i.jsxs("span",{className:"px-2 py-0.5 text-xs font-semibold rounded-full bg-[rgba(16,185,129,0.1)] text-ui-status-success",children:[e("pricing.plans.save")," ",X.offPercent,"%"]})]}),i.jsxs("div",{className:"flex items-baseline gap-1",children:[i.jsx("span",{className:"text-xl font-semibold text-ui-text-primary",children:"$"}),i.jsx("span",{className:"text-4xl font-extrabold text-ui-text-primary",children:X.actualPrice%1===0?X.actualPrice.toFixed(0):X.actualPrice.toFixed(2)}),i.jsx("span",{className:"text-ui-text-tertiary text-sm",children:e("pricing.plans.moSuffix")})]})]}),i.jsx("p",{className:"text-xs text-ui-text-tertiary mb-4",children:c?e("pricing.plans.billedYearly",{total:X.yearlyTotal.toFixed(0)}):e("pricing.plans.billedMonthly")}),i.jsxs("div",{className:"mb-4 p-3 rounded-xl bg-ui-bg-secondary",children:[i.jsxs("div",{className:"flex items-center justify-between mb-1",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx(xu,{className:"w-4 h-4 text-ui-text-secondary"}),i.jsx("span",{className:"text-xs text-ui-text-secondary",children:e("pricing.plans.monthlyCredits")})]}),i.jsx("span",{className:"text-sm font-bold text-ui-text-secondary",children:X.credits})]}),X.topupBonusPercent>0&&i.jsx("p",{className:"text-xs text-ui-status-success mt-1",children:e("pricing.plans.topupBonus",{pct:X.topupBonusPercent,rate:X.topupRate})})]}),i.jsx("div",{className:"flex flex-col gap-2.5 mb-5 flex-1",children:[e("pricing.feat.creditsPerMonth",{credits:X.rawCredits.toLocaleStr
1243ing()}),...X.topupBonusPercent>0?[e("pricing.feat.topupBonus",{pct:X.topupBonusPercent})]:[],...(JZ[X.id]||[]).map(Ne=>e(Ne))].map((Ne,de)=>i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx(Fr,{className:"w-[16px] h-[16px] flex-shrink-0 text-ui-status-success"}),i.jsx("span",{className:"text-xs text-ui-text-secondary",children:Ne})]},de))}),(()=>{var mt,Ft;const _e=A&&A.plan!=="free"&&A.status==="active",Ne=af[(A==null?void 0:A.plan)||"free"]??0,de=af[X.id]??0,be=X.id===(A==null?void 0:A.plan),ie=c?"yearly":"monthly",De=ie===((A==null?void 0:A.interval)||"monthly"),F=_e&&be&&De,se=((mt=A==null?void 0:A.pendingChange)==null?void 0:mt.plan)===X.id&&((Ft=A==null?void 0:A.pendingChange)==null?void 0:Ft.interval)===ie;let ue=X.cta;se?ue=e("pricing.cta.scheduled"):F?ue=e("pricing.cta.current"):_e&&(de>Ne?ue=e("pricing.cta.upgrade"):de<Ne?ue=e("pricing.cta.downgrade"):be&&!De&&(ue=e(c?"pricing.cta.switchYearly":"pricing.cta.switchMonthly")));const je=F||se||w===X.id,Ge=_e&&de<Ne;return i.jsx("button",{onClick:()=>he(X.id),disabled:je,className:`btn w-full flex items-center justify-center gap-2 mt-auto ${F||se?"btn-outline opacity-50 cursor-not-allowed":Ge?"btn-outline text-orange-600 border-orange-300 hover:bg-orange-50":X.popular?"btn-primary":"btn-outline"}`,children:w===X.id?i.jsx(kn,{className:"w-4 h-4 animate-spin"}):i.jsxs(i.Fragment,{children:[se&&i.jsx(bh,{className:"w-4 h-4"}),ue,!F&&!se&&i.jsx(fr,{className:"w-4 h-4"})]})})})()]},X.id||pe))})]})}),l==="purchase"&&i.jsxs("section",{className:"py-16 bg-ui-bg-primary",children:[i.jsxs("div",{className:"container max-w-3xl",children:[i.jsxs("div",{className:"text-center mb-10",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-extrabold mb-3 text-ui-text-primary tracking-tight",children:e("pricing.topup.sectionTitle")}),i.jsx("p",{className:"text-ui-text-secondary",children:e("pricing.topup.sectionSubtitle")})]}),i.jsx("div",{className:"flex flex-wrap items-center justify-center gap-4 mb-10",children:we.map((X,pe)=>i.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 rounded-full bg-ui-bg-secondary",children:[pe===0&&i.jsx(Qw,{className:"w-4 h-4 text-ui-text-secondary"}),pe===1&&i.jsx(Zx,{className:"w-4 h-4 text-ui-text-secondary"}),pe===2&&i.jsx(Jx,{className:"w-4 h-4 text-ui-text-secondary"}),pe===3&&i.jsx(Gu,{className:"w-4 h-4 text-ui-text-secondary"}),i.jsx("span",{className:"text-sm font-medium text-ui-text-secondary",children:X})]},pe))}),i.jsxs("div",{className:"p-6 rounded-2xl bg-ui-bg-secondary border border-ui-border",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center bg-ui-bg-tertiary",children:i.jsx(xu,{className:"w-6 h-6 text-ui-text-secondary"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-bold text-ui-text-primary",children:e("pricing.topup.title")}),i.jsx("p",{className:"text-sm text-ui-text-secondary",children:e("pricing.topup.desc")})]})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-ui-text-secondary mb-1",children:e("pricing.topup.creditsLabel")}),i.jsx("input",{type:"number",min:1e4,max:5e5,step:100,value:b,onChange:X=>{const pe=Math.min(5e5,Math.max(1e4,Number(X.target.value)||1e4));k(pe)},className:"w-full px-3 py-2 rounded-lg bg-ui-bg-primary border border-ui-border text-ui-text-primary font-semibold focus:outline-none focus:border-ui-border-strong"})]}),i.jsx("input",{type:"range",min:1e4,max:5e5,step:100,value:b,onChange:X=>k(Number(X.target.value)),className:"w-full accent-[var(--theme)] mb-4"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:[1e4,2e4,3e4,5e4,1e5].map(X=>i.jsx("button",{onClick:()=>k(X),className:`px-3 py-1.5 rounded-lg text-sm font-medium border transition-all ${b===X?"border-[var(--theme)] text-white":"border-ui-border text-ui-text-secondary hover:border-ui-border-strong"}`,style:b===X?{background:"var(--theme)"}
1243:void 0,children:X.toLocaleString()},X))})]}),i.jsxs("div",{className:"flex flex-col justify-between p-5 rounded-xl bg-ui-bg-primary border border-ui-border",children:[i.jsxs("div",{className:"space-y-3 mb-5",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-sm text-ui-text-secondary",children:e("pricing.topup.youGet")}),i.jsxs("span",{className:"font-bold text-ui-text-primary",children:[b.toLocaleString()," ",e("pricing.topup.creditsUnit")]})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-sm text-ui-text-secondary",children:e("pricing.topup.rate")}),i.jsxs("span",{className:"font-semibold text-ui-text-primary",children:["$1 = ",G.toLocaleString()," ",e("pricing.topup.creditsUnit"),ee>0&&i.jsxs("span",{className:"ml-1 text-xs text-ui-status-success",children:["+",ee,"%"]})]})]}),i.jsxs("div",{className:"flex items-center justify-between border-t border-ui-border pt-3",children:[i.jsx("span",{className:"text-sm font-semibold text-ui-text-primary",children:e("pricing.topup.toPay")}),i.jsxs("span",{className:"text-xl font-extrabold text-ui-text-primary",children:["$",Q.toFixed(2)]})]})]}),K&&i.jsx("p",{className:"text-xs text-ui-status-error mb-3",children:e("pricing.topup.minHint")}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("button",{onClick:()=>V(),disabled:f||K,className:"w-full flex items-center justify-center gap-2 px-4 py-3 rounded-xl font-semibold text-white transition-all disabled:opacity-50",style:{background:"var(--theme)"},children:f?i.jsx(kn,{className:"w-4 h-4 animate-spin"}):i.jsxs(i.Fragment,{children:[i.jsx(oG,{className:"w-4 h-4"}),e("pricing.topup.buyNow")]})}),i.jsx("button",{type:"button",onClick:()=>C(),disabled:g||K,className:"w-full flex items-center justify-center gap-2 px-4 py-3 rounded-xl text-sm font-medium border border-ui-border text-ui-text-secondary hover:border-ui-border-strong transition-all disabled:opacity-50",children:g?i.jsx(kn,{className:"w-4 h-4 animate-spin"}):e("pricing.payWithCrypto")})]})]})]})]})]}),i.jsxs("div",{className:"container max-w-3xl mt-12",children:[i.jsx("div",{className:"text-center mb-6",children:i.jsx("h2",{className:"text-2xl md:text-3xl font-extrabold text-ui-text-primary tracking-tight",children:e("pricing.threshold.title")})}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"p-6 rounded-2xl bg-ui-bg-secondary border border-ui-border",children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("h3",{className:"text-lg font-bold text-ui-text-tertiary",children:e("pricing.threshold.basic.title")}),i.jsx("p",{className:"text-sm text-ui-text-tertiary",children:e("pricing.threshold.basic.subtitle")})]}),i.jsx("div",{className:"space-y-2.5 mb-4",children:e("pricing.threshold.basic.features",{returnObjects:!0}).map((X,pe)=>i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx(Fr,{className:"w-4 h-4 text-ui-text-tertiary flex-shrink-0"}),i.jsx("span",{className:"text-sm text-ui-text-tertiary",children:X})]},pe))}),i.jsx("div",{className:"space-y-2.5",children:e("pricing.threshold.basic.restricted",{returnObjects:!0}).map((X,pe)=>i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx(cr,{className:"w-4 h-4 text-ui-text-tertiary/50 flex-shrink-0"}),i.jsx("span",{className:"text-sm text-ui-text-tertiary/50 line-through",children:X})]},pe))})]}),i.jsxs("div",{className:"p-6 rounded-2xl border-2 border-[var(--theme)] bg-ui-bg-primary",style:{boxShadow:"0 4px 24px rgba(99,102,241,0.12)"},children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("h3",{className:"text-lg font-bold text-ui-text-primary",children:e("pricing.threshold.full.title")}),i.jsx("p",{className:"text-sm text-ui-text-secondary",children:e("pricing.threshold.full.subtitle")})]}),i.jsx("div",{className:"space-y-2.5",children:e("pricing.threshold.full.features",{returnObjects:!0}).map((X,pe)=>i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx(Fr,{className:"w-4 h-4 text-ui-status-success flex-shrink-0"}),i.jsx("span",{className:"text-sm text-ui-text-primary",children:X})]},pe))})]})]}),i.jsx("p",{className:"text-center mt-4 text-sm font-medium text-ui-text-secondary",children:e("pricing.threshold.cta")})]})]}),i.jsx("section",{className:"py-12 bg-ui-bg-secondary",children:i.jsxs("div",{className:"container max-w-5xl",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-extrabold text-center mb-3 text-ui-text-primary tracking-tight",children:e("pricing.credits.title")}),i.jsx("p",{className:"text-center mb-8 text-ui-text-secondary",children:e("pricing.credits.subtitle")}),i.jsx("div",{className:"max-w-2xl mx-auto",children:i.jsxs("div",{className:"p-6 rounded-2xl bg-ui-bg-primary border border-ui-border",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center bg-ui-bg-tertiary",children:i.jsx(xu,{className:"w-6 h-6 text-ui-text-secondary"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-bold text-ui-text-primary",children:e("pricing.credits.unified.name")}
1243),i.jsx("p",{className:"text-sm text-ui-text-secondary",children:e("pricing.credits.unified.desc")})]})]}),i.jsx("ul",{className:"space-y-2",children:Oe.map((X,pe)=>i.jsxs("li",{className:"flex items-center gap-2.5",children:[i.jsx(Fr,{className:"w-4 h-4 flex-shrink-0 text-ui-text-secondary"}),i.jsx("span",{className:"text-sm text-ui-text-secondary",children:X})]},pe))})]})})]})}),i.jsx("section",{className:"py-16 bg-ui-bg-secondary",children:i.jsxs("div",{className:"container max-w-4xl",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-extrabold text-center mb-10 text-ui-text-primary tracking-tight",children:e("pricing.comparison.title")}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsxs("div",{className:"p-6 rounded-2xl bg-ui-bg-primary border border-ui-border",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx(Jx,{className:"w-6 h-6 text-ui-text-secondary"}),i.jsx("h3",{className:"text-lg font-bold text-ui-text-primary",children:e("pricing.comparison.subscription.title")})]}),i.jsx("ul",{className:"space-y-3",children:Be.map((X,pe)=>i.jsxs("li",{className:"flex items-center gap-2.5",children:[i.jsx(Fr,{className:"w-4 h-4 flex-shrink-0 text-ui-text-secondary"}),i.jsx("span",{className:"text-sm text-ui-text-secondary",children:X})]},pe))})]}),i.jsxs("div",{className:"p-6 rounded-2xl bg-ui-bg-primary border border-ui-border",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx(Zx,{className:"w-6 h-6 text-ui-status-success"}),i.jsx("h3",{className:"text-lg font-bold text-ui-text-primary",children:e("pricing.comparison.packs.title")})]}),i.jsx("ul",{className:"space-y-3",children:ve.map((X,pe)=>i.jsxs("li",{className:"flex items-center gap-2.5",children:[i.jsx(Fr,{className:"w-4 h-4 flex-shrink-0 text-ui-status-success"}),i.jsx("span",{className:"text-sm text-ui-text-secondary",children:X})]},pe))})]})]})]})}),i.jsx("section",{className:"py-12 bg-ui-bg-primary",children:i.jsx("div",{className:"container max-w-4xl",children:i.jsxs("div",{className:"p-8 rounded-2xl flex flex-col md:flex-row items-center gap-8 border border-ui-border",style:{background:"linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1))"},children:[i.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center flex-shrink-0 bg-ui-bg-primary",children:i.jsx(Gu,{className:"w-8 h-8 text-ui-text-secondary"})}),i.jsxs("div",{className:"flex-1 text-center md:text-left",children:[i.jsx("h3",{className:"text-xl font-bold mb-2 text-ui-text-primary",children:e("pricing.transfer.title")}),i.jsx("p",{className:"mb-4 text-ui-text-secondary",children:e("pricing.transfer.desc")}),i.jsx("div",{className:"flex flex-wrap gap-3 justify-center md:justify-start",children:Se.map((X,pe)=>i.jsx("span",{className:"px-3 py-1.5 text-sm rounded-full bg-ui-bg-primary text-ui-text-secondary",children:X},pe))})]})]})})}),i.jsx("section",{className:"py-16 bg-ui-bg-secondary",children:i.jsxs("div",{className:"container max-w-3xl",children:[i.jsx("h2",{className:"text-3xl font-extrabold text-center mb-12 text-ui-text-primary tracking-tight",children:e("pricing.faq.title")}),i.jsx("div",{className:"space-y-4",children:xe.map((X,pe)=>i.jsxs("div",{className:"rounded-[14px] overflow-hidden bg-ui-bg-primary border border-ui-border",children:[i.jsxs("button",{onClick:()=>m(h===pe?null:pe),className:"w-full px-6 py-4 flex items-center justify-between text-left",children:[i.jsx("span",{className:"font-semibold text-ui-text-primary",children:X.question}),h===pe?i.jsx(d9,{className:"w-5 h-5 text-ui-text-tertiary"}):i.jsx(dn,{className:"w-5 h-5 text-ui-text-tertiary"})]}),h===pe&&i.jsx("div",{className:"px-6 pb-4",children:i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:X.answer})})]},pe))})]})}),M&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-ui-bg-primary rounded-2xl p-6 w-full max-w-md mx-4",children:[i.jsx("h2",{className:"text-lg font-semibold mb-2 text-ui-text-primary",children:M.direction==="upgrade"?e("pricing.modal.upgradeTitle"):M.direction==="downgrade"?e("pricing.modal.downgradeTitle"):e("pricing.modal.switchTitle")}),i.jsx("p",{className:"text-sm text-ui-text-secondary mb-4",children:M.direction==="upgrade"?i.jsxs(i.Fragment,{children:[e("pricing.modal.upgradeDesc")," ",i.jsx("span",{className:"font-medium capitalize",children:M.planId})," ",M.interval," ",e("pricing.modal.upgradeImmediate")]}):i.jsxs(i.Fragment,{children:[e("pricing.modal.deferredDesc")," ",i.jsx("span",{className:"font-medium capitalize",children:M.planId})," ",M.interval," ",e("pricing.modal.deferredAt"),A!=null&&A.currentPeriodEnd?` (${new Date(A.currentPeriodEnd).toLocaleDateString()})`:"","."]})}),i.jsxs("div",{className:"flex gap-3 justify-end",children:[i.jsx("button",{onClick:()=>B(null),className:"btn btn-outline px-4 py-2",children:e("common.cancel","Cancel")}),i.jsx("button",{onClick:()=>q(M.planId,M.interval),disabled:W,className:`btn px-4 py-2 text-white ${M.direction==="upgrade"?"btn-primary":"bg-orange-600 hover:bg-orange-700"}`,children:W?i.jsx(kn,{className:"w-4 h-4 animate-spin"}):M.direction==="upgrade"?e("pricing.modal.confirmUpgrade"):e("pricing.modal.confirmChange")})]})]})})]})}const _N=()=>
1243i.jsx("svg",{className:"w-9 h-9",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})}),tJ=()=>i.jsx("svg",{className:"w-9 h-9",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M3 12V6.75l6-1v6.5H3v-.25zm0 .75h6v6.5l-6-1v-5.5zm7.5-7.75L21 3v9h-10.5V5zm0 14L21 21V12h-10.5v7z"})}),rJ=()=>i.jsx("svg",{className:"w-9 h-9",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M17.6 9.48l1.84-3.18c.16-.31.04-.69-.27-.86-.31-.16-.69-.04-.86.27l-1.87 3.23C14.77 8.24 12.93 7.82 11 7.82s-3.77.42-5.44 1.12L3.69 5.71c-.16-.31-.54-.43-.86-.27-.31.16-.43.55-.27.86l1.84 3.18C1.73 11.26 0 14.13 0 17.47h22c0-3.34-1.73-6.21-4.4-7.99zM7 15.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25zm8 0c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25z"})});function nJ(){const{t:e}=We(),{lang:t}=Ut(),r=t||"en",n=[{id:"extension",icon:KZ,title:e("download.platforms.extension.title"),desc:e("download.platforms.extension.desc"),button:"",requirements:e("download.platforms.extension.requirements"),comingSoon:!1,stores:[{kind:"chrome",url:xg.chrome,label:e("download.platforms.extension.buttonChrome")},{kind:"firefox",url:xg.firefox,label:e("download.platforms.extension.buttonFirefox")}]},{id:"macos",icon:_N,title:e("download.platforms.macos.title"),desc:e("download.platforms.macos.desc"),button:e("download.platforms.macos.button"),requirements:e("download.platforms.macos.requirements"),comingSoon:!1,downloadUrl:"https://uniai-public.uniai.one/downloads/UniAI-0.1.24-arm64.dmg"},{id:"windows",icon:tJ,title:e("download.platforms.windows.title"),desc:e("download.platforms.windows.desc"),button:e("download.platforms.windows.button"),requirements:e("download.platforms.windows.requirements"),comingSoon:!0},{id:"android",icon:rJ,title:e("download.platforms.android.title"),desc:e("download.platforms.android.desc"),button:e("download.platforms.android.button"),requirements:e("download.platforms.android.requirements"),comingSoon:!0},{id:"ios",icon:_N,title:e("download.platforms.ios.title"),desc:e("download.platforms.ios.desc"),button:e("download.platforms.ios.button"),requirements:e("download.platforms.ios.requirements"),comingSoon:!0}],s=[{icon:Ti,titleKey:"download.features.items.0.title",descKey:"download.features.items.0.desc"},{icon:wG,titleKey:"download.features.items.1.title",descKey:"download.features.items.1.desc"},{icon:og,titleKey:"download.features.items.2.title",descKey:"download.features.items.2.desc"}];return i.jsxs("div",{style:{paddingTop:"var(--header-height)"},children:[i.jsx(pn,{title:e("seo.downloadTitle"),description:e("seo.downloadDesc"),path:"/download"}
1243),i.jsx(wa,{data:hc({lang:r,name:"UniAI",description:e("seo.downloadDesc"),operatingSystem:"macOS, Windows, Android"})}),i.jsx("section",{className:"py-20 text-center bg-ui-bg-primary",children:i.jsxs("div",{className:"container",children:[i.jsx("h1",{className:"text-4xl md:text-5xl font-extrabold mb-5 text-ui-text-primary tracking-tight",children:e("download.title")}),i.jsx("p",{className:"text-lg max-w-xl mx-auto text-ui-text-secondary leading-relaxed",children:e("download.subtitle")})]})}),i.jsx("section",{className:"pb-20 bg-ui-bg-primary",children:i.jsx("div",{className:"container",children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-5 max-w-7xl mx-auto",children:n.map(a=>{const o=a.icon;return i.jsxs("div",{className:`flex flex-col items-center text-center p-6 rounded-2xl border bg-ui-bg-primary transition-all duration-200 ${a.comingSoon?"border-ui-border/70":"border-ui-border hover:-translate-y-1 hover:border-[var(--border-strong)] hover:shadow-lg"}`,children:[i.jsx("div",{className:`w-16 h-16 rounded-2xl flex items-center justify-center mb-5 ${a.comingSoon?"bg-ui-bg-secondary/60 text-ui-text-tertiary":"bg-ui-bg-secondary text-ui-text-primary"}`,children:i.jsx(o,{})}),i.jsx("h3",{className:"flex items-center justify-center min-h-[3.25rem] text-lg font-bold leading-snug text-ui-text-primary",children:a.title}),i.jsx("p",{className:"min-h-[2.75rem] text-sm leading-relaxed text-ui-text-secondary",children:a.desc}),i.jsx("div",{className:"w-full mt-5",children:a.comingSoon?i.jsxs("button",{className:"btn w-full cursor-default bg-ui-bg-tertiary text-ui-text-tertiary",disabled:!0,children:[i.jsx(bh,{className:"w-4 h-4"}),a.button]}):a.stores?i.jsx("div",{className:"flex flex-col gap-2",children:a.stores.map(l=>i.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:`btn w-full inline-flex items-center justify-center gap-2 ${l.kind==="chrome"?"btn-primary":"border border-ui-border bg-ui-bg-primary text-ui-text-primary hover:bg-ui-bg-tertiary"}`,children:[l.kind==="chrome"?i.jsx(aI,{className:"w-5 h-5"}):i.jsx(iI,{className:"w-5 h-5"}),i.jsx("span",{children:l.label})]},l.kind))}):i.jsxs("a",{href:a.downloadUrl||"#",download:!0,className:"btn btn-primary w-full inline-flex items-center justify-center gap-2",children:[i.jsx(ag,{className:"w-4 h-4"}),a.button]})}),i.jsx("p",{className:"mt-auto pt-5 text-xs leading-relaxed text-ui-text-tertiary",children:a.requirements})]},a.id)})})})}),i.jsx("section",{className:"py-20 bg-ui-bg-secondary",children:i.jsxs("div",{className:"container",children:[i.jsx("h2",{className:"text-3xl font-extrabold text-center mb-12 text-ui-text-primary tracking-tight",children:e("download.features.title")}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-4xl mx-auto",children:s.map((a,o)=>{const l=a.icon;return i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"w-14 h-14 rounded-[12px] flex items-center justify-center mx-auto mb-4 bg-ui-bg-tertiary text-ui-text-secondary",children:i.jsx(l,{className:"w-6 h-6"})}),i.jsx("h3",{className:"text-lg font-bold mb-2 text-ui-text-primary",children:e(a.titleKey)}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:e(a.descKey)})]},o)})})]})})]})}function oI(e="300px",t){const r=v.useRef(null),n=t??r,[s,a]=v.useState(!0);return v.useEffect(()=>{const o=n.current;if(!o||typeof IntersectionObserver>"u")return;const l=new IntersectionObserver(u=>a(u[u.length-1].isIntersecting),{rootMargin:e});return l.observe(o),()=>l.disconnect()},[e,n]),[n,s]}const lI=6,sJ=5e3,AN=2,aJ=2,iJ=2500,oJ=[50,200,1e3,5e3],xb=["<50ms","<200ms","<1s","<5s",">=5s"];class lJ{constructor(t=lI){nt(this,"active",0);nt(this,"queueHigh",[]);nt(this,"queue",[]);nt(this,"max");nt(this,"stallTimer",null);nt(this,"stallStreak",0);nt(this,"forcedGrant",!1);nt(this,"grants",0);nt(this,"grantLatencyTotalMs",0);nt(this,"grantLatencyHist",xb.map(()=>0));nt(this,"watchdogTrips",0);nt(this,"peakQueued",0);this.max=t}setMaxConcurrent(t){this.max=Math.max(1,Math.floor(t)),this.pump()}acquire(t){const r=(t==null?void 0:t.priority)==="high"?this.queueHigh:this.queue;let n=!1,s=!1,a;const o=Date.now(),l=new Promise(d=>{a=d}),u=()=>{this.active++,s=!0,this.noteGrantLatency(Date.now()-o),this.noteProgress(),a()},c=()=>
1243{if(!n)if(n=!0,s)this.active--,this.pump();else{const d=r.indexOf(u);d>=0&&r.splice(d,1)}};if(this.active<this.max)u();else{r.push(u);const d=this.queuedTotal();d>this.peakQueued&&(this.peakQueued=d),this.armStallWatchdog()}return{granted:l,release:c}}queuedTotal(){return this.queueHigh.length+this.queue.length}shiftNext(){return this.queueHigh.shift()??this.queue.shift()}pump(){for(;this.active<this.max&&this.queuedTotal()>0;)this.shiftNext()()}noteProgress(){this.forcedGrant||(this.stallStreak=0),this.stallTimer&&(clearTimeout(this.stallTimer),this.stallTimer=null),this.armStallWatchdog()}noteGrantLatency(t){this.grants++,this.grantLatencyTotalMs+=t;let r=oJ.findIndex(n=>t<n);r<0&&(r=xb.length-1),this.grantLatencyHist[r]++}armStallWatchdog(){if(this.stallTimer!==null||this.queuedTotal()===0)return;const t=this.stallStreak>=AN?iJ:sJ;this.stallTimer=setTimeout(()=>{if(this.stallTimer=null,this.queuedTotal()>0&&this.active>=this.max){this.watchdogTrips++,this.stallStreak++;const r=this.stallStreak>=AN?aJ:1;this.forcedGrant=!0;for(let n=0;n<r&&this.queuedTotal()>0;n++)this.shiftNext()();this.forcedGrant=!1}else this.pump(),this.armStallWatchdog()},t)}stats(){const t={};return xb.forEach((r,n)=>{t[r]=this.grantLatencyHist[n]}),{active:this.active,queued:this.queuedTotal(),queuedHigh:this.queueHigh.length,queuedNormal:this.queue.length,max:this.max,peakQueued:this.peakQueued,watchdogTrips:this.watchdogTrips,stallStreak:this.stallStreak,grants:this.grants,grantLatency:{avgMs:this.grants>0?Math.round(this.grantLatencyTotalMs/this.grants):0,buckets:t}}}}const _1=new lJ;typeof window<"u"&&(window.__mediaGateStats=()=>_1.stats());const j2=2e4,jN=2,cJ=800,I2=new Set,bb=new Map,uJ=e=>new Promise(t=>setTimeout(t,e)),dJ=20,hJ=2e3,mJ=8,fJ=2,pJ=4,gJ=2,xJ=4,R2=lI,bJ=12,yJ=16,So=[];let D2=R2;function cI(e){const t=[...e].sort((n,s)=>n-s),r=t.length>>1;return t.length%2===1?t[r]:(t[r-1]+t[r])/2}function vJ(){let e=0,t=0;const r=[];for(const n of So)n.outcome==="timeout"?e++:n.outcome==="error"?t++:r.push(n.ms);return e>=gJ||t>=pJ?xJ:e>0||t>=fJ?R2:r.length>=mJ&&cI(r)<hJ?bJ:R2}function uI(e,t){So.push({outcome:e,ms:t}),So.length>dJ&&So.shift();const r=Math.min(yJ,vJ());r!==D2&&(D2=r,_1.setMaxConcurrent(r))}function wJ(){const e=So.filter(t=>t.outcome==="ok").map(t=>t.ms);return{tier:D2,window:So.length,ok:e.length,errors:So.filter(t=>t.outcome==="error").length,timeouts:So.filter(t=>t.outcome==="timeout").length,medianOkMs:e.length>0?cI(e):null}}typeof window<"u"&&(window.__mediaLoadProfile=wJ);function IN(e){return!!e&&I2.has(e)}function EJ(e,t){return new Promise(r=>{const n=new Image;t&&(n.crossOrigin=t);let s=!1,a=null;const o=l=>{s||(s=!0,a&&clearTimeout(a),r(l))};a=setTimeout(()=>o("timeout"),j2),n.onload=()=>o("ok"),n.onerror=()=>o("error"),n.src=e})}function kJ(e,t){if(I2.has(e))return Promise.resolve();const r=bb.get(e);if(r)return r;const n=(async()=>{const s=!/^(blob|data):/.test(e);let a="error",o=0;for(let l=0;l<=jN;l++){const u=_1.acquire({priority:"high"});await u.granted;const c=Date.now();if(a=await EJ(e,t),o=Date.now()-c,u.release(),a==="ok"){I2.add(e);break}if(a==="timeout")break;l<jN&&await uJ(cJ*(l+1)+Math.floor(Math.random()*300))}s&&uI(a,o)})().finally(()=>{bb.delete(e)});return bb.set(e,n),n}function NJ(){const e=_1.acquire();let t=!1,r=null;const n=()=>{t||(t=!0,r&&clearTimeout(r),e.release())};return{ready:e.granted.then(()=>{t||(r=setTimeout(()=>{uI("timeout",j2),n()},j2))}),settle:n}}function dI(e,t){const r=(t==null?void 0:t.enabled)??!0,n=(t==null?void 0:t.delayMs)??0,[s,a]=v.useState(()=>e&&IN(e)?e:void 0);return v.useEffect(()=>{if(!e||!r)return;if(IN(e)){a(e);return}let o=!0;const l=()=>{kJ(e,Hr(e)).then(()=>{o&&a(e)})};if(n>0){const u=setTimeout(l,n);return()=>{o=!1,clearTimeout(u)}}return l(),()=>{o=!1}},[e,r,n]),s}function SJ(e,t){const r=(t==null?void 0:t.enabled)??!0,n=!!(t!=null&&t.bypass),[s,a]=v.useState(void 0),o=v.useRef(void 0),l=v.useRef(null);v.useEffect(()=>{if(!e||!r||o.current===e)return;if(n){o.current=e,a(e);return}const d=NJ();l.current=d;let h=!0;return d.ready.then(()=>{h&&(o.current=e,a(e))}),()=>{h=!1,d.settle(),l.current===d&&(l.current=null)}},[e,r,n]);const u=v.useCallback(()=>{var d;(d=l.current)==null||d.settle(),l.current=null},[]);return{src:e&&(s===e||n)?e:void 0,onSettled:u}}function hI(){return i.jsx("div",{className:"absolute inset-0 animate-pulse",style:{background:"var(--bg-tertiary)"}})}function TJ(){return i.jsx("div",{className:"absolute inset-0",style:{background:"var(--bg-tertiary)"}})}function A1({src:e,alt:t,className:r}){const[n,s]=oI(),[a,o]=v.useState(!1);v.useEffect(()=>{o(!1)},[e]);const l=dI(a?null:e,{enabled:s,delayMs:50});return i.jsxs("div",{ref:n,className:"relative w-full h-full overflow-hidden",children:[a?i.jsx(TJ,{}):l?null:i.jsx(hI,{}),l&&!a&&i.jsx("img",{src:l,alt:t,crossOrigin:Hr(l),className:r||"",onError:()=>o(!0)})]})}function j1({coverUrl:e,videoUrl:t,className:r,alt:n=""}){const[s,a]=oI(),[o,l]=v.useState(!1),[u,c]=v.useState(!1),[d,h]=v.useState(!1);v.useEffect(()=>{l(!1),c(!1),h(!1)},[e,t]);const m=!!e&&!o,f=!m&&!!t&&!u,p=dI(m?e:null,{enabled:a,delayMs:50}),g=SJ(f?t:null,{enabled:a});v.useEffect(()=>{!a&&f&&h(!1)},[a,f]);const x=!m&&!f,w=m?!!p:d;return i.jsx("div",{ref:s,className:"relative w-full h-full overflow-hidden",children:x?i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",style:{background:"var(--bg-tertiary)"},children:i.jsx("svg",{className:"w-6 h-6",style:{color:"var(--text-muted)"},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:i.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})})}):i.jsxs(i.Fragment,{children:[!w&&i.jsx(hI,{}),a&&m&&p&&i.jsx("img",{src:p,alt:n,crossOrigin:Hr(p),className:r||"",onError:()=>l(!0)}),a&&f&&g.src&&i.jsx("video",{src:g.src.includes("#")?g.src:`${g.src}
1243#t=0.1`,muted:!0,playsInline:!0,preload:"metadata",crossOrigin:Hr(g.src),className:`${r||""} ${d?"opacity-100":"opacity-0"} transition-opacity duration-200`,onError:()=>{g.onSettled(),c(!0)},onLoadedMetadata:y=>{g.onSettled();try{y.currentTarget.currentTime=.1}catch{h(!0)}},onSeeked:()=>h(!0)})]})})}function CJ({project:e,name:t}){const n=Yu(e.thumbnailAssetId,void 0,e.thumbnail)||e.thumbnail;return n?/\.(mp4|webm|mov)(\?|$)/i.test(n)?i.jsx(j1,{coverUrl:null,videoUrl:n,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",alt:t}):i.jsx(A1,{src:n,alt:t,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}):null}function _J({project:e,onOpen:t,canEdit:r=!1,onDelete:n,onRename:s}){const{t:a}=We(),[o,l]=v.useState(!1),[u,c]=v.useState(""),d=v.useRef(null),h=b=>{b.stopPropagation(),l(!0),c(e.name),setTimeout(()=>{var k;return(k=d.current)==null?void 0:k.select()},0)},m=async()=>{l(!1);const b=u.trim();!b||b===e.name||await(s==null?void 0:s(e.id,b))},f=e.coverImages||[],p=f.length>=4&&!e.thumbnail,g=(b,k,T=!1)=>{const S=`w-full h-full object-cover${T?" group-hover:scale-105 transition-transform duration-300":""}`;return b.type==="video"?i.jsx(j1,{coverUrl:b.coverUrl,videoUrl:b.url,className:S,alt:e.name},k):i.jsx(A1,{src:b.url,alt:e.name,className:S},k)},x=f.find(b=>b.type==="image"&&b.url)||f.find(b=>b.type==="video"&&b.coverUrl)||f[0],w=r&&!!s,y=r&&!!n;return i.jsxs("div",{onClick:()=>t(e),className:"group relative rounded-xl overflow-hidden cursor-pointer border border-border/60 shadow-sm hover:shadow-lg hover:border-primary/30 transition-all duration-200",style:{background:"var(--bg-primary)"},children:[i.jsx("div",{className:"aspect-[4/3] overflow-hidden",style:{background:"var(--bg-secondary)"},children:p?i.jsx("div",{className:"grid grid-cols-2 grid-rows-2 w-full h-full gap-0.5",children:f.slice(0,4).map((b,k)=>g(b,k))}):e.thumbnail?i.jsx(CJ,{project:e,name:e.name}):x?g(x,void 0,!0):i.jsx("div",{className:"w-full h-full flex items-center justify-center",children:i.jsx(w1,{className:"w-8 h-8 text-muted-foreground/30"})})}),i.jsxs("div",{className:"px-3 py-2 flex items-center justify-between gap-2",style:{background:"var(--bg-primary)"},children:[o?i.jsx("input",{ref:d,value:u,onChange:b=>c(b.target.value),onBlur:m,onKeyDown:b=>{b.key==="Enter"&&!b.nativeEvent.isComposing&&(b.preventDefault(),m()),b.key==="Escape"&&l(!1)},onClick:b=>b.stopPropagation(),className:"flex-1 min-w-0 text-sm font-medium bg-transparent border-b border-primary outline-none",autoFocus:!0}):w?i.jsx("p",{className:"flex-1 min-w-0 text-sm font-medium truncate hover:text-primary cursor-text",style:{color:"var(--text-primary)"},onClick:h,title:a("art.clickToRename"),children:e.name}):i.jsx("p",{className:"flex-1 min-w-0 text-sm font-medium truncate",style:{color:"var(--text-primary)"},children:e.name}),i.jsx("p",{className:"text-xs shrink-0",style:{color:"var(--text-tertiary)"},children:new Date(e.updatedAt).toLocaleDateString()})]}),y&&i.jsx("button",{type:"button",onClick:b=>n(b,e.id),className:"absolute top-2 right-2 p-1.5 bg-black/50 text-white rounded-lg opacity-0 group-hover:opacity-100 transition-opacity hover:bg-destructive",children:i.jsx(tm,{className:"w-3.5 h-3.5"})})]})}const RN=e=>e.startsWith("zh")?"zh":"en",DN={list:async(e={})=>{const t={};return e.kind&&(t.kind=e.kind),e.search&&(t.search=e.search),e.tags&&e.tags.length>0&&(t.tags=e.tags.join(",")),e.page&&(t.page=String(e.page)),e.pageSize&&(t.pageSize=String(e.pageSize)),e.lang&&(t.lang=e.lang),(await U.get("/art/templates",{params:t})).data},listTags:async e=>(await U.get("/art/templates/tags",{params:e?{kind:e}:{}})).data,get:async e=>(await U.get(`/art/templates/${e}`)).data,clone:async(e,t)=>(await U.post(`/art/templates/${e}/clone`,{},t?{params:{lang:t}}:void 0)).data},Ic="__all__";function AJ({template:e,alt:t}){const n=Yu(e.thumbnailAssetId??void 0,void 0,e.thumbnail??void 0)||e.thumbnail;return n?/\.(mp4|webm|mov)(\?|$)/i.test(n)?i.jsx(j1,{coverUrl:null,videoUrl:n,alt:t,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}):i.jsx(A1,{src:n,alt:t,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}):i.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{background:"var(--bg-tertiary)"}
1243,children:i.jsx(y9,{className:"w-8 h-8 text-muted-foreground/30"})})}function MN({kind:e="system",size:t="default",heading:r,hideIfEmpty:n=!1,showFilters:s=!0}){const{t:a,i18n:o}=We(),l=Er(),[u,c]=v.useState([]),[d,h]=v.useState(Ic),[m,f]=v.useState(""),[p,g]=v.useState(""),[x,w]=v.useState([]),[y,b]=v.useState(!0);v.useEffect(()=>{h(Ic),f(""),g("")},[e]),v.useEffect(()=>{let H=!1;return DN.listTags(e).then(L=>{H||c(Array.isArray(L)?L:[])}).catch(()=>{H||c([])}),()=>{H=!0}},[e]),v.useEffect(()=>{const H=setTimeout(()=>g(m),300);return()=>clearTimeout(H)},[m]),v.useEffect(()=>{const H=RN(o.language);b(!0);const L={kind:e,pageSize:60,lang:H};p.trim()&&(L.search=p.trim()),d!==Ic&&(L.tags=[d]);let $=!1;return DN.list(L).then(ee=>{$||w(Array.isArray(ee==null?void 0:ee.items)?ee.items:[])}).catch(()=>{$||w([])}).finally(()=>{$||b(!1)}),()=>{$=!0}},[p,d,e,o.language]);const k=v.useCallback(H=>{l(`/${o.language}/app/design/templates/${H.id}/preview`)},[l,o.language]),T=RN(o.language)==="zh",S=H=>(T?H.templateNameZh:H.templateNameEn)||H.templateNameZh||H.templateNameEn||H.name,j=e==="tv"?a("art.tvEmpty","Uni TV â ææ å
容"):a("art.templatesEmpty","模æ¿åº â ææ å
容"),E=e==="tv"?a("art.tvSearchPlaceholder","æç´¢ Uni TV..."):a("art.templateSearchPlaceholder","æç´¢ åºæ¯/å¹³å°/模å..."),A=e==="tv"?M9:y9,R=t!=="default",M=t==="large"?"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5":t==="largeSquare"?"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-
12435":"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4",B=t==="large"?"aspect-[16/9] rounded-2xl":t==="largeSquare"?"aspect-square rounded-2xl":"aspect-square rounded-xl",W=!p.trim()&&d===Ic;return n&&W&&!y&&x.length===0?null:i.jsxs("div",{className:`w-full ${R?"max-w-[92rem] py-4":"max-w-5xl py-6"} mx-auto px-6`,children:[r&&i.jsx("div",{className:"mb-5",children:r}),s&&i.jsxs("div",{className:"flex items-center gap-3 mb-6 flex-wrap",children:[i.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap flex-1",children:[i.jsx("button",{onClick:()=>h(Ic),className:`px-3 py-1.5 rounded-lg text-sm transition-colors ${d===Ic?"bg-[var(--bg-tertiary)] text-[var(--text-primary)] font-medium":"bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)]"}`,children:a("art.templateAll","å
¨é¨")}),u.map(H=>{var $;const L=T?H.nameZh:(($=H.nameEn)==null?void 0:$.trim())||H.nameZh;return i.jsx("button",{onClick:()=>h(H.nameZh),className:`px-3 py-1.5 rounded-lg text-sm transition-colors ${d===H.nameZh?"bg-[var(--bg-tertiary)] text-[var(--text-primary)] font-medium":"bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)]"}`,children:L},H.nameZh)})]}),i.jsxs("div",{className:"relative",children:[i.jsx(yh,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--text-tertiary)]"}),i.jsx("input",{type:"text",value:m,onChange:H=>f(H.target.value),placeholder:E,className:"pl-8 pr-3 py-1.5 text-sm rounded-lg bg-[var(--bg-secondary)] border border-[var(--border-default)] text-[var(--text-primary)] placeholder:text-[var(--text-tertiary)] focus:outline-none focus:border-ui-accent w-64"})]})]}),y?i.jsx("div",{className:M,children:Array.from({length:t==="large"?6:8}).map((H,L)=>i.jsxs("div",{className:"animate-pulse",children:[i.jsx("div",{className:B,style:{background:"var(--bg-tertiary)"}}),i.jsx("div",{className:"pt-1.5 pb-2.5 space-y-2",children:i.jsx("div",{className:"h-4 rounded w-3/4",style:{background:"var(--bg-tertiary)"}})})]},L))}):x.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[i.jsx("div",{className:"w-16 h-16 rounded-2xl bg-muted/50 flex items-center justify-center mb-4",children:i.jsx(A,{className:"w-8 h-8 text-muted-foreground/40"})}),i.jsx("p",{className:"text-sm text-muted-foreground",children:j})]}):i.jsx("div",{className:M,children:x.map(H=>i.jsxs("div",{onClick:()=>k(H),className:"group relative cursor-pointer transition-all duration-200",children:[i.jsx("div",{className:`${B} overflow-hidden shadow-sm group-hover:shadow-lg transition-shadow duration-200`,style:{background:"var(--bg-secondary)"},children:i.jsx(AJ,{template:H,alt:S(H)})}),i.jsx("div",{className:"pt-1.5 pb-2.5",children:i.jsx("p",{className:"text-sm font-medium truncate",style:{color:"var(--text-card-label)"},title:S(H),children:S(H)})})]},H.id))})]})}const ON={list:async(e={})=>{const t={};return e.page&&(t.page=String(e.page)),e.pageSize&&(t.pageSize=String(e.pageSize)),e.featured&&(t.featured="true"),e.userId&&(t.userId=e.userId),(await U.get("/tv-works",{params:t})).data},get:async(e,t=!1,r)=>(await U.get(`/tv-works/${e}`,{params:{...t?{snapshot:"1"}:{},...r?{previewToken:r}:{}}})).data,getMine:async e=>(await U.get("/tv-works/mine",{params:{projectId:e}})).data,getProjectPublishState:async e=>(await U.get(`/tv-works/project/${e}/publish-state`)).data,publish:async e=>(await U.post("/tv-works",e)).data,like:async e=>(await U.post(`/tv-works/${e}/like`,{})).data,unlike:async e=>(await U.delete(`/tv-works/${e}/like`)).data,unpublish:async e=>(await U.post(`/tv-works/${e}/unpublish`,{})).data,clone:async e=>(await U.post(`/tv-works/${e}/clone`,{})).data,getAuthorProfile:async e=>(await U.get(`/tv-works/authors/${e}`)).data};function jJ(e){const t=Math.floor(e/60),r=Math.floor(e%60);return`${String(t).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function IJ({work:e,onClick:t,owned:r=!1,onUnpublish:n}){var h;const{t:s,i18n:a}=We(),o=Er(),[l,u]=v.useState(!1),[c,d]=v.useState(null);return i.jsxs("div",{onClick:()=>t(e),onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:"group relative cursor-pointer rounded-2xl overflow-hidden aspect-[16/9] bg-black shadow-md hover:shadow-2xl hover:shadow-black/40 transition-all duration-300 hover:scale-[1.015]",children:[e.coverUrl?i.jsx(A1,{src:e.coverUrl,alt:e.title,className:"absolute inset-0 w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}):e.videoUrl?i.jsx(j1,{coverUrl:null,videoUrl:e.videoUrl,alt:e.title,className:"absolute inset-0 w-full h-full object-cover"}):i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-neutral-900",children:i.jsx(M9,{className:"w-10 h-10 text-white/15"})}),l&&e.videoUrl&&i.jsx("video",{ref:m=>{m&&(m.muted=!0,m.volume=0)}
1243,src:e.videoUrl,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,crossOrigin:xa(e.videoUrl)?"anonymous":void 0,onLoadedMetadata:m=>d(m.currentTarget.duration),className:"absolute inset-0 w-full h-full object-cover"}),i.jsx("div",{className:"absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-t from-black/90 via-black/40 to-transparent pointer-events-none"}),i.jsxs("div",{className:"absolute inset-x-0 bottom-0 px-4 pb-3.5 pointer-events-none",children:[i.jsxs("button",{type:"button",onClick:m=>{var f;m.stopPropagation(),(f=e.user)!=null&&f.id&&o(`/${a.language}/app/design/tv/user/${e.user.id}`)},className:"pointer-events-auto block max-w-full truncate text-left text-xs text-white/60 hover:text-white/90 transition-colors",children:["@",(h=e.user)==null?void 0:h.name]}),i.jsxs("div",{className:"flex items-end justify-between gap-2 mt-0.5",children:[i.jsx("p",{className:"text-base font-semibold text-white truncate",title:e.title,children:e.title}),i.jsxs("span",{className:"flex items-center gap-1 text-xs text-white/70 shrink-0 pb-0.5",children:[i.jsx(MV,{className:"w-3.5 h-3.5"}),e.likeCount]})]})]}),l&&i.jsxs(i.Fragment,{children:[c!==null&&i.jsx("span",{className:"absolute top-2.5 left-2.5 px-2 py-1 text-xs font-medium text-white bg-black/60 backdrop-blur-sm rounded-md pointer-events-none",children:jJ(c)}),r?i.jsx("button",{onClick:m=>{m.stopPropagation(),n==null||n(e)},className:"absolute top-2.5 right-2.5 px-3 py-1.5 text-xs text-white bg-red-600/70 backdrop-blur-sm rounded-lg hover:bg-red-600 transition-colors",children:s("tv.unpublish","Take down")}):e.isCanvasPublic&&i.jsx("button",{onClick:m=>{m.stopPropagation(),o(`/${a.language}/app/design/tv/${e.id}?process=1`,{state:{work:e}})},className:"absolute top-2.5 right-2.5 px-3 py-1.5 text-xs text-white bg-black/60 backdrop-blur-sm rounded-lg hover:bg-black/80 transition-colors",children:s("tv.viewProcess","View creative process")})]}),!l&&e.videoUrl&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:i.jsx("span",{className:"w-12 h-12 rounded-full bg-black/50 backdrop-blur-sm flex items-center justify-center",children:i.jsx(i3,{className:"w-5 h-5 text-white ml-0.5"})})})]})}function RJ({src:e,alt:t="",className:r}){const[n,s]=v.useState(!1);return i.jsx("img",{src:e,alt:t,crossOrigin:xa(e)?"anonymous":void 0,ref:a=>{a&&a.complete&&a.naturalWidth>0&&s(!0)},onLoad:()=>s(!0),className:`${r} transition-opacity duration-500 ${n?"opacity-100":"opacity-0"}`})}const DJ=6e3;function MJ({items:e,onOpen:t}){const[r,n]=v.useState(0),s=v.useRef(!1),a=v.useRef(new Set),o=e.length;if(v.useEffect(()=>{if(o<=1)return;const u=setInterval(()=>{s.current||n(c=>(c+1)%o)},DJ);return()=>clearInterval(u)},[o]),o===0)return null;const l=u=>{let c=(u-r+o)%o;return c>o/2&&(c-=o),c};return i.jsxs("div",{className:"relative",onMouseEnter:()=>{s.current=!0},onMouseLeave:()=>{s.current=!1},children:[i.jsxs("div",{className:"relative w-full h-[180px] sm:h-[210px] md:h-[250px] lg:h-[280px] overflow-hidden",children:[e.map((u,c)=>{const d=l(c),h=Math.abs(d)<=1||o<=2,m=d===0;return h&&a.current.add(u.id),i.jsxs("div",{onClick:()=>m?t(u):n(c),className:`absolute top-1/2 left-1/2 h-full aspect-video rounded-xl overflow-hidden bg-neutral-900 cursor-pointer transition-all duration-500 ease-out ${h?"":"opacity-0 pointer-events-none"}`,style:{transform:`translate(calc(-50% + ${d*96}%), -50%) ${m?"scale(1)":"scale(0.95, 0.9)"}`,clipPath:m?void 0:d<0?"polygon(0 0, 100% 5%, 100% 95%, 0 100%)":"polygon(0 5%, 100% 0, 100% 100%, 0 95%)",zIndex:m?20:10,boxShadow:m?"var(--shadow-xl)":"none"},children:[i.jsx("div",{className:"absolute inset-0 animate-pulse bg-gradient-to-br from-neutral-800 via-neutral-900 to-neutral-800"}),u.coverUrl?i.jsx(RJ,{src:u.coverUrl,className:"absolute inset-0 w-full h-full object-cover"}):u.videoUrl&&(h||a.current.has(u.id))?i.jsx("video",{ref:f=>{f&&(f.muted=!0)},src:`${u.videoUrl}#t=0.1`,preload:"metadata",muted:!0,playsInline:!0,crossOrigin:xa(u.videoUrl)?"anonymous":void 0,className:"absolute inset-0 w-full h-full object-cover"}):null,m&&u.videoUrl&&i.jsx("video",{ref:f=>{f&&(f.muted=!0,f.volume=0)}
1243,src:u.videoUrl,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,crossOrigin:xa(u.videoUrl)?"anonymous":void 0,onCanPlay:f=>{f.currentTarget.style.opacity="1"},style:{opacity:0,transition:"opacity 0.45s ease"},className:"absolute inset-0 w-full h-full object-cover"},`${u.id}-live`),!m&&i.jsx("div",{className:`absolute inset-0 ${d<0?"bg-gradient-to-r from-black/15 to-black/60":"bg-gradient-to-l from-black/15 to-black/60"}`})]},u.id)}),o>1&&i.jsxs(i.Fragment,{children:[i.jsx("button",{"aria-label":"Previous",onClick:()=>n(u=>(u-1+o)%o),className:"absolute left-3 top-1/2 -translate-y-1/2 z-30 w-9 h-9 rounded-md bg-black/40 backdrop-blur-sm hover:bg-black/60 text-white flex items-center justify-center transition-colors",children:i.jsx(x1,{className:"w-5 h-5"})}),i.jsx("button",{"aria-label":"Next",onClick:()=>n(u=>(u+1)%o),className:"absolute right-3 top-1/2 -translate-y-1/2 z-30 w-9 h-9 rounded-md bg-black/40 backdrop-blur-sm hover:bg-black/60 text-white flex items-center justify-center transition-colors",children:i.jsx(Gs,{className:"w-5 h-5"})})]})]}),o>1&&i.jsx("div",{className:"flex items-center justify-center gap-2 mt-4",children:e.map((u,c)=>i.jsx("button",{"aria-label":u.title,onClick:()=>n(c),className:`h-1 rounded-full transition-all duration-300 ${c===r?"w-7 bg-[var(--text-primary)]":"w-4 bg-[var(--text-primary)]/25 hover:bg-[var(--text-primary)]/50"}`},u.id))})]})}const yb=6,LN=8;function OJ({heading:e}){const{t,i18n:r}=We(),n=Er(),[s,a]=v.useState([]),[o,l]=v.useState([]),[u,c]=v.useState(0),[d,h]=v.useState(!0);v.useEffect(()=>{let y=!1;return h(!0),Promise.all([ON.list({pageSize:yb+LN+1}),ON.list({featured:!0,pageSize:LN})]).then(([b,k])=>{y||(a(Array.isArray(b==null?void 0:b.items)?b.items:[]),c((b==null?void 0:b.total)??0),l(Array.isArray(k==null?void 0:k.items)?k.items:[]))}).catch(()=>{y||(a([]),l([]))}).finally(()=>{y||h(!1)}),()=>{y=!0}},[]);const m=e?i.jsx("div",{className:"mb-5",children:e}):i.jsx("div",{className:"mb-5",children:i.jsx("h2",{className:"text-xl font-bold tracking-tight",children:t("art.tabTV","Uni TV")})});if(d)return i.jsxs("div",{className:"w-full max-w-[92rem] mx-auto px-6 py-4",children:[m,i.jsxs("div",{className:"animate-pulse",children:[i.jsxs("div",{className:"flex items-center justify-center gap-4 h-[180px] sm:h-[210px] md:h-[250px] lg:h-[280px] overflow-hidden",children:[i.jsx("div",{className:"h-[90%] aspect-video rounded-xl shrink-0",style:{background:"var(--bg-tertiary)"}}),i.jsx("div",{className:"h-full aspect-video rounded-xl shrink-0",style:{background:"var(--bg-tertiary)"}}),i.jsx("div",{className:"h-[90%] aspect-video rounded-xl shrink-0",style:{background:"var(--bg-tertiary)"}})]}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5 mt-8",children:Array.from({length:6}).map((y,b)=>i.jsx("div",{className:"aspect-[16/9] rounded-2xl",style:{background:"var(--bg-tertiary)"}},b))})]})]});if(s.length===0&&o.length===0)return null;const f=y=>n(`/${r.language}/app/design/tv/${y.id}`,{state:{work:y,feedItems:s}}),p=new Set(o.map(y=>y.id)),g=o.length>0?s.filter(y=>!p.has(y.id)):s,x=(g.length>
12430?g:s).slice(0,yb),w=u>yb;return i.jsxs("div",{className:"w-full max-w-[92rem] mx-auto px-6 py-4",children:[m,o.length>0&&i.jsx("div",{className:"mb-8",children:i.jsx(MJ,{items:o,onOpen:f})}),x.length>0&&i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:x.map(y=>i.jsx(IJ,{work:y,onClick:f},y.id))}),w&&i.jsx("div",{className:"flex justify-end mt-3",children:i.jsxs("button",{onClick:()=>n(`/${r.language}/app/design/tv`),className:"inline-flex items-center gap-1 text-sm text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:[t("tv.viewAll","View all"),i.jsx(fr,{className:"w-4 h-4"})]})})]})}function LJ(){const{t:e,i18n:t}=We(),r=Er(),n=Xn(),s=Pi(b=>b.currentTeamId),a=n.pathname.includes("/app/design"),{projects:o,isLoading:l,loadProjects:u,createProject:c}=$n(),d=ut(b=>b.isAuthenticated);v.useEffect(()=>{const b=new URLSearchParams(n.search),k=b.get("view");k&&(k==="personal"?r({pathname:`${n.pathname.replace(/\/+$/,"")}/projects`},{replace:!0}):(b.delete("view"),r({pathname:n.pathname,search:b.toString()},{replace:!0})))},[n.search,n.pathname,r,t.language]),v.useEffect(()=>{d&&u(s??void 0)},[d,s,u]);const h=o.slice(0,3),[m,f]=v.useState(!1),p=async()=>{if(!m){f(!0);try{const b=await c("design",s??void 0,void 0,void 0);window.open(`/${t.language}/app/design/${b.id}`,"_blank")}catch{}finally{f(!1)}}},g=()=>{if(!d){r(`/${t.language}/login?redirect=${encodeURIComponent(n.pathname+n.search)}`);return}p()},x=b=>{r(`/${t.language}/app/design/${b.id}`)},w=v.useCallback((b,k)=>{localStorage.setItem(`art_auto_generate_${b.id}`,JSON.stringify(k));const T=n.pathname.includes("/app/design")?"design":"image/generate";window.open(`/${t.language}/app/${T}/${b.id}`,"_blank")},[n.pathname,t.language]),y=!s||Pi.getState().canAddProjectInCurrentTeam();return i.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[i.jsx(pn,{title:e("artHome.seoTitle"),description:e("artHome.seoDescription"),path:"/app/design"}),i.jsxs("div",{className:`flex-1 flex flex-col items-center px-4 pb-16 ${a?"pt-24":"pt-16"}`,children:[i.jsxs("div",{className:"w-full max-w-3xl",children:[i.jsx(sI,{onSubmit:w,className:"w-full",showQuickActions:!1}),i.jsxs("div",{className:"w-full mt-5",children:[i.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[y&&i.jsx("div",{onClick:g,className:"group cursor-pointer transition-all duration-300 hover:scale-[1.02]",children:i.jsx("div",{className:"h-full min-h-[8rem] bg-gradient-to-br from-[var(--bg-secondary)] to-[var(--bg-tertiary)] group-hover:from-primary/10 group-hover:to-primary/20 border-2 border-dashed border-[var(--border-default)] group-hover:border-primary/50 rounded-xl transition-all duration-300 flex flex-col items-center justify-center gap-2.5",children:m?i.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-primary border-t-transparent animate-spin"}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-[var(--bg-tertiary)] group-hover:bg-primary/15 flex items-center justify-center transition-all duration-300 group-hover:scale-110 group-hover:shadow-md",children:i.jsx(ec,{className:"w-5 h-5 text-[var(--text-muted)] group-hover:text-primary transition-colors duration-300"})}),i.jsx("span",{className:"text-sm font-medium text-[var(--text-tertiary)] group-hover:text-primary transition-colors duration-300",children:e("art.newProject","æ°å»ºé¡¹ç®")})]})})}),d&&(l&&o.length===0?Array.from({length:3}).map((b,k)=>i.jsxs("div",{className:"rounded-xl overflow-hidden border border-border/60 animate-pulse",style:{background:"var(--bg-primary)"},children:[i.jsx("div",{className:"aspect-[4/3]",style:{background:"var(--bg-tertiary)"}}),i.jsxs("div",{className:"px-3 py-2.5 space-y-2",children:[i.jsx("div",{className:"h-4 rounded w-3/4",style:{background:"var(--bg-tertiary)"}}),i.jsx("div",{className:"h-3 rounded w-1/2",style:{background:"var(--bg-tertiary)"}})]})]},`skel-${k}`)):h.map(b=>i.jsx(_J,{project:b,onOpen:x},b.id)))]}),i.jsx("div",{className:"flex justify-end mt-3",children:i.jsxs("button",{onClick:()=>r(`/${t.language}/app/design/projects`),className:"inline-flex items-center gap-1 text-sm text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:[e("art.allProjects","ææé¡¹ç®"),i.jsx(fr,{className:"w-4 h-4"})]})})]})]}),i.jsxs("div",{className:"w-full",children:[i.jsx(MN,{kind:"tv",size:"large",hideIfEmpty:!0,show
vendor: 5,862 bytes, line 1243
1243Filters:!1,heading:i.jsx("h2",{className:"text-xl font-bold tracking-tight",children:e("art.tabTV","Uni TV")})}),i.jsx(OJ,{heading:i.jsx("h2",{className:"text-xl font-bold tracking-tight",children:e("art.tabTV","Uni TV")})}),i.jsx(MN,{kind:"system",size:"largeSquare",showFilters:!1,heading:i.jsx("h2",{className:"text-xl font-bold tracking-tight",children:e("art.tabTemplates","模æ¿åº")})})]})]})]})}/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:mI,setPrototypeOf:PN,isFrozen:PJ,getPrototypeOf:FJ,getOwnPropertyDescriptor:BJ}=Object;let{freeze:Gn,seal:Ks,create:M2}=Object,{apply:O2,construct:L2}=typeof Reflect<"u"&&Reflect;Gn||(Gn=function(t){return t});Ks||(Ks=function(t){return t});O2||(O2=function(t,r){for(var n=arguments.length,s=new Array(n>2?n-2:0),a=2;a<n;a++)s[a-2]=arguments[a];return t.apply(r,s)});L2||(L2=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];return new t(...n)});const of=Kn(Array.prototype.forEach),UJ=Kn(Array.prototype.lastIndexOf),FN=Kn(Array.prototype.pop),e0=Kn(Array.prototype.push),$J=Kn(Array.prototype.splice),hp=Kn(String.prototype.toLowerCase),vb=Kn(String.prototype.toString),wb=Kn(String.prototype.match),t0=Kn(String.prototype.replace),zJ=Kn(String.prototype.indexOf),HJ=Kn(String.prototype.trim),ea=Kn(Object.prototype.hasOwnProperty),Dn=Kn(RegExp.prototype.test),r0=qJ(TypeError);function Kn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];return O2(e,t,n)}}function qJ(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return L2(e,r)}}function At(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:hp;PN&&PN(e,null);let n=t.length;for(;n--;){let s=t[n];if(typeof s=="string"){const a=r(s);a!==s&&(PJ(t)||(t[n]=a),s=a)}e[s]=!0}return e}function WJ(e){for(let t=0;t<e.length;t++)ea(e,t)||(e[t]=null);return e}function Ra(e){const t=M2(null);for(const[r,n]of mI(e))ea(e,r)&&(Array.isArray(n)?t[r]=WJ(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Ra(n):t[r]=n);return t}function n0(e,t){for(;e!==null;){const n=BJ(e,t);if(n){if(n.get)return Kn(n.get);if(typeof n.value=="function")return Kn(n.value)}e=FJ(e)}function r(){return null}return r}const BN=Gn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Eb=Gn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),kb=Gn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),VJ=Gn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Nb=Gn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),GJ=Gn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),UN=Gn(["#text"]),$N=Gn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
1243spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Sb=Gn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),zN=Gn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),lf=Gn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),KJ=Ks(/\{\{[\w\W]*|[\w\W]*\}\}/gm),YJ=Ks(/<%[\w\W]*|[\w\W]*%>/gm),QJ=Ks(/\$\{[\w\W]*/gm),XJ=Ks(/^data-[\-\w.\u00B7-\uFFFF]+$/),ZJ=Ks(/^aria-[\-\w]+$/),fI=Ks(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),JJ=Ks(/^(?:\w+script|data):/i),eee=Ks(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pI=Ks(/^html$/i),tee=Ks(/^[a-z][.\w]*(-[.\w]+)+$/i);var HN=Object.freeze({__proto__:null,ARIA_ATTR:ZJ,ATTR_WHITESPACE:eee,CUSTOM_ELEMENT:tee,DATA_ATTR:XJ,DOCTYPE_NAME:pI,ERB_EXPR:YJ,IS_ALLOWED_URI:fI,IS_SCRIPT_OR_DATA:JJ,MUSTACHE_EXPR:KJ,TMPLIT_EXPR:QJ});const s0={element:1,text:3,progressingInstruction:7,comment:8,document:9},ree=function(){return typeof window>"u"?null:window},nee=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;
vendor: 14,532 bytes, lines 1243-1244
1243const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(n=r.getAttribute(s));const a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},qN=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function gI(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ree();const t=ot=>gI(ot);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==s0.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,s=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:u,NodeFilter:c,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:f}=e,p=u.prototype,g=n0(p,"cloneNode"),x=n0(p,"remove"),w=n0(p,"nextSibling"),y=n0(p,"childNodes"),b=n0(p,"parentNode");if(typeof o=="function"){const ot=r.createElement("template");ot.content&&ot.content.ownerDocument&&(r=ot.content.ownerDocument)}let k,T="";const{implementation:S,createNodeIterator:j,createDocumentFragment:E,getElementsByTagName:A}=r,{importNode:R}=n;let M=qN();t.isSupported=typeof mI=="function"&&typeof b=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:W,TMPLIT_EXPR:H,DATA_ATTR:L,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:ee,ATTR_WHITESPACE:G,CUSTOM_ELEMENT:Q}=HN;let{IS_ALLOWED_URI:D}=HN,K=null;const V=At({},[...BN,...Eb,...kb,...Nb,...UN]);let C=null;const O=At({},[...$N,...Sb,...zN,...lf]);let q=Object.seal(M2(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ne=null,he=null;const xe=Object.seal(M2(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,Se=!0,we=!1,Be=!0,ve=!1,Ye=!0,Ae=!1,Ee=!1,Ce=!1,X=!1,pe=!1,_e=!1,Ne=!0,de=!1;const be="user-content-";let ie=!0,De=!1,F={},se=null;const ue=At({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let je=null;const Ge=At({},["audio","video","img","source","image","track"]);let mt=null;const Ft=At({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ur="http://www.w3.org/1998/Math/MathML",ht="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xhtml";let Nt=Qt,Jt=!1,Re=null;const on=At({},[ur,ht,Qt],vb);let In=At({},["mi","mo","mn","ms","mtext"]),ms=At({},["annotation-xml"]);const Rr=At({},["title","style","font","a","script"]);let Qs=null;const Wr=["application/xhtml+xml","text/html"],pm="text/html";let kr=null,Gi=null;const Nr=r.createElement("form"),yc=function(ae){return ae instanceof RegExp||ae instanceof Function},ni=function(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Gi&&Gi===ae)){if((!ae||typeof ae!="object")&&(ae={}),ae=Ra(ae),Qs=Wr.indexOf(ae.PARSER_MEDIA_TYPE)===-1?pm:ae.PARSER_MEDIA_TYPE,kr=Qs==="application/xhtml+xml"?vb:hp,K=ea(ae,"ALLOWED_TAGS")?At({},ae.ALLOWED_TAGS,kr):V,C=ea(ae,"ALLOWED_ATTR")?At({},ae.ALLOWED_ATTR,kr):O,Re=ea(ae,"ALLOWED_NAMESPACES")?At({},ae.ALLOWED_NAMESPACES,vb):on,mt=ea(ae,"ADD_URI_SAFE_ATTR")?At(Ra(Ft),ae.ADD_URI_SAFE_ATTR,kr):Ft,je=ea(ae,"ADD_DATA_URI_TAGS")?At(Ra(Ge),ae.ADD_DATA_URI_TAGS,kr):Ge,se=ea(ae,"FORBID_CONTENTS")?At({},ae.FORBID_CONTENTS,kr):ue,ne=ea(ae,"FORBID_TAGS")?At({},ae.FORBID_TAGS,kr):Ra({}),he=ea(ae,"FORBID_ATTR")?At({},ae.FORBID_ATTR,kr):Ra({}),F=ea(ae,"USE_PROFILES")?ae.USE_PROFILES:!1,Oe=ae.ALLOW_ARIA_ATTR!==!1,Se=ae.ALLOW_DATA_ATTR!==!1,we=ae.ALLOW_UNKNOWN_PROTOCOLS||!1,Be=ae.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ve=ae.SAFE_FOR_TEMPLATES||!1,Ye=ae.SAFE_FOR_XML!==!1,Ae=ae.WHOLE_DOCUMENT||!1,X=ae.RETURN_DOM||!1,pe=ae.RETURN_DOM_FRAGMENT||!1,_e=ae.RETURN_TRUSTED_TYPE||!1,Ce=ae.FORCE_BODY||!1,Ne=ae.SANITIZE_DOM!==!1,de=ae.SANITIZE_NAMED_PROPS||!1,ie=ae.KEEP_CONTENT!==!1,De=ae.IN_PLACE||!1,D=ae.ALLOWED_URI_REGEXP||fI,Nt=ae.NAMESPACE||Qt,In=ae.MATHML_TEXT_INTEGRATION_POINTS||In,ms=ae.HTML_INTEGRATION_POINTS||ms,q=ae.CUSTOM_ELEMENT_HANDLING||{},ae.CUSTOM_ELEMENT_HANDLING&&yc(ae.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(q.tagNameCheck=ae.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ae.CUSTOM_ELEMENT_HANDLING&&yc(ae.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(q.attributeNameCheck=ae.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ae.CUSTOM_ELEMENT_HANDLING&&typeof ae.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(q.allowCustomizedBuiltInElements=ae.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ve&&(Se=!1),pe&&(X=!0),F&&(K=At({},UN),C=[],F.html===!0&&(At(K,BN),At(C,$N)),F.svg===!0&&(At(K,Eb),At(C,Sb),At(C,lf)),F.svgFilters===!0&&(At(K,kb),At(C,Sb),At(C,lf)),F.mathMl===!0&&(At(K,Nb),At(C,zN),At(C,lf))),ae.ADD_TAGS&&(typeof ae.ADD_TAGS=="function"?xe.tagCheck=ae.ADD_TAGS:(K===V&&(K=Ra(K)),At(K,ae.ADD_TAGS,kr))),ae.ADD_ATTR&&(typeof ae.ADD_ATTR=="function"?xe.attributeCheck=ae.ADD_ATTR:(C===O&&(C=Ra(C)),At(C,ae.ADD_ATTR,kr))),ae.ADD_URI_SAFE_ATTR&&At(mt,ae.ADD_URI_SAFE_ATTR,kr),ae.FORBID_CONTENTS&&(se===ue&&(se=Ra(se)),At(se,ae.FORBID_CONTENTS,kr)),ae.ADD_FORBID_CONTENTS&&(se===ue&&(se=Ra(se)),At(se,ae.ADD_FORBID_CONTENTS,kr)),ie&&(K["#text"]=!0),Ae&&At(K,["html","head","body"]),K.table&&(At(K,["tbody"]),delete ne.tbody),ae.TRUSTED_TYPES_POLICY){if(typeof ae.TRUSTED_TYPES_POLICY.createHTML!="function")throw r0('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ae.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw r0('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=ae.TRUSTED_TYPES_POLICY,T=k.createHTML("")}else k===void 0&&(k=nee(f,s)),k!==null&&typeof T=="string"&&(T=k.createHTML(""));Gn&&Gn(ae),Gi=ae}},kd=At({},[...Eb,...kb,...VJ]),Nd=At({},[...Nb,...GJ]),ox=function(ae){let $e=b(ae);(!$e||!$e.tagName)&&($e={namespaceURI:Nt,tagName:"template"});const at=hp(ae.tagName),Ot=hp($e.tagName);return Re[ae.namespaceURI]?ae.namespaceURI===ht?$e.namespaceURI===Qt?at==="svg":$e.namespaceURI===ur?at==="svg"&&(Ot==="annotation-xml"||In[Ot]):!!kd[at]:ae.namespaceURI===ur?$e.namespaceURI===Qt?at==="math":$e.namespaceURI===ht?at==="math"&&ms[Ot]:!!Nd[at]:ae.namespaceURI===Qt?$e.namespaceURI===ht&&!ms[Ot]||$e.namespaceURI===ur&&!In[Ot]?!1:!Nd[at]&&(Rr[at]||!kd[at]):!!(Qs==="application/xhtml+xml"&&Re[ae.namespaceURI]):!1},fs=function(ae){e0(t.removed,{element:ae});try{b(ae).removeChild(ae)}catch{x(ae)}},si=function(ae,$e){try{e0(t.removed,{attribute:$e.getAttributeNode(ae),from:$e})}catch{e0(t.removed,{attribute:null,from:$e})}if($e.removeAttribute(ae),ae==="is")if(X||pe)try{fs($e)}catch{}else try{$e.setAttribute(ae,"")}catch{}},ln=function(ae){let $e=null,at=null;if(Ce)ae="<remove></remove>"+ae;else{const gr=wb(ae,/^[\r\n\t ]+/);at=gr&&gr[0]}Qs==="application/xhtml+xml"&&Nt===Qt&&(ae='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ae+"</body></html>");const Ot=k?k.createHTML(ae):ae;if(Nt===Qt)try{$e=new m().parseFromString(Ot,Qs)}catch{}if(!$e||!$e.documentElement){$e=S.createDocument(Nt,"template",null);try{$e.documentElement.innerHTML=Jt?T:Ot}catch{}}const Mr=$e.body||$e.documentElement;return ae&&at&&Mr.insertBefore(r.createTextNode(at),Mr.childNodes[0]||null),Nt===Qt?A.call($e,Ae?"html":"body")[0]:Ae?$e.documentElement:Mr},vc=function(ae){return j.call(ae.ownerDocument||ae,ae,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Zr=function(ae){return ae instanceof h&&(typeof ae.nodeName!="string"||typeof ae.textContent!="string"||typeof ae.removeChild!="function"||!(ae.attributes instanceof d)||typeof ae.removeAttribute!="function"||typeof ae.setAttribute!="function"||typeof ae.namespaceURI!="string"||typeof ae.insertBefore!="function"||typeof ae.hasChildNodes!="function")},wc=function(ae){return typeof l=="function"&&ae instanceof l};function Dr(ot,ae,$e){of(ot,at=>{at.call(t,ae,$e,Gi)})}const Ec=function(ae){let $e=null;if(Dr(M.beforeSanitizeElements,ae,null),Zr(ae))return fs(ae),!0;const at=kr(ae.nodeName);if(Dr(M.uponSanitizeElement,ae,{tagName:at,allowedTags:K}),Ye&&ae.hasChildNodes()&&!wc(ae.firstElementChild)&&Dn(/<[/\w!]/g,ae.innerHTML)&&Dn(/<[/\w!]/g,ae.textContent)||ae.nodeType===s0.progressingInstruction||Ye&&ae.nodeType===s0.comment&&Dn(/<[/\w]/g,ae.data))return fs(ae),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(at))&&(!K[at]||ne[at])){if(!ne[at]&&xm(at)&&(q.tagNameCheck instanceof RegExp&&Dn(q.tagNameCheck,at)||q.tagNameCheck instanceof Function&&q.tagNameCheck(at)))return!1;if(ie&&!se[at]){const Ot=b(ae)||ae.parentNode,Mr=y(ae)||ae.childNodes;if(Mr&&Ot){const gr=Mr.length;for(let gn=gr-1;gn>=0;--gn){const Rs=g(Mr[gn],!0);Rs.__removalCount=(ae.__removalCount||0)+1,Ot.insertBefore(Rs,w(ae))}}}return fs(ae),!0}return ae instanceof u&&!ox(ae)||(at==="noscript"||at==="noembed"||at==="noframes")&&Dn(/<\/no(script|embed|frames)/i,ae.innerHTML)?(fs(ae),!0):(ve&&ae.nodeType===s0.text&&($e=ae.textContent,of([B,W,H],Ot=>{$e=t0($e,Ot," ")}),ae.textContent!==$e&&(e0(t.removed,{element:ae.cloneNode()}),ae.textContent=$e)),Dr(M.afterSanitizeElements,ae,null),!1)},gm=function(ae,$e,at){if(Ne&&($e==="id"||$e==="name")&&(at in r||at in Nr))return!1;if(!(Se&&!he[$e]&&Dn(L,$e))){if(!(Oe&&Dn($,$e))){if(!(xe.attributeCheck instanceof Function&&xe.attributeCheck($e,ae))){if(!C[$e]||he[$e]){if(!(xm(ae)&&(q.tagNameCheck instanceof RegExp&&Dn(q.tagNameCheck,ae)||q.tagNameCheck instanceof Function&&q.tagNameCheck(ae))&&(q.attributeNameCheck instanceof RegExp&&Dn(q.attributeNameCheck,$e)||q.attributeNameCheck instanceof Function&&q.attributeNameCheck($e,ae))||$e==="is"&&q.allowCustomizedBuiltInElements&&(q.tagNameCheck instanceof RegExp&&Dn(q.tagNameCheck,at)||q.tagNameCheck instanceof Function&&q.tagNameCheck(at))))return!1}else if(!mt[$e]){if(!Dn(D,t0(at,G,""))){if(!(($e==="src"||$e==="xlink:href"||$e==="href")&&ae!=="script"&&zJ(at,"data:")===0&&je[ae])){if(!(we&&!Dn(ee,t0(at,G,"")))){if(at)return!1}}}}}}}return!0},xm=function(ae){return ae!=="annotation-xml"&&wb(ae,Q)},Na=function(ae){Dr(M.beforeSanitizeAttributes,ae,null);const{attributes:$e}=ae;if(!$e||Zr(ae))return;const at={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:C,forceKeepAttr:void 0};let Ot=$e.length;for(;Ot--;){const Mr=$e[Ot],{name:gr,namespaceURI:gn,value:Rs}=Mr,Ki=kr(gr),lt=Rs;let Vt=gr==="value"?lt:HJ(lt);if(at.attrName=Ki,at.attrValue=Vt,at.keepAttr=!0,at.forceKeepAttr=void 0,Dr(M.uponSanitizeAttribute,ae,at),Vt=at.attrValue,de&&(Ki==="id"||Ki==="name")&&(si(gr,ae),Vt=be+Vt),Ye&&Dn(/((--!?|])>)|<\/(style|title|textarea)/i,Vt)){si(gr,ae);continue}if(Ki==="attributename"&&wb(Vt,"href")){si(gr,ae);continue}if(at.forceKeepAttr)continue;if(!at.keepAttr){si(gr,ae);continue}if(!Be&&Dn(/\/>/i,Vt)){si(gr,ae);continue}ve&&of([B,W,H],xn=>{Vt=t0(Vt,xn," ")});const ai=kr(ae.nodeName);if(!gm(ai,Ki,Vt)){si(gr,ae);continue}if(k&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!gn)switch(f.getAttributeType(ai,Ki)){case"TrustedHTML":{Vt=k.createHTML(Vt);break}case"TrustedScriptURL":{Vt=k.createScriptURL(Vt);break}}if(Vt!==lt)try{gn?ae.setAttributeNS(gn,gr,Vt):ae.setAttribute(gr,Vt),Zr(ae)?fs(ae):FN(t.removed)}catch{si(gr,ae)}}Dr(M.afterSanitizeAttributes,ae,null)},bm=function ot(ae){let $e=null;const at=vc(ae);for(Dr(M.beforeSanitizeShadowDOM,ae,null);$e=at.nextNode();)Dr(M.uponSanitizeShadowNode,$e,null),Ec($e),Na($e),$e.content instanceof a&&ot($e.content);Dr(M.afterSanitizeShadowDOM,ae,null)};return t.sanitize=function(ot){let ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$e=null,at=null,Ot=null,Mr=null;if(Jt=!ot,Jt&&(ot="<!-->"),typeof ot!="string"&&!wc(ot))if(typeof ot.toString=="function"){if(ot=ot.toString(),typeof ot!="string")throw r0("dirty is not a string, aborting")}else throw r0("toString is not a function");if(!t.isSupported)return ot;if(Ee||ni(ae),t.removed=[],typeof ot=="string"&&(De=!1),De){if(ot.nodeName){const Rs=kr(ot.nodeName);if(!K[Rs]||ne[Rs])throw r0("root node is forbidden and cannot be sanitized in-place")}}else if(ot instanceof l)$e=ln("<!---->"),at=$e.ownerDocument.importNode(ot,!0),at.nodeType===s0.element&&at.nodeName==="BODY"||at.nodeName==="HTML"?$e=at:$e.appendChild(at);else{if(!X&&!ve&&!Ae&&ot.indexOf("<")===-1)return k&&_e?k.createHTML(ot):ot;if($e=ln(ot),!$e)return X?null:_e?T:""}$e&&Ce&&fs($e.firstChild);const gr=vc(De?ot:$e);for(;Ot=gr.nextNode();)Ec(Ot),Na(Ot),Ot.content instanceof a&&bm(Ot.content);if(De)return ot;if(X){if(pe)for(Mr=E.call($e.ownerDocument);$e.firstChild;)Mr.appendChild($e.firstChild);else Mr=$e;return(C.shadowroot||C.shadowrootmode)&&(Mr=R.call(n,Mr,!0)),Mr}let gn=Ae?$e.outerHTML:$e.innerHTML;return Ae&&K["!doctype"]&&$e.ownerDocument&&$e.ownerDocument.doctype&&$e.ownerDocument.doctype.name&&Dn(pI,$e.ownerDocument.doctype.name)&&(gn="<!DOCTYPE "+$e.ownerDocument.doctype.name+`> 1244`+gn),ve&&of([B,W,H],Rs=>{gn=t0(gn,Rs," ")}),k&&_e?k.createHTML(gn):gn},t.setConfig=function(){let ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ni(ot),Ee=!0},t.clearConfig=function(){Gi=null,Ee=!1},t.isValidAttribute=function(ot,ae,$e){Gi||ni({});const at=kr(ot),Ot=kr(ae);return gm(at,Ot,$e)},t.addHook=function(ot,ae){typeof ae=="function"&&e0(M[ot],ae)},t.removeHook=function(ot,ae){if(ae!==void 0){const $e=UJ(M[ot],ae);return $e===-1?void 0:$J(M[ot],$e,1)[0]}return FN(M[ot])},t.removeHooks=function(ot){M[ot]=[]},t.removeAllHooks=function(){M=qN()},t}var I1=gI();const mve=Object.freeze(Object.defineProperty({__proto__:null,default:I1},Symbol.toStringTag,{value:"Module"})),P2={ALLOWED_TAGS:["p","br","strong","b","em","i","u","code","pre","blockquote","ul","ol","li","h1","h2","h3","h4","h5","h6","a","span","div","table","thead","tbody","tr","th","td","img","figure","figcaption","hr","dl","dt","dd","sub","sup","mark"],ALLOWED_ATTR:["href","target","rel","class","title","src","alt","width","height","colspan","rowspan"],ALLOW_DATA_ATTR:!1,ADD_ATTR:["target"],FORBID_TAGS:["script","style","iframe","object","embed","form","input","select","textarea","button"],FORB
1244ID_ATTR:["onerror","onload","onclick","onmouseover","onfocus","onblur","style"]};I1.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer"))});function see(e){return I1.sanitize(e,P2)}const aee={...P2,ALLOWED_ATTR:[...P2.ALLOWED_ATTR??[],"style"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onfocus","onblur"]};function fve(e){return I1.sanitize(e,aee)}function iee(){const{token:e}=Ut(),{t,i18n:r}=We(),{data:n,isLoading:s,error:a}=ga({queryKey:["shared-writing",e],queryFn:()=>$A.drafts.getShared(e),enabled:!!e}),o=n==null?void 0:n.data;return s?i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-[var(--bg-secondary)]",children:i.jsx(kn,{className:"w-8 h-8 animate-spin text-[var(--text-muted)]"})}):a||!o?i.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-[var(--bg-secondary)]",children:[i.jsx(Qr,{className:"w-16 h-16 text-[var(--text-muted)] mb-4"}),i.jsx("h1",{className:"text-xl font-semibold text-[var(--text-primary)] mb-2",children:t("writing.shareNotFound")}),i.jsx("p",{className:"text-sm text-[var(--text-muted)] mb-6",children:t("writing.shareNotFoundDesc")}),i.jsxs("a",{href:`/${r.language}/login`,className:"flex items-center gap-2 px-4 py-2 bg-[var(--theme)] text-white rounded-lg hover:bg-[var(--theme-hover)] transition-colors text-sm font-medium",children:[i.jsx(ig,{className:"w-4 h-4"}),t("writing.openInUniAI")]})]}):i.jsxs("div",{className:"min-h-screen bg-[var(--bg-secondary)]",children:[i.jsx("header",{className:"border-b border-ui-border bg-[var(--bg-primary)]",children:i.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-4 flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Qr,{className:"w-5 h-5 text-[var(--text-tertiary)]"}),i.jsx("span",{className:"text-sm font-medium text-[var(--text-secondary)]",children:t("writing.sharedWriting")})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[o.wordCount>0&&i.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t("writing.totalWords",{count:o.wordCount})}),i.jsxs("a",{href:`/${r.language}/register`,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs bg-[var(--theme)] text-white rounded-lg hover:bg-[var(--theme-hover)] transition-colors font-medium",children:[i.jsx(ig,{className:"w-3.5 h-3.5"}),t("writing.openInUniAI")]})]})]})}),i.jsxs("main",{className:"max-w-4xl mx-auto px-6 py-8",children:[o.title&&i.jsx("h1",{className:"text-2xl font-bold text-[var(--text-primary)] mb-6",children:o.title}),o.authorName&&i.jsxs("div",{className:"text-sm text-[var(--text-muted)] mb-6",children:[o.authorName,o.sharedAt&&i.jsxs("span",{children:[" · ",new Date(o.sharedAt).toLocaleDateString()]})]}),i.jsx("article",{className:"prose prose-sm dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:see(o.content)}})]})]})}function sm({items:e,className:t=""}){const[r,n]=v.useState(0);return i.jsx("div",{className:`space-y-3 ${t}`,children:e.map((s,a)=>{const o=a===r;return i.jsxs("div",{className:"border border-[var(--border-default)] rounded-xl bg-[var(--bg-secondary)] overflow-hidden transition-shadow hover:shadow-sm",children:[i.jsxs("button",{type:"button",className:"w-full flex items-center justify-between gap-4 px-5 py-4 text-left",onClick:()=>n(o?null:a),"aria-expanded":o,children:[i.jsx("span",{className:"text-[var(--text-primary)] font-medium",children:s.q}),i.jsx(dn,{size:18,className:`shrink-0 text-[var(--text-muted)] transition-transform ${o?"rotate-180":""}`})]}),o&&i.jsx("div",{className:"px-5 pb-4 text-sm leading-relaxed text-[var(--text-secondary)] whitespace-pre-line",children:s.a})]},a)})})}const oee=[r3,x9,e3,Ts],lee=[Yw,b9,rG,Qr];function cee(){const{t:e}=We(),{lang:t="en"}=Ut(),r=e("landingDocumentTranslate",{returnObjects:!0}),n=`/${t}/register?next=${encodeURIComponent(`/${t}/app/translate/document`)}`,s=`/${t}/pricing`;return i.jsxs("div",{style:{paddingTop:"var(--header-height)"},children:[i.jsx(pn,{title:r.title,description:r.subtitle,path:"/translate/document"}
1244),i.jsx(wa,{data:[hc({lang:t,name:r.title,description:r.subtitle,applicationCategory:"BusinessApplication",operatingSystem:"Web, macOS, Windows, Android"}),{"@context":"https://schema.org","@type":"FAQPage",mainEntity:r.faqs.map(a=>({"@type":"Question",name:a.q,acceptedAnswer:{"@type":"Answer",text:a.a}}))},al([{name:"Home",path:"/"},{name:r.title,path:"/translate/document"}],t)]}),i.jsxs("section",{className:"container py-16 md:py-24 text-center",children:[i.jsx("h1",{className:"text-4xl md:text-6xl font-extrabold mb-6 text-ui-text-primary tracking-tight",children:r.title}),i.jsx("p",{className:"text-lg md:text-xl text-ui-text-secondary max-w-2xl mx-auto mb-8",children:r.subtitle}),i.jsxs("div",{className:"flex items-center justify-center gap-3",children:[i.jsxs(Ke,{to:n,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[var(--accent-primary)] text-white font-semibold hover:opacity-90 transition",children:[r.ctaPrimary," ",i.jsx(fr,{size:18})]}),i.jsx(Ke,{to:s,className:"inline-flex items-center px-6 py-3 rounded-full border border-[var(--border-default)] text-ui-text-primary hover:bg-ui-bg-secondary transition",children:r.ctaSecondary})]}),i.jsx("div",{className:"mt-14 max-w-4xl mx-auto rounded-2xl overflow-hidden border border-[var(--border-default)] bg-[var(--bg-secondary)] aspect-[16/9] flex items-center justify-center",children:i.jsx(e3,{size:64,className:"text-[var(--text-muted)]"})})]}),i.jsx("section",{className:"container py-16",children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-
12445",children:r.features.map((a,o)=>{const l=oee[o];return i.jsxs("div",{className:"p-6 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[i.jsx(l,{size:28,className:"text-[var(--accent-primary)] mb-4"}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},o)})})}),i.jsx("section",{className:"container py-16",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:r.steps.map(a=>i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"w-12 h-12 rounded-full bg-[var(--accent-primary)] text-white text-lg font-bold flex items-center justify-center mx-auto mb-4",children:a.n}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},a.n))})}),i.jsxs("section",{className:"container py-16",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-10 text-center",children:r.useCasesTitle}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-
12445",children:r.useCases.map((a,o)=>{const l=lee[o];return i.jsxs("div",{className:"p-6 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[i.jsx(l,{size:28,className:"text-[var(--accent-primary)] mb-4"}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},o)})})]}),i.jsxs("section",{className:"container py-16 max-w-3xl",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-10 text-center",children:r.faqTitle}),i.jsx(sm,{items:r.faqs})]}),i.jsxs("section",{className:"container py-16 text-center",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-3",children:r.bottomCtaTitle}),i.jsx("p",{className:"text-ui-text-secondary mb-6",children:r.bottomCtaBody}),i.jsxs(Ke,{to:n,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[var(--accent-primary)] text-white font-semibold hover:opacity-90 transition",children:[r.ctaPrimary," ",i.jsx(fr,{size:18})]})]})]})}function uee(){const{t:e}=We(),{lang:t="en"}=Ut(),r=e("landingSubtitleTranslate",{returnObjects:!0}),n=`/${t}/register?next=${encodeURIComponent(`/${t}/app/translate/subtitle`)}`,s=`/${t}/pricing`;return i.jsxs("div",{style:{paddingTop:"var(--header-height)"},children:[i.jsx(pn,{title:r.title,description:r.subtitle,path:"/translate/subtitle"}),i.jsx(wa,{data:[hc({lang:t,name:r.title,description:r.subtitle,applicationCategory:"MultimediaApplication",operatingSystem:"Web, macOS, Windows, Android"}),{"@context":"https://schema.org","@type":"FAQPage",mainEntity:r.faqs.map(a=>
1244({"@type":"Question",name:a.q,acceptedAnswer:{"@type":"Answer",text:a.a}}))},al([{name:"Home",path:"/"},{name:r.title,path:"/translate/subtitle"}],t)]}),i.jsxs("section",{className:"container py-16 md:py-24 text-center",children:[i.jsx("h1",{className:"text-4xl md:text-6xl font-extrabold mb-6 text-ui-text-primary tracking-tight",children:r.title}),i.jsx("p",{className:"text-lg md:text-xl text-ui-text-secondary max-w-2xl mx-auto mb-8",children:r.subtitle}),i.jsxs("div",{className:"flex items-center justify-center gap-3",children:[i.jsxs(Ke,{to:n,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[var(--accent-primary)] text-white font-semibold hover:opacity-90 transition",children:[r.ctaPrimary," ",i.jsx(fr,{size:18})]}),i.jsx(Ke,{to:s,className:"inline-flex items-center px-6 py-3 rounded-full border border-[var(--border-default)] text-ui-text-primary hover:bg-ui-bg-secondary transition",children:r.ctaSecondary})]}),i.jsx("div",{className:"mt-14 max-w-4xl mx-auto rounded-2xl overflow-hidden border border-[var(--border-default)] bg-[var(--bg-secondary)] aspect-[16/9] flex items-center justify-center",children:i.jsx(R9,{size:64,className:"text-[var(--text-muted)]"})})]}),i.jsx("section",{className:"container py-16",children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-
12445",children:r.features.map((a,o)=>i.jsxs("div",{className:"p-6 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[i.jsx(a.icon,{size:28,className:"text-[var(--accent-primary)] mb-4"}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},o))})}),i.jsx("section",{className:"container py-16",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:r.steps.map(a=>i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"w-12 h-12 rounded-full bg-[var(--accent-primary)] text-white text-lg font-bold flex items-center justify-center mx-auto mb-4",children:a.n}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},a.n))})}),i.jsxs("section",{className:"container py-16",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-10 text-center",children:r.useCasesTitle}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-
12445",children:r.useCases.map((a,o)=>i.jsxs("div",{className:"p-6 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[i.jsx(a.icon,{size:28,className:"text-[var(--accent-primary)] mb-4"}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},o))})]}),i.jsxs("section",{className:"container py-16 max-w-3xl",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-10 text-center",children:r.faqTitle}),i.jsx(sm,{items:r.faqs})]}),i.jsxs("section",{className:"container py-16 text-center",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-3",children:r.bottomCtaTitle}),i.jsx("p",{className:"text-ui-text-secondary mb-6",children:r.bottomCtaBody}),i.jsxs(Ke,{to:n,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[var(--accent-primary)] text-white font-semibold hover:opacity-90 transition",children:[r.ctaPrimary," ",i.jsx(fr,{size:18})]})]})]})}const U3={features:[{icon:wn,title:"Edge-perfect AI",body:"A specialized segmentation model handles fine hair, fur, glass, smoke and lace cleanly â no jagged edges."},{icon:Ti,title:"Instant output",body:"Most images process in under 3 seconds. Batch up to 100 images at once."},{icon:Xw,title:"Transparent PNG",body:"Download as PNG with full alpha transparency, or export as JPG with a custom background color."},{icon:Ts,title:"Privacy-first",body:"Images encrypted in transit and at rest. Auto-deleted after 30 days. Enterprise plans support zero-retention."}],steps:[{n:1,title:"Upload your image",body:"Drag in JPG, PNG, WEBP or HEIC up to 25 MB. Supports up to 8K resolution."},{n:2,title:"Let AI cut it out",body:"No clicking or masking â the model removes the background automatically in 1â3 seconds."},{n:3,title:"Download PNG",body:"Get a transparent PNG, or replace the background with a color, blur or another photo."}],useCases:[{icon:o3,title:"E-commerce listings",body:"Clean white-background product photos for Amazon, Shopify and Taobao listings â no Photoshop skills needed."},{icon:Jh,title:"Portrait photography",body:"Cut out subjects from busy backgrounds while keeping every flyaway hair intact."},{icon:E1,title:"Headshots & ID photos",body:"Generate compliant ID photos with the right background color in seconds."},{icon:Yw,title:"Marketing creatives",body:"Composite product shots, social media graphics and ad creatives faster."}]},dee=U3.features.map(e=>e.icon),hee=U3.steps.map(e=>e.n),mee=U3.useCases.map(e=>e.icon);function fee(){const{t:e}=We(),{lang:t="en"}=Ut(),r=e("landingImageRemoveBg",{returnObjects:!0}),n=`/${t}/register?next=${encodeURIComponent(`/${t}/app/image/remove-bg`)}`,s=`/${t}/pricing`;return i.jsxs("div",{style:{paddingTop:"var(--header-height)"},children:[i.jsx(pn,{title:r.title,description:r.subtitle,path:"/image/remove-bg"}),i.jsx(wa,{data:[hc({lang:t,name:r.title,description:r.subtitle,applicationCategory:"DesignApplication",operatingSystem:"Web, macOS, Windows, Android"}),{"@context":"https://schema.org","@type":"FAQPage",mainEntity:r.faqs.map(a=>
1244({"@type":"Question",name:a.q,acceptedAnswer:{"@type":"Answer",text:a.a}}))},al([{name:"Home",path:"/"},{name:r.title,path:"/image/remove-bg"}],t)]}),i.jsxs("section",{className:"container py-16 md:py-24 text-center",children:[i.jsx("h1",{className:"text-4xl md:text-6xl font-extrabold mb-6 text-ui-text-primary tracking-tight",children:r.title}),i.jsx("p",{className:"text-lg md:text-xl text-ui-text-secondary max-w-2xl mx-auto mb-8",children:r.subtitle}),i.jsxs("div",{className:"flex items-center justify-center gap-3",children:[i.jsxs(Ke,{to:n,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[var(--accent-primary)] text-white font-semibold hover:opacity-90 transition",children:[r.ctaPrimary," ",i.jsx(fr,{size:18})]}),i.jsx(Ke,{to:s,className:"inline-flex items-center px-6 py-3 rounded-full border border-[var(--border-default)] text-ui-text-primary hover:bg-ui-bg-secondary transition",children:r.ctaSecondary})]}),i.jsx("div",{className:"mt-14 max-w-4xl mx-auto rounded-2xl overflow-hidden border border-[var(--border-default)] bg-[var(--bg-secondary)] aspect-[16/9] flex items-center justify-center",children:i.jsx(Xw,{size:64,className:"text-[var(--text-muted)]"})})]}),i.jsx("section",{className:"container py-16",children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-
12445",children:r.features.map((a,o)=>{const l=dee[o];return i.jsxs("div",{className:"p-6 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[i.jsx(l,{size:28,className:"text-[var(--accent-primary)] mb-4"}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},o)})})}),i.jsx("section",{className:"container py-16",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:r.steps.map((a,o)=>i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"w-12 h-12 rounded-full bg-[var(--accent-primary)] text-white text-lg font-bold flex items-center justify-center mx-auto mb-4",children:hee[o]}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},o))})}),i.jsxs("section",{className:"container py-16",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-10 text-center",children:r.useCasesTitle}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-
12445",children:r.useCases.map((a,o)=>{const l=mee[o];return i.jsxs("div",{className:"p-6 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[i.jsx(l,{size:28,className:"text-[var(--accent-primary)] mb-4"}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},o)})})]}),i.jsxs("section",{className:"container py-16 max-w-3xl",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-10 text-center",children:r.faqTitle}),i.jsx(sm,{items:r.faqs})]}),i.jsxs("section",{className:"container py-16 text-center",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-3",children:r.bottomCtaTitle}),i.jsx("p",{className:"text-ui-text-secondary mb-6",children:r.bottomCtaBody}),i.jsxs(Ke,{to:n,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[var(--accent-primary)] text-white font-semibold hover:opacity-90 transition",children:[r.ctaPrimary," ",i.jsx(fr,{size:18})]})]})]})}const pee=[wn,Zw,Ti,Ts],gee=[Jh,Ss,QV,Wo];function xee(){const{t:e}=We(),{lang:t="en"}=Ut(),r=e("landingImageUpscale",{returnObjects:!0}),n={...r,features:r.features.map((o,l)=>({...o,icon:pee[l]})),useCases:r.useCases.map((o,l)=>({...o,icon:gee[l]})),steps:r.steps.map((o,l)=>({...o,n:l+1}))},s=`/${t}/register?next=${encodeURIComponent(`/${t}/app/image/upscale`)}`,a=`/${t}/pricing`;return i.jsxs("div",{style:{paddingTop:"var(--header-height)"},children:[i.jsx(pn,{title:n.title,description:n.subtitle,path:"/image/upscale"}),i.jsx(wa,{data:[hc({lang:t,name:n.title,description:n.subtitle,applicationCategory:"DesignApplication",operatingSystem:"Web, macOS, Windows, Android"}),{"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.faqs.map(o=>
1244({"@type":"Question",name:o.q,acceptedAnswer:{"@type":"Answer",text:o.a}}))},al([{name:"Home",path:"/"},{name:n.title,path:"/image/upscale"}],t)]}),i.jsxs("section",{className:"container py-16 md:py-24 text-center",children:[i.jsx("h1",{className:"text-4xl md:text-6xl font-extrabold mb-6 text-ui-text-primary tracking-tight",children:n.title}),i.jsx("p",{className:"text-lg md:text-xl text-ui-text-secondary max-w-2xl mx-auto mb-8",children:n.subtitle}),i.jsxs("div",{className:"flex items-center justify-center gap-3",children:[i.jsxs(Ke,{to:s,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[var(--accent-primary)] text-white font-semibold hover:opacity-90 transition",children:[n.ctaPrimary," ",i.jsx(fr,{size:18})]}),i.jsx(Ke,{to:a,className:"inline-flex items-center px-6 py-3 rounded-full border border-[var(--border-default)] text-ui-text-primary hover:bg-ui-bg-secondary transition",children:n.ctaSecondary})]}),i.jsx("div",{className:"mt-14 max-w-4xl mx-auto rounded-2xl overflow-hidden border border-[var(--border-default)] bg-[var(--bg-secondary)] aspect-[16/9] flex items-center justify-center",children:i.jsx(Zw,{size:64,className:"text-[var(--text-muted)]"})})]}),i.jsx("section",{className:"container py-16",children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-
12445",children:n.features.map((o,l)=>i.jsxs("div",{className:"p-6 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[i.jsx(o.icon,{size:28,className:"text-[var(--accent-primary)] mb-4"}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:o.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:o.body})]},l))})}),i.jsx("section",{className:"container py-16",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:n.steps.map(o=>i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"w-12 h-12 rounded-full bg-[var(--accent-primary)] text-white text-lg font-bold flex items-center justify-center mx-auto mb-4",children:o.n}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:o.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:o.body})]},o.n))})}),i.jsxs("section",{className:"container py-16",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-10 text-center",children:n.useCasesTitle}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-
12445",children:n.useCases.map((o,l)=>i.jsxs("div",{className:"p-6 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[i.jsx(o.icon,{size:28,className:"text-[var(--accent-primary)] mb-4"}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:o.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:o.body})]},l))})]}),i.jsxs("section",{className:"container py-16 max-w-3xl",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-10 text-center",children:n.faqTitle}),i.jsx(sm,{items:n.faqs})]}),i.jsxs("section",{className:"container py-16 text-center",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-3",children:n.bottomCtaTitle}),i.jsx("p",{className:"text-ui-text-secondary mb-6",children:n.bottomCtaBody}),i.jsxs(Ke,{to:s,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[var(--accent-primary)] text-white font-semibold hover:opacity-90 transition",children:[n.ctaPrimary," ",i.jsx(fr,{size:18})]})]})]})}const $3={features:[{icon:y1,title:"98% accuracy",body:"A whisper-class model fine-tuned on real-world recordings handles accents, jargon and overlapping speech."},{icon:x9,title:"100+ languages",body:"Transcribe English, Chinese, Spanish, Japanese, French, German, Arabic and 100+ more â including dialect variants."},{icon:E1,title:"Speaker labels",body:"Automatic speaker diarization labels who said what â perfect for interviews and panel discussions."},{icon:Ts,title:"Privacy-first",body:"Audio encrypted in transit and at rest. Auto-deleted after 30 days. Enterprise plans support zero-retention."}],steps:[{n:1,title:"Upload audio or video",body:"Drag in MP3, WAV, M4A, MP4, MOV or paste a YouTube link. Up to 4 hours per file."},{n:2,title:"Pick language & options",body:"Auto-detect supported. Optional: speaker labels, timestamps, profanity filter, custom vocabulary."},{n:3,title:"Edit & export transcript",body:"Review side-by-side with audio playback, fix any errors, and export as TXT, DOCX, SRT, VTT or PDF."}],useCases:[{icon:Yw,title:"Meetings & interviews",body:"Generate searchable meeting notes and full interview transcripts with speaker tags."},{icon:YV,title:"Podcasts & YouTube",body:"Produce show notes, blog posts and SEO-friendly captions from your audio episodes."},{icon:b9,title:"Lectures & courses",body:"Turn lecture recordings into study-friendly transcripts with timestamps for quick review."},{icon:Qr,title:"Legal & medical dictation",body:"Transcribe depositions, case notes and clinical dictations with custom vocabulary support."}]},bee=$3.features.map(e=>e.icon),yee=$3.steps.map(e=>e.n),vee=$3.useCases.map(e=>e.icon);function wee(){const{t:e}=We(),{lang:t="en"}=Ut(),r=e("landingStt",{returnObjects:!0}),n=`/${t}/register?next=${encodeURIComponent(`/${t}/app/audio/stt`)}`,s=`/${t}/pricing`;return i.jsxs("div",{style:{paddingTop:"var(--header-height)"},children:[i.jsx(pn,{title:r.title,description:r.subtitle,path:"/audio/stt"}),i.jsx(wa,{data:[hc({lang:t,name:r.title,description:r.subtitle,applicationCategory:"BusinessApplication",operatingSystem:"Web, macOS, Windows, Android"}),{"@context":"https://schema.org","@type":"FAQPage",mainEntity:r.faqs.map(a=>
1244({"@type":"Question",name:a.q,acceptedAnswer:{"@type":"Answer",text:a.a}}))},al([{name:"Home",path:"/"},{name:r.title,path:"/audio/stt"}],t)]}),i.jsxs("section",{className:"container py-16 md:py-24 text-center",children:[i.jsx("h1",{className:"text-4xl md:text-6xl font-extrabold mb-6 text-ui-text-primary tracking-tight",children:r.title}),i.jsx("p",{className:"text-lg md:text-xl text-ui-text-secondary max-w-2xl mx-auto mb-8",children:r.subtitle}),i.jsxs("div",{className:"flex items-center justify-center gap-3",children:[i.jsxs(Ke,{to:n,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[var(--accent-primary)] text-white font-semibold hover:opacity-90 transition",children:[r.ctaPrimary," ",i.jsx(fr,{size:18})]}),i.jsx(Ke,{to:s,className:"inline-flex items-center px-6 py-3 rounded-full border border-[var(--border-default)] text-ui-text-primary hover:bg-ui-bg-secondary transition",children:r.ctaSecondary})]}),i.jsx("div",{className:"mt-14 max-w-4xl mx-auto rounded-2xl overflow-hidden border border-[var(--border-default)] bg-[var(--bg-secondary)] aspect-[16/9] flex items-center justify-center",children:i.jsx(y1,{size:64,className:"text-[var(--text-muted)]"})})]}),i.jsx("section",{className:"container py-16",children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-
12445",children:r.features.map((a,o)=>{const l=bee[o];return i.jsxs("div",{className:"p-6 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[i.jsx(l,{size:28,className:"text-[var(--accent-primary)] mb-4"}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},o)})})}),i.jsx("section",{className:"container py-16",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:r.steps.map((a,o)=>i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"w-12 h-12 rounded-full bg-[var(--accent-primary)] text-white text-lg font-bold flex items-center justify-center mx-auto mb-4",children:yee[o]}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},o))})}),i.jsxs("section",{className:"container py-16",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-10 text-center",children:r.useCasesTitle}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-
12445",children:r.useCases.map((a,o)=>{const l=vee[o];return i.jsxs("div",{className:"p-6 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-secondary)]",children:[i.jsx(l,{size:28,className:"text-[var(--accent-primary)] mb-4"}),i.jsx("h3",{className:"font-semibold text-ui-text-primary mb-2",children:a.title}),i.jsx("p",{className:"text-sm text-ui-text-secondary leading-relaxed",children:a.body})]},o)})})]}),i.jsxs("section",{className:"container py-16 max-w-3xl",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-10 text-center",children:r.faqTitle}),i.jsx(sm,{items:r.faqs})]}),i.jsxs("section",{className:"container py-16 text-center",children:[i.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-ui-text-primary mb-3",children:r.bottomCtaTitle}),i.jsx("p",{className:"text-ui-text-secondary mb-6",children:r.bottomCtaBody}),i.jsxs(Ke,{to:n,className:"inline-flex items-center gap-2 px-6 py-3 rounded-full bg-[var(--accent-primary)] text-white font-semibold hover:opacity-90 transition",children:[r.ctaPrimary," ",i.jsx(fr,{size:18})]})]})]})}function a0({appPath:e,children:t}){const{lang:r}=Ut();return ut(s=>s.isAuthenticated)?i.jsx(Bn,{to:`/${r}/app/${e}`,replace:!0}):i.jsx(i.Fragment,{children:t})}function Eee(){const{t:e,i18n:t}=We(),{theme:r,setTheme:n,resolvedTheme:s}=Uw(),a=Er(),o=Xn(),[l,u]=v.useState(!1),[c,d]=v.useState(!1),h=v.useRef(null),m=v.useRef(null);v.useEffect(()=>{const x=w=>{h.current&&!h.current.contains(w.target)&&u(!1),m.current&&!m.current.contains(w.target)&&d(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);const f=x=>{t.changeLanguage(x);const w=Vw(o.pathname,x);a(w),u(!1)},p=Nn.find(x=>x.code===t.language)||Nn[0],g=[{id:"light",icon:yu,label:e("settings.themes.light")},{id:"dark",icon:bu,label:e("settings.themes.dark")},{id:"system",icon:v1,label:e("settings.themes.system")}];return i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("div",{className:"relative",ref:h,children:[i.jsxs("button",{onClick:()=>u(!l),className:"flex items-center gap-1.5 px-2 py-1.5 rounded-lg text-sm hover:bg-[var(--bg-hover)] transition-colors",children:[i.jsx(Tn,{className:"w-4 h-4"}),i.jsx("span",{className:"hidden sm:inline",children:p.nativeName}),i.jsx(dn,{className:"w-3 h-3"})]}),l&&i.jsx("div",{className:"absolute right-0 top-full mt-1 w-40 bg-[var(--bg-primary)] rounded-lg shadow-lg border border-ui-border py-1 z-50",children:Nn.map(x=>i.jsxs("button",{onClick:()=>f(x.code),className:`w-full px-3 py-2 text-left text-sm hover:bg-[var(--bg-hover)] flex items-center justify-between ${t.language===x.code?"text-primary-600":"text-[var(--text-secondary)]"}`,children:[i.jsx("span",{children:cg(x,t.language)}),t.language===x.code&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary-600"})]},x.code))})]}),i.jsxs("div",{className:"relative",ref:m,children:[i.jsxs("button",{onClick:()=>d(!c),className:"flex items-center gap-1.5 px-2 py-1.5 rounded-lg text-sm hover:bg-[var(--bg-hover)] transition-colors",children:[s==="dark"?i.jsx(bu,{className:"w-4 h-4"}):i.jsx(yu,{className:"w-4 h-4"}),i.jsx(dn,{className:"w-3 h-3"})]}),c&&i.jsx("div",{className:"absolute right-0 top-full mt-1 w-36 bg-[var(--bg-primary)] rounded-lg shadow-lg border border-ui-border py-1 z-50",children:g.map(x=>{const w=x.icon;return i.jsxs("button",{onClick:()=>{n(x.id),d(!1)},className:`w-full px-3 py-2 text-left text-sm hover:bg-[var(--bg-hover)] flex items-center gap-2 ${r===x.id?"text-primary-600":"text-[var(--text-secondary)]"}`,children:[i.jsx(w,{className:"w-4 h-4"}),i.jsx("span",{children:x.label}),r===x.id&&i.jsx("span",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-primary-600"})]},x.id)})})]})]})}var WN=1,kee=.9,Nee=.8,See=.17,Tb=.1,Cb=.999,Tee=.9999,Cee=.99,_ee=/[\\\/_+.#"@\[\(\{&]/,Aee=/[\\\/_+.#"@\[\(\{&]/g,jee=/[\s-]/,xI=/[\s-]/g;function F2(e,t,r,n,s,a,o){if(a===t.length)return s===e.length?WN:Cee;var l=`${s},${a}`;if(o[l]!==void 0)return o[l];for(var u=n.charAt(a),c=r.indexOf(u,s),d=0,h,m,f,p;c>=0;)h=F2(e,t,r,n,c+1,a+1,o),h>d&&(c===s?h*=WN:_ee.test(e.charAt(c-1))?(h*=Nee,f=e.slice(s,c-1).match(Aee),f&&s>0&&(h*=Math.pow(Cb,f.length))):jee.test(e.charAt(c-1))?(h*=kee,p=e.slice(s,c-1).match(xI),p&&s>0&&(h*=Math.pow(Cb,p.length))):(h*=See,s>0&&(h*=Math.pow(Cb,c-s))),e.charAt(c)!==t.charAt(a)&&(h*=Tee)),(h<Tb&&r.charAt(c-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(c-1)!==n.charAt(a))&&(m=F2(e,t,r,n,c+1,a+2,o),m*Tb>h&&(h=m*Tb)),h>d&&(d=h),c=r.indexOf(u,c+1);return o[l]=d,d}function VN(e){return e.toLowerCase().replace(xI," ")}function Iee(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,F2(e,t,VN(e),VN(t),0,0,{})}function zo(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function GN(e,t){if(typeof e=="function")return e(t);
vendor: 12,933 bytes, line 1244
1244e!=null&&(e.current=t)}function Vo(...e){return t=>{let r=!1;const n=e.map(s=>{const a=GN(s,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():GN(e[s],null)}}}}function mc(...e){return v.useCallback(Vo(...e),e)}function Ree(e,t){const r=v.createContext(t),n=a=>{const{children:o,...l}=a,u=v.useMemo(()=>l,Object.values(l));return i.jsx(r.Provider,{value:u,children:o})};n.displayName=e+"Provider";function s(a){const o=v.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,s]}function Dee(e,t=[]){let r=[];function n(a,o){const l=v.createContext(o),u=r.length;r=[...r,o];const c=h=>{var w;const{scope:m,children:f,...p}=h,g=((w=m==null?void 0:m[e])==null?void 0:w[u])||l,x=v.useMemo(()=>p,Object.values(p));return i.jsx(g.Provider,{value:x,children:f})};c.displayName=a+"Provider";function d(h,m){var g;const f=((g=m==null?void 0:m[e])==null?void 0:g[u])||l,p=v.useContext(f);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,d]}const s=()=>{const a=r.map(o=>v.createContext(o));return function(l){const u=(l==null?void 0:l[e])||a;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return s.scopeName=e,[n,Mee(s,...t)]}function Mee(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const o=n.reduce((l,{useScope:u,scopeName:c})=>{const h=u(a)[`__scope${c}`];return{...l,...h}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var Nh=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Oee=Fg[" useId ".trim().toString()]||(()=>{}),Lee=0;function ji(e){const[t,r]=v.useState(Oee());return Nh(()=>{r(n=>n??String(Lee++))},[e]),t?`radix-${t}`:""}var Pee=Fg[" useInsertionEffect ".trim().toString()]||Nh;function Fee({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,a,o]=Bee({defaultProp:t,onChange:r}),l=e!==void 0,u=l?e:s;{const d=v.useRef(e!==void 0);v.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,n])}const c=v.useCallback(d=>{var h;if(l){const m=Uee(d)?d(e):d;m!==e&&((h=o.current)==null||h.call(o,m))}else a(d)},[l,e,a,o]);return[u,c]}function Bee({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),s=v.useRef(r),a=v.useRef(t);return Pee(()=>{a.current=t},[t]),v.useEffect(()=>{var o;s.current!==r&&((o=a.current)==null||o.call(a,r),s.current=r)},[r,s]),[r,n,a]}function Uee(e){return typeof e=="function"}function bI(e){const t=$ee(e),r=v.forwardRef((n,s)=>{const{children:a,...o}=n,l=v.Children.toArray(a),u=l.find(Hee);if(u){const c=u.props.children,d=l.map(h=>h===u?v.Children.count(c)>1?v.Children.only(null):v.isValidElement(c)?c.props.children:null:h);return i.jsx(t,{...o,ref:s,children:v.isValidElement(c)?v.cloneElement(c,void 0,d):null})}return i.jsx(t,{...o,ref:s,children:a})});return r.displayName=`${e}.Slot`,r}function $ee(e){const t=v.forwardRef((r,n)=>{const{children:s,...a}=r;if(v.isValidElement(s)){const o=Wee(s),l=qee(a,s.props);return s.type!==v.Fragment&&(l.ref=n?Vo(n,o):o),v.cloneElement(s,l)}return v.Children.count(s)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zee=Symbol("radix.slottable");function Hee(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zee}function qee(e,t){const r={...t};for(const n in t){const s=e[n],a=t[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...l)=>{const u=a(...l);return s(...l),u}:s&&(r[n]=s):n==="style"?r[n]={...s,...a}:n==="className"&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...e,...r}}function Wee(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Vee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zi=Vee.reduce((e,t)=>{const r=bI(`Primitive.${t}`),n=v.forwardRef((s,a)=>{const{asChild:o,...l}=s,u=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(u,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Gee(e,t){e&&fn.flushSync(()=>e.dispatchEvent(t))}function Sh(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Kee(e,t=globalThis==null?void 0:globalThis.document){const r=Sh(e);v.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Yee="DismissableLayer",B2="dismissableLayer.update",Qee="dismissableLayer.pointerDownOutside",Xee="dismissableLayer.focusOutside",KN,yI=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vI=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...u}=e,c=v.useContext(yI),[d,h]=v.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=v.useState({}),p=mc(t,j=>h(j)),g=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(x),y=d?g.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,k=y>=w,T=ete(j=>{const E=j.target,A=[...c.branches].some(R=>R.contains(E));!k||A||(s==null||s(j),o==null||o(j),j.defaultPrevented||l==null||l())},m),S=tte(j=>{const E=j.target;[...c.branches].some(R=>R.contains(E))||(a==null||a(j),o==null||o(j),j.defaultPrevented||l==null||l())},m);return Kee(j=>{y===c.layers.size-1&&(n==null||n(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},m),v.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(KN=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),YN(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=KN)}},[d,m,r,c]),v.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),YN())},[d,c]),v.useEffect(()=>{const j=()=>f({});return document.addEventListener(B2,j),()=>document.removeEventListener(B2,j)},[]),i.jsx(zi.div,{...u,ref:p,style:{pointerEvents:b?k?"auto":"none":void 0,...e.style},onFocusCapture:zo(e.onFocusCapture,S.onFocusCapture),onBlurCapture:zo(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:zo(e.onPointerDownCapture,T.onPointerDownCapture)})});vI.displayName=Yee;var Zee="DismissableLayerBranch",Jee=v.forwardRef((e,t)=>{const r=v.useContext(yI),n=v.useRef(null),s=mc(t,n);return v.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),i.jsx(zi.div,{...e,ref:s})});Jee.displayName=Zee;function ete(e,t=globalThis==null?void 0:globalThis.document){const r=Sh(e),n=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let u=function(){wI(Qee,r,c,{discrete:!0})};const c={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=u,t.addEventListener("click",s.current,{once:!0})):u()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function tte(e,t=globalThis==null?void 0:globalThis.document){const r=Sh(e),n=v.useRef(!1);return v.useEffect(()=>{const s=a=>{a.target&&!n.current&&wI(Xee,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function YN(){const e=new CustomEvent(B2);document.dispatchEvent(e)}function wI(e,t,r,{discrete:n}){const s=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?Gee(s,a):s.dispatchEvent(a)}var _b="focusScope.autoFocusOnMount",Ab="focusScope.autoFocusOnUnmount",QN={bubbles:!1,cancelable:!0},rte="FocusScope",EI=v.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...o}=e,[l,u]=v.useState(null),c=Sh(s),d=Sh(a),h=v.useRef(null),m=mc(t,g=>u(g)),f=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let g=function(b){if(f.paused||!l)return;const k=b.target;l.contains(k)?h.current=k:no(h.current,{select:!0})},x=function(b){if(f.paused||!l)return;const k=b.relatedTarget;k!==null&&(l.contains(k)||no(h.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const T of b)T.removedNodes.length>0&&no(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const y=new MutationObserver(w);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),y.disconnect()}}},[n,l,f.paused]),v.useEffect(()=>{if(l){ZN.add(f);const g=document.activeElement;if(!l.contains(g)){const w=new CustomEvent(_b,QN);l.addEventListener(_b,c),l.dispatchEvent(w),w.defaultPrevented||(nte(lte(kI(l)),{select:!0}),document.activeElement===g&&no(l))}return()=>{l.removeEventListener(_b,c),setTimeout(()=>{const w=new CustomEvent(Ab,QN);l.addEventListener(Ab,d),l.dispatchEvent(w),w.defaultPrevented||no(g??document.body,{select:!0}),l.removeEventListener(Ab,d),ZN.remove(f)},0)}}},[l,c,d,f]);const p=v.useCallback(g=>{if(!r&&!n||f.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(x&&w){const y=g.currentTarget,[b,k]=ste(y);b&&k?!g.shiftKey&&w===k?(g.preventDefault(),r&&no(b,{select:!0})):g.shiftKey&&w===b&&(g.preventDefault(),r&&no(k,{select:!0})):w===y&&g.preventDefault()}},[r,n,f.paused]);return i.jsx(zi.div,{tabIndex:-1,...o,ref:m,onKeyDown:p})});EI.displayName=rte;function nte(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(no(n,{select:t}),document.activeElement!==r)return}function ste(e){const t=kI(e),r=XN(t,e),n=XN(t.reverse(),e);return[r,n]}function kI(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function XN(e,t){for(const r of e)if(!ate(r,{upTo:t}))return r}function ate(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 ite(e){return e instanceof HTMLInputElement&&"select"in e}function no(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ite(e)&&t&&e.select()}}var ZN=ote();function ote(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=JN(e,t),e.unshift(t)},remove(t){var r;e=JN(e,t),(r=e[0])==null||r.resume()}}}function JN(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function lte(e){return e.filter(t=>t.tagName!=="A")}var cte="Portal",NI=v.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[s,a]=v.useState(!1);Nh(()=>a(!0),[]);const o=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?IF.createPortal(i.jsx(zi.div,{...n,ref:t}),o):null});NI.displayName=cte;function ute(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var R1=e=>{const{present:t,children:r}=e,n=dte(t),s=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),a=mc(n.ref,hte(s));return typeof r=="function"||n.isPresent?v.cloneElement(s,{ref:a}):null};R1.displayName="Presence";function dte(e){const[t,r]=v.useState(),n=v.useRef(null),s=v.useRef(e),a=v.useRef("none"),o=e?"mounted":"unmounted",[l,u]=ute(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const c=cf(n.current);a.current=l==="mounted"?c:"none"},[l]),Nh(()=>{const c=n.current,d=s.current;if(d!==e){const m=a.current,f=cf(c);e?u("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,u]),Nh(()=>
1244{if(t){let c;const d=t.ownerDocument.defaultView??window,h=f=>{const g=cf(n.current).includes(CSS.escape(f.animationName));if(f.target===t&&g&&(u("ANIMATION_END"),!s.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=f=>{f.target===t&&(a.current=cf(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function cf(e){return(e==null?void 0:e.animationName)||"none"}function hte(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var jb=0;function mte(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??eS()),document.body.insertAdjacentElement("beforeend",e[1]??eS()),jb++,()=>{jb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jb--}},[])}function eS(){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 U2=function(e,t){return U2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])},U2(e,t)};function pve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");U2(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ha=function(){return Ha=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ha.apply(this,arguments)};function SI(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function gve(e,t,r,n){function s(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function l(d){try{c(n.next(d))}catch(h){o(h)}}function u(d){try{c(n.throw(d))}catch(h){o(h)}}function c(d){d.done?a(d.value):s(d.value).then(l,u)}c((n=n.apply(e,t||[])).next())})}function xve(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(c){return function(d){return u([c,d])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,s&&(a=c[0]&2?s.return:c[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,c[1])).done)return a;switch(s=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,s=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],s=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function fte(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,a;n<s;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var mp="right-scroll-bar-position",fp="width-before-scroll-bar",pte="with-scroll-bars-hidden",gte="--removed-body-scroll-bar-size";function Ib(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xte(e,t){var r=v.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var bte=typeof window<"u"?v.useLayoutEffect:v.useEffect,tS=new WeakMap;function yte(e,t){var r=xte(null,function(n){return e.forEach(function(s){return Ib(s,n)})});return bte(function(){var n=tS.get(r);if(n){var s=new Set(n),a=new Set(e),o=r.current;
vendor: 4,224 bytes, lines 1244-1259
1244s.forEach(function(l){a.has(l)||Ib(l,null)}),a.forEach(function(l){s.has(l)||Ib(l,o)})}tS.set(r,e)},[e]),r}function vte(e){return e}function wte(e,t){t===void 0&&(t=vte);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(a),o=r}var u=function(){var d=o;o=[],d.forEach(a)},c=function(){return Promise.resolve().then(u)};c(),r={push:function(d){o.push(d),c()},filter:function(d){return o=o.filter(d),r}}}};return s}function Ete(e){e===void 0&&(e={});var t=wte(null);return t.options=Ha({async:!0,ssr:!1},e),t}var TI=function(e){var t=e.sideCar,r=SI(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return v.createElement(n,Ha({},r))};TI.isSideCarExport=!0;function kte(e,t){return e.useMedium(t),TI}var CI=Ete(),Rb=function(){},D1=v.forwardRef(function(e,t){var r=v.useRef(null),n=v.useState({onScrollCapture:Rb,onWheelCapture:Rb,onTouchMoveCapture:Rb}),s=n[0],a=n[1],o=e.forwardProps,l=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,h=e.shards,m=e.sideCar,f=e.noRelative,p=e.noIsolation,g=e.inert,x=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,b=e.gapMode,k=SI(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=m,S=yte([r,t]),j=Ha(Ha({},k),s);return v.createElement(v.Fragment,null,d&&v.createElement(T,{sideCar:CI,removeScrollBar:c,shards:h,noRelative:f,noIsolation:p,inert:g,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:b}),o?v.cloneElement(v.Children.only(l),Ha(Ha({},j),{ref:S})):v.createElement(y,Ha({},j,{className:u,ref:S}),l))});D1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};D1.classNames={fullWidth:fp,zeroRight:mp};var Nte=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ste(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Nte();return t&&e.setAttribute("nonce",t),e}function Tte(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cte(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _te=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ste())&&(Tte(t,r),Cte(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ate=function(){var e=_te();return function(t,r){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},_I=function(){var e=Ate(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},jte={left:0,top:0,right:0,gap:0},Db=function(e){return parseInt(e||"",10)||0},Ite=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Db(r),Db(n),Db(s)]},Rte=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return jte;var t=Ite(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Dte=_I(),Eu="data-scroll-locked",Mte=function(e,t,r,n){var s=e.left,a=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),` 1245 .`.concat(pte,` { 1246 overflow: hidden `).concat(n,`; 1247 padding-right: `).concat(l,"px ").concat(n,`; 1248 } 1249 body[`).concat(Eu,`] { 1250 overflow: hidden `).concat(n,`; 1251 overscroll-behavior: contain; 1252 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 1253 padding-left: `.concat(s,`px; 1254 padding-top: `).concat(a,`px; 1255 padding-right: `).concat(o,`px; 1256 margin-left:0; 1257 margin-top:0; 1258 margin-right: `).concat(l,"px ").concat(n,`; 1259 `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";
1259")].filter(Boolean).join(""),` 1260 } 1261 1262 .`).concat(mp,` { 1263 right: `).concat(l,"px ").concat(n,`; 1264 } 1265 1266 .`).concat(fp,` { 1267 margin-right: `).concat(l,"px ").concat(n,`; 1268 } 1269 1270 .`).concat(mp," .").concat(mp,` { 1271 right: 0 `).concat(n,`; 1272 } 1273 1274 .`).concat(fp," .").concat(fp,` { 1275 margin-right: 0 `).concat(n,`; 1276 } 1277 1278 body[`).concat(Eu,`] { 1279 `).concat(gte,": ").concat(l,`px; 1280 } 1281`)},rS=function(){var e=parseInt(document.body.getAttribute(Eu)||"0",10);return isFinite(e)?e:0},Ote=function(){v.useEffect(function(){return document.body.setAttribute(Eu,(rS()+1).toString()),function(){var e=rS()-1;e<=0?document.body.removeAttribute(Eu):document.body.setAttribute(Eu,e.toString())}},[])},Lte=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;Ote();var a=v.useMemo(function(){return Rte(s)},[s]);return v.createElement(Dte,{styles:Mte(a,!t,s,r?"":"!important")})},$2=!1;if(typeof window<"u")try{var uf=Object.defineProperty({},"passive",{get:function(){return $2=!0,!0}});window.addEventListener("test",uf,uf),window.removeEventListener("test",uf,uf)}catch{$2=!1}var Rc=$2?{passive:!1}:!1,Pte=function(e){return e.tagName==="TEXTAREA"},AI=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Pte(e)&&r[t]==="visible")},Fte=function(e){return AI(e,"overflowY")},Bte=function(e){return AI(e,"overflowX")},nS=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=jI(e,n);if(s){var a=II(e,n),o=a[1],l=a[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Ute=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},$te=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},jI=function(e,t){return e==="v"?Fte(t):Bte(t)},II=function(e,t){return e==="v"?Ute(t):$te(t)},zte=function(e,t){return e==="h"&&t==="rtl"?-1:1},Hte=function(e,t,r,n,s){var a=zte(e,window.getComputedStyle(t).direction),o=a*n,l=r.target,u=t.contains(l),c=!1,d=o>0,h=0,m=0;do{if(!l)break;var f=II(e,l),p=f[0],g=f[1],x=f[2],w=g-x-a*p;(p||w)&&jI(e,l)&&(h+=w,m+=p);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(d&&Math.abs(h)<1||!d&&Math.abs(m)<1)&&(c=!0),c},df=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sS=function(e){return[e.deltaX,e.deltaY]},aS=function(e){return e&&"current"in e?e.current:e},qte=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wte=function(e){return` 1282 .block-interactivity-`.concat(e,` {pointer-events: none;} 1283 .allow-interactivity-`).concat(e,` {pointer-events: all;} 1284`)},Vte=0,Dc=[];function Gte(e){var t=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),s=v.useState(Vte++)[0],a=v.useState(_I)[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=fte([e.lockRef.current],(e.shards||[]).map(aS),!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 w=df(g),y=r.current,b="deltaX"in g?g.deltaX:y[0]-w[0],k="deltaY"in g?g.deltaY:y[1]-w[1],T,S=g.target,j=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in g&&j==="h"&&S.type==="range")return!1;var E=window.getSelection(),A=E&&E.anchorNode,R=A?A===S||A.contains(S):!1;if(R)return!1;var M=nS(j,S);if(!M)return!0;if(M?T=j:(T=j==="v"?"h":"v",M=nS(j,S)),!M)return!1;if(!n.current&&"changedTouches"in g&&(b||k)&&(n.current=T),!T)return!0;var B=n.current||T;return Hte(B,x,g,B==="h"?b:k)},[]),u=v.useCallback(function(g){var x=g;if(!(!Dc.length||Dc[Dc.length-1]!==a)){var w="deltaY"in x?sS(x):df(x),y=t.current.filter(function(T){return T.name===x.type&&(T.target===x.target||x.target===T.shadowParent)&&qte(T.delta,w)})[0];if(y&&y.should){x.cancelable&&x.preventDefault();return}
vendor: 4,104 bytes, line 1284
1284if(!y){var b=(o.current.shards||[]).map(aS).filter(Boolean).filter(function(T){return T.contains(x.target)}),k=b.length>0?l(x,b[0]):!o.current.noIsolation;k&&x.cancelable&&x.preventDefault()}}},[]),c=v.useCallback(function(g,x,w,y){var b={name:g,delta:x,target:w,should:y,shadowParent:Kte(w)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),d=v.useCallback(function(g){r.current=df(g),n.current=void 0},[]),h=v.useCallback(function(g){c(g.type,sS(g),g.target,l(g,e.lockRef.current))},[]),m=v.useCallback(function(g){c(g.type,df(g),g.target,l(g,e.lockRef.current))},[]);v.useEffect(function(){return Dc.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Rc),document.addEventListener("touchmove",u,Rc),document.addEventListener("touchstart",d,Rc),function(){Dc=Dc.filter(function(g){return g!==a}),document.removeEventListener("wheel",u,Rc),document.removeEventListener("touchmove",u,Rc),document.removeEventListener("touchstart",d,Rc)}},[]);var f=e.removeScrollBar,p=e.inert;return v.createElement(v.Fragment,null,p?v.createElement(a,{styles:Wte(s)}):null,f?v.createElement(Lte,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Kte(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Yte=kte(CI,Gte);var RI=v.forwardRef(function(e,t){return v.createElement(D1,Ha({},e,{ref:t,sideCar:Yte}))});RI.classNames=D1.classNames;var Qte=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mc=new WeakMap,hf=new WeakMap,mf={},Mb=0,DI=function(e){return e&&(e.host||DI(e.parentNode))},Xte=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=DI(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Zte=function(e,t,r,n){var s=Xte(t,Array.isArray(e)?e:[e]);mf[r]||(mf[r]=new WeakMap);var a=mf[r],o=[],l=new Set,u=new Set(s),c=function(h){!h||l.has(h)||(l.add(h),c(h.parentNode))};s.forEach(c);var d=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(m){if(l.has(m))d(m);else try{var f=m.getAttribute(n),p=f!==null&&f!=="false",g=(Mc.get(m)||0)+1,x=(a.get(m)||0)+1;Mc.set(m,g),a.set(m,x),o.push(m),g===1&&p&&hf.set(m,!0),x===1&&m.setAttribute(r,"true"),p||m.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",m,w)}})};return d(t),l.clear(),Mb++,function(){o.forEach(function(h){var m=Mc.get(h)-1,f=a.get(h)-1;Mc.set(h,m),a.set(h,f),m||(hf.has(h)||h.removeAttribute(n),hf.delete(h)),f||h.removeAttribute(r)}),Mb--,Mb||(Mc=new WeakMap,Mc=new WeakMap,hf=new WeakMap,mf={})}},Jte=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=Qte(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Zte(n,s,r,"aria-hidden")):function(){return null}},M1="Dialog",[MI]=Dee(M1),[ere,Ea]=MI(M1),OI=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:a,modal:o=!0}=e,l=v.useRef(null),u=v.useRef(null),[c,d]=Fee({prop:n,defaultProp:s??!1,onChange:a,caller:M1});return i.jsx(ere,{scope:t,triggerRef:l,contentRef:u,contentId:ji(),titleId:ji(),descriptionId:ji(),open:c,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(h=>!h),[d]),modal:o,children:r})};OI.displayName=M1;var LI="DialogTrigger",tre=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ea(LI,r),a=mc(t,s.triggerRef);return i.jsx(zi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":q3(s.open),...n,ref:a,onClick:zo(e.onClick,s.onOpenToggle)})});tre.displayName=LI;var z3="DialogPortal",[rre,PI]=MI(z3,{forceMount:void 0}),FI=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,a=Ea(z3,t);return i.jsx(rre,{scope:t,forceMount:r,children:v.Children.map(n,o=>i.jsx(R1,{present:r||a.open,children:i.jsx(NI,{asChild:!0,container:s,children:o})}))})};FI.displayName=z3;var bg="DialogOverlay",BI=v.forwardRef((e,t)=>
vendor: 16,268 bytes, lines 1284-1288
1284{const r=PI(bg,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,a=Ea(bg,e.__scopeDialog);return a.modal?i.jsx(R1,{present:n||a.open,children:i.jsx(sre,{...s,ref:t})}):null});BI.displayName=bg;var nre=bI("DialogOverlay.RemoveScroll"),sre=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ea(bg,r);return i.jsx(RI,{as:nre,allowPinchZoom:!0,shards:[s.contentRef],children:i.jsx(zi.div,{"data-state":q3(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ic="DialogContent",UI=v.forwardRef((e,t)=>{const r=PI(ic,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,a=Ea(ic,e.__scopeDialog);return i.jsx(R1,{present:n||a.open,children:a.modal?i.jsx(are,{...s,ref:t}):i.jsx(ire,{...s,ref:t})})});UI.displayName=ic;var are=v.forwardRef((e,t)=>{const r=Ea(ic,e.__scopeDialog),n=v.useRef(null),s=mc(t,r.contentRef,n);return v.useEffect(()=>{const a=n.current;if(a)return Jte(a)},[]),i.jsx($I,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zo(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:zo(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:zo(e.onFocusOutside,a=>a.preventDefault())})}),ire=v.forwardRef((e,t)=>{const r=Ea(ic,e.__scopeDialog),n=v.useRef(!1),s=v.useRef(!1);return i.jsx($I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:a=>{var u,c;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=a.target;((c=r.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),$I=v.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:a,...o}=e,l=Ea(ic,r),u=v.useRef(null),c=mc(t,u);return mte(),i.jsxs(i.Fragment,{children:[i.jsx(EI,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:a,children:i.jsx(vI,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q3(l.open),...o,ref:c,onDismiss:()=>l.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(ure,{titleId:l.titleId}),i.jsx(hre,{contentRef:u,descriptionId:l.descriptionId})]})]})}),H3="DialogTitle",ore=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ea(H3,r);return i.jsx(zi.h2,{id:s.titleId,...n,ref:t})});ore.displayName=H3;var zI="DialogDescription",lre=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ea(zI,r);return i.jsx(zi.p,{id:s.descriptionId,...n,ref:t})});lre.displayName=zI;var HI="DialogClose",cre=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Ea(HI,r);return i.jsx(zi.button,{type:"button",...n,ref:t,onClick:zo(e.onClick,()=>s.onOpenChange(!1))})});cre.displayName=HI;function q3(e){return e?"open":"closed"}var qI="DialogTitleWarning",[bve,WI]=Ree(qI,{contentName:ic,titleName:H3,docsSlug:"dialog"}),ure=({titleId:e})=>{const t=WI(qI),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 1285 1286If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 1287 1288For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},dre="DialogDescriptionWarning",hre=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${WI(dre).contentName}}.`;return v.useEffect(()=>{var a;const s=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},mre=OI,fre=FI,pre=BI,gre=UI,xre=Symbol.for("react.lazy"),yg=Fg[" use ".trim().toString()];function bre(e){return typeof e=="object"&&e!==null&&"then"in e}function VI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===xre&&"_payload"in e&&bre(e._payload)}function yre(e){const t=vre(e),r=v.forwardRef((n,s)=>{let{children:a,...o}=n;VI(a)&&typeof yg=="function"&&(a=yg(a._payload));const l=v.Children.toArray(a),u=l.find(Ere);if(u){const c=u.props.children,d=l.map(h=>h===u?v.Children.count(c)>1?v.Children.only(null):v.isValidElement(c)?c.props.children:null:h);return i.jsx(t,{...o,ref:s,children:v.isValidElement(c)?v.cloneElement(c,void 0,d):null})}return i.jsx(t,{...o,ref:s,children:a})});return r.displayName=`${e}.Slot`,r}function vre(e){const t=v.forwardRef((r,n)=>{let{children:s,...a}=r;if(VI(s)&&typeof yg=="function"&&(s=yg(s._payload)),v.isValidElement(s)){const o=Nre(s),l=kre(a,s.props);return s.type!==v.Fragment&&(l.ref=n?Vo(n,o):o),v.cloneElement(s,l)}return v.Children.count(s)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wre=Symbol("radix.slottable");function Ere(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wre}function kre(e,t){const r={...t};for(const n in t){const s=e[n],a=t[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...l)=>{const u=a(...l);return s(...l),u}:s&&(r[n]=s):n==="style"?r[n]={...s,...a}:n==="className"&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...e,...r}}function Nre(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sre=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],il=Sre.reduce((e,t)=>{const r=yre(`Primitive.${t}`),n=v.forwardRef((s,a)=>{const{asChild:o,...l}=s,u=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(u,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),i0='[cmdk-group=""]',Ob='[cmdk-group-items=""]',Tre='[cmdk-group-heading=""]',GI='[cmdk-item=""]',iS=`${GI}:not([aria-disabled="true"])`,z2="cmdk-item-select",zc="data-value",Cre=(e,t,r)=>Iee(e,t,r),KI=v.createContext(void 0),am=()=>v.useContext(KI),YI=v.createContext(void 0),W3=()=>v.useContext(YI),QI=v.createContext(void 0),XI=v.forwardRef((e,t)=>{let r=Hc(()=>{var V,C;return{search:"",value:(C=(V=e.value)!=null?V:e.defaultValue)!=null?C:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Hc(()=>new Set),s=Hc(()=>new Map),a=Hc(()=>new Map),o=Hc(()=>new Set),l=ZI(e),{label:u,children:c,value:d,onValueChange:h,filter:m,shouldFilter:f,loop:p,disablePointerSelection:g=!1,vimBindings:x=!0,...w}=e,y=ji(),b=ji(),k=ji(),T=v.useRef(null),S=Fre();oc(()=>{if(d!==void 0){let V=d.trim();r.current.value=V,j.emit()}},[d]),oc(()=>{S(6,W)},[]);let j=v.useMemo(()=>({subscribe:V=>(o.current.add(V),()=>o.current.delete(V)),snapshot:()=>r.current,setState:(V,C,O)=>{var q,ne,he,xe;if(!Object.is(r.current[V],C)){if(r.current[V]=C,V==="search")B(),R(),S(1,M);else if(V==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Oe=document.getElementById(k);Oe?Oe.focus():(q=document.getElementById(y))==null||q.focus()}if(S(7,()=>{var Oe;r.current.selectedItemId=(Oe=H())==null?void 0:Oe.id,j.emit()}),O||S(5,W),((ne=l.current)==null?void 0:ne.value)!==void 0){let Oe=C??"";(xe=(he=l.current).onValueChange)==null||xe.call(he,Oe);return}}j.emit()}},emit:()=>{o.current.forEach(V=>V())}}),[]),E=v.useMemo(()=>({value:(V,C,O)=>{var q;C!==((q=a.current.get(V))==null?void 0:q.value)&&(a.current.set(V,{value:C,keywords:O}),r.current.filtered.items.set(V,A(C,O)),S(2,()=>{R(),j.emit()}))},item:(V,C)=>(n.current.add(V),C&&(s.current.has(C)?s.current.get(C).add(V):s.current.set(C,new Set([V]))),S(3,()=>{B(),R(),r.current.value||M(),j.emit()}),()=>{a.current.delete(V),n.current.delete(V),r.current.filtered.items.delete(V);let O=H();S(4,()=>{B(),(O==null?void 0:O.getAttribute("id"))===V&&M(),j.emit()})}),group:V=>(s.current.has(V)||s.current.set(V,new Set),()=>{a.current.delete(V),s.current.delete(V)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:y,inputId:k,labelId:b,listInnerRef:T}),[]);function A(V,C){var O,q;let ne=(q=(O=l.current)==null?void 0:O.filter)!=null?q:Cre;return V?ne(V,r.current.search,C):0}function R(){if(!r.current.search||l.current.shouldFilter===!1)return;let V=r.current.filtered.items,C=[];r.current.filtered.groups.forEach(q=>{let ne=s.current.get(q),he=0;ne.forEach(xe=>{let Oe=V.get(xe);he=Math.max(Oe,he)}),C.push([q,he])});let O=T.current;L().sort((q,ne)=>{var he,xe;let Oe=q.getAttribute("id"),Se=ne.getAttribute("id");return((he=V.get(Se))!=null?he:0)-((xe=V.get(Oe))!=null?xe:0)}).forEach(q=>{let ne=q.closest(Ob);ne?ne.appendChild(q.parentElement===ne?q:q.closest(`${Ob} > *`)):O.appendChild(q.parentElement===O?q:q.closest(`${Ob} > *`))}),C.sort((q,ne)=>ne[1]-q[1]).forEach(q=>{var ne;let he=(ne=T.current)==null?void 0:ne.querySelector(`${i0}[${zc}="${encodeURIComponent(q[0])}"]`);he==null||he.parentElement.appendChild(he)})}function M(){let V=L().find(O=>O.getAttribute("aria-disabled")!=="true"),C=V==null?void 0:V.getAttribute(zc);j.setState("value",C||void 0)}function B(){var V,C,O,q;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let ne=0;for(let he of n.current){let xe=(C=(V=a.current.get(he))==null?void 0:V.value)!=null?C:"",Oe=(q=(O=a.current.get(he))==null?void 0:O.keywords)!=null?q:[],Se=A(xe,Oe);r.current.filtered.items.set(he,Se),Se>0&&ne++}for(let[he,xe]of s.current)for(let Oe of xe)if(r.current.filtered.items.get(Oe)>0){r.current.filtered.groups.add(he);break}r.current.filtered.count=ne}function W(){var V,C,O;let q=H();q&&(((V=q.parentElement)==null?void 0:V.firstChild)===q&&((O=(C=q.closest(i0))==null?void 0:C.querySelector(Tre))==null||O.scrollIntoView({block:"nearest"})),q.scrollIntoView({block:"nearest"}))}function H(){var V;return(V=T.current)==null?void 0:V.querySelector(`${GI}[aria-selected="true"]`)}function L(){var V;return Array.from(((V=T.current)==null?void 0:V.querySelectorAll(iS))||[])}function $(V){let C=L()[V];C&&j.setState("value",C.getAttribute(zc))}function ee(V){var C;let O=H(),q=L(),ne=q.findIndex(xe=>xe===O),he=q[ne+V];(C=l.current)!=null&&C.loop&&(he=ne+V<0?q[q.length-1]:ne+V===q.length?q[0]:q[ne+V]),he&&j.setState("value",he.getAttribute(zc))}function G(V){let C=H(),O=C==null?void 0:C.closest(i0),q;for(;O&&!q;)O=V>0?Lre(O,i0):Pre(O,i0),q=O==null?void 0:O.querySelector(iS);q?j.setState("value",q.getAttribute(zc)):ee(V)}let Q=()=>$(L().length-1),D=V=>{V.preventDefault(),V.metaKey?Q():V.altKey?G(1):ee(1)},K=V=>{V.preventDefault(),V.metaKey?$(0):V.altKey?G(-1):ee(-1)};return v.createElement(il.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:V=>{var C;(C=w.onKeyDown)==null||C.call(w,V);let O=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||O))switch(V.key){case"n":case"j":{x&&V.ctrlKey&&D(V);break}case"ArrowDown":{D(V);break}case"p":case"k":{x&&V.ctrlKey&&K(V);break}case"ArrowUp":{K(V);break}case"Home":{V.preventDefault(),$(0);break}case"End":{V.preventDefault(),Q();break}case"Enter":{V.preventDefault();let q=H();if(q){let ne=new Event(z2);q.dispatchEvent(ne)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Ure},u),O1(e,V=>v.createElement(YI.Provider,{value:j},v.createElement(KI.Provider,{value:E},V))))}),_re=v.forwardRef((e,t)=>{var r,n;let s=ji(),a=v.useRef(null),o=v.useContext(QI),l=am(),u=ZI(e),c=(n=(r=u.current)==null?void 0:r.forceMount)!=null?n:o==null?void 0:o.forceMount;oc(()=>{if(!c)return l.item(s,o==null?void 0:o.id)},[c]);let d=JI(s,a,[e.value,e.children,a],e.keywords),h=W3(),m=Go(S=>S.value&&S.value===d.current),f=Go(S=>c||l.filter()===!1?!0:S.search?S.filtered.items.get(s)>0:!0);v.useEffect(()=>{let S=a.current;if(!(!S||e.disabled))return S.addEventListener(z2,p),()=>S.removeEventListener(z2,p)},[f,e.onSelect,e.disabled]);function p(){var S,j;g(),(j=(S=u.current).onSelect)==null||j.call(S,d.current)}function g(){h.setState("value",d.current,!0)}if(!f)return null;let{disabled:x,value:w,onSelect:y,forceMount:b,keywords:k,...T}=e;return v.createElement(il.div,{ref:Vo(a,t),...T,id:s,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!m,"data-disabled":!!x,"data-selected":!!m,onPointerMove:x||l.getDisablePointerSelection()?void 0:g,onClick:x?void 0:p},e.children)}),Are=v.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:s,...a}=e,o=ji(),l=v.useRef(null),u=v.useRef(null),c=ji(),d=am(),h=Go(f=>s||d.filter()===!1?!0:f.search?f.filtered.groups.has(o):!0);oc(()=>d.group(o),[]),JI(o,l,[e.value,e.heading,u]);let m=v.useMemo(()=>({id:o,forceMount:s}),[s]);return v.createElement(il.div,{ref:Vo(l,t),...a,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&v.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),O1(e,f=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},v.createElement(QI.Provider,{value:m},f))))}),jre=v.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,s=v.useRef(null),a=Go(o=>!o.search);return!r&&!a?null:v.createElement(il.div,{ref:Vo(s,t),...n,"cmdk-separator":"",role:"separator"})}),Ire=v.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,s=e.value!=null,a=W3(),o=Go(c=>c.search),l=Go(c=>c.selectedItemId),u=am();return v.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),v.createElement(il.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:s?e.value:o,onChange:c=>{s||a.setState("search",c.target.value),r==null||r(c.target.value)}})}),Rre=v.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...s}=e,a=v.useRef(null),o=v.useRef(null),l=Go(c=>c.selectedItemId),u=am();return v.useEffect(()=>{if(o.current&&a.current){let c=o.current,d=a.current,h,m=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let f=c.offsetHeight;d.style.setProperty("--cmdk-list-height",f.toFixed(1)+"px")})});return m.observe(c),()=>{cancelAnimationFrame(h),m.unobserve(c)}}},[]),v.createElement(il.div,{ref:Vo(a,t),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":n,id:u.listId},O1(e,c=>v.createElement("div",{ref:Vo(o,u.listInnerRef),"cmdk-list-sizer":""},c)))}),Dre=v.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:s,contentClassName:a,container:o,...l}=e;return v.createElement(mre,{open:r,onOpenChange:n},v.createElement(fre,{container:o},v.createElement(pre,{"cmdk-overlay":"",className:s}),v.createElement(gre,{"aria-label":e.label,"cmdk-dialog":"",className:a},v.createElement(XI,{ref:t,...l}))))}),Mre=v.forwardRef((e,t)=>Go(r=>r.filtered.count===0)?v.createElement(il.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Ore=v.forwardRef((e,t)=>{let{progress:r,children:n,label:s="Loading...",...a}=e;return v.createElement(il.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},O1(e,o=>v.createElement("div",{"aria-hidden":!0},o)))}),Oc=Object.assign(XI,{List:Rre,Item:_re,Input:Ire,Group:Are,Separator:jre,Dialog:Dre,Empty:Mre,Loading:Ore});function Lre(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Pre(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function ZI(e){let t=v.useRef(e);return oc(()=>{t.current=e}),t}var oc=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Hc(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function Go(e){let t=W3(),r=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,r,r)}function JI(e,t,r,n=[]){let s=v.useRef(),a=am();return oc(()=>{var o;let l=(()=>{var c;
1288for(let d of r){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(c=d.current.textContent)==null?void 0:c.trim():s.current}})(),u=n.map(c=>c.trim());a.value(e,l,u),(o=t.current)==null||o.setAttribute(zc,l),s.current=l}),s}var Fre=()=>{let[e,t]=v.useState(),r=Hc(()=>new Map);return oc(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,s)=>{r.current.set(n,s),t({})}};function Bre(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function O1({asChild:e,children:t},r){return e&&v.isValidElement(t)?v.cloneElement(Bre(t),{ref:t.ref},r(t.props.children)):r(t)}var Ure={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const di=Yt.create({baseURL:"/api/v1"}),Ko={getLanguages:()=>di.get("/cms/languages").then(e=>e.data),getDocsTree:e=>di.get("/cms/docs/tree",{params:{lang:e}}).then(t=>t.data),getDoc:(e,t)=>di.get(`/cms/docs/${e}`,{params:{lang:t}}).then(r=>r.data),getBlogList:(e,t=1)=>di.get("/cms/blog",{params:{lang:e,page:t}}).then(r=>r.data),getBlogPost:(e,t)=>di.get(`/cms/blog/${e}`,{params:{lang:t}}).then(r=>r.data),getAnnouncementList:(e,t=1)=>di.get("/cms/announcements",{params:{lang:e,page:t}}).then(r=>r.data),getAnnouncement:(e,t)=>di.get(`/cms/announcements/${e}`,{params:{lang:t}}).then(r=>r.data),submitFeedback:e=>di.post("/cms/feedback",e).then(t=>t.data),search:(e,t,r)=>di.get("/cms/search",{params:{q:e,lang:t,limit:r}}).then(n=>n.data)};function $re(){const{t:e}=We(),t=Er(),{lang:r="zh-CN"}=Ut(),[n,s]=v.useState(!1),[a,o]=v.useState(""),[l,u]=v.useState([]),[c,d]=v.useState(!1);v.useEffect(()=>{const m=f=>{(f.metaKey||f.ctrlKey)&&f.key.toLowerCase()==="k"&&(f.preventDefault(),s(p=>!p))};return document.addEventListener("keydown",m,!0),()=>document.removeEventListener("keydown",m,!0)},[]),v.useEffect(()=>{n||(o(""),u([]))},[n]),v.useEffect(()=>{const m=a.trim();if(!m){u([]),d(!1);return}d(!0);const f=setTimeout(async()=>{try{const{results:p}=await Ko.search(m,r);u(p)}catch{u([])}finally{d(!1)}},150);return()=>clearTimeout(f)},[a,r]);const h=v.useCallback(m=>{s(!1),t(`/${r}/docs/${m}`)},[r,t]);return i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button",onClick:()=>s(!0),"aria-label":e("cms.search"),className:"w-full max-w-md inline-flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-[var(--text-tertiary)] border border-[var(--border-default)] bg-[var(--bg-secondary)] hover:text-[var(--text-primary)] hover:border-ui-accent/40 transition-colors",children:[i.jsx(yh,{className:"w-4 h-4 shrink-0"}),i.jsx("span",{className:"hidden sm:inline",children:e("cms.searchPlaceholder")}),i.jsx("kbd",{className:"hidden sm:inline ml-auto px-1.5 py-0.5 rounded bg-[var(--bg-tertiary)] text-[10px] font-mono text-[var(--text-tertiary)]",children:"âK"})]}),i.jsxs(Oc.Dialog,{open:n,onOpenChange:s,shouldFilter:!1,label:e("cms.search"),className:"fixed inset-0 z-50 flex items-start justify-center pt-[12vh] px-4",children:[i.jsx("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>s(!1),"aria-hidden":"true"}),i.jsxs("div",{className:"relative w-full max-w-xl rounded-2xl border border-[var(--border-default)] bg-[var(--bg-primary)] shadow-2xl overflow-hidden",children:[i.jsxs("div",{className:"flex items-center gap-2 px-4 border-b border-[var(--border-default)]",children:[i.jsx(yh,{className:"w-4 h-4 text-[var(--text-tertiary)] shrink-0"}),i.jsx(Oc.Input,{value:a,onValueChange:o,placeholder:e("cms.searchPlaceholder"),className:"flex-1 h-12 bg-transparent outline-none text-[var(--text-primary)] placeholder:text-[var(--text-tertiary)] text-sm"}),c&&i.jsx(kn,{className:"w-4 h-4 text-[var(--text-tertiary)] animate-spin shrink-0"})]}),i.jsxs(Oc.List,{className:"max-h-[60vh] overflow-y-auto p-2",children:[i.jsx(Oc.Empty,{className:"py-8 text-center text-sm text-[var(--text-tertiary)]",children:a.trim()?e("cms.searchNoResults"):e("cms.searchHint")}),l.length>0&&i.jsx(Oc.Group,{heading:e("cms.docs"),className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-[var(--text-tertiary)] [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider",children:l.map(m=>i.jsxs(Oc.Item,{value:`${m.slug} ${m.title}`,onSelect:()=>h(m.slug),className:"flex items-start gap-3 px-3 py-2.5 rounded-lg cursor-pointer text-[var(--text-secondary)] data-[selected=true]:bg-[var(--bg-secondary)] data-[selected=true]:text-[var(--text-primary)]",children:[i.jsx(Qr,{className:"w-4 h-4 mt-0.5 shrink-0 text-ui-accent"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm font-medium truncate",children:m.title}),m.product&&i.jsx("span",{className:"shrink-0 text-[10px] px-1.5 py-0.5 rounded-full bg-ui-accent/10 text-ui-accent border border-ui-accent/20",children:m.product})]}),m.snippet&&i.jsx("p",{className:"text-xs text-[var(--text-tertiary)] truncate mt-0.5",children:m.snippet})]})]},`${m.slug}:${m.lang}`))})]}),i.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-t border-[var(--border-default)] text-[10px] text-[var(--text-tertiary)]",children:[i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(TV,{className:"w-3 h-3"})," ",e("cms.searchOpen")]}),i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx("kbd",{className:"px-1 rounded bg-[var(--bg-tertiary)]",children:"esc"})," ",e("cms.searchClose")]})]})]})]})]})}function md({children:e,sidebar:t,rightSidebar:r}){const{t:n}=We(),{lang:s="zh-CN"}
1288=Ut(),a=Xn(),[o,l]=v.useState(!1),u=[{path:`/${s}/docs`,label:n("cms.docs")},{path:`/${s}/announcements`,label:n("cms.announcements")},{path:`/${s}/blog`,label:n("cms.blog")}],c=d=>a.pathname.startsWith(d);return i.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--bg-primary)]",children:[i.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 focus:z-50 focus:px-4 focus:py-2 focus:rounded-lg focus:bg-ui-accent focus:text-white focus:shadow-lg focus:outline-none focus:ring-2 focus:ring-ui-accent/50",children:n("cms.skipToContent")}),i.jsx("header",{className:"sticky top-0 z-10 border-b border-[var(--border-default)] bg-[var(--bg-primary)]/95 backdrop-blur-md",children:i.jsxs("div",{className:"max-w-[1440px] mx-auto px-5 md:px-10 flex items-center h-14 gap-6",children:[t&&i.jsx("button",{onClick:()=>l(!o),className:"md:hidden p-2 -ml-2 rounded-lg hover:bg-[var(--bg-secondary)] transition-colors","aria-label":"Toggle sidebar",children:i.jsx(s3,{className:"w-5 h-5"})}),i.jsxs(Ke,{to:`/${s}`,className:"flex items-center gap-2 font-bold text-lg text-[var(--text-primary)]",children:[i.jsx("img",{src:"/logos/uniai-64.png",alt:"UniAI",className:"w-7 h-7"}),"UniAI"]}),i.jsx("nav",{className:"flex gap-1",children:u.map(d=>i.jsx(Ke,{to:d.path,className:Uo("px-3.5 py-1.5 rounded-lg text-sm font-medium transition-colors",c(d.path)?"bg-[var(--bg-tertiary)] text-[var(--text-primary)]":"text-[var(--text-tertiary)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-secondary)]"),children:d.label},d.path))}),i.jsx("div",{className:"flex-1 flex justify-center px-2",children:i.jsx($re,{})}),i.jsx(Eee,{})]})}),i.jsxs("div",{className:"flex flex-1 max-w-[1440px] mx-auto w-full",children:[t&&i.jsx("aside",{className:"w-64 shrink-0 hidden md:block",children:i.jsx("div",{className:"sticky top-14 h-[calc(100vh-3.5rem)] overflow-y-auto py-8 px-5 md:pl-10 md:pr-4 border-r border-[var(--border-default)]",children:t})}),t&&o&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"fixed inset-0 bg-black/50 z-30 md:hidden",onClick:()=>l(!1)}),i.jsxs("aside",{className:"fixed inset-y-0 left-0 w-72 bg-[var(--bg-primary)] border-r border-[var(--border-default)] z-40 md:hidden overflow-y-auto",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[var(--border-default)]",children:[i.jsx("span",{className:"font-semibold text-[var(--text-primary)]",children:n("cms.docs")}),i.jsx("button",{onClick:()=>l(!1),className:"p-1.5 rounded-lg hover:bg-[var(--bg-secondary)] transition-colors",children:i.jsx(cr,{className:"w-5 h-5"})})]}),i.jsx("div",{className:"p-4",onClick:()=>l(!1),children:t})]})]}),i.jsx("main",{id:"main-content",tabIndex:-1,className:"flex-1 min-w-0 py-8 px-6 md:px-12 focus:outline-none",children:e}),r&&i.jsx("aside",{className:"w-60 shrink-0 hidden xl:block",children:i.jsx("div",{className:"sticky top-14 h-[calc(100vh-3.5rem)] overflow-y-auto py-8 px-4 pr-10 border-l border-[var(--border-default)]",children:r})})]})]})}function eR({node:e,currentSlug:t,lang:r,indent:n=0}){const[s,a]=v.useState(!0),o=e.children.length>0,l=e.slug===t,u=!e.slug&&o;return i.jsxs("div",{className:u&&n===0?"mt-7 first:mt-0":"",children:[u?i.jsxs("button",{onClick:()=>a(c=>!c),className:"group flex items-center gap-2 w-full py-2 mb-1 text-sm font-bold text-[var(--text-primary)] transition-colors cursor-pointer",children:[i.jsx("span",{className:"flex items-center justify-center w-5 h-5 rounded-md bg-ui-accent/10 text-ui-accent transition-colors group-hover:bg-ui-accent/20",children:s?i.jsx(dn,{className:"w-3.5 h-3.5"}):i.jsx(Gs,{className:"w-3.5 h-3.5"})}),e.label]}):i.jsx("div",{style:{paddingLeft:`${n*8}px`},children:e.slug?i.jsx(Ke,{to:`/${r}/docs/${e.slug}`,"aria-current":l?"page":void 0,className:Uo("group block py-2 px-3 rounded-lg text-sm transition-all cursor-pointer",l?"bg-gradient-to-r from-ui-accent/10 to-ui-accent/5 text-ui-accent font-semibold shadow-sm shadow-ui-accent/5 border border-ui-accent/15":"text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-secondary)] hover:pl-4"),children:e.label}):i.jsx("span",{className:"block py-2 px-3 text-sm font-semibold text-[var(--text-primary)] cursor-pointer",onClick:()=>a(c=>!c),children:e.label})}),s&&o&&i.jsx("div",{className:u?"ml-[10px] pl-2":"",children:e.children.map(c=>i.jsx(eR,{node:c,currentSlug:t,lang:r,indent:n+1},c.id))})]})}function zre({nodes:e,currentSlug:t,lang:r}){return i.jsx("nav",{className:"space-y-0.5",children:e.map(n=>i.jsx(eR,{node:n,currentSlug:t,lang:r},n.id))})}function oS(e){const t=[],r=String(e||"");let n=r.indexOf(","),s=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const o=r.slice(s,n).trim();
vendor: 4,432 bytes, line 1288
1288(o||!a)&&t.push(o),s=n+1,n=r.indexOf(",",s)}return t}function tR(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const Hre=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wre={};function lS(e,t){return(Wre.jsx?qre:Hre).test(e)}const Vre=/[ \t\n\f\r]/g;function Gre(e){return typeof e=="object"?e.type==="text"?cS(e.value):!1:cS(e)}function cS(e){return e.replace(Vre,"")===""}class im{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}im.prototype.normal={};im.prototype.property={};im.prototype.space=void 0;function rR(e,t){const r={},n={};for(const s of e)Object.assign(r,s.property),Object.assign(n,s.normal);return new im(r,n,t)}function Th(e){return e.toLowerCase()}class hs{constructor(t,r){this.attribute=r,this.property=t}}hs.prototype.attribute="";hs.prototype.booleanish=!1;hs.prototype.boolean=!1;hs.prototype.commaOrSpaceSeparated=!1;hs.prototype.commaSeparated=!1;hs.prototype.defined=!1;hs.prototype.mustUseProperty=!1;hs.prototype.number=!1;hs.prototype.overloadedBoolean=!1;hs.prototype.property="";hs.prototype.spaceSeparated=!1;hs.prototype.space=void 0;let Kre=0;const Et=fc(),Or=fc(),H2=fc(),He=fc(),nr=fc(),ku=fc(),gs=fc();function fc(){return 2**++Kre}const q2=Object.freeze(Object.defineProperty({__proto__:null,boolean:Et,booleanish:Or,commaOrSpaceSeparated:gs,commaSeparated:ku,number:He,overloadedBoolean:H2,spaceSeparated:nr},Symbol.toStringTag,{value:"Module"})),Lb=Object.keys(q2);class V3 extends hs{constructor(t,r,n,s){let a=-1;if(super(t,r),uS(this,"space",s),typeof n=="number")for(;++a<Lb.length;){const o=Lb[a];uS(this,Lb[a],(n&q2[o])===q2[o])}}}V3.prototype.defined=!0;function uS(e,t,r){r&&(e[t]=r)}function fd(e){const t={},r={};for(const[n,s]of Object.entries(e.properties)){const a=new V3(n,e.transform(e.attributes||{},n),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[Th(n)]=n,r[Th(a.attribute)]=n}return new im(t,r,e.space)}const nR=fd({properties:{ariaActiveDescendant:null,ariaAtomic:Or,ariaAutoComplete:null,ariaBusy:Or,ariaChecked:Or,ariaColCount:He,ariaColIndex:He,ariaColSpan:He,ariaControls:nr,ariaCurrent:null,ariaDescribedBy:nr,ariaDetails:null,ariaDisabled:Or,ariaDropEffect:nr,ariaErrorMessage:null,ariaExpanded:Or,ariaFlowTo:nr,ariaGrabbed:Or,ariaHasPopup:null,ariaHidden:Or,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nr,ariaLevel:He,ariaLive:null,ariaModal:Or,ariaMultiLine:Or,ariaMultiSelectable:Or,ariaOrientation:null,ariaOwns:nr,ariaPlaceholder:null,ariaPosInSet:He,ariaPressed:Or,ariaReadOnly:Or,ariaRelevant:null,ariaRequired:Or,ariaRoleDescription:nr,ariaRowCount:He,ariaRowIndex:He,ariaRowSpan:He,ariaSelected:Or,ariaSetSize:He,ariaSort:null,ariaValueMax:He,ariaValueMin:He,ariaValueNow:He,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function sR(e,t){return t in e?e[t]:t}function aR(e,t){return sR(e,t.toLowerCase())}const Yre=fd({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ku,acceptCharset:nr,accessKey:nr,action:null,allow:null,allowFullScreen:Et,allowPaymentRequest:Et,allowUserMedia:Et,alt:null,as:null,async:Et,autoCapitalize:null,autoComplete:nr,autoFocus:Et,autoPlay:Et,blocking:nr,capture:null,charSet:null,checked:Et,cite:null,className:nr,cols:He,colSpan:null,content:null,contentEditable:Or,controls:Et,controlsList:nr,coords:He|ku,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Et,defer:Et,dir:null,dirName:null,disabled:Et,download:H2,draggable:Or,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Et,formTarget:null,headers:nr,height:He,hidden:H2,high:He,href:null,hrefLang:null,htmlFor:nr,httpEquiv:nr,id:null,imageSizes:null,imageSrcSet:null,inert:Et,inputMode:null,integrity:null,is:null,isMap:Et,itemId:null,itemProp:nr,itemRef:nr,itemScope:Et,itemType:nr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Et,low:He,manifest:null,max:null,maxLength:He,media:null,method:null,min:null,minLength:He,multiple:Et,muted:Et,name:null,nonce:null,noModule:Et,noValidate:Et,onAbort:null,onAfterPrint:null,onAuxCl
1288ick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Et,optimum:He,pattern:null,ping:nr,placeholder:null,playsInline:Et,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Et,referrerPolicy:null,rel:nr,required:Et,reversed:Et,rows:He,rowSpan:He,sandbox:nr,scope:null,scoped:Et,seamless:Et,selected:Et,shadowRootClonable:Et,shadowRootDelegatesFocus:Et,shadowRootMode:null,shape:null,size:He,sizes:null,slot:null,span:He,spellCheck:Or,src:null,srcDoc:null,srcLang:null,srcSet:null,start:He,step:null,style:null,tabIndex:He,target:null,title:null,translate:null,type:null,typeMustMatch:Et,useMap:null,value:Or,width:He,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nr,axis:null,background:null,bgColor:null,border:He,borderColor:null,bottomMargin:He,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Et,declare:Et,event:null,face:null,frame:null,frameBorder:null,hSpace:He,leftMargin:He,link:null,longDesc:null,lowSrc:null,marginHeight:He,marginWidth:He,noResize:Et,noHref:Et,noShade:Et,noWrap:Et,object:null,profile:null,prompt:null,rev:null,rightMargin:He,rules:null,scheme:null,scrolling:Or,standby:null,summary:null,text:null,topMargin:He,valueType:null,version:null,vAlign:null,vLink:null,vSpace:He,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Et,disableRemotePlayback:Et,prefix:null,property:null,results:He,security:null,unselectable:null},space:"html",transform:aR}),Qre=fd({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav
1288-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:gs,accentHeight:He,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:He,amplitude:He,arabicForm:null,ascent:He,attributeName:null,attributeType:null,azimuth:He,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:He,by:null,calcMode:null,capHeight:He,className:nr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:He,diffuseConstant:He,direction:null,display:null,dur:null,divisor:He,dominantBaseline:null,download:Et,dx:null,dy:null,edgeMode:null,editable:null,elevation:He,enableBackground:null,end:null,event:null,exponent:He,externalResourcesRequired:null,fill:null,fillOpacity:He,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ku,g2:ku,glyphName:ku,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:He,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:He,horizOriginX:He,horizOriginY:He,id:null,ideographic:He,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:He,k:He,k1:He,k2:He,k3:He,k4:He,kernelMatrix:gs,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:He,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:He,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 5,418 bytes, lines 1288-1289
1288Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:He,overlineThickness:He,paintOrder:null,panose1:null,path:null,pathLength:He,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:He,pointsAtY:He,pointsAtZ:He,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gs,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gs,rev:gs,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gs,requiredFeatures:gs,requiredFonts:gs,requiredFormats:gs,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:He,specularExponent:He,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:He,strikethroughThickness:He,string:null,stroke:null,strokeDashArray:gs,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:He,strokeOpacity:He,strokeWidth:null,style:null,surfaceScale:He,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gs,tabIndex:He,tableValues:null,target:null,targetX:He,targetY:He,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gs,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:He,underlineThickness:He,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:He,values:null,vAlphabetic:He,vMathematical:He,vectorEffect:null,vHanging:He,vIdeographic:He,version:null,vertAdvY:He,vertOriginX:He,vertOriginY:He,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:He,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:sR}),iR=fd({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),oR=fd({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:aR}),lR=fd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Xre={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Zre=/[A-Z]/g,dS=/-[a-z]/g,Jre=/^data[-\w.:]+$/i;function L1(e,t){const r=Th(t);let n=t,s=hs;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Jre.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(dS,tne);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!dS.test(a)){let o=a.replace(Zre,ene);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}s=V3}return new s(n,t)}function ene(e){return"-"+e.toLowerCase()}function tne(e){return e.charAt(1).toUpperCase()}const om=rR([nR,Yre,iR,oR,lR],"html"),ol=rR([nR,Qre,iR,oR,lR],"svg");function hS(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function cR(e){return e.join(" ").trim()}var G3={},mS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,rne=/\n/g,nne=/^\s*/,sne=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ane=/^:\s*/,ine=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,one=/^[;\s]*/,lne=/^\s+|\s+$/g,cne=` 1289`,fS="/",pS="*",El="",une="comment",dne="declaration";function hne(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function s(p){var g=p.match(rne);g&&(r+=g.length);var x=p.lastIndexOf(cne);n=~x?p.length-x:n+p.length}function a(){var p={line:r,column:n};return function(g){return g.position=new o(p),c(),g}}function o(p){this.start=p,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function l(p){var g=new Error(t.source+":"+r+":"+n+": "+p);if(g.reason=p,g.filename=t.source,g.line=r,g.column=n,g.source=e,!t.silent)throw g}function u(p){var g=p.exec(e);if(g){var x=g[0];return s(x),e=e.slice(x.length),g}}function c(){u(nne)}function d(p){var g;for(p=p||[];g=h();)g!==!1&&p.push(g);return p}function h(){var p=a();if(!(fS!=e.charAt(0)||pS!=e.charAt(1))){for(var g=2;El!=e.charAt(g)&&(pS!=e.charAt(g)||fS!=e.charAt(g+1));)++g;if(g+=2,El===e.charAt(g-1))return l("End of comment missing");var x=e.slice(2,g-2);return n+=2,s(x),e=e.slice(g),n+=2,p({type:une,comment:x})}}function m(){var p=a(),g=u(sne);if(g){if(h(),!u(ane))return l("property missing ':'");var x=u(ine),w=p({type:dne,property:gS(g[0].replace(mS,El)),value:x?gS(x[0].replace(mS,El)):El});return u(one),w}}function f(){var p=[];d(p);for(var g;g=m();)g!==!1&&(p.push(g),d(p));return p}return c(),f()}function gS(e){return e?e.replace(lne,El):El}var mne=hne,fne=Ep&&Ep.__importDefault||function(e){return e&&e.__esMo
vendor: 3,679 bytes, line 1289
1289dule?e:{default:e}};Object.defineProperty(G3,"__esModule",{value:!0});G3.default=gne;const pne=fne(mne);function gne(e,t){let r=null;if(!e||typeof e!="string")return r;const n=(0,pne.default)(e),s=typeof t=="function";return n.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:l}=a;s?t(o,l,a):l&&(r=r||{},r[o]=l)}),r}var P1={};Object.defineProperty(P1,"__esModule",{value:!0});P1.camelCase=void 0;var xne=/^--[a-zA-Z0-9_-]+$/,bne=/-([a-z])/g,yne=/^[^-]+$/,vne=/^-(webkit|moz|ms|o|khtml)-/,wne=/^-(ms)-/,Ene=function(e){return!e||yne.test(e)||xne.test(e)},kne=function(e,t){return t.toUpperCase()},xS=function(e,t){return"".concat(t,"-")},Nne=function(e,t){return t===void 0&&(t={}),Ene(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(wne,xS):e=e.replace(vne,xS),e.replace(bne,kne))};P1.camelCase=Nne;var Sne=Ep&&Ep.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Tne=Sne(G3),Cne=P1;function W2(e,t){var r={};return!e||typeof e!="string"||(0,Tne.default)(e,function(n,s){n&&s&&(r[(0,Cne.camelCase)(n,t)]=s)}),r}W2.default=W2;var _ne=W2;const Ane=Bi(_ne),F1=uR("end"),Za=uR("start");function uR(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function jne(e){const t=Za(e),r=F1(e);if(t&&r)return{start:t,end:r}}function P0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bS(e.position):"start"in e||"end"in e?bS(e):"line"in e||"column"in e?V2(e):""}function V2(e){return yS(e&&e.line)+":"+yS(e&&e.column)}function bS(e){return V2(e&&e.start)+"-"+V2(e&&e.end)}function yS(e){return e&&typeof e=="number"?e:1}class An extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let s="",a={},o=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?s=t:!a.cause&&t&&(o=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const u=n.indexOf(":");u===-1?a.ruleId=n:(a.source=n.slice(0,u),a.ruleId=n.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=P0(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}An.prototype.file="";An.prototype.name="";An.prototype.reason="";An.prototype.message="";An.prototype.stack="";An.prototype.column=void 0;An.prototype.line=void 0;An.prototype.ancestors=void 0;An.prototype.cause=void 0;An.prototype.fatal=void 0;An.prototype.place=void 0;An.prototype.ruleId=void 0;An.prototype.source=void 0;const K3={}.hasOwnProperty,Ine=new Map,Rne=/[A-Z]/g,Dne=new Set(["table","tbody","thead","tfoot","tr"]),Mne=new Set(["td","th"]),dR="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function One(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=Hne(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 7,764 bytes, line 1289
1289if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=zne(r,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ol:om,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=hR(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function hR(e,t,r){if(t.type==="element")return Lne(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Pne(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Bne(e,t,r);if(t.type==="mdxjsEsm")return Fne(e,t);if(t.type==="root")return Une(e,t,r);if(t.type==="text")return $ne(e,t)}function Lne(e,t,r){const n=e.schema;let s=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=ol,e.schema=s),e.ancestors.push(t);const a=fR(e,t.tagName,!1),o=qne(e,t);let l=Q3(e,t);return Dne.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!Gre(u):!0})),mR(e,o,a,t),Y3(o,l),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function Pne(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ch(e,t.position)}function Fne(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ch(e,t.position)}function Bne(e,t,r){const n=e.schema;let s=n;t.name==="svg"&&n.space==="html"&&(s=ol,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:fR(e,t.name,!0),o=Wne(e,t),l=Q3(e,t);return mR(e,o,a,t),Y3(o,l),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function Une(e,t,r){const n={};return Y3(n,Q3(e,t)),e.create(t,e.Fragment,n,r)}function $ne(e,t){return t.value}function mR(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function Y3(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function zne(e,t,r){return n;function n(s,a,o,l){const c=Array.isArray(o.children)?r:t;return l?c(a,o,l):c(a,o)}}function Hne(e,t){return r;function r(n,s,a,o){const l=Array.isArray(a.children),u=Za(n);return t(s,a,o,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function qne(e,t){const r={};let n,s;for(s in t.properties)if(s!=="children"&&K3.call(t.properties,s)){const a=Vne(e,s,t.properties[s]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Mne.has(t.tagName)?n=l:r[o]=l}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function Wne(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(r,e.evaluater.evaluateExpression(l.argument))}else Ch(e,t.position);else{const s=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const l=n.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Ch(e,t.position);else a=n.value===null?!0:n.value;r[s]=a}return r}function Q3(e,t){const r=[];let n=-1;const s=e.passKeys?new Map:Ine;for(;++n<t.children.length;){const a=t.children[n];let o;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=s.get(u)||0;o=u+"-"+c,s.set(u,c+1)}}const l=hR(e,a,o);l!==void 0&&r.push(l)}return r}function Vne(e,t,r){const n=L1(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?tR(r):cR(r)),n.property==="style"){let s=typeof r=="object"?r:Gne(e,String(r));return e.stylePropertyNameCase==="css"&&(s=Kne(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&n.space?Xre[n.property]||n.property:n.attribute,r]}}function Gne(e,t){try{return Ane(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,s=new An("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=dR+"#cannot-parse-style-attribute",s}}function fR(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,o;for(;++a<s.length;){const l=lS(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}n=o}else n=lS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const s=n.value;return K3.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(n);Ch(e)}function Ch(e,t){const r=new An("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=dR+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Kne(e){const t={};let r;for(r in e)K3.call(e,r)&&(t[Yne(r)]=e[r]);return t}function Yne(e){let t=e.replace(Rne,Qne);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Qne(e){return"-"+e.toLowerCase()}const Pb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Xne={};function X3(e,t){const r=Xne,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return pR(e,n,s)}function pR(e,t,r){if(Zne(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return vS(e.children,t,r)}return Array.isArray(e)?vS(e,t,r):""}function vS(e,t,r){const n=[];let s=-1;for(;++s<e.length;)n[s]=pR(e[s],t,r);return n.join("")}function Zne(e){return!!(e&&typeof e=="object")}const wS=document.createElement("i");function _h(e){const t="&"+e+";";wS.innerHTML=t;const r=wS.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Es(e,t,r,n){const s=e.length;let a=0,o;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Us(e,t){return e.length>0?(Es(e,e.length,0,t),e):t}const ES={}.hasOwnProperty;function gR(e){const t={};let r=-1;for(;++r<e.length;)Jne(t,e[r]);return t}function Jne(e,t){let r;for(r in t){const s=(ES.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let o;if(a)for(o in a){ES.call(s,o)||(s[o]=[]);const l=a[o];ese(s[o],Array.isArray(l)?l:l?[l]:[])}}}function ese(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Es(e,0,0,n)}function xR(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function fa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hn=ll(/[A-Za-z]/),Sn=ll(/[\dA-Za-z]/),tse=ll(/[#-'*+\--9=?A-Z^-~]/);function vg(e){return e!==null&&(e<32||e===127)}const G2=ll(/\d/),rse=ll(/[\dA-Fa-f]/),nse=ll(/[!-/:-@[-`{-~]/);function Ze(e){return e!==null&&e<-2}function Lt(e){return e!==null&&(e<0||e===32)}function _t(e){return e===-2||e===-1||e===32}const Yo=ll(new RegExp("\\p{P}|\\p{S}
1289","u")),ba=ll(/\s/);function ll(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function pd(e){const t=[];let r=-1,n=0,s=0;for(;++r<e.length;){const a=e.charCodeAt(r);let o="";if(a===37&&Sn(e.charCodeAt(r+1))&&Sn(e.charCodeAt(r+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(r+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),s=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(n,r),encodeURIComponent(o)),n=r+s+1,o=""),s&&(r+=s,s=0)}return t.join("")+e.slice(n)}function bt(e,t,r,n){const s=n?n-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return _t(u)?(e.enter(r),l(u)):t(u)}function l(u){return _t(u)&&a++<s?(e.consume(u),l):(e.exit(r),t(u))}}const sse={tokenize:ase};function ase(e){const t=e.attempt(this.parser.constructs.contentInitial,n,s);let r;return t;function n(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),bt(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),a(l)}function a(l){const u=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Ze(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}const ise={tokenize:ose},kS={tokenize:lse};function ose(e){const t=this,r=[];let n=0,s,a,o;return l;function l(b){if(n<r.length){const k=r[n];return t.containerState=k[1],e.attempt(k[0].continuation,u,c)(b)}return c(b)}function u(b){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&y();const k=t.events.length;let T=k,S;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){S=t.events[T][1].end;break}w(n);let j=k;for(;j<t.events.length;)t.events[j][1].end={...S},j++;return Es(t.events,T+1,0,t.events.slice(k)),t.events.length=j,c(b)}return l(b)}function c(b){if(n===r.length){if(!s)return m(b);if(s.currentConstruct&&s.currentConstruct.concrete)return p(b);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(kS,d,h)(b)}function d(b){return s&&y(),w(n),m(b)}function h(b){return t.parser.lazy[t.now().line]=n!==r.length,o=t.now().offset,p(b)}function m(b){return t.containerState={},e.attempt(kS,f,p)(b)}function f(b){return n++,r.push([t.currentConstruct,t.containerState]),m(b)}function p(b){if(b===null){s&&y(),w(0),e.consume(b);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),g(b)}function g(b){if(b===null){x(e.exit("chunkFlow"),!0),w(0),e.consume(b);return}return Ze(b)?(e.consume(b),x(e.exit("chunkFlow")),n=0,t.interrupt=void 0,l):(e.consume(b),g)}function x(b,k){const T=t.sliceStream(b);if(k&&T.push(null),b.previous=a,a&&(a.next=b),a=b,s.defineSkip(b.start),s.write(T),t.parser.lazy[b.start.line]){let S=s.events.length;for(;S--;)if(s.events[S][1].start.offset<o&&(!s.events[S][1].end||s.events[S][1].end.offset>o))return;const j=t.events.length;let E=j,A,R;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){if(A){R=t.events[E][1].end;break}A=!0}for(w(n),S=j;S<t.events.length;)t.events[S][1].end={...R},S++;Es(t.events,E+1,0,t.events.slice(j)),t.events.length=S}}function w(b){let k=r.length;for(;k-- >b;){const T=r[k];t.containerState=T[1],T[0].exit.call(t,e)}r.length=b}function y(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function lse(e,t,r){return bt(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qu(e){if(e===null||Lt(e)||ba(e))return 1;if(Yo(e))return 2}function B1(e,t,r){const n=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const K2={name:"attention",resolveAll:cse,tokenize:use};function cse(e,t){let r=-1,n,s,a,o,l,u,c,d;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[
vendor: 5,327 bytes, line 1289
1289n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const h={...e[n][1].end},m={...e[r][1].start};NS(h,-u),NS(m,u),o={type:u>1?"strongSequence":"emphasisSequence",start:h,end:{...e[n][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:m},a={type:u>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},s={type:u>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[n][1].end={...o.start},e[r][1].start={...l.end},c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=Us(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=Us(c,[["enter",s,t],["enter",o,t],["exit",o,t],["enter",a,t]]),c=Us(c,B1(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),c=Us(c,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[r][1].end.offset-e[r][1].start.offset?(d=2,c=Us(c,[["enter",e[r][1],t],["exit",e[r][1],t]])):d=0,Es(e,n-1,r-n+3,c),r=n+c.length-d-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function use(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,s=Qu(n);let a;return o;function o(u){return a=u,e.enter("attentionSequence"),l(u)}function l(u){if(u===a)return e.consume(u),l;const c=e.exit("attentionSequence"),d=Qu(u),h=!d||d===2&&s||r.includes(u),m=!s||s===2&&d||r.includes(n);return c._open=!!(a===42?h:h&&(s||!m)),c._close=!!(a===42?m:m&&(d||!h)),t(u)}}function NS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const dse={name:"autolink",tokenize:hse};function hse(e,t,r){let n=0;return s;function s(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(f){return Hn(f)?(e.consume(f),o):f===64?r(f):c(f)}function o(f){return f===43||f===45||f===46||Sn(f)?(n=1,l(f)):c(f)}function l(f){return f===58?(e.consume(f),n=0,u):(f===43||f===45||f===46||Sn(f))&&n++<32?(e.consume(f),l):(n=0,c(f))}function u(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||vg(f)?r(f):(e.consume(f),u)}function c(f){return f===64?(e.consume(f),d):tse(f)?(e.consume(f),c):r(f)}function d(f){return Sn(f)?h(f):r(f)}function h(f){return f===46?(e.consume(f),n=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):m(f)}function m(f){if((f===45||Sn(f))&&n++<63){const p=f===45?m:h;return e.consume(f),p}return r(f)}}const lm={partial:!0,tokenize:mse};function mse(e,t,r){return n;function n(a){return _t(a)?bt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Ze(a)?t(a):r(a)}}const bR={continuation:{tokenize:pse},exit:gse,name:"blockQuote",tokenize:fse};function fse(e,t,r){const n=this;return s;function s(o){if(o===62){const l=n.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return r(o)}function a(o){return _t(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function pse(e,t,r){const n=this;return s;function s(o){return _t(o)?bt(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(bR,t,r)(o)}}function gse(e){e.exit("blockQuote")}const yR={name:"characterEscape",tokenize:xse};function xse(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return nse(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const vR={name:"characterReference",tokenize:bse};function bse(e,t,r){const n=this;let s=0,a,o;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,o=Sn,d(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=rse,d):(e.enter("characterReferenceValue"),a=7,o=G2,d(h))}function d(h){if(h===59&&s){const m=e.exit("characterReferenceValue");return o===Sn&&!_h(n.sliceSerialize(m))?r(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(h)&&s++<a?(e.consume(h),d):r(h)}}const SS={partial:!0,tokenize:vse},TS={concrete:!0,name:"codeFenced",tokenize:yse};function yse(e,t,r){const n=this,s={partial:!0,tokenize:T};let a=0,o=0,l;return u;function u(S){return c(S)}function c(S){const j=n.events[n.events.length-1];return a=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,l=S,e.enter("co
1289deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(S)}function d(S){return S===l?(o++,e.consume(S),d):o<3?r(S):(e.exit("codeFencedFenceSequence"),_t(S)?bt(e,h,"whitespace")(S):h(S))}function h(S){return S===null||Ze(S)?(e.exit("codeFencedFence"),n.interrupt?t(S):e.check(SS,g,k)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||Ze(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(S)):_t(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),bt(e,f,"whitespace")(S)):S===96&&S===l?r(S):(e.consume(S),m)}function f(S){return S===null||Ze(S)?h(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||Ze(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(S)):S===96&&S===l?r(S):(e.consume(S),p)}function g(S){return e.attempt(s,k,x)(S)}function x(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),w}function w(S){return a>0&&_t(S)?bt(e,y,"linePrefix",a+1)(S):y(S)}function y(S){return S===null||Ze(S)?e.check(SS,g,k)(S):(e.enter("codeFlowValue"),b(S))}function b(S){return S===null||Ze(S)?(e.exit("codeFlowValue"),y(S)):(e.consume(S),b)}function k(S){return e.exit("codeFenced"),t(S)}function T(S,j,E){let A=0;return R;function R(L){return S.enter("lineEnding"),S.consume(L),S.exit("lineEnding"),M}function M(L){return S.enter("codeFencedFence"),_t(L)?bt(S,B,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):B(L)}function B(L){return L===l?(S.enter("codeFencedFenceSequence"),W(L)):E(L)}function W(L){return L===l?(A++,S.consume(L),W):A>=o?(S.exit("codeFencedFenceSequence"),_t(L)?bt(S,H,"whitespace")(L):H(L)):E(L)}function H(L){return L===null||Ze(L)?(S.exit("codeFencedFence"),j(L)):E(L)}}}function vse(e,t,r){const n=this;return s;function s(o){return o===null?r(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}const Fb={name:"codeIndented",tokenize:Ese},wse={partial:!0,tokenize:kse};function Ese(e,t,r){const n=this;return s;function s(c){return e.enter("codeIndented"),bt(e,a,"linePrefix",5)(c)}function a(c){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(c):r(c)}function o(c){return c===null?u(c):Ze(c)?e.attempt(wse,o,u)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||Ze(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function u(c){return e.exit("codeIndented"),t(c)}}function kse(e,t,r){const n=this;return s;function s(o){return n.parser.lazy[n.now().line]?r(o):Ze(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):bt(e,a,"linePrefix",5)(o)}function a(o){const l=n.events[n.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):Ze(o)?s(o):r(o)}}const Nse={name:"codeText",previous:Tse,resolve:Sse,tokenize:Cse};function Sse(e){let t=e.length-4,r=3,n,s;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)s===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(s=n):(n===t||e[n][1].type==="lineEnding")&&(e[s][1].type="codeTextData",n!==s+2&&(e[s][1].end=e[n-1][1].end,e.splice(s+2,n-s-2),t-=n-s-2,n=s+2),s=void 0);return e}function Tse(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Cse(e,t,r){let n=0,s,a;return o;function o(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),n++,l):(e.exit("codeTextSequence"),u(h))}function u(h){return h===null?r(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),u):h===96?(a=e.enter("codeTextSequence"),s=0,d(h)):Ze(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||Ze(h)?(e.exit("codeTextData"),u(h)):(e.consume(h),c)}function d(h){return h===96?(e.consume(h),s++,d):s===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",c(h))}}class _se{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const s=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return n&&o0(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),o0(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),o0(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);o0(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);o0(this.left,r.reverse())}}}function o0(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function wR(e){const t={};let r=-1,n,s,a,o,l,u,c;const d=new _se(e);for(;++r<d.length;){for(;r in t;)r=t[r];if(n=d.get(r),r&&n[1].type==="chunkFlow"&&d.get(r-1)[1].type==="listItemPrefix"&&(u=n[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,Ase(d,r)),r=t[r],c=!0);else if(n[1]._container){for(a=r,s=void 0;a--;)if(o=d.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(s&&(d.get(s)[1].type="lineEndingBlank"),o[1].type="lineEnding",s=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;s&&(n[1].end={...d.get(s)[1].start},l=d.slice(s,r),l.unshift(n),d.splice(s,r-s+1,l))}}return Es(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function Ase(e,t){const r=e.get(t)[1],n=e.get(t)[2];let s=t-1;const a=[];let o=r._tokenizer;o||(o=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,u=[],c={};let d,h,m=-1,f=r,p=0,g=0;const x=[g];for(;f;){for(;e.get(++s)[1]!==f;);a.push(s),f._tokenizer||(d=n.sliceStream(f),f.next||d.push(null),h&&o.defineSki
vendor: 22,827 bytes, line 1289
1289p(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=r;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(g=m+1,x.push(g),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):x.pop(),m=x.length;m--;){const w=l.slice(x[m],x[m+1]),y=a.pop();u.push([y,y+w.length-1]),e.splice(y,2,w)}for(u.reverse(),m=-1;++m<u.length;)c[p+u[m][0]]=p+u[m][1],p+=u[m][1]-u[m][0]-1;return c}const jse={resolve:Rse,tokenize:Dse},Ise={partial:!0,tokenize:Mse};function Rse(e){return wR(e),e}function Dse(e,t){let r;return n;function n(l){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?a(l):Ze(l)?e.check(Ise,o,a)(l):(e.consume(l),s)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,s}}function Mse(e,t,r){const n=this;return s;function s(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),bt(e,a,"linePrefix")}function a(o){if(o===null||Ze(o))return r(o);const l=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(n.parser.constructs.flow,r,t)(o)}}function ER(e,t,r,n,s,a,o,l,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return h;function h(w){return w===60?(e.enter(n),e.enter(s),e.enter(a),e.consume(w),e.exit(a),m):w===null||w===32||w===41||vg(w)?r(w):(e.enter(n),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),g(w))}function m(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(s),e.exit(n),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(w))}function f(w){return w===62?(e.exit("chunkString"),e.exit(l),m(w)):w===null||w===60||Ze(w)?r(w):(e.consume(w),w===92?p:f)}function p(w){return w===60||w===62||w===92?(e.consume(w),f):f(w)}function g(w){return!d&&(w===null||w===41||Lt(w))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(n),t(w)):d<c&&w===40?(e.consume(w),d++,g):w===41?(e.consume(w),d--,g):w===null||w===32||w===40||vg(w)?r(w):(e.consume(w),w===92?x:g)}function x(w){return w===40||w===41||w===92?(e.consume(w),g):g(w)}}function kR(e,t,r,n,s,a){const o=this;let l=0,u;return c;function c(f){return e.enter(n),e.enter(s),e.consume(f),e.exit(s),e.enter(a),d}function d(f){return l>999||f===null||f===91||f===93&&!u||f===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?r(f):f===93?(e.exit(a),e.enter(s),e.consume(f),e.exit(s),e.exit(n),t):Ze(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||Ze(f)||l++>999?(e.exit("chunkString"),d(f)):(e.consume(f),u||(u=!_t(f)),f===92?m:h)}function m(f){return f===91||f===92||f===93?(e.consume(f),l++,h):h(f)}}function NR(e,t,r,n,s,a){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(n),e.enter(s),e.consume(m),e.exit(s),o=m===40?41:m,u):r(m)}function u(m){return m===o?(e.enter(s),e.consume(m),e.exit(s),e.exit(n),t):(e.enter(a),c(m))}function c(m){return m===o?(e.exit(a),u(o)):m===null?r(m):Ze(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),bt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===o||m===null||Ze(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?h:d)}function h(m){return m===o||m===92?(e.consume(m),d):d(m)}}function Ci(e,t){let r;return n;function n(s){return Ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r=!0,n):_t(s)?bt(e,n,r?"linePrefix":"lineSuffix")(s):t(s)}}const Ose={name:"definition",tokenize:Pse},Lse={partial:!0,tokenize:Fse};function Pse(e,t,r){const n=this;let s;return a;function a(f){return e.enter("definition"),o(f)}function o(f){return kR.call(n,e,l,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return s=fa(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),u):r(f)}function u(f){return Lt(f)?Ci(e,c)(f):c(f)}function c(f){return ER(e,d,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(Lse,h,h)(f)}function h(f){return _t(f)?bt(e,m,"whitespace")(f):m(f)}function m(f){return f===null||Ze(f)?(e.exit("definition"),n.parser.defined.push(s),t(f)):r(f)}}function Fse(e,t,r){return n;function n(l){return Lt(l)?Ci(e,s)(l):r(l)}function s(l){return NR(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return _t(l)?bt(e,o,"whitespace")(l):o(l)}function o(l){return l===null||Ze(l)?t(l):r(l)}}const Bse={name:"hardBreakEscape",tokenize:Use};function Use(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Ze(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const $se={name:"headingAtx",resolve:zse,tokenize:Hse};function zse(e,t){let r=e.length-2,n=3,s,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(s={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Es(e,n,r-n+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function Hse(e,t,r){let n=0;return s;function s(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&n++<6?(e.consume(d),o):d===null||Lt(d)?(e.exit("atxHeadingSequence"),l(d)):r(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||Ze(d)?(e.exit("atxHeading"),t(d)):_t(d)?bt(e,l,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),l(d))}function c(d){return d===null||d===35||Lt(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),c)}}const qse=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],CS=["pre","script","style","textarea"],Wse={concrete:!0,name:"htmlFlow",resolveTo:Kse,tokenize:Yse},Vse={partial:!0,tokenize:Xse},Gse={partial:!0,tokenize:Qse};function Kse(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Yse(e,t,r){const n=this;let s,a,o,l,u;return c;function c(C){return d(C)}function d(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),h}function h(C){return C===33?(e.consume(C),m):C===47?(e.consume(C),a=!0,g):C===63?(e.consume(C),s=3,n.interrupt?t:D):Hn(C)?(e.consume(C),o=String.fromCharCode(C),x):r(C)}function m(C){return C===45?(e.consume(C),s=2,f):C===91?(e.consume(C),s=5,l=0,p):Hn(C)?(e.consume(C),s=4,n.interrupt?t:D):r(C)}function f(C){return C===45?(e.consume(C),n.interrupt?t:D):r(C)}function p(C){const O="CDATA[";return C===O.charCodeAt(l++)?(e.consume(C),l===O.length?n.interrupt?t:B:p):r(C)}function g(C){return Hn(C)?(e.consume(C),o=String.fromCharCode(C),x):r(C)}function x(C){if(C===null||C===47||C===62||Lt(C)){const O=C===47,q=o.toLowerCase();return!O&&!a&&CS.includes(q)?(s=1,n.interrupt?t(C):B(C)):qse.includes(o.toLowerCase())?(s=6,O?(e.consume(C),w):n.interrupt?t(C):B(C)):(s=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(C):a?y(C):b(C))}return C===45||Sn(C)?(e.consume(C),o+=String.fromCharCode(C),x):r(C)}function w(C){return C===62?(e.consume(C),n.interrupt?t:B):r(C)}function y(C){return _t(C)?(e.consume(C),y):R(C)}function b(C){return C===47?(e.consume(C),R):C===58||C===95||Hn(C)?(e.consume(C),k):_t(C)?(e.consume(C),b):R(C)}function k(C){return C===45||C===46||C===58||C===95||Sn(C)?(e.consume(C),k):T(C)}function T(C){return C===61?(e.consume(C),S):_t(C)?(e.consume(C),T):b(C)}function S(C){return C===null||C===60||C===61||C===62||C===96?r(C):C===34||C===39?(e.consume(C),u=C,j):_t(C)?(e.consume(C),S):E(C)}function j(C){return C===u?(e.consume(C),u=null,A):C===null||Ze(C)?r(C):(e.consume(C),j)}function E(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Lt(C)?T(C):(e.consume(C),E)}function A(C){return C===47||C===62||_t(C)?b(C):r(C)}function R(C){return C===62?(e.consume(C),M):r(C)}function M(C){return C===null||Ze(C)?B(C):_t(C)?(e.consume(C),M):r(C)}function B(C){return C===45&&s===2?(e.consume(C),$):C===60&&s===1?(e.consume(C),ee):C===62&&s===4?(e.consume(C),K):C===63&&s===3?(e.consume(C),D):C===93&&s===5?(e.consume(C),Q):Ze(C)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Vse,V,W)(C)):C===null||Ze(C)?(e.exit("htmlFlowData"),W(C)):(e.consume(C),B)}function W(C){return e.check(Gse,H,V)(C)}function H(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),L}function L(C){return C===null||Ze(C)?W(C):(e.enter("htmlFlowData"),B(C))}function $(C){return C===45?(e.consume(C),D):B(C)}function ee(C){return C===47?(e.consume(C),o="",G):B(C)}function G(C){if(C===62){const O=o.toLowerCase();return CS.includes(O)?(e.consume(C),K):B(C)}return Hn(C)&&o.length<8?(e.consume(C),o+=String.fromCharCode(C),G):B(C)}function Q(C){return C===93?(e.consume(C),D):B(C)}function D(C){return C===62?(e.consume(C),K):C===45&&s===2?(e.consume(C),D):B(C)}function K(C){return C===null||Ze(C)?(e.exit("htmlFlowData"),V(C)):(e.consume(C),K)}function V(C){return e.exit("htmlFlow"),t(C)}}function Qse(e,t,r){const n=this;return s;function s(o){return Ze(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):r(o)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function Xse(e,t,r){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(lm,t,r)}}const Zse={name:"htmlText",tokenize:Jse};function Jse(e,t,r){const n=this;let s,a,o;return l;function l(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),u}function u(D){return D===33?(e.consume(D),c):D===47?(e.consume(D),T):D===63?(e.consume(D),b):Hn(D)?(e.consume(D),E):r(D)}function c(D){return D===45?(e.consume(D),d):D===91?(e.consume(D),a=0,p):Hn(D)?(e.consume(D),y):r(D)}function d(D){return D===45?(e.consume(D),f):r(D)}function h(D){return D===null?r(D):D===45?(e.consume(D),m):Ze(D)?(o=h,ee(D)):(e.consume(D),h)}function m(D){return D===45?(e.consume(D),f):h(D)}function f(D){return D===62?$(D):D===45?m(D):h(D)}function p(D){const K="CDATA[";return D===K.charCodeAt(a++)?(e.consume(D),a===K.length?g:p):r(D)}function g(D){return D===null?r(D):D===93?(e.consume(D),x):Ze(D)?(o=g,ee(D)):(e.consume(D),g)}function x(D){return D===93?(e.consume(D),w):g(D)}function w(D){return D===62?$(D):D===93?(e.consume(D),w):g(D)}function y(D){return D===null||D===62?$(D):Ze(D)?(o=y,ee(D)):(e.consume(D),y)}function b(D){return D===null?r(D):D===63?(e.consume(D),k):Ze(D)?(o=b,ee(D)):(e.consume(D),b)}function k(D){return D===62?$(D):b(D)}function T(D){return Hn(D)?(e.consume(D),S):r(D)}function S(D){return D===45||Sn(D)?(e.consume(D),S):j(D)}function j(D){return Ze(D)?(o=j,ee(D)):_t(D)?(e.consume(D),j):$(D)}function E(D){return D===45||Sn(D)?(e.consume(D),E):D===47||D===62||Lt(D)?A(D):r(D)}function A(D){return D===47?(e.consume(D),$):D===58||D===95||Hn(D)?(e.consume(D),R):Ze(D)?(o=A,ee(D)):_t(D)?(e.consume(D),A):$(D)}function R(D){return D===45||D===46||D===58||D===95||Sn(D)?(e.consume(D),R):M(D)}function M(D){return D===61?(e.consume(D),B):Ze(D)?(o=M,ee(D)):_t(D)?(e.consume(D),M):A(D)}function B(D){return D===null||D===60||D===61||D===62||D===96?r(D):D===34||D===39?(e.consume(D),s=D,W):Ze(D)?(o=B,ee(D)):_t(D)?(e.consume(D),B):(e.consume(D),H)}function W(D){return D===s?(e.consume(D),s=void 0,L):D===null?r(D):Ze(D)?(o=W,ee(D)):(e.consume(D),W)}function H(D){return D===null||D===34||D===39||D===60||D===61||D===96?r(D):D===47||D===62||Lt(D)?A(D):(e.consume(D),H)}function L(D){return D===47||D===62||Lt(D)?A(D):r(D)}function $(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),t):r(D)}function ee(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),G}function G(D){return _t(D)?bt(e,Q,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Q(D)}function Q(D){return e.enter("htmlTextData"),o(D)}}const Z3={name:"labelEnd",resolveAll:nae,resolveTo:sae,tokenize:aae},eae={tokenize:iae},tae={tokenize:oae},rae={tokenize:lae};function nae(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const s=n.type==="labelImage"?4:2;n.type="data",t+=s}}return e.length!==r.length&&Es(e,0,e.length,r),e}function sae(e,t){let r=e.length,n=0,s,a,o,l;for(;r--;)if(s=e[r][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(o){if(e[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=r,s.type!=="labelLink")){n=2;break}}else s.type==="labelEnd"&&(o=r);const u={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},d={type:"labelText",start:{...e[a+n+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",u,t],["enter",c,t]],l=Us(l,e.slice(a+1,a+n+3)),l=Us(l,[["enter",d,t]]),l=Us(l,B1(t.parser.constructs.insideSpan.null,e.slice(a+n+4,o-3),t)),l=Us(l,[["exit",d,t],e[o-2],e[o-1],["exit",c,t]]),l=Us(l,e.slice(o+1)),l=Us(l,[["exit",u,t]]),Es(e,a,e.length,l),e}function aae(e,t,r){const n=this;let s=n.events.length,a,o;for(;s--;)if((n.events[s][1].type==="labelImage"||n.events[s][1].type==="labelLink")&&!n.events[s][1]._balanced){a=n.events[s][1];break}return l;function l(m){return a?a._inactive?h(m):(o=n.parser.defined.includes(fa(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):r(m)}function u(m){return m===40?e.attempt(eae,d,o?d:h)(m):m===91?e.attempt(tae,d,o?c:h)(m):o?d(m):h(m)}function c(m){return e.attempt(rae,d,h)(m)}function d(m){return t(m)}function h(m){return a._balanced=!0,r(m)}}function iae(e,t,r){return n;function n(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),s}function s(h){return Lt(h)?Ci(e,a)(h):a(h)}function a(h){return h===41?d(h):ER(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function o(h){return Lt(h)?Ci(e,u)(h):d(h)}function l(h){return r(h)}function u(h){return h===34||h===39||h===40?NR(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function c(h){return Lt(h)?Ci(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):r(h)}}function oae(e,t,r){const n=this;return s;function s(l){return kR.call(n,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return n.parser.defined.includes(fa(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(l):r(l)}function o(l){return r(l)}}function lae(e,t,r){return n;function n(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const cae={name:"labelStartImage",resolveAll:Z3.resolveAll,tokenize:uae};function uae(e,t,r){const n=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):r(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(l):t(l)}}const dae={name:"labelStartLink",resolveAll:Z3.resolveAll,tokenize:hae};function hae(e,t,r){const n=this;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):t(o)}}const Bb={name:"lineEnding",tokenize:mae};function mae(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),bt(e,t,"linePrefix")}}const pp={name:"thematicBreak",tokenize:fae};function fae(e,t,r){let n=0,s;return a;function a(c){return e.enter("thematicBreak"),o(c)}function o(c){return s=c,l(c)}function l(c){return c===s?(e.enter("thematicBreakSequence"),u(c)):n>=3&&(c===null||Ze(c))?(e.exit("thematicBreak"),t(c)):r(c)}function u(c){return c===s?(e.consume(c),n++,u):(e.exit("thematicBreakSequence"),_t(c)?bt(e,l,"whitespace")(c):l(c))}}const ts={continuation:{tokenize:bae},exit:vae,name:"list",tokenize:xae},pae={partial:!0,tokenize:wae},gae={partial:!0,tokenize:yae};function xae(e,t,r){const n=this,s=n.events[n.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return l;function l(f){const p=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:G2(f)){if(n.containerState.type||(n.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(pp,r,c)(f):c(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(f)}return r(f)}function u(f){return G2(f)&&++o<10?(e.consume(f),u):(!n.interrupt||o<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),c(f)):r(f)}function c(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(lm,n.interrupt?r:d,e.attempt(pae,m,h))}function d(f){return n.containerState.initialBlankLine=!0,a++,m(f)}function h(f){return _t(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),m):r(f)}function m(f){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function bae(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(lm,s,a);function s(l){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,bt(e,t,"listItemIndent",n.containerState.size+1)(l)}function a(l){return n.containerState.furtherBlankLines||!_t(l)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(l)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(gae,t,o)(l))}function o(l){return n.containerState._closeFlow=!0,n.interrupt=void 0,bt(e,e.attempt(ts,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function yae(e,t,r){const n=this;return bt(e,s,"listItemIndent",n.containerState.size+1);function s(a){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?t(a):r(a)}}function vae(e){e.exit(this.containerState.type)}function wae(e,t,r){const n=this;return bt(e,s,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const o=n.events[n.events.length-1];return!_t(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const _S={name:"setextUnderline",resolveTo:Eae,tokenize:kae};function Eae(e,t){let r=e.length,n,s,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(s=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",o,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=o,e.push(["exit",o,t]),e}function kae(e,t,r){const n=this;let s;return a;function a(c){let d=n.events.length,h;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){h=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),s=c,o(c)):r(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===s?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),_t(c)?bt(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||Ze(c)?(e.exit("setextHeadingLine"),t(c)):r(c)}}const Nae={tokenize:Sae};function Sae(e){const t=this,r=e.attempt(lm,n,e.attempt(this.parser.constructs.flowInitial,s,bt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(jse,s)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const Tae={resolveAll:TR()},Cae=SR("string"),_ae=SR("text");function SR(e){return{resolveAll:TR(e==="text"?Aae:void 0),tokenize:t};function t(r){const n=this,s=this.parser.constructs[e],a=r.attempt(s,o,l);return o;function o(d){return c(d)?a(d):l(d)}function l(d){if(d===null){r.consume(d);return}return r.enter("data"),r.consume(d),u}function u(d){return c(d)?(r.exit("data"),a(d)):(r.consume(d),u)}function c(d){if(d===null)return!0;const h=s[d];let m=-1;if(h)for(;++m<h.length;){const f=h[m];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function TR(e){return t;function t(r,n){let s=-1,a;for(;++s<=r.length;)a===void 0?r[s]&&r[s][1].type==="data"&&(a=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==a+2&&(r[a][1].end=r[s-1][1].end,r.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(r,n):r}}function Aae(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],s=t.sliceStream(n);let a=s.length,o=-1,l=0,u;
vendor: 2,572 bytes, line 1289
1289for(;a--;){const c=s[a];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(c===-2)u=!0,l++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(l=0),l){const c={type:r===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:n.start._bufferIndex+o,_index:n.start._index+a,line:n.end.line,column:n.end.column-l,offset:n.end.offset-l},end:{...n.end}};n.end={...c.start},n.start.offset===n.end.offset?Object.assign(n,c):(e.splice(r,0,["enter",c,t],["exit",c,t]),r+=2)}r++}return e}const jae={42:ts,43:ts,45:ts,48:ts,49:ts,50:ts,51:ts,52:ts,53:ts,54:ts,55:ts,56:ts,57:ts,62:bR},Iae={91:Ose},Rae={[-2]:Fb,[-1]:Fb,32:Fb},Dae={35:$se,42:pp,45:[_S,pp],60:Wse,61:_S,95:pp,96:TS,126:TS},Mae={38:vR,92:yR},Oae={[-5]:Bb,[-4]:Bb,[-3]:Bb,33:cae,38:vR,42:K2,60:[dse,Zse],91:dae,92:[Bse,yR],93:Z3,95:K2,96:Nse},Lae={null:[K2,Tae]},Pae={null:[42,95]},Fae={null:[]},Bae=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Pae,contentInitial:Iae,disable:Fae,document:jae,flow:Dae,flowInitial:Rae,insideSpan:Lae,string:Mae,text:Oae},Symbol.toStringTag,{value:"Module"}));function Uae(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const s={},a=[];let o=[],l=[];const u={attempt:j(T),check:j(S),consume:y,enter:b,exit:k,interrupt:j(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:g,events:[],now:p,parser:e,previous:null,sliceSerialize:m,sliceStream:f,write:h};let d=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function h(M){return o=Us(o,M),x(),o[o.length-1]!==null?[]:(E(t,0),c.events=B1(a,c.events,c),c.events)}function m(M,B){return zae(f(M),B)}function f(M){return $ae(o,M)}function p(){const{_bufferIndex:M,_index:B,line:W,column:H,offset:L}=n;return{_bufferIndex:M,_index:B,line:W,column:H,offset:L}}function g(M){s[M.line]=M.column,R()}function x(){let M;for(;n._index<o.length;){const B=o[n._index];if(typeof B=="string")for(M=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===M&&n._bufferIndex<B.length;)w(B.charCodeAt(n._bufferIndex));else w(B)}}function w(M){d=d(M)}function y(M){Ze(M)?(n.line++,n.column=1,n.offset+=M===-3?2:1,R()):M!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=M}function b(M,B){const W=B||{};return W.type=M,W.start=p(),c.events.push(["enter",W,c]),l.push(W),W}function k(M){const B=l.pop();return B.end=p(),c.events.push(["exit",B,c]),B}function T(M,B){E(M,B.from)}
vendor: 10,119 bytes, lines 1289-1291
1289function S(M,B){B.restore()}function j(M,B){return W;function W(H,L,$){let ee,G,Q,D;return Array.isArray(H)?V(H):"tokenize"in H?V([H]):K(H);function K(ne){return he;function he(xe){const Oe=xe!==null&&ne[xe],Se=xe!==null&&ne.null,we=[...Array.isArray(Oe)?Oe:Oe?[Oe]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return V(we)(xe)}}function V(ne){return ee=ne,G=0,ne.length===0?$:C(ne[G])}function C(ne){return he;function he(xe){return D=A(),Q=ne,ne.partial||(c.currentConstruct=ne),ne.name&&c.parser.constructs.disable.null.includes(ne.name)?q():ne.tokenize.call(B?Object.assign(Object.create(c),B):c,u,O,q)(xe)}}function O(ne){return M(Q,D),L}function q(ne){return D.restore(),++G<ee.length?C(ee[G]):$}}}function E(M,B){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&Es(c.events,B,c.events.length-B,M.resolve(c.events.slice(B),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function A(){const M=p(),B=c.previous,W=c.currentConstruct,H=c.events.length,L=Array.from(l);return{from:H,restore:$};function $(){n=M,c.previous=B,c.currentConstruct=W,c.events.length=H,l=L,R()}}function R(){n.line in s&&n.column<2&&(n.column=s[n.line],n.offset+=s[n.line]-1)}}function $ae(e,t){const r=t.start._index,n=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let o;if(r===s)o=[e[r].slice(n,a)];else{if(o=e.slice(r,s),n>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(n):o.shift()}a>0&&o.push(e[s].slice(0,a))}return o}function zae(e,t){let r=-1;const n=[];let s;for(;++r<e.length;){const a=e[r];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=` 1290`;break}case-3:{o=`\r 1291`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&s)continue;o=" ";break}default:o=String.fromCharCode(a)}s=a===-2,n.push(o)}return n.join("")}function Hae(e){const n={constructs:gR([Bae,...(e||{}).extensions||[]]),content:s(sse),defined:[],document:s(ise),flow:s(Nae),lazy:{},string:s(Cae),text:s(_ae)};return n;function s(a){return o;function o(l){return Uae(n,a,l)}}}function qae(e){for(;!wR(e););return e}const AS=/[\0\t\n\r]/g;function Wae(){let e=1,t="",r=!0,n;return s;function s(a,o,l){const u=[];let c,d,h,m,f;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),h=0,t="",r&&(a.charCodeAt(0)===65279&&h++,r=void 0);h<a.length;){if(AS.lastIndex=h,c=AS.exec(a),m=c&&c.index!==void 0?c.index:a.length,f=a.charCodeAt(m),!c){t=a.slice(h);break}if(f===10&&h===m&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),h<m&&(u.push(a.slice(h,m)),e+=m-h),f){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}h=m+1}return l&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Vae=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Gae(e){return e.replace(Vae,Kae)}function Kae(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),a=s===120||s===88;return xR(r.slice(a?2:1),a?16:10)}return _h(r)||e}const CR={}.hasOwnProperty;function Yae(e,t,r){return typeof t!="string"&&(r=t,t=void 0),Qae(r)(qae(Hae(r).document().write(Wae()(e,t,!0))))}function Qae(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(pe),autolinkProtocol:A,autolinkEmail:A,atxHeading:a(Ae),blockQuote:a(Se),characterEscape:A,characterReference:A,codeFenced:a(we),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(we,o),codeText:a(Be,o),codeTextData:A,data:A,codeFlowValue:A,definition:a(ve),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Ye),hardBreakEscape:a(Ee),hardBreakTrailing:a(Ee),htmlFlow:a(Ce,o),htmlFlowData:A,htmlText:a(Ce,o),htmlTextData:A,image:a(X),label:o,link:a(pe),listItem:a(Ne),listItemValue:m,listOrdered:a(_e,h),listUnordered:a(_e),paragraph:a(de),reference:C,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ae),strong:a(be),thematicBreak:a(De)},exit:{atxHeading:u(),atxHeadingSequence:T,autolink:u(),autolinkEmail:Oe,autolinkProtocol:xe,blockQuote:u(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:q,characterReferenceMarkerNumeric:q,characterReferenceValue:ne,characterReference:he,codeFenced:u(x),codeFencedFence:g,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:R,codeIndented:u(w),codeText:u(L),codeTextData:R,data:R,definition:u(),definitionDestinationString:k,definitionLabelString:y,definitionTitleString:b,emphasis:u(),hardBreakEscape:u(B),hardBreakTrailing:u(B),htmlFlow:u(W),htmlFlowData:R,htmlText:u(H),htmlTextData:R,image:u(ee),label:Q,labelText:G,lineEnding:M,link:u($),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:O,resourceDestinationString:D,resourceTitleString:K,resource:V,setextHeading:u(E),setextHeadingLineSequence:j,setextHeadingText:S,strong:u(),thematicBreak:u()}};_R(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(F){let se={type:"root",children:[]};const ue={stack:[se],tokenStack:[],config:t,enter:l,exit:c,buffer:o,resume:d,data:r},je=[];let Ge=-1;for(;++Ge<F.length;)if(F[Ge][1].type==="listOrdered"||F[Ge][1].type==="listUnordered")if(F[Ge][0]==="enter")je.push(Ge);else{const mt=je.pop();Ge=s(F,mt,Ge)}for(Ge=-1;++Ge<F.length;){const mt=t[F[Ge][0]];CR.call(mt,F[Ge][1].type)&&mt[F[Ge][1].type].call(Object.assign({sliceSerialize:F[Ge][2].sliceSerialize},ue),F[Ge][1])}if(ue.tokenStack.length>0){const mt=ue.tokenStack[ue.tokenStack.length-1];(mt[1]||jS).call(ue,void 0,mt[0])}for(se.position={start:Ji(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:Ji(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<t.transforms.length;)se=t.transforms[Ge](se)||se;return se}function s(F,se,ue){let je=se-1,Ge=-1,mt=!1,Ft,ur,ht,Qt;for(;++je<=ue;){const Nt=F[je];switch(Nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Nt[0]==="enter"?Ge++:Ge--,Qt=void 0;break}case"lineEndingBlank":{Nt[0]==="enter"&&(Ft&&!Qt&&!Ge&&!ht&&(ht=je),Qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qt=void 0}if(!Ge&&Nt[0]==="enter"&&Nt[1].type==="listItemPrefix"||Ge===-1&&Nt[0]==="exit"&&(Nt[1].type==="listUnordered"||Nt[1].type==="listOrdered")){if(Ft){let Jt=je;for(ur=void 0;Jt--;){const Re=F[Jt];if(Re[1].type==="lineEnding"||Re[1].type==="lineEndingBlank"){if(Re[0]==="exit")continue;ur&&(F[ur][1].type="lineEndingBlank",mt=!0),Re[1].type="lineEnding",ur=Jt}else if(!(Re[1].type==="linePrefix"||Re[1].type==="blockQuotePrefix"||Re[1].type==="blockQuotePrefixWhitespace"||Re[1].type==="blockQuoteMarker"||Re[1].type==="listItemIndent"))break}ht&&(!ur||ht<ur)&&(Ft._spread=!0),Ft.end=Object.assign({},ur?F[ur][1].start:Nt[1].end),F.splice(ur||je,0,["exit",Ft,Nt[2]]),je++,ue++}if(Nt[1].type==="listItemPrefix"){const Jt={type:"listItem",_spread:!1,start:Object.assign({},Nt[1].start),end:void 0};Ft=Jt,F.splice(je,0,["enter",Jt,Nt[2]]),je++,ue++,ht=void 0,Qt=!0}}}return F[se][1]._spread=mt,ue}function a(F,se){return ue;function ue(je){l.call(this,F(je),je),se&&se.call(this,je)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(F,se,ue){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([se,ue||void 0]),F.position={start:Ji(se.start),end:void 0}}function u(F){return se;function se(ue){F&&F.call(this,ue),c.call(this,ue)}}function c(F,se){const ue=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==F.type&&(se?se.call(this,F,je[0]):(je[1]||jS).call(this,F,je[0]));else throw new Error("Cannot close `"+F.type+"` ("+P0({start:F.start,end:F.end})+"): itâs not open");ue.position.end=Ji(F.end)}function d(){return X3(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function m(F){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function f(){const F=this.resume(),se=this.stack[this.stack.length-1];se.lang=F}function p(){const F=this.resume(),se=this.stack[this.stack.length-1];se.meta=F}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const F=this.resume(),se=this.stack[this.stack.length-1];se.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const F=this.resume(),se=this.stack[this.stack.length-1];se.value=F.replace(/(\r?\n|\r)$/g,"")}function y(F){const se=this.resume(),ue=this.stack[this.stack.length-1];ue.label=se,ue.identifier=fa(this.sliceSerialize(F)).toLowerCase()}function b(){const F=this.resume(),se=this.stack[this.stack.length-1];se.title=F}function k(){const F=this.resume(),se=this.stack[this.stack.length-1];se.url=F}function T(F){const se=this.stack[this.stack.length-1];if(!se.depth){const ue=this.sliceSerialize(F).length;se.depth=ue}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function j(F){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function A(F){const ue=this.stack[this.stack.length-1].children;let je=ue[ue.length-1];(!je||je.type!=="text")&&(je=ie(),je.position={start:Ji(F.start),end:void 0},ue.push(je)),this.stack.push(je)}function R(F){const se=this.stack.pop();se.value+=this.sliceSerialize(F),se.position.end=Ji(F.end)}function M(F){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ue=se.children[se.children.length-1];ue.position.end=Ji(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(A.call(this,F),R.call(this,F))}function B(){this.data.atHardBreak=!0}function W(){const F=this.resume(),se=this.stack[this.stack.length-1];se.value=F}function H(){const F=this.resume(),se=this.stack[this.stack.length-1];se.value=F}function L(){const F=this.resume(),se=this.stack[this.stack.length-1];se.value=F}function $(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";
vendor: 13,914 bytes, lines 1291-1295
1291F.type+="Reference",F.referenceType=se,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function ee(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=se,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function G(F){const se=this.sliceSerialize(F),ue=this.stack[this.stack.length-2];ue.label=Gae(se),ue.identifier=fa(se).toLowerCase()}function Q(){const F=this.stack[this.stack.length-1],se=this.resume(),ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,ue.type==="link"){const je=F.children;ue.children=je}else ue.alt=se}function D(){const F=this.resume(),se=this.stack[this.stack.length-1];se.url=F}function K(){const F=this.resume(),se=this.stack[this.stack.length-1];se.title=F}function V(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function O(F){const se=this.resume(),ue=this.stack[this.stack.length-1];ue.label=se,ue.identifier=fa(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function q(F){this.data.characterReferenceType=F.type}function ne(F){const se=this.sliceSerialize(F),ue=this.data.characterReferenceType;let je;ue?(je=xR(se,ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=_h(se);const Ge=this.stack[this.stack.length-1];Ge.value+=je}function he(F){const se=this.stack.pop();se.position.end=Ji(F.end)}function xe(F){R.call(this,F);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(F)}function Oe(F){R.call(this,F);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(F)}function Se(){return{type:"blockquote",children:[]}}function we(){return{type:"code",lang:null,meta:null,value:""}}function Be(){return{type:"inlineCode",value:""}}function ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ye(){return{type:"emphasis",children:[]}}function Ae(){return{type:"heading",depth:0,children:[]}}function Ee(){return{type:"break"}}function Ce(){return{type:"html",value:""}}function X(){return{type:"image",title:null,url:"",alt:null}}function pe(){return{type:"link",title:null,url:"",children:[]}}function _e(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function Ne(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function de(){return{type:"paragraph",children:[]}}function be(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function De(){return{type:"thematicBreak"}}}function Ji(e){return{line:e.line,column:e.column,offset:e.offset}}function _R(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?_R(e,n):Xae(e,n)}}function Xae(e,t){let r;for(r in t)if(CR.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function jS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+P0({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+P0({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+P0({start:t.start,end:t.end})+") is still open")}function Zae(e){const t=this;t.parser=r;function r(n){return Yae(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Jae(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function eie(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:` 1292`}]}function tie(e,t){const r=t.value?t.value+` 1293`:"",n={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(n.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function rie(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function nie(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sie(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),s=pd(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let o,l=e.footnoteCounts.get(n);l===void 0?(l=0,e.footnoteOrder.push(n),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(n,l);const u={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function aie(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function iie(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function AR(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=n:s.push({type:"text",value:n}),s}function oie(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return AR(e,t);const s={src:pd(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(s.title=n.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function lie(e,t){const r={src:pd(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function cie(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function uie(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return AR(e,t);const s={href:pd(n.url||"")};n.title!==null&&n.title!==void 0&&(s.title=n.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function die(e,t){const r={href:pd(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hie(e,t,r){const n=e.all(t),s=r?mie(r):jR(t),a={},o=[];if(typeof t.checked=="boolean"){const d=n[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},n.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<n.length;){const d=n[l];(s||l!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:` 1294`}),d.type==="element"&&d.tagName==="p"&&!s?o.push(...d.children):o.push(d)}const u=n[n.length-1];u&&(s||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:` 1295`});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)}function mie(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=jR(r[n])}return t}function jR(e){const t=e.spread;return t??e.children.length>1}function fie(e,t){const r={},n=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++s<n.length;){const o=n[s];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function pie(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gie(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function xie(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bie(e,t){const r=e.all(t),n=r.shift(),s=[];if(n){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],o),s.push(o)}if(r.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},l=Za(t.children[1]),u=F1(t.children[t.children.length-1]);l&&u&&(o.position={start:l,end:u}),s.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function yie(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",o=r&&r.type==="table"?r.align:void 0,l=o?o.length:t.children.length;let u=-1;const c=[];for(;++u<l;){const h=t.children[u],m={},f=o?o[u]:void 0;f&&(m.align=f);let p={type:"element",tagName:a,properties:m,children:[]};h&&(p.children=e.all(h),e.patch(h,p),p=e.applyData(h,p)),c.push(p)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function vie(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const IS=9,RS=32;function wie(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),s=0;const a=[];for(;n;)a.push(DS(t.slice(s,n.index),s>0,!0),n[0]),s=n.index+n[0].length,n=r.exec(t);return a.push(DS(t.slice(s),s>0,!1)),a.join("")}function DS(e,t,r){let n=0,s=e.length;if(t){let a=e.codePointAt(n);for(;a===IS||a===RS;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(s-1);for(;a===IS||a===RS;)s--,a=e.codePointAt(s-1)}return s>n?e.slice(n,s):""}function Eie(e,t){const r={type:"text",value:wie(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function kie(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const Nie={blockquote:Jae,break:eie,code:tie,delete:rie,emphasis:nie,footnoteReference:sie,heading:aie,html:iie,imageReference:oie,image:lie,inlineCode:cie,linkReference:uie,link:die,listItem:hie,list:fie,paragraph:pie,root:gie,strong:xie,table:bie,tableCell:vie,tableRow:yie,text:Eie,thematicBreak:kie,toml:ff,yaml:ff,definition:ff,footnoteDefinition:ff};function ff(){}const IR=-1,U1=0,F0=1,wg=2,J3=3,e5=4,t5=5,r5=6,RR=7,DR=8,MS=typeof self=="object"?self:globalThis,Sie=(e,t)=>{const r=(s,a)=>(e.set(a,s),s),n=s=>{if(e.has(s))return e.get(s);const[a,o]=t[s];switch(a){case U1:case IR:return r(o,s);case F0:{const l=r([],s);for(const u of o)l.push(n(u));return l}case wg:{const l=r({},s);for(const[u,c]of o)l[n(u)]=n(c);return l}case J3:return r(new Date(o),s);case e5:{const{source:l,flags:u}=o;return r(new RegExp(l,u),s)}case t5:{const l=r(new Map,s);for(const[u,c]of o)l.set(n(u),n(c));return l}case r5:{const l=r(new Set,s);for(const u of o)l.add(n(u));return l}case RR:{const{name:l,message:u}=o;return r(new MS[l](u),s)}case DR:return r(BigInt(o),s);case"BigInt":return r(Object(BigInt(o)),s);case"ArrayBuffer":return r(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return r(new DataView(l),o)}}return r(new MS[a](o),s)};return n},OS=e=>Sie(new Map,e)(0),Lc="",{toString:Tie}={},{keys:Cie}=Object,l0=e=>{const t=typeof e;if(t!=="object"||!e)return[U1,t];const r=Tie.call(e).slice(8,-1);switch(r){case"Array":return[F0,Lc];case"Object":return[wg,Lc];case"Date":return[J3,Lc];case"RegExp":return[e5,Lc];case"Map":return[t5,Lc];case"Set":return[r5,Lc];case"DataView":return[F0,r]}return r.includes("Array")?[F0,r]:r.includes("Error")?[RR,r]:[wg,r]},pf=([e,t])=>e===U1&&(t==="function"||t==="symbol"),_ie=(e,t,r,n)=>{const s=(o,l)=>{const u=n.push(o)-1;return r.set(l,u),u},a=o=>{if(r.has(o))return r.get(o);let[l,u]=l0(o);switch(l){case U1:{let d=o;switch(u){case"bigint":l=DR,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return s([IR],o)}return s([l,d],o)}case F0:{if(u){let m=o;return u==="DataView"?m=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(o)),s([u,[...m]],o)}const d=[],h=s([l,d],o);for(const m of o)d.push(a(m));return h}case wg:{if(u)switch(u){case"BigInt":return s([u,o.toString()],o);case"Boolean":case"Number":case"String":return s([u,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const d=[],h=s([l,d],o);for(const m of Cie(o))(e||!pf(l0(o[m])))&&d.push([a(m),a(o[m])]);return h}case J3:return s([l,o.toISOString()],o);case e5:{const{source:d,flags:h}=o;return s([l,{source:d,flags:h}],o)}case t5:{const d=[],h=s([l,d],o);for(const[m,f]of o)(e||!(pf(l0(m))||pf(l0(f))))&&d.push([a(m),a(f)]);return h}case r5:{const d=[],h=s([l,d],o);for(const m of o)(e||!pf(l0(m)))&&d.push(a(m));return h}}const{message:c}=o;return s([l,{name:u,message:c}],o)};return a},LS=(e,{json:t,lossy:r}={})=>{const n=[];return _ie(!(t||r),!!t,new Map,n)(e),n},lc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?OS(LS(e,t)):structuredClone(e):(e,t)=>OS(LS(e,t));function Aie(e,t){const r=[{type:"text",value:"â©"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function jie(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}
vendor: 20,706 bytes, lines 1295-1301
1295function Iie(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||Aie,n=e.options.footnoteBackLabel||jie,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),h=String(c.identifier).toUpperCase(),m=pd(h.toLowerCase());let f=0;const p=[],g=e.footnoteCounts.get(h);for(;g!==void 0&&++f<=g;){p.length>0&&p.push({type:"text",value:" "});let y=typeof r=="string"?r:r(u,f);typeof y=="string"&&(y={type:"text",value:y}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(u,f),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const x=d[d.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const y=x.children[x.children.length-1];y&&y.type==="text"?y.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...p)}else d.push(...p);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(c,w),l.push(w)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...lc(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` 1296`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` 1297`}]}}const cm=function(e){if(e==null)return Oie;if(typeof e=="function")return $1(e);if(typeof e=="object")return Array.isArray(e)?Rie(e):Die(e);if(typeof e=="string")return Mie(e);throw new Error("Expected function, string, or object as test")};function Rie(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=cm(e[r]);return $1(n);function n(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function Die(e){const t=e;return $1(r);function r(n){const s=n;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function Mie(e){return $1(t);function t(r){return r&&r.type===e}}function $1(e){return t;function t(r,n,s){return!!(Lie(r)&&e.call(this,r,typeof n=="number"?n:void 0,s||void 0))}}function Oie(){return!0}function Lie(e){return e!==null&&typeof e=="object"&&"type"in e}const MR=[],Pie=!0,Y2=!1,B0="skip";function z1(e,t,r,n){let s;typeof t=="function"&&typeof r!="function"?(n=r,r=t):s=t;const a=cm(s),o=n?-1:1;l(e,void 0,[])();function l(u,c,d){const h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){const f=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(f?"<"+f+">":""))+")"})}return m;function m(){let f=MR,p,g,x;if((!t||a(u,c,d[d.length-1]||void 0))&&(f=Fie(r(u,d)),f[0]===Y2))return f;if("children"in u&&u.children){const w=u;if(w.children&&f[0]!==B0)for(g=(n?w.children.length:-1)+o,x=d.concat(w);g>-1&&g<w.children.length;){const y=w.children[g];if(p=l(y,g,x)(),p[0]===Y2)return p;g=typeof p[1]=="number"?p[1]:g+o}}return f}}}function Fie(e){return Array.isArray(e)?e:typeof e=="number"?[Pie,e]:e==null?MR:[e]}function pc(e,t,r,n){let s,a,o;typeof t=="function"&&typeof r!="function"?(a=void 0,o=t,s=r):(a=t,o=r,s=n),z1(e,a,l,s);function l(u,c){const d=c[c.length-1],h=d?d.children.indexOf(u):void 0;return o(u,h,d)}}const Q2={}.hasOwnProperty,Bie={};function Uie(e,t){const r=t||Bie,n=new Map,s=new Map,a=new Map,o={...Nie,...r.handlers},l={all:c,applyData:zie,definitionById:n,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:o,one:u,options:r,patch:$ie,wrap:qie};return pc(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?n:s,m=String(d.identifier).toUpperCase();h.has(m)||h.set(m,d)}}),l;function u(d,h){const m=d.type,f=l.handlers[m];if(Q2.call(l.handlers,m)&&f)return f(l,d,h);if(l.options.passThrough&&l.options.passThrough.includes(m)){if("children"in d){const{children:g,...x}=d,w=lc(x);return w.children=l.all(d),w}return lc(d)}return(l.options.unknownHandler||Hie)(l,d,h)}function c(d){const h=[];if("children"in d){const m=d.children;let f=-1;for(;++f<m.length;){const p=l.one(m[f],d);if(p){if(f&&m[f-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=PS(p.value)),!Array.isArray(p)&&p.type==="element")){const g=p.children[0];g&&g.type==="text"&&(g.value=PS(g.value))}Array.isArray(p)?h.push(...p):h.push(p)}}}return h}}function $ie(e,t){e.position&&(t.position=jne(e))}function zie(e,t){let r=t;if(e&&e.data){const n=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const o="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:o}}r.type==="element"&&a&&Object.assign(r.properties,lc(a)),"children"in r&&r.children&&s!==null&&s!==void 0&&(r.children=s)}return r}function Hie(e,t){const r=t.data||{},n="value"in t&&!(Q2.call(r,"hProperties")||Q2.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qie(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:` 1298`});++n<e.length;)n&&r.push({type:"text",value:` 1299`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:` 1300`}),r}function PS(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function FS(e,t){const r=Uie(e,t),n=r.one(e,void 0),s=Iie(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return s&&a.children.push({type:"text",value:` 1301`},s),a}function Wie(e,t){return e&&"run"in e?async function(r,n){const s=FS(r,{file:n,...t});await e.run(s,n)}:function(r,n){return FS(r,{file:n,...e||t})}}function BS(e){if(e)throw e}var gp=Object.prototype.hasOwnProperty,OR=Object.prototype.toString,US=Object.defineProperty,$S=Object.getOwnPropertyDescriptor,zS=function(t){return typeof Array.isArray=="function"?Array.isArray(t):OR.call(t)==="[object Array]"},HS=function(t){if(!t||OR.call(t)!=="[object Object]")return!1;var r=gp.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&gp.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var s;for(s in t);return typeof s>"u"||gp.call(t,s)},qS=function(t,r){US&&r.name==="__proto__"?US(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},WS=function(t,r){if(r==="__proto__")if(gp.call(t,r)){if($S)return $S(t,r).value}else return;return t[r]},Vie=function e(){var t,r,n,s,a,o,l=arguments[0],u=1,c=arguments.length,d=!1;for(typeof l=="boolean"&&(d=l,l=arguments[1]||{},u=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});u<c;++u)if(t=arguments[u],t!=null)for(r in t)n=WS(l,r),s=WS(t,r),l!==s&&(d&&s&&(HS(s)||(a=zS(s)))?(a?(a=!1,o=n&&zS(n)?n:[]):o=n&&HS(n)?n:{},qS(l,{name:r,newValue:e(d,o,s)})):typeof s<"u"&&qS(l,{name:r,newValue:s}));return l};const Ub=Bi(Vie);function X2(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Gie(){const e=[],t={run:r,use:n};return t;function r(...s){let a=-1;const o=s.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...s);function l(u,...c){const d=e[++a];let h=-1;if(u){o(u);return}for(;++h<s.length;)(c[h]===null||c[h]===void 0)&&(c[h]=s[h]);s=c,d?Kie(d,l)(...c):o(null,...c)}}function n(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function Kie(e,t){let r;return n;function n(...o){const l=e.length>o.length;let u;l&&o.push(s);try{u=e.apply(this,o)}catch(c){const d=c;if(l&&r)throw d;return s(d)}l||(u&&u.then&&typeof u.then=="function"?u.then(a,s):u instanceof Error?s(u):a(u))}function s(o,...l){r||(r=!0,t(o,...l))}function a(o){s(null,o)}}const Oa={basename:Yie,dirname:Qie,extname:Xie,join:Zie,sep:"/"};function Yie(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');um(e);let r=0,n=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){r=s+1;break}}else n<0&&(a=!0,n=s+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let o=-1,l=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){r=s+1;break}}else o<0&&(a=!0,o=s+1),l>-1&&(e.codePointAt(s)===t.codePointAt(l--)?l<0&&(n=s):(l=-1,n=o));return r===n?n=o:n<0&&(n=e.length),e.slice(r,n)}function Qie(e){if(um(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Xie(e){um(e);let t=e.length,r=-1,n=0,s=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){n=t+1;break}continue}r<0&&(o=!0,r=t+1),l===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||r<0||a===0||a===1&&s===r-1&&s===n+1?"":e.slice(s,r)}function Zie(...e){let t=-1,r;for(;++t<e.length;)um(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Jie(r)}function Jie(e){um(e);const t=e.codePointAt(0)===47;let r=eoe(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function eoe(e,t){let r="",n=0,s=-1,a=0,o=-1,l,u;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(s===o-1||a===1))if(s!==o-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(u=r.lastIndexOf("/"),u!==r.length-1){u<0?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),s=o,a=0;continue}}else if(r.length>0){r="",n=0,s=o,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(s+1,o):r=e.slice(s+1,o),n=o-s-1;s=o,a=0}else l===46&&a>-1?a++:a=-1}return r}function um(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const toe={cwd:roe};function roe(){return"/"}function Z2(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function noe(e){if(typeof e=="string")e=new URL(e);else if(!Z2(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return soe(e)}function soe(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const $b=["history","path","basename","stem","extname","dirname"];class LR{constructor(t){let r;t?Z2(t)?r={path:t}:typeof t=="string"||aoe(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":toe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<$b.length;){const a=$b[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let s;for(s in r)$b.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?Oa.basename(this.path):void 0}set basename(t){Hb(t,"basename"),zb(t,"basename"),this.path=Oa.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Oa.dirname(this.path):void 0}set dirname(t){VS(this.basename,"dirname"),this.path=Oa.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Oa.extname(this.path):void 0}set extname(t){if(zb(t,"extname"),VS(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Oa.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Z2(t)&&(t=noe(t)),Hb(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Oa.basename(this.path,this.extname):void 0}set stem(t){Hb(t,"stem"),zb(t,"stem"),this.path=Oa.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const s=this.message(t,r,n);throw s.fatal=!0,s}info(t,r,n){const s=this.message(t,r,n);return s.fatal=void 0,s}message(t,r,n){const s=new An(t,r,n);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function zb(e,t){if(e&&e.includes(Oa.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Oa.sep+"`")}function Hb(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function VS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function aoe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ioe=function(e){const n=this.constructor.prototype,s=n[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,n),a},ooe={}.hasOwnProperty;class n5 extends ioe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Gie()}copy(){const t=new n5;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Ub(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Vb("data",this.frozen),this.namespace[t]=r,this):ooe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Vb("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const s=r.call(t,...n);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=gf(t),n=this.parser||this.Parser;return qb("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),qb("process",this.parser||this.Parser),Wb("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(a,o){const l=gf(t),u=n.parse(l);n.run(u,l,function(d,h,m){if(d||!h||!m)return c(d);const f=h,p=n.stringify(f,m);uoe(p)?m.value=p:m.result=p,c(d,m)});function c(d,h){d||!h?o(d):a?a(h):r(void 0,h)}}}processSync(t){let r=!1,n;return this.freeze(),qb("processSync",this.parser||this.Parser),Wb("processSync",this.compiler||this.Compiler),this.process(t,s),KS("processSync","process",r),n;function s(a,o){r=!0,BS(a),n=o}}run(t,r,n){GS(t),this.freeze();const s=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,l){const u=gf(r);s.run(t,u,c);function c(d,h,m){const f=h||t;d?l(d):o?o(f):n(void 0,f,m)}}}runSync(t,r){let n=!1,s;return this.run(t,r,a),KS("runSync","run",n),s;function a(o,l){BS(o),s=l,n=!0}}stringify(t,r){this.freeze();const n=gf(r),s=this.compiler||this.Compiler;return Wb("stringify",s),GS(t),s(t,n)}use(t,...r){const n=this.attachers,s=this.namespace;if(Vb("use",this.frozen),t!=null)if(typeof t=="function")u(t,r);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...h]=c;u(d,h)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(s.settings=Ub(!0,s.settings,c.settings))}function l(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const h=c[d];a(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let h=-1,m=-1;for(;++h<n.length;)if(n[h][0]===c){m=h;break}if(m===-1)n.push([c,...d]);else if(d.length>0){let[f,...p]=d;const g=n[m][1];X2(g)&&X2(f)&&(f=Ub(!0,g,f)),n[m]=[c,f,...p]}}}}const loe=new n5().freeze();function qb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Wb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Vb(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function GS(e){if(!X2(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function KS(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gf(e){return coe(e)?e:new LR(e)}function coe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function uoe(e){return typeof e=="string"||doe(e)}function doe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hoe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",YS=[],QS={allowDangerousHtml:!0},moe=/^(https?|ircs?|mailto|xmpp)$/i,foe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function poe(e){const t=goe(e),r=xoe(e);return boe(t.runSync(t.parse(r),r),e)}function goe(e){const t=e.rehypePlugins||YS,r=e.remarkPlugins||YS,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...QS}:QS;return loe().use(Zae).use(r).use(Wie,n).use(t)}function xoe(e){const t=e.children||"",r=new LR;return typeof t=="string"&&(r.value=t),r}function boe(e,t){const r=t.allowedElements,n=t.allowElement,s=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||yoe;for(const d of foe)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+hoe+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),pc(e,c),One(e,{Fragment:i.Fragment,components:s,ignoreInvalidStyle:!0,jsx:i.jsx,jsxs:i.jsxs,passKeys:!0,passNode:!0});function c(d,h,m){if(d.type==="raw"&&m&&typeof h=="number")return o?m.children.splice(h,1):m.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let f;for(f in Pb)if(Object.hasOwn(Pb,f)&&Object.hasOwn(d.properties,f)){const p=d.properties[f],g=Pb[f];(g===null||g.includes(d.tagName))&&(d.properties[f]=u(String(p||""),f,d))}}if(d.type==="element"){let f=r?!r.includes(d.tagName):a?a.includes(d.tagName):!1;if(!f&&n&&typeof h=="number"&&(f=!n(d,h,m)),f&&m&&typeof h=="number")return l&&d.children?m.children.splice(h,1,...d.children):m.children.splice(h,1),h}}}function yoe(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||r!==-1&&t>r||n!==-1&&t>n||moe.test(e.slice(0,t))?e:""}function Eg(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,s=r.indexOf(t);for(;s!==-1;)n++,s=r.indexOf(t,s+t.length);return n}function voe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function woe(e,t,r){const s=cm((r||{}).ignore||[]),a=Eoe(t);let o=-1;for(;++o<a.length;)z1(e,"text",l);function l(c,d){let h=-1,m;
vendor: 5,071 bytes, lines 1301-1302
1301for(;++h<d.length;){const f=d[h],p=m?m.children:void 0;if(s(f,p?p.indexOf(f):void 0,m))return;m=f}if(m)return u(c,d)}function u(c,d){const h=d[d.length-1],m=a[o][0],f=a[o][1];let p=0;const x=h.children.indexOf(c);let w=!1,y=[];m.lastIndex=0;let b=m.exec(c.value);for(;b;){const k=b.index,T={index:b.index,input:b.input,stack:[...d,c]};let S=f(...b,T);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?m.lastIndex=k+1:(p!==k&&y.push({type:"text",value:c.value.slice(p,k)}),Array.isArray(S)?y.push(...S):S&&y.push(S),p=k+b[0].length,w=!0),!m.global)break;b=m.exec(c.value)}return w?(p<c.value.length&&y.push({type:"text",value:c.value.slice(p)}),h.children.splice(x,1,...y)):y=[c],x+y.length}}function Eoe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const s=r[n];t.push([koe(s[0]),Noe(s[1])])}return t}function koe(e){return typeof e=="string"?new RegExp(voe(e),"g"):e}function Noe(e){return typeof e=="function"?e:function(){return e}}const Gb="phrasing",Kb=["autolink","link","image","label"];function Soe(){return{transforms:[Roe],enter:{literalAutolink:Coe,literalAutolinkEmail:Yb,literalAutolinkHttp:Yb,literalAutolinkWww:Yb},exit:{literalAutolink:Ioe,literalAutolinkEmail:joe,literalAutolinkHttp:_oe,literalAutolinkWww:Aoe}}}function Toe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Gb,notInConstruct:Kb},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Gb,notInConstruct:Kb},{character:":",before:"[ps]",after:"\\/",inConstruct:Gb,notInConstruct:Kb}]}}function Coe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Yb(e){this.config.enter.autolinkProtocol.call(this,e)}function _oe(e){this.config.exit.autolinkProtocol.call(this,e)}function Aoe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function joe(e){this.config.exit.autolinkEmail.call(this,e)}function Ioe(e){this.exit(e)}function Roe(e){woe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Doe],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Moe]],{ignore:["link","linkReference"]})}function Doe(e,t,r,n,s){let a="";if(!PR(s)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!Ooe(r)))return!1;const o=Loe(r+n);if(!o[0])return!1;const l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function Moe(e,t,r,n){return!PR(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function Ooe(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Loe(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const s=Eg(e,"(");let a=Eg(e,")");for(;n!==-1&&s>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function PR(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||ba(r)||Yo(r))&&(!t||r!==47)}FR.peek=Woe;function Poe(){this.buffer()}function Foe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Boe(){this.buffer()}function Uoe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function $oe(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=fa(this.sliceSerialize(e)).toLowerCase(),r.label=t}function zoe(e){this.exit(e)}function Hoe(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=fa(this.sliceSerialize(e)).toLowerCase(),r.label=t}function qoe(e){this.exit(e)}function Woe(){return"["}function FR(e,t,r,n){const s=r.createTracker(n);let a=s.move("[^");const o=r.enter("footnoteReference"),l=r.enter("reference");return a+=s.move(r.safe(r.associationId(e),{after:"]",before:a})),l(),o(),a+=s.move("]"),a}function Voe(){return{enter:{gfmFootnoteCallString:Poe,gfmFootnoteCall:Foe,gfmFootnoteDefinitionLabelString:Boe,gfmFootnoteDefinition:Uoe},exit:{gfmFootnoteCallString:$oe,gfmFootnoteCall:zoe,gfmFootnoteDefinitionLabelString:Hoe,gfmFootnoteDefinition:qoe}}}function Goe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:FR},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,s,a,o){const l=a.createTracker(o);let u=l.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return u+=l.move(a.safe(a.associationId(n),{before:u,after:"]"})),d(),u+=l.move("]:"),n.children&&n.children.length>0&&(l.shift(4),u+=l.move((t?` 1302`:" ")+a.indentLines(a.containerFlow(n,l.current()),t?BR:Koe))),c(),u}}function Koe(e,t,r){return t===0?e:BR(e,t,r)}function BR(e,t,r){return(r?"":" ")+e}const Yoe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];UR.peek=ele;
vendor: 8,519 bytes, lines 1302-1314
1302function Qoe(){return{canContainEols:["delete"],enter:{strikethrough:Zoe},exit:{strikethrough:Joe}}}function Xoe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Yoe}],handlers:{delete:UR}}}function Zoe(e){this.enter({type:"delete",children:[]},e)}function Joe(e){this.exit(e)}function UR(e,t,r,n){const s=r.createTracker(n),a=r.enter("strikethrough");let o=s.move("~~");return o+=r.containerPhrasing(e,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),a(),o}function ele(){return"~"}function tle(e){return e.length}function rle(e,t){const r=t||{},n=(r.align||[]).concat(),s=r.stringLength||tle,a=[],o=[],l=[],u=[];let c=0,d=-1;for(;++d<e.length;){const g=[],x=[];let w=-1;for(e[d].length>c&&(c=e[d].length);++w<e[d].length;){const y=nle(e[d][w]);if(r.alignDelimiters!==!1){const b=s(y);x[w]=b,(u[w]===void 0||b>u[w])&&(u[w]=b)}g.push(y)}o[d]=g,l[d]=x}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<c;)a[h]=XS(n[h]);else{const g=XS(n);for(;++h<c;)a[h]=g}h=-1;const m=[],f=[];for(;++h<c;){const g=a[h];let x="",w="";g===99?(x=":",w=":"):g===108?x=":":g===114&&(w=":");let y=r.alignDelimiters===!1?1:Math.max(1,u[h]-x.length-w.length);const b=x+"-".repeat(y)+w;r.alignDelimiters!==!1&&(y=x.length+y+w.length,y>u[h]&&(u[h]=y),f[h]=y),m[h]=b}o.splice(1,0,m),l.splice(1,0,f),d=-1;const p=[];for(;++d<o.length;){const g=o[d],x=l[d];h=-1;const w=[];for(;++h<c;){const y=g[h]||"";let b="",k="";if(r.alignDelimiters!==!1){const T=u[h]-(x[h]||0),S=a[h];S===114?b=" ".repeat(T):S===99?T%2?(b=" ".repeat(T/2+.5),k=" ".repeat(T/2-.5)):(b=" ".repeat(T/2),k=b):k=" ".repeat(T)}r.delimiterStart!==!1&&!h&&w.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&y==="")&&(r.delimiterStart!==!1||h)&&w.push(" "),r.alignDelimiters!==!1&&w.push(b),w.push(y),r.alignDelimiters!==!1&&w.push(k),r.padding!==!1&&w.push(" "),(r.delimiterEnd!==!1||h!==c-1)&&w.push("|")}p.push(r.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return p.join(` 1303`)}function nle(e){return e==null?"":String(e)}function XS(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const ZS={}.hasOwnProperty;function $R(e,t){const r=t||{};function n(s,...a){let o=n.invalid;const l=n.handlers;if(s&&ZS.call(s,e)){const u=String(s[e]);o=ZS.call(l,u)?l[u]:n.unknown}if(o)return o.call(this,s,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}function sle(e,t,r,n){const s=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const o=r.indentLines(r.containerFlow(e,a.current()),ale);return s(),o}function ale(e,t,r){return">"+(r?"":" ")+e}function ile(e,t){return JS(e,t.inConstruct,!0)&&!JS(e,t.notInConstruct,!1)}function JS(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function eT(e,t,r,n){let s=-1;for(;++s<r.unsafe.length;)if(r.unsafe[s].character===` 1304`&&ile(r.stack,r.unsafe[s]))return/[ \t]/.test(n.before)?"":" ";return`\\ 1305`}function zR(e,t){const r=String(e);let n=r.indexOf(t),s=n,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===s?++a>o&&(o=a):a=1,s=n+t.length,n=r.indexOf(t,s);return o}function ole(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function lle(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function cle(e,t,r,n){const s=lle(r),a=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if(ole(e,r)){const h=r.enter("codeIndented"),m=r.indentLines(a,ule);return h(),m}const l=r.createTracker(n),u=s.repeat(Math.max(zR(a,s)+1,3)),c=r.enter("codeFenced");let d=l.move(u);if(e.lang){const h=r.enter(`codeFencedLang${o}`);d+=l.move(r.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=r.enter(`codeFencedMeta${o}`);d+=l.move(" "),d+=l.move(r.safe(e.meta,{before:d,after:` 1306`,encode:["`"],...l.current()})),h()}return d+=l.move(` 1307`),a&&(d+=l.move(a+` 1308`)),d+=l.move(u),c(),d}function ule(e,t,r){return(r?"":" ")+e}function s5(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function dle(e,t,r,n){const s=s5(r),a=s==='"'?"Quote":"Apostrophe",o=r.enter("definition");let l=r.enter("label");const u=r.createTracker(n);let c=u.move("[");return c+=u.move(r.safe(r.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(r.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=r.enter("destinationRaw"),c+=u.move(r.safe(e.url,{before:c,after:e.title?" ":` 1309`,...u.current()}))),l(),e.title&&(l=r.enter(`title${a}`),c+=u.move(" "+s),c+=u.move(r.safe(e.title,{before:c,after:s,...u.current()})),c+=u.move(s),l()),o(),c}function hle(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ah(e){return"&#x"+e.toString(16).toUpperCase()+";"}function kg(e,t,r){const n=Qu(e),s=Qu(t);return n===void 0?s===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}HR.peek=mle;function HR(e,t,r,n){const s=hle(r),a=r.enter("emphasis"),o=r.createTracker(n),l=o.move(s);let u=o.move(r.containerPhrasing(e,{after:s,before:l,...o.current()}));const c=u.charCodeAt(0),d=kg(n.before.charCodeAt(n.before.length-1),c,s);d.inside&&(u=Ah(c)+u.slice(1));const h=u.charCodeAt(u.length-1),m=kg(n.after.charCodeAt(0),h,s);m.inside&&(u=u.slice(0,-1)+Ah(h));const f=o.move(s);return a(),r.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+u+f}function mle(e,t,r){return r.options.emphasis||"*"}function fle(e,t){let r=!1;return pc(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Y2}),!!((!e.depth||e.depth<3)&&X3(e)&&(t.options.setext||r))}function ple(e,t,r,n){const s=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(fle(e,r)){const d=r.enter("headingSetext"),h=r.enter("phrasing"),m=r.containerPhrasing(e,{...a.current(),before:` 1310`,after:` 1311`});return h(),d(),m+` 1312`+(s===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(` 1313`))+1))}const o="#".repeat(s),l=r.enter("headingAtx"),u=r.enter("phrasing");a.move(o+" ");let c=r.containerPhrasing(e,{before:"# ",after:` 1314`,...a.current()});return/^[\t ]/.test(c)&&(c=Ah(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,r.options.closeAtx&&(c+=" "+o),u(),l(),c}qR.peek=gle;function qR(e){return e.value||""}function gle(){return"<"}WR.peek=xle;function WR(e,t,r,n){const s=s5(r),a=s==='"'?"Quote":"Apostrophe",o=r.enter("image");let l=r.enter("label");const u=r.createTracker(n);let c=u.move("![");return c+=u.move(r.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(r.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=r.enter("destinationRaw"),c+=u.move(r.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),l(),e.title&&(l=r.enter(`title${a}`),c+=u.move(" "+s),c+=u.move(r.safe(e.title,{before:c,after:s,...u.current()})),c+=u.move(s),l()),c+=u.move(")"),o(),c}function xle(){return"!"}VR.peek=ble;function VR(e,t,r,n){const s=e.referenceType,a=r.enter("imageReference");let o=r.enter("label");const l=r.createTracker(n);let u=l.move("![");const c=r.safe(e.alt,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),o();const d=r.stack;r.stack=[],o=r.enter("reference");const h=r.safe(r.associationId(e),{before:u,after:"]",...l.current()});return o(),r.stack=d,a(),s==="full"||!c||c!==h?u+=l.move(h+"]"):s==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function ble(){return"!"}GR.peek=yle;function GR(e,t,r){let n=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(n);)s+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const o=r.unsafe[a],l=r.compilePattern(o);let u;if(o.atBreak)for(;u=l.exec(n);){let c=u.index;
vendor: 5,484 bytes, line 1314
1314n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(u.index+1)}}return s+n+s}function yle(){return"`"}function KR(e,t){const r=X3(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}YR.peek=vle;function YR(e,t,r,n){const s=s5(r),a=s==='"'?"Quote":"Apostrophe",o=r.createTracker(n);let l,u;if(KR(e,r)){const d=r.stack;r.stack=[],l=r.enter("autolink");let h=o.move("<");return h+=o.move(r.containerPhrasing(e,{before:h,after:">",...o.current()})),h+=o.move(">"),l(),r.stack=d,h}l=r.enter("link"),u=r.enter("label");let c=o.move("[");return c+=o.move(r.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=r.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(r.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=r.enter("destinationRaw"),c+=o.move(r.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=r.enter(`title${a}`),c+=o.move(" "+s),c+=o.move(r.safe(e.title,{before:c,after:s,...o.current()})),c+=o.move(s),u()),c+=o.move(")"),l(),c}function vle(e,t,r){return KR(e,r)?"<":"["}QR.peek=wle;function QR(e,t,r,n){const s=e.referenceType,a=r.enter("linkReference");let o=r.enter("label");const l=r.createTracker(n);let u=l.move("[");const c=r.containerPhrasing(e,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),o();const d=r.stack;r.stack=[],o=r.enter("reference");const h=r.safe(r.associationId(e),{before:u,after:"]",...l.current()});return o(),r.stack=d,a(),s==="full"||!c||c!==h?u+=l.move(h+"]"):s==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function wle(){return"["}function a5(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ele(e){const t=a5(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function kle(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function XR(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Nle(e,t,r,n){const s=r.enter("list"),a=r.bulletCurrent;let o=e.ordered?kle(r):a5(r);const l=e.ordered?o==="."?")":".":Ele(r);let u=t&&r.bulletLastUsed?o===r.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(u=!0),XR(r)===o&&d){let h=-1;for(;++h<e.children.length;){const m=e.children[h];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=l),r.bulletCurrent=o;const c=r.containerFlow(e,n);return r.bulletLastUsed=o,r.bulletCurrent=a,s(),c}function Sle(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Tle(e,t,r,n){const s=Sle(r);let a=r.bulletCurrent||a5(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=r.createTracker(n);l.move(a+" ".repeat(o-a.length)),l.shift(o);const u=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,l.current()),d);return u(),c;function d(h,m,f){return m?(f?"":" ".repeat(o))+h:(f?a:a+" ".repeat(o-a.length))+h}}function Cle(e,t,r,n){const s=r.enter("paragraph"),a=r.enter("phrasing"),o=r.containerPhrasing(e,n);return a(),s(),o}const _le=cm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ale(e,t,r,n){return(e.children.some(function(o){return _le(o)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function jle(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ZR.peek=Ile;function ZR(e,t,r,n){const s=jle(r),a=r.enter("strong"),o=r.createTracker(n),l=o.move(s+s);let u=o.move(r.containerPhrasing(e,{after:s,before:l,...o.current()}));const c=u.charCodeAt(0),d=kg(n.before.charCodeAt(n.before.length-1),c,s);d.inside&&(u=Ah(c)+u.slice(1));const h=u.charCodeAt(u.length-1),m=kg(n.after.charCodeAt(0),h,s);m.inside&&(u=u.slice(0,-1)+Ah(h));const f=o.move(s+s);return a(),r.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+u+f}function Ile(e,t,r){return r.options.strong||"*"}
vendor: 5,116 bytes, lines 1314-1316
1314function Rle(e,t,r,n){return r.safe(e.value,n)}function Dle(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Mle(e,t,r){const n=(XR(r)+(r.options.ruleSpaces?" ":"")).repeat(Dle(r));return r.options.ruleSpaces?n.slice(0,-1):n}const JR={blockquote:sle,break:eT,code:cle,definition:dle,emphasis:HR,hardBreak:eT,heading:ple,html:qR,image:WR,imageReference:VR,inlineCode:GR,link:YR,linkReference:QR,list:Nle,listItem:Tle,paragraph:Cle,root:Ale,strong:ZR,text:Rle,thematicBreak:Mle};function Ole(){return{enter:{table:Lle,tableData:tT,tableHeader:tT,tableRow:Fle},exit:{codeText:Ble,table:Ple,tableData:Qb,tableHeader:Qb,tableRow:Qb}}}function Lle(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function Ple(e){this.exit(e),this.data.inTable=void 0}function Fle(e){this.enter({type:"tableRow",children:[]},e)}function Qb(e){this.exit(e)}function tT(e){this.enter({type:"tableCell",children:[]},e)}function Ble(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ule));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function Ule(e,t){return t==="|"?t:e}function $le(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,s=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` 1315`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:o,tableCell:u,tableRow:l}};function o(f,p,g,x){return c(d(f,g,x),f.align)}function l(f,p,g,x){const w=h(f,g,x),y=c([w]);return y.slice(0,y.indexOf(` 1316`))}function u(f,p,g,x){const w=g.enter("tableCell"),y=g.enter("phrasing"),b=g.containerPhrasing(f,{...x,before:a,after:a});return y(),w(),b}function c(f,p){return rle(f,{align:p,alignDelimiters:n,padding:r,stringLength:s})}function d(f,p,g){const x=f.children;let w=-1;const y=[],b=p.enter("table");for(;++w<x.length;)y[w]=h(x[w],p,g);return b(),y}function h(f,p,g){const x=f.children;let w=-1;const y=[],b=p.enter("tableRow");for(;++w<x.length;)y[w]=u(x[w],f,p,g);return b(),y}function m(f,p,g){let x=JR.inlineCode(f,p,g);return g.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function zle(){return{exit:{taskListCheckValueChecked:rT,taskListCheckValueUnchecked:rT,paragraph:qle}}}function Hle(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wle}}}function rT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function qle(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const s=t.children;let a=-1,o;for(;++a<s.length;){const l=s[a];if(l.type==="paragraph"){o=l;break}}o===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Wle(e,t,r,n){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=r.createTracker(n);a&&l.move(o);let u=JR.listItem(e,t,r,{...n,...l.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+o}}function Vle(){return[Soe(),Voe(),Qoe(),Ole(),zle()]}function Gle(e){return{extensions:[Toe(),Goe(e),Xoe(),$le(e),Hle()]}}const Kle={tokenize:ece,partial:!0},eD={tokenize:tce,partial:!0},tD={tokenize:rce,partial:!0},rD={tokenize:nce,partial:!0},Yle={tokenize:sce,partial:!0},nD={name:"wwwAutolink",tokenize:Zle,previous:aD},sD={name:"protocolAutolink",tokenize:Jle,previous:iD},Hi={name:"emailAutolink",tokenize:Xle,previous:oD},Ja={};function Qle(){return{text:Ja}}let ml=48;for(;ml<123;)Ja[ml]=Hi,ml++,ml===58?ml=65:ml===91&&(ml=97);Ja[43]=Hi;Ja[45]=Hi;Ja[46]=Hi;Ja[95]=Hi;Ja[72]=[Hi,sD];Ja[104]=[Hi,sD];Ja[87]=[Hi,nD];Ja[119]=[Hi,nD];function Xle(e,t,r){const n=this;let s,a;return o;function o(h){return!J2(h)||!oD.call(n,n.previous)||i5(n.events)?r(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(h))}function l(h){return J2(h)?(e.consume(h),l):h===64?(e.consume(h),u):r(h)}function u(h){return h===46?e.check(Yle,d,c)(h):h===45||h===95||Sn(h)?(a=!0,e.consume(h),u):d(h)}function c(h){return e.consume(h),s=!0,u}function d(h){return a&&s&&Hn(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):r(h)}}function Zle(e,t,r){const n=this;return s;function s(o){return o!==87&&o!==119||!aD.call(n,n.previous)||i5(n.events)?r(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Kle,e.attempt(eD,e.attempt(tD,a),r),r)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function Jle(e,t,r){const n=this;let s="",a=!1;return o;
vendor: 7,898 bytes, line 1316
1316function o(h){return(h===72||h===104)&&iD.call(n,n.previous)&&!i5(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(h),e.consume(h),l):r(h)}function l(h){if(Hn(h)&&s.length<5)return s+=String.fromCodePoint(h),e.consume(h),l;if(h===58){const m=s.toLowerCase();if(m==="http"||m==="https")return e.consume(h),u}return r(h)}function u(h){return h===47?(e.consume(h),a?c:(a=!0,u)):r(h)}function c(h){return h===null||vg(h)||Lt(h)||ba(h)||Yo(h)?r(h):e.attempt(eD,e.attempt(tD,d),r)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function ece(e,t,r){let n=0;return s;function s(o){return(o===87||o===119)&&n<3?(n++,e.consume(o),s):o===46&&n===3?(e.consume(o),a):r(o)}function a(o){return o===null?r(o):t(o)}}function tce(e,t,r){let n,s,a;return o;function o(c){return c===46||c===95?e.check(rD,u,l)(c):c===null||Lt(c)||ba(c)||c!==45&&Yo(c)?u(c):(a=!0,e.consume(c),o)}function l(c){return c===95?n=!0:(s=n,n=void 0),e.consume(c),o}function u(c){return s||n||!a?r(c):t(c)}}function rce(e,t){let r=0,n=0;return s;function s(o){return o===40?(r++,e.consume(o),s):o===41&&n<r?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(rD,t,a)(o):o===null||Lt(o)||ba(o)?t(o):(e.consume(o),s)}function a(o){return o===41&&n++,e.consume(o),s}}function nce(e,t,r){return n;function n(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),n):l===38?(e.consume(l),a):l===93?(e.consume(l),s):l===60||l===null||Lt(l)||ba(l)?t(l):r(l)}function s(l){return l===null||l===40||l===91||Lt(l)||ba(l)?t(l):n(l)}function a(l){return Hn(l)?o(l):r(l)}function o(l){return l===59?(e.consume(l),n):Hn(l)?(e.consume(l),o):r(l)}}function sce(e,t,r){return n;function n(a){return e.consume(a),s}function s(a){return Sn(a)?r(a):t(a)}}function aD(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Lt(e)}function iD(e){return!Hn(e)}function oD(e){return!(e===47||J2(e))}function J2(e){return e===43||e===45||e===46||e===95||Sn(e)}function i5(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const ace={tokenize:mce,partial:!0};function ice(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:uce,continuation:{tokenize:dce},exit:hce}},text:{91:{name:"gfmFootnoteCall",tokenize:cce},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oce,resolveTo:lce}}}}function oce(e,t,r){const n=this;let s=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;s--;){const u=n.events[s][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return l;function l(u){if(!o||!o._balanced)return r(u);const c=fa(n.sliceSerialize({start:o.end,end:n.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?r(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function lce(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...l),e}function cce(e,t,r){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,o;return l;function l(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),u}function u(h){return h!==94?r(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(a>999||h===93&&!o||h===null||h===91||Lt(h))return r(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return s.includes(fa(n.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(h)}return Lt(h)||(o=!0),a++,e.consume(h),h===92?d:c}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function uce(e,t,r){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0,l;return u;function u(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):r(p)}function d(p){if(o>999||p===93&&!l||p===null||p===91||Lt(p))return r(p);if(p===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return a=fa(n.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Lt(p)||(l=!0),o++,e.consume(p),p===92?h:d}function h(p){return p===91||p===92||p===93?(e.consume(p),o++,d):d(p)}function m(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s.includes(a)||s.push(a),bt(e,f,"gfmFootnoteDefinitionWhitespace")):r(p)}function f(p){return t(p)}}function dce(e,t,r){return e.check(lm,t,e.attempt(ace,t,r))}function hce(e){e.exit("gfmFootnoteDefinition")}function mce(e,t,r){const n=this;return bt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):r(a)}}function fce(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:s};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function s(o,l){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let c=u;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[u][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[u][1].end)},h={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[u][1].start)},m=[["enter",d,l],["enter",o[c][1],l],["exit",o[c][1],l],["enter",h,l]],f=l.parser.constructs.insideSpan.null;f&&Es(m,m.length,0,B1(f,o.slice(c+1,u),l)),Es(m,m.length,0,[["exit",h,l],["enter",o[u][1],l],["exit",o[u][1],l],["exit",d,l]]),Es(o,c-1,u-c+3,m),u=c+m.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function a(o,l,u){const c=this.previous,d=this.events;let h=0;return m;function m(p){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(p):(o.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const g=Qu(c);if(p===126)return h>
vendor: 1,513 bytes, line 1316
13161?u(p):(o.consume(p),h++,f);if(h<2&&!r)return u(p);const x=o.exit("strikethroughSequenceTemporary"),w=Qu(p);return x._open=!w||w===2&&!!g,x._close=!g||g===2&&!!w,l(p)}}}class pce{constructor(){this.map=[]}add(t,r,n){gce(this,t,r,n)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let s=n.pop();for(;s;){for(const a of s)t.push(a);s=n.pop()}this.map.length=0}}function gce(e,t,r,n){let s=0;if(!(r===0&&n.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=r,e.map[s][2].push(...n);return}s+=1}e.map.push([t,r,n])}}function xce(e,t){let r=!1;const n=[];for(;t<e.length;){const s=e[t];if(r){if(s[0]==="enter")s[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function bce(){return{flow:{null:{name:"table",tokenize:yce,resolveAll:vce}}}}function yce(e,t,r){const n=this;let s=0,a=0,o;return l;function l(R){let M=n.events.length-1;for(;M>-1;){const H=n.events[M][1].type;if(H==="lineEnding"||H==="linePrefix")M--;else break}const B=M>-1?n.events[M][1].type:null,W=B==="tableHead"||B==="tableRow"?S:u;
vendor: 4,777 bytes, line 1316
1316return W===S&&n.parser.lazy[n.now().line]?r(R):W(R)}function u(R){return e.enter("tableHead"),e.enter("tableRow"),c(R)}function c(R){return R===124||(o=!0,a+=1),d(R)}function d(R){return R===null?r(R):Ze(R)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),f):r(R):_t(R)?bt(e,d,"whitespace")(R):(a+=1,o&&(o=!1,s+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),h(R)))}function h(R){return R===null||R===124||Lt(R)?(e.exit("data"),d(R)):(e.consume(R),R===92?m:h)}function m(R){return R===92||R===124?(e.consume(R),h):h(R)}function f(R){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(R):(e.enter("tableDelimiterRow"),o=!1,_t(R)?bt(e,p,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):p(R))}function p(R){return R===45||R===58?x(R):R===124?(o=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),g):T(R)}function g(R){return _t(R)?bt(e,x,"whitespace")(R):x(R)}function x(R){return R===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),w):R===45?(a+=1,w(R)):R===null||Ze(R)?k(R):T(R)}function w(R){return R===45?(e.enter("tableDelimiterFiller"),y(R)):T(R)}function y(R){return R===45?(e.consume(R),y):R===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(R))}function b(R){return _t(R)?bt(e,k,"whitespace")(R):k(R)}function k(R){return R===124?p(R):R===null||Ze(R)?!o||s!==a?T(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):T(R)}function T(R){return r(R)}function S(R){return e.enter("tableRow"),j(R)}function j(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),j):R===null||Ze(R)?(e.exit("tableRow"),t(R)):_t(R)?bt(e,j,"whitespace")(R):(e.enter("data"),E(R))}function E(R){return R===null||R===124||Lt(R)?(e.exit("data"),j(R)):(e.consume(R),R===92?A:E)}function A(R){return R===92||R===124?(e.consume(R),E):E(R)}}function vce(e,t){let r=-1,n=!0,s=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,u=0,c,d,h;const m=new pce;for(;++r<e.length;){const f=e[r],p=f[1];f[0]==="enter"?p.type==="tableHead"?(l=!1,u!==0&&(nT(m,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},m.add(r,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(n=!0,h=void 0,a=[0,0,0,0],o=[0,r+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},m.add(r,0,[["enter",d,t]])),s=p.type==="tableDelimiterRow"?2:d?3:1):s&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(n=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],h=xf(m,t,a,s,void 0,h),a=[0,0,0,0]),o[2]=r)):p.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(o[0]=o[1],h=xf(m,t,a,s,void 0,h)),a=o,o=[a[1],r,0,0])):p.type==="tableHead"?(l=!0,u=r):p.type==="tableRow"||p.type==="tableDelimiterRow"?(u=r,a[1]!==0?(o[0]=o[1],h=xf(m,t,a,s,r,h)):o[1]!==0&&(h=xf(m,t,o,s,r,h)),s=0):s&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=r)}for(u!==0&&nT(m,t,u,c,d),m.consume(t.events),r=-1;++r<t.events.length;){const f=t.events[r];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=xce(t.events,r))}return e}function xf(e,t,r,n,s,a){const o=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",l="tableContent";r[0]!==0&&(a.end=Object.assign({},qc(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const u=qc(t.events,r[1]);if(a={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const c=qc(t.events,r[2]),d=qc(t.events,r[3]),h={type:l,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(r[2],0,[["enter",h,t]]),n!==2){const m=t.events[r[2]],f=t.events[r[3]];if(m[1].end=Object.assign({},f[1].end),m[1].type="chunkText",m[1].contentType="text",r[3]>r[2]+1){const p=r[2]+1,g=r[3]-r[2]-1;e.add(p,g,[])}}e.add(r[3]+1,0,[["exit",h,t]])}return s!==void 0&&(a.end=Object.assign({},qc(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function nT(e,t,r,n,s){const a=[],o=qc(t.events,r);s&&(s.end=Object.assign({},o),a.push(["exit",s,t])),n.end=Object.assign({},o),a.push(["exit",n,t]),e.add(r+1,0,a)}function qc(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const wce={name:"tasklistCheck",tokenize:kce};function Ece(){return{text:{91:wce}}}function kce(e,t,r){const n=this;return s;function s(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return Lt(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u
vendor: 4,897 bytes, lines 1316-1320
1316===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):r(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):r(u)}function l(u){return Ze(u)?t(u):_t(u)?e.check({tokenize:Nce},t,r)(u):r(u)}}function Nce(e,t,r){return bt(e,n,"whitespace");function n(s){return s===null?r(s):t(s)}}function Sce(e){return gR([Qle(),ice(),fce(e),bce(),Ece()])}const Tce={};function Cce(e){const t=this,r=e||Tce,n=t.data(),s=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);s.push(Sce(r)),a.push(Vle()),o.push(Gle(r))}function _ce(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:s,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:o,mathTextData:l}};function e(u){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},u)}function t(){this.buffer()}function r(){const u=this.resume(),c=this.stack[this.stack.length-1];c.type,c.meta=u}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(u){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(u),d.value=c;const h=d.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function a(u){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},u),this.buffer()}function o(u){const c=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(u),d.value=c,d.data.hChildren.push({type:"text",value:c})}function l(u){this.config.enter.data.call(this,u),this.config.exit.data.call(this,u)}}function Ace(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` 1317`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(a,o,l,u){const c=a.value||"",d=l.createTracker(u),h="$".repeat(Math.max(zR(c,"$")+1,2)),m=l.enter("mathFlow");let f=d.move(h);if(a.meta){const p=l.enter("mathFlowMeta");f+=d.move(l.safe(a.meta,{after:` 1318`,before:f,encode:["$"],...d.current()})),p()}return f+=d.move(` 1319`),c&&(f+=d.move(c+` 1320`)),f+=d.move(h),m(),f}function n(a,o,l){let u=a.value||"",c=1;for(t||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(u);)c++;const d="$".repeat(c);/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^\$|\$$/.test(u))&&(u=" "+u+" ");let h=-1;for(;++h<l.unsafe.length;){const m=l.unsafe[h];if(!m.atBreak)continue;const f=l.compilePattern(m);let p;for(;p=f.exec(u);){let g=p.index;u.codePointAt(g)===10&&u.codePointAt(g-1)===13&&g--,u=u.slice(0,g)+" "+u.slice(p.index+1)}}return d+u+d}function s(){return"$"}}const jce={tokenize:Ice,concrete:!0,name:"mathFlow"},sT={tokenize:Rce,partial:!0};function Ice(e,t,r){const n=this,s=n.events[n.events.length-1],a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0;let o=0;return l;function l(y){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),u(y)}function u(y){return y===36?(e.consume(y),o++,u):o<2?r(y):(e.exit("mathFlowFenceSequence"),bt(e,c,"whitespace")(y))}function c(y){return y===null||Ze(y)?h(y):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===null||Ze(y)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),h(y)):y===36?r(y):(e.consume(y),d)}function h(y){return e.exit("mathFlowFence"),n.interrupt?t(y):e.attempt(sT,m,x)(y)}function m(y){return e.attempt({tokenize:w,partial:!0},x,f)(y)}function f(y){return(a?bt(e,p,"linePrefix",a+1):p)(y)}function p(y){return y===null?x(y):Ze(y)?e.attempt(sT,m,x)(y):(e.enter("mathFlowValue"),g(y))}function g(y){return y===null||Ze(y)?(e.exit("mathFlowValue"),p(y)):(e.consume(y),g)}function x(y){return e.exit("mathFlow"),t(y)}function w(y,b,k){let T=0;return bt(y,S,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function S(A){return y.enter("mathFlowFence"),y.enter("mathFlowFenceSequence"),j(A)}function j(A){return A===36?(T++,y.consume(A),j):T<o?k(A):(y.exit("mathFlowFenceSequence"),bt(y,E,"whitespace")(A))}function E(A){return A===null||Ze(A)?(y.exit("mathFlowFence"),b(A)):k(A)}}}function Rce(e,t,r){const n=this;return s;function s(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function Dce(e){let r=(e||{}).singleDollarTextMath;
1320return r==null&&(r=!0),{tokenize:n,resolve:Mce,previous:Oce,name:"mathText"};function n(s,a,o){let l=0,u,c;return d;function d(g){return s.enter("mathText"),s.enter("mathTextSequence"),h(g)}function h(g){return g===36?(s.consume(g),l++,h):l<2&&!r?o(g):(s.exit("mathTextSequence"),m(g))}function m(g){return g===null?o(g):g===36?(c=s.enter("mathTextSequence"),u=0,p(g)):g===32?(s.enter("space"),s.consume(g),s.exit("space"),m):Ze(g)?(s.enter("lineEnding"),s.consume(g),s.exit("lineEnding"),m):(s.enter("mathTextData"),f(g))}function f(g){return g===null||g===32||g===36||Ze(g)?(s.exit("mathTextData"),m(g)):(s.consume(g),f)}function p(g){return g===36?(s.consume(g),u++,p):u===l?(s.exit("mathTextSequence"),s.exit("mathText"),a(g)):(c.type="mathTextData",f(g))}}}function Mce(e){let t=e.length-4,r=3,n,s;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)s===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(s=n):(n===t||e[n][1].type==="lineEnding")&&(e[s][1].type="mathTextData",n!==s+2&&(e[s][1].end=e[n-1][1].end,e.splice(s+2,n-s-2),t-=n-s-2,n=s+2),s=void 0);return e}function Oce(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function Lce(e){return{flow:{36:jce},text:{36:Dce(e)}}}class ze extends Error{constructor(t,r){var n="KaTeX parse error: "+t,s,a,o=r&&r.loc;if(o&&o.start<=o.end){var l=o.lexer.input;s=o.start,a=o.end,s===l.length?n+=" at end of input: ":n+=" at position "+(s+1)+": ";var u=l.slice(s,a).replace(/[^]/g,"$&̲"),c;s>15?c="â¦"+l.slice(s-15,s):c=l.slice(0,s);var d;a+15<l.length?d=l.slice(a,a+15)+"â¦":d=l.slice(a),n+=c+u+d}super(n),this.name="ParseError",Object.setPrototypeOf(this,ze.prototype),this.position=s,s!=null&&a!=null&&(this.length=a-s),this.rawMessage=t}}var Pce=/([A-Z])/g,o5=e=>e.replace(Pce,"-$1").toLowerCase(),Fce={"&":"&",">":">","<":"<",'"':""","'":"'"},Bce=/[&><"']/g,Cn=e=>String(e).replace(Bce,t=>Fce[t]),xp=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?xp(e.body[0]):e:e.type==="font"?xp(e.body):e,Uce=new Set(["mathord","textord","atom"]),qi=e=>Uce.has(xp(e).type),$ce=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},e4={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function zce(e){if("default"in e)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class l5{constructor(t){t===void 0&&(t={}),t=t||{};for(var r of Object.keys(e4)){var n=e4[r],s=t[r];this[r]=s!==void 0?n.processor?n.processor(s):s:zce(n)}}reportNonstrict(t,r,n){var s=this.strict;if(typeof s=="function"&&(s=s(t,r,n)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new ze("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var s=this.strict;if(typeof s=="function")try{s=s(t,r,n)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var r=$ce(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class eo{constructor(t,r,n){this.id=t,this.size=r,this.cramped=n}sup(){return Ua[Hce[this.id]]}sub(){return Ua[qce[this.id]]}fracNum(){return Ua[Wce[this.id]]}fracDen(){return Ua[Vce[this.id]]}cramp(){return Ua[Gce[this.id]]}text(){return Ua[Kce[this.id]]}isTight(){return this.size>=2}}var c5=0,Ng=1,Nu=2,Ii=3,jh=4,Hs=5,Xu=6,Wn=7,Ua=[new eo(c5,0,!1),new eo(Ng,0,!0),new eo(Nu,1,!1),new eo(Ii,1,!0),new eo(jh,2,!1),new eo(Hs,2,!0),new eo(Xu,3,!1),new eo(Wn,3,!0)],Hce=[jh,Hs,jh,Hs,Xu,Wn,Xu,Wn],qce=[Hs,Hs,Hs,Hs,Wn,Wn,Wn,Wn],Wce=[Nu,Ii,jh,Hs,Xu,Wn,Xu,Wn],Vce=[Ii,Ii,Hs,Hs,Wn,Wn,Wn,Wn],Gce=[Ng,Ng,Ii,Ii,Hs,Hs,Wn,Wn],Kce=[c5,Ng,Nu,Ii,Nu,Ii,Nu,Ii],yt={DISPLAY:Ua[c5],TEXT:Ua[Nu],SCRIPT:Ua[jh],SCRIPTSCRIPT:Ua[Xu]},t4=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Yce(e){for(var t=0;t<t4.length;t++)for(var r=t4[t],n=0;n<r.blocks.length;n++){var s=r.blocks[n];if(e>=s[0]&&e<=s[1])return r.name}return null}var bp=[];
vendor: 4,413 bytes, lines 1320-1371
1320t4.forEach(e=>e.blocks.forEach(t=>bp.push(...t)));function lD(e){for(var t=0;t<bp.length;t+=2)if(e>=bp[t]&&e<=bp[t+1])return!0;return!1}var Pc=80,Qce=function(t,r){return"M95,"+(622+t+r)+` 1321c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 1322c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 1323c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 1324s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 1325c69,-144,104.5,-217.7,106.5,-221 1326l`+t/2.075+" -"+t+` 1327c5.3,-9.3,12,-14,20,-14 1328H400000v`+(40+t)+`H845.2724 1329s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 1330c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z 1331M`+(834+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Xce=function(t,r){return"M263,"+(601+t+r)+`c0.7,0,18,39.7,52,119 1332c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 1333c340,-704.7,510.7,-1060.3,512,-1067 1334l`+t/2.084+" -"+t+` 1335c4.7,-7.3,11,-11,19,-11 1336H40000v`+(40+t)+`H1012.3 1337s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 1338c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 1339s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 1340c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z 1341M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Zce=function(t,r){return"M983 "+(10+t+r)+` 1342l`+t/3.13+" -"+t+` 1343c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` 1344H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 1345s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 1346c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 1347c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 1348c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 1349c53.7,-170.3,84.5,-266.8,92.5,-289.5z 1350M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Jce=function(t,r){return"M424,"+(2398+t+r)+` 1351c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 1352c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 1353s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 1354s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 1355l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 1356v`+(40+t)+`H1014.6 1357s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 1358c-2,6,-10,9,-24,9 1359c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+r+` 1360h400000v`+(40+t)+"h-400000z"},eue=function(t,r){return"M473,"+(2713+t+r)+` 1361c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` 1362c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 1363s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 1364c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 1365c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 1366s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 1367606zM`+(1001+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},tue=function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},rue=function(t,r,n){var s=n-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+` 1368H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 1369h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 1370c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 1371219 661 l218 661zM702 `+r+"H400000v"+(40+t)+"H742z"},nue=function(t,r,n){r=1e3*r;var s="";switch(t){case"sqrtMain":s=Qce(r,Pc);break;case"sqrtSize1":s=Xce(r,Pc);break;case"sqrtSize2":s=Zce(r,Pc);break;case"sqrtSize3":s=Jce(r,Pc);break;case"sqrtSize4":s=eue(r,Pc);break;case"sqrtTall":s=rue(r,Pc,n)}return s},sue=function(t,r){switch(t){case"â":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"â£":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"â¥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"â":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"â¢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"â¥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"âª":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"â":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"â":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},aT
vendor: 10,493 bytes, lines 1371-1492
1371={doubleleftarrow:`M262 157 1372l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 1373 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 1374 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 1375c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 1376 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 1377-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 1378-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z 1379m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l 1380-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 1381 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 1382-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 1383-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 1384-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 1385c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 1386-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 1387 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 1388-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 1389c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 1390 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 1391 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 1392 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 1393-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 1394 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 1395 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 1396 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 1397-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 1398H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 1399 435 0h399565z`,leftgroupunder:`M400000 262 1400H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 1401 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 1402-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 1403-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 1404-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 1405 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 1406-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 1407-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z 1408m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 1409 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 1410 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 1411-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 1412 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 1413-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 1414v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 1415-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 1416-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 1417 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z 1418M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftbracketunder:`M0 0 h120 V290 H399995 v120 H0z 1419M0 0 h120 V290 H399995 v120 H0z`,leftbracketover:`M0 440 h120 V150 H399995 v-120 H0z 1420M0 440 h120 V150 H399995 v-120 H0z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z 1421M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 1422-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 1423c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 1424 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z 1425M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 1426c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 1427-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 1428 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 1429 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 1430c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 1431 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 1432 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 1433-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 1434-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z 1435m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 143660.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 1437-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z 1438m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 1439c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 1440-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z 1441m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 144285.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 1443-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z 1444m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 1445c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 1446-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 1447 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 1448 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 1449-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 1450-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 1451 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l 1452-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 1453s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 1454c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 1455 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 1456-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 1457 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 1458 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 1459-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 1460-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 1461 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 1462-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 1463 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z 1464m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 1465 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 1466-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 1467-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 1468 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 1469 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 1470-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z 1471m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 1472 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 1473-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 1474 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z 1475M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightbracketunder:`M399995 0 h-120 V290 H0 v120 H400000z 1476M399995 0 h-120 V290 H0 v120 H400000z`,rightbracketover:`M399995 440 h-120 V150 H0 v-120 H399995z 1477M399995 440 h-120 V150 H0 v-120 H399995z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1478 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 1479-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 1480-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 1481 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 1482-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 1483-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 1484-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 1485 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 1486c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 1487 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 1488 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 1489-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 1490 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 1491-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 1492 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2
vendor: 5,256 bytes, lines 1492-1550
14926.525 0 1493 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 1494-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 1495-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 1496 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 1497c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 1498 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 1499-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 1500 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 1501 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 1502 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 1503-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 1504 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 1505 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 1506 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 15073.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 150810.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 1509-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 1510-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 1511H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 1512c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 1513c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 1514-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 1515-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 1516-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, 1517-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, 1518-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, 1519-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, 1520-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 1521c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 1522c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 1523s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 1524121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 1525s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 1526c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z 1527M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 1528-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 152913.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 1530-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 1531-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 1532-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 1533151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 1534c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 1535c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 1536c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 1537c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z 1538M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 1539c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, 1540-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 1541c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z 1542M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 1543c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 15441c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, 1545-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z 1546M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 1547c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, 1548-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 1549c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z 1550M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},
vendor: 8,476 bytes, lines 1550-1578
1550aue=function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 1551H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z 1552M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 1553c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 1554c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 1555c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 1556c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z 1557M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 1558c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 1559c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z 1560MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z 1561MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z 1562M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z 1563M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 1564c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, 1565-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 1566949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 1567c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, 1568-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 1569l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, 1570-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 157163,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 1572c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+` 1573c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 1574c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 1575c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 1576c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 1577l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, 1578-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class gd{constructor(t){this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){for(var t="",r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t}toText(){var t=r=>r.toText();return this.children.map(t).join("")}}var r4={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},iue={ex:!0,em:!0,mu:!0},cD=function(t){return typeof t!="string"&&(t=t.unit),t in r4||t in iue||t==="ex"},yr=function(t,r){var n;if(t.unit in r4)n=r4[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var s;if(r.style.isTight()?s=r.havingStyle(r.style.text()):s=r,t.unit==="ex")n=s.fontMetrics().xHeight;else if(t.unit==="em")n=s.fontMetrics().quad;else throw new ze("Invalid unit: '"+t.unit+"'");s!==r&&(n*=s.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},Ve=function(t){return+t.toFixed(4)+"em"},Qo=function(t){return t.filter(r=>r).join(" ")},uD=function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var s=r.getColor();s&&(this.style.color=s)}},dD=function(t){var r=document.createElement(t);r.className=Qo(this.classes);for(var n of Object.keys(this.style))r.style[n]=this.style[n];for(var s of Object.keys(this.attributes))r.setAttribute(s,this.attributes[s]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r},oue=/[\s"'>/=\x00-\x1f]/,hD=function(t){var r="<"+t;this.classes.length&&(r+=' class="'+Cn(Qo(this.classes))+'"');var n="";for(var s of Object.keys(this.style))n+=o5(s)+":"+this.style[s]+";";n&&(r+=' style="'+Cn(n)+'"');for(var a of Object.keys(this.attributes)){if(oue.test(a))throw new ze("Invalid attribute name '"+a+"'");r+=" "+a+'="'+Cn(this.attributes[a])+'"'}r+=">";for(var o=0;o<this.children.length;o++)r+=this.children[o].toMarkup();return r+="</"+t+">",r};class xd{constructor(t,r,n,s){uD.call(this,t,n,s),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return dD.call(this,"span")}toMarkup(){return hD.call(this,"span")}}class H1{constructor(t,r,n,s){uD.call(this,r,s),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return dD.call(this,"a")}toMarkup(){return hD.call(this,"a")}}class lue{constructor(t,r,n){this.alt=r,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var r of Object.keys(this.style))t.style[r]=this.style[r];return t}toMarkup(){var t='<img src="'+Cn(this.src)+'"'+(' alt="'+Cn(this.alt)+'"'),r="";for(var n of Object.keys(this.style))r+=o5(n)+":"+this.style[n]+";";return r&&(t+=' style="'+Cn(r)+'"'),t+="'/>",t}}var cue={î:"ıÌ",ï:"ıÌ",Ã:"ıÌ",ì:"ıÌ"};class Cs{constructor(t,r,n,s,a,o,l,u){this.text=t,this.height=r||0,this.depth=n||0,this.italic=s||0,this.skew=a||0,this.width=o||0,this.classes=l||[],this.style=u||{},this.maxFontSize=0;var c=Yce(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïÃì]/.test(this.text)&&(this.text=cue[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=Ve(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Qo(this.classes));for(var n of Object.keys(this.style))r=r||document.createElement("span"),r.style[n]=this.style[n];return r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="<span";this.classes.length&&(t=!0,r+=' class="',r+=Cn(Qo(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+Ve(this.italic)+";");for(var s of Object.keys(this.style))n+=o5(s)+":"+this.style[s]+";";n&&(t=!0,r+=' style="'+Cn(n)+'"');var a=Cn(this.text);return t?(r+=">",r+=a,r+="</span>",r):a}}class Fi{constructor(t,r){this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var s=0;s<this.children.length;s++)r.appendChild(this.children[s].toNode());return r}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var r of Object.keys(this.attributes))t+=" "+r+'="'+Cn(this.attributes[r])+'"';t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</svg>",t}}class Xo{constructor(t,r){this.pathName=t,this.alternate=r}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",aT[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+Cn(this.alternate)+'"/>':'<path d="'+Cn(aT[this.pathName])+'"/>'}}class n4{constructor(t){this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t="<line";for(var r of Object.keys(this.attributes))t+=" "+r+'="'+Cn(this.attributes[r])+'"';return t+="/>",t}}function uue(e){if(e instanceof Cs)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function due(e){if(e instanceof xd)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var hue=e=>e instanceof xd||e instanceof H1||e instanceof gd,Va
vendor: 57,629 bytes, line 1578
1578={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},
vendor: 2,149 bytes, line 1578
1578bf={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},iT={Ã
:"A",Ã:"D",Ã:"o",Ã¥:"a",ð:"d",þ:"o",Ð:"A",Ð:"B",Ð:"B",Ð:"F",Ð:"A",Ð:"E",Ð:"K",Ð:"3",Ð:"N",Ð:"N",Ð:"K",Ð:"N",Ð:"M",Ð:"H",Ð:"O",Ð:"N",Ð :"P",С:"C",Т:"T",У:"y",Ф:"O",Ð¥:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Ð:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",Ñ:"p",Ñ:"c",Ñ:"o",Ñ:"y",Ñ:"b",Ñ
:"x",Ñ:"n",Ñ:"n",Ñ:"w",Ñ:"w",Ñ:"a",Ñ:"m",Ñ:"a",Ñ:"e",Ñ:"m",Ñ:"r"};function mue(e,t){Va[e]=t}function u5(e,t,r){if(!Va[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),s=Va[t][n];if(!s&&e[0]in iT&&(n=iT[e[0]].charCodeAt(0),s=Va[t][n]),!s&&r==="text"&&lD(n)&&(s=Va[t][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Xb={};function fue(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Xb[t]){var r=Xb[t]={cssEmPerMu:bf.quad[t]/18};for(var n in bf)bf.hasOwnProperty(n)&&(r[n]=bf[n][t])}return Xb[t]}var pue={bin:1,close:1,inner:1,open:1,punct:1,rel:1},gue={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},mr={math:{},text:{}};function _(e,t,r,n,s,a){mr[e][s]={font:t,group:r,replace:n},a&&n&&(mr[e][n]=mr[e][s])}var I="math",Me="text",P="main",J="ams",pr="accent-token",tt="bin",Zn="close",bd="inner",ft="mathord",qr="op-token",js="open",dm="punct",te="rel",W
1578i="spacing",ce="textord";_(I,P,te,"â¡","\\equiv",!0);_(I,P,te,"âº","\\prec",!0);_(I,P,te,"â»","\\succ",!0);_(I,P,te,"â¼","\\sim",!0);_(I,P,te,"â¥","\\perp");_(I,P,te,"⪯","\\preceq",!0);_(I,P,te,"⪰","\\succeq",!0);_(I,P,te,"â","\\simeq",!0);_(I,P,te,"â£","\\mid",!0);_(I,P,te,"âª","\\ll",!0);_(I,P,te,"â«","\\gg",!0);_(I,P,te,"â","\\asymp",!0);_(I,P,te,"â¥","\\parallel");_(I,P,te,"â","\\bowtie",!0);_(I,P,te,"â£","\\smile",!0);_(I,P,te,"â","\\sqsubseteq",!0);_(I,P,te,"â","\\sqsupseteq",!0);_(I,P,te,"â","\\doteq",!0);_(I,P,te,"â¢","\\frown",!0);_(I,P,te,"â","\\ni",!0);_(I,P,te,"â","\\propto",!0);_(I,P,te,"â¢","\\vdash",!0);_(I,P,te,"â£","\\dashv",!0);_(I,P,te,"â","\\owns");_(I,P,dm,".","\\ldotp");_(I,P,dm,"â
","\\cdotp");_(I,P,dm,"â
","·");_(Me,P,ce,"â
","·");_(I,P,ce,"#","\\#");_(Me,P,ce,"#","\\#");_(I,P,ce,"&","\\&");_(Me,P,ce,"&","\\&");_(I,P,ce,"âµ","\\aleph",!0);_(I,P,ce,"â","\\forall",!0);_(I,P,ce,"â","\\hbar",!0);_(I,P,ce,"â","\\exists",!0);_(I,P,ce,"â","\\nabla",!0);_(I,P,ce,"â","\\flat",!0);_(I,P,ce,"â","\\ell",!0);_(I,P,ce,"â®","\\natural",!0);_(I,P,ce,"â£","\\clubsuit",!0);_(I,P,ce,"â","\\wp",!0);_(I,P,ce,"â¯","\\sharp",!0);_(I,P,ce,"â¢","\\diamondsuit",!0);_(I,P,ce,"â","\\Re",!0);_(I,P,ce,"â¡","\\heartsuit",!0);_(I,P,ce,"â","\\Im",!0);_(I,P,ce,"â ","\\spadesuit",!0);_(I,P,ce,"§","\\S",!0);_(Me,P,ce,"§","\\S");_(I,P,ce,"¶","\\P",!0);_(Me,P,ce,"¶","\\P");_(I,P,ce,"â ","\\dag");_(Me,P,ce,"â ","\\dag");_(Me,P,ce,"â ","\\textdagger");_(I,P,ce,"â¡","\\ddag");_(Me,P,ce,"â¡","\\ddag");_(Me,P,ce,"â¡","\\textdaggerdbl");_(I,P,Zn,"â±","\\rmoustache",!0);_(I,P,js,"â°","\\lmoustache",!0);_(I,P,Zn,"â¯","\\rgroup",!0);_(I,P,js,"â®","\\lgroup",!0);_(I,P,tt,"â","\\mp",!0);_(I,P,tt,"â","\\ominus",!0);_(I,P,tt,"â","\\uplus",!0);_(I,P,tt,"â","\\sqcap",!0);_(I,P,tt,"â","\\ast");_(I,P,tt,"â","\\sqcup",!0);_(I,P,tt,"â¯","\\bigcirc",!0);_(I,P,tt,"â","\\bullet",!0);_(I,P,tt,"â¡","\\ddagger");_(I,P,tt,"â","\\wr",!0);_(I,P,tt,"⨿","\\amalg");_(I,P,tt,"&","\\And");_(I,P,te,"âµ","\\longleftarrow",!0);_(I,P,te,"â","\\Leftarrow",!0);_(I,P,te,"â¸","\\Longleftarrow",!0);_(I,P,te,"â¶","\\longrightarrow",!0);_(I,P,te,"â","\\Rightarrow",!0);_(I,P,te,"â¹","\\Longrightarrow",!0);_(I,P,te,"â","\\leftrightarrow",!0);_(I,P,te,"â·","\\longleftrightarrow",!0);_(I,P,te,"â","\\Leftrightarrow",!0);_(I,P,te,"âº","\\Longleftrightarrow",!0);_(I,P,te,"â¦","\\mapsto",!0);_(I,P,te,"â¼","\\longmapsto",!0);_(I,P,te,"â","\\nearrow",!0);_(I,P,te,"â©","\\hookleftarrow",!0);_(I,P,te,"âª","\\hookrightarrow",!0);_(I,P,te,"â","\\searrow",!0);_(I,P,te,"â¼","\\leftharpoonup",!0);_(I,P,te,"â","\\rightharpoonup",!0);_(I,P,te,"â","\\swarrow",!0);_(I,P,te,"â½","\\leftharpoondown",!0);_(I,P,te,"â","\\rightharpoondown",!0);_(I,P,te,"â","\\nwarrow",!0);_(I,P,te,"â","\\rightleftharpoons",!0);_(I,J,te,"â®","\\nless",!0);_(I,J,te,"î","\\@nleqslant");_(I,J,te,"î","\\@nleqq");_(I,J,te,"âª","\\lneq",!0);_(I,J,te,"â¨","\\lneqq",!0);_(I,J,te,"î","\\@lvertneqq");_(I,J,te,"â¦","\\lnsim",!0);_(I,J,te,"âª","\\lnapprox",!0);_(I,J,te,"â","\\nprec",!0);_(I,J,te,"â ","\\npreceq",!0);_(I,J,te,"â¨","\\precnsim",!0);_(I,J,te,"⪹","\\precnapprox",!0);_(I,J,te,"â","\\nsim",!0);_(I,J,te,"î","\\@nshortmid");_(I,J,te,"â¤","\\nmid",!0);_(I,J,te,"â¬","\\nvdash",!0);_(I,J,te,"â","\\nvDash",!0);_(I,J,te,"âª","\\ntriangleleft");_(I,J,te,"â¬","\\ntrianglelefteq",!0);_(I,J,te,"â","\\subsetneq",!0);_(I,J,te,"î","\\@varsubsetneq");_(I,J,te,"â«","\\subsetneqq",!0);_(I,J,te,"î","\\@varsubsetneqq");_(I,J,te,"â¯","\\ngtr",!0);_(I,J,te,"î","\\@ngeqslant");_(I,J,te,"î","\\@ngeqq");_(I,J,te,"âª","\\gneq",!0);_(I,J,te,"â©","\\gneqq",!0);_(I,J,te,"î","\\@gvertneqq");_(I,J,te,"â§","\\gnsim",!0);_(I,J,te,"âª","\\gnapprox",!0);_(I,J,te,"â","\\nsucc",!0);_(I,J,te,"â¡","\\nsucceq",!0);_(I,J,te,"â©","\\succnsim",!0);_(I,J,te,"⪺","\\succnapprox",!0);_(I,J,te,"â","\\ncong",!0);_(I,J,te,"î","\\@nshortparallel");_(I,J,te,"â¦","\\nparallel",!0);_(I,J,te,"â¯","\\nVDash",!0);_(I,J,te,"â«","\\ntriangleright");_(I,J,te,"â","\\ntrianglerighteq",!0);_(I,J,te,"î","\\@nsupseteqq");_(I,J,te,"â","\\supsetneq",!0);_(I,J,te,"î","\\@varsupsetneq");_(I,J,te,"â«","\\supsetneqq",!0);_(I,J,te,"î","\\@varsupsetneqq");_(I,J,te,"â®","\\nVdash",!0);_(I,J,te,"⪵","\\precneqq",!0);_(I,J,te,"⪶","\\succneqq",!0);
1578_(I,J,te,"î","\\@nsubseteqq");_(I,J,tt,"â´","\\unlhd");_(I,J,tt,"âµ","\\unrhd");_(I,J,te,"â","\\nleftarrow",!0);_(I,J,te,"â","\\nrightarrow",!0);_(I,J,te,"â","\\nLeftarrow",!0);_(I,J,te,"â","\\nRightarrow",!0);_(I,J,te,"â®","\\nleftrightarrow",!0);_(I,J,te,"â","\\nLeftrightarrow",!0);_(I,J,te,"â³","\\vartriangle");_(I,J,ce,"â","\\hslash");_(I,J,ce,"â½","\\triangledown");_(I,J,ce,"â","\\lozenge");_(I,J,ce,"â","\\circledS");_(I,J,ce,"®","\\circledR");_(Me,J,ce,"®","\\circledR");_(I,J,ce,"â¡","\\measuredangle",!0);_(I,J,ce,"â","\\nexists");_(I,J,ce,"â§","\\mho");_(I,J,ce,"â²","\\Finv",!0);_(I,J,ce,"â
","\\Game",!0);_(I,J,ce,"âµ","\\backprime");_(I,J,ce,"â²","\\blacktriangle");_(I,J,ce,"â¼","\\blacktriangledown");_(I,J,ce,"â ","\\blacksquare");_(I,J,ce,"â§«","\\blacklozenge");_(I,J,ce,"â
","\\bigstar");_(I,J,ce,"â¢","\\sphericalangle",!0);_(I,J,ce,"â","\\complement",!0);_(I,J,ce,"ð","\\eth",!0);_(Me,P,ce,"ð","ð");_(I,J,ce,"â±","\\diagup");_(I,J,ce,"â²","\\diagdown");_(I,J,ce,"â¡","\\square");_(I,J,ce,"â¡","\\Box");_(I,J,ce,"â","\\Diamond");_(I,J,ce,"Â¥","\\yen",!0);_(Me,J,ce,"Â¥","\\yen",!0);_(I,J,ce,"â","\\checkmark",!0);_(Me,J,ce,"â","\\checkmark");_(I,J,ce,"â¶","\\beth",!0);_(I,J,ce,"â¸","\\daleth",!0);_(I,J,ce,"â·","\\gimel",!0);_(I,J,ce,"Ï","\\digamma",!0);_(I,J,ce,"ϰ","\\varkappa");_(I,J,js,"â","\\@ulcorner",!0);_(I,J,Zn,"â","\\@urcorner",!0);_(I,J,js,"â","\\@llcorner",!0);_(I,J,Zn,"â","\\@lrcorner",!0);_(I,J,te,"â¦","\\leqq",!0);_(I,J,te,"⩽","\\leqslant",!0);_(I,J,te,"âª","\\eqslantless",!0);_(I,J,te,"â²","\\lesssim",!0);_(I,J,te,"âª
","\\lessapprox",!0);_(I,J,te,"â","\\approxeq",!0);_(I,J,tt,"â","\\lessdot");_(I,J,te,"â","\\lll",!0);_(I,J,te,"â¶","\\lessgtr",!0);_(I,J,te,"â","\\lesseqgtr",!0);_(I,J,te,"âª","\\lesseqqgtr",!0);_(I,J,te,"â","\\doteqdot");_(I,J,te,"â","\\risingdotseq",!0);_(I,J,te,"â","\\fallingdotseq",!0);_(I,J,te,"â½","\\backsim",!0);_(I,J,te,"â","\\backsimeq",!0);_(I,J,te,"â«
","\\subseteqq",!0);_(I,J,te,"â","\\Subset",!0);_(I,J,te,"â","\\sqsubset",!0);_(I,J,te,"â¼","\\preccurlyeq",!0);_(I,J,te,"â","\\curlyeqprec",!0);_(I,J,te,"â¾","\\precsim",!0);_(I,J,te,"⪷","\\precapprox",!0);_(I,J,te,"â²","\\vartriangleleft");_(I,J,te,"â´","\\trianglelefteq");_(I,J,te,"â¨","\\vDash",!0);_(I,J,te,"âª","\\Vvdash",!0);_(I,J,te,"â£","\\smallsmile");_(I,J,te,"â¢","\\smallfrown");_(I,J,te,"â","\\bumpeq",!0);_(I,J,te,"â","\\Bumpeq",!0);_(I,J,te,"â§","\\geqq",!0);_(I,J,te,"⩾","\\geqslant",!0);_(I,J,te,"âª","\\eqslantgtr",!0);_(I,J,te,"â³","\\gtrsim",!0);_(I,J,te,"âª","\\gtrapprox",!0);_(I,J,tt,"â","\\gtrdot");_(I,J,te,"â","\\ggg",!0);_(I,J,te,"â·","\\gtrless",!0);_(I,J,te,"â","\\gtreqless",!0);_(I,J,te,"âª","\\gtreqqless",!0);_(I,J,te,"â","\\eqcirc",!0);_(I,J,te,"â","\\circeq",!0);_(I,J,te,"â","\\triangleq",!0);_(I,J,te,"â¼","\\thicksim");
1578_(I,J,te,"â","\\thickapprox");_(I,J,te,"â«","\\supseteqq",!0);_(I,J,te,"â","\\Supset",!0);_(I,J,te,"â","\\sqsupset",!0);_(I,J,te,"â½","\\succcurlyeq",!0);_(I,J,te,"â","\\curlyeqsucc",!0);_(I,J,te,"â¿","\\succsim",!0);_(I,J,te,"⪸","\\succapprox",!0);_(I,J,te,"â³","\\vartriangleright");_(I,J,te,"âµ","\\trianglerighteq");_(I,J,te,"â©","\\Vdash",!0);_(I,J,te,"â£","\\shortmid");_(I,J,te,"â¥","\\shortparallel");_(I,J,te,"â¬","\\between",!0);_(I,J,te,"â","\\pitchfork",!0);_(I,J,te,"â","\\varpropto");_(I,J,te,"â","\\blacktriangleleft");_(I,J,te,"â´","\\therefore",!0);_(I,J,te,"â","\\backepsilon");_(I,J,te,"â¶","\\blacktriangleright");_(I,J,te,"âµ","\\because",!0);_(I,J,te,"â","\\llless");_(I,J,te,"â","\\gggtr");_(I,J,tt,"â²","\\lhd");_(I,J,tt,"â³","\\rhd");_(I,J,te,"â","\\eqsim",!0);_(I,P,te,"â","\\Join");_(I,J,te,"â","\\Doteq",!0);_(I,J,tt,"â","\\dotplus",!0);_(I,J,tt,"â","\\smallsetminus");_(I,J,tt,"â","\\Cap",!0);_(I,J,tt,"â","\\Cup",!0);_(I,J,tt,"â©","\\doublebarwedge",!0);_(I,J,tt,"â","\\boxminus",!0);_(I,J,tt,"â","\\boxplus",!0);_(I,J,tt,"â","\\divideontimes",!0);_(I,J,tt,"â","\\ltimes",!0);_(I,J,tt,"â","\\rtimes",!0);_(I,J,tt,"â","\\leftthreetimes",!0);_(I,J,tt,"â","\\rightthreetimes",!0);_(I,J,tt,"â","\\curlywedge",!0);_(I,J,tt,"â","\\curlyvee",!0);_(I,J,tt,"â","\\circleddash",!0);_(I,J,tt,"â","\\circledast",!0);_(I,J,tt,"â
","\\centerdot");_(I,J,tt,"âº","\\intercal",!0);_(I,J,tt,"â","\\doublecap");_(I,J,tt,"â","\\doublecup");_(I,J,tt,"â ","\\boxtimes",!0);_(I,J,te,"â¢","\\dashrightarrow",!0);_(I,J,te,"â ","\\dashleftarrow",!0);_(I,J,te,"â","\\leftleftarrows",!0);_(I,J,te,"â","\\leftrightarrows",!0);_(I,J,te,"â","\\Lleftarrow",!0);_(I,J,te,"â","\\twoheadleftarrow",!0);_(I,J,te,"â¢","\\leftarrowtail",!0);_(I,J,te,"â«","\\looparrowleft",!0);_(I,J,te,"â","\\leftrightharpoons",!0);_(I,J,te,"â¶","\\curvearrowleft",!0);_(I,J,te,"âº","\\circlearrowleft",!0);_(I,J,te,"â°","\\Lsh",!0);_(I,J,te,"â","\\upuparrows",!0);_(I,J,te,"â¿","\\upharpoonleft",!0);_(I,J,te,"â","\\downharpoonleft",!0);_(I,P,te,"â¶","\\origof",!0);_(I,P,te,"â·","\\imageof",!0);_(I,J,te,"â¸","\\multimap",!0);_(I,J,te,"â","\\leftrightsquigarrow",!0);_(I,J,te,"â","\\rightrightarrows",!0);_(I,J,te,"â","\\rightleftarrows",!0);_(I,J,te,"â ","\\twoheadrightarrow",!0);_(I,J,te,"â£","\\rightarrowtail",!0);_(I,J,te,"â¬","\\looparrowright",!0);_(I,J,te,"â·","\\curvearrowright",!0);_(I,J,te,"â»","\\circlearrowright",!0);_(I,J,te,"â±","\\Rsh",!0);_(I,J,te,"â","\\downdownarrows",!0);_(I,J,te,"â¾","\\upharpoonright",!0);_(I,J,te,"â","\\downharpoonright",!0);_(I,J,te,"â","\\rightsquigarrow",!0);_(I,J,te,"â","\\leadsto");_(I,J,te,"â","\\Rrightarrow",!0);_(I,J,te,"â¾","\\restriction");_(I,P,ce,"â","`");_(I,P,ce,"$","\\$");_(Me,P,ce,"$","\\$");_(Me,P,ce,"$","\\textdollar");_(I,P,ce,"%","\\%");_(Me,P,ce,"%","\\%");_(I,P,ce,"_","\\_");_(Me,P,ce,"_","\\_");_(Me,P,ce,"_","\\textunderscore");_(I,P,ce,"â ","\\angle",!0);_(I,P,ce,"â","\\infty",!0);_(I,P,ce,"â²","\\prime");_(I,P,ce,"â³","\\triangle");_(I,P,ce,"Î","\\Gamma",!0);_(I,P,ce,"Î","\\Delta",!0);_(I,P,ce,"Î","\\Theta",!0);_(I,P,ce,"Î","\\Lambda",!0);_(I,P,ce,"Î","\\Xi",!0);_(I,P,ce,"Î ","\\Pi",!0);_(I,P,ce,"Σ","\\Sigma",!0);_(I,P,ce,"Î¥","\\Upsilon",!0);_(I,P,ce,"Φ","\\Phi",!0);_(I,P,ce,"Ψ","\\Psi",!0);_(I,P,ce,"Ω","\\Omega",!0);_(I,P,ce,"A","Î");_(I,P,ce,"B","Î");_(I,P,ce,"E","Î");_(I,P,ce,"Z","Î");_(I,P,ce,"H","Î");_(I,P,ce,"I","Î");_(I,P,ce,"K","Î");_(I,P,ce,"M","Î");_(I,P,ce,"N","Î");_(I,P,ce,"O","Î");_(I,P,ce,"P","Ρ");_(I,P,ce,"T","Τ");_(I,P,ce,"X","Χ");_(I,P,ce,"¬","\\neg",!0);_(I,P,ce,"¬","\\lnot");_(I,P,ce,"â¤","\\top");_(I,P,ce,"â¥","\\bot");_(I,P,ce,"â
","\\emptyset");_(I,J,ce,"â
","\\varnothing");_(I,P,ft,"α","\\alpha",!0);_(I,P,ft,"β","\\beta",!0);_(I,P,ft,"γ","\\gamma",!0);_(I,P,ft,"δ","\\delta",!0);_(I,P,ft,"ϵ","\\epsilon",!0);_(I,P,ft,"ζ","\\zeta",!0);_(I,P,ft,"η","\\eta",!0);_(I,P,ft,"θ","\\theta",!0);_(I,P,ft,"ι","\\iota",!0);_(I,P,ft,"κ","\\kappa",!0);_(I,P,ft,"λ","\\lambda",!0);_(I,P,ft,"μ","\\mu",!0);_(I,P,ft,"ν","\\nu",!0);_(I,P,ft,"ξ","\\xi",!0);_(I,P,ft,"ο","\\omicron",!0);_(I,P,ft,"Ï","\\pi",!0);_(I,P,ft,"Ï","\\rho",!0);_(I,P,ft,"Ï","\\sigma",!0);_(I,P,ft,"Ï","\\tau",!0);_(I,P,ft,"Ï
","\\upsilon",!0);_(I,P,ft,"Ï","\\phi",!0);_(I,P,ft,"Ï","\\chi",!0);_(I,P,ft,"Ï","\\psi",!0);_(I,P,ft,"Ï","\\omega",!0);_(I,P,ft,"ε","\\varepsilon",!0);_(I,P,ft,"Ï","\\vartheta",!0);_(I,P,ft,"Ï","\\varpi",!0);_(I,P,ft,"ϱ","\\varrho",!0);_(I,P,ft,"Ï","\\varsigma",!0);_(I,P,ft,"Ï","\\varphi",!0);_(I,P,tt,"â","*",!0);_(I,P,tt,"+","+");_(I,P,tt,"â","-",!0);_(I,P,tt,"â
","\\cdot",!0);_(I,P,tt,"â","\\circ",!0);_(I,P,tt,"÷","\\div",!0);_(I,P,tt,"±","\\pm",!0);_(I,P,tt,"Ã","\\times",!0);_(I,P,tt,"â©","\\cap",!0);_(I,P,tt,"âª","\\cup",!0);_(I,P,tt,"â","\\setminus",!0);_(I,P,tt,"â§","\\land");_(I,P,tt,"â¨","\\lor");_(I,P,tt,"â§","\\wedge",!0);_(I,P,tt,"â¨","\\vee",!0);_(I,P,ce,"â","\\surd");_(I,P,js,"â¨","\\langle",!0);_(I,P,js,"â£","\\lvert");_(I,P,js,"â¥","\\lVert");_(I,P,Zn,"?","?");_(I,P,Zn,"!","!");_(I,P,Zn,"â©","\\rangle",!0);_(I,P,Zn,"â£","\\rvert");_(I,P,Zn,"â¥","\\rVert");_(I,P,te,"=","=");_(I,P,te,":",":");_(I,P,te,"â","\\approx",!0);_(I,P,te,"â
","\\cong",!0);_(I,P,te,"â¥","\\ge");_(I,P,te,"â¥","\\geq",!0);_(I,P,te,"â","\\gets");_(I,P,te,">","\\gt",!0);_(I,P,te,"â","\\in",!0);_(I,P,te,"î ","\\@not");_(I,P,te,"â","\\subset",!0);_(I,P,te,"â","\\supset",!0);_(I,P,te,"â","\\subseteq",!0);_(I,P,te,"â","\\supseteq",!0);_(I,J,te,"â","\\nsubseteq",!0);_(I,J,te,"â","\\nsupseteq",!0);_(I,P,te,"â¨","\\models");_(I,P,te,"â","\\leftarrow",!0);_(I,P,te,"â¤","\\le");_(I,P,te,"â¤","\\leq",!0);_(I,P,te,"<","\\lt",!0);_(I,P,te,"â","\\rightarrow",!0);_(I,P,te,"â","\\to");_(I,J,te,"â±","\\ngeq",!0);_(I,J,te,"â°","\\nleq",!0);_(I,P,Wi," ","\\ ");_(I,P,Wi," ","\\space");_(I,P,Wi," ","\\nobreakspace");
vendor: 12,973 bytes, line 1578
1578_(Me,P,Wi," ","\\ ");_(Me,P,Wi," "," ");_(Me,P,Wi," ","\\space");_(Me,P,Wi," ","\\nobreakspace");_(I,P,Wi,null,"\\nobreak");_(I,P,Wi,null,"\\allowbreak");_(I,P,dm,",",",");_(I,P,dm,";",";");_(I,J,tt,"â¼","\\barwedge",!0);_(I,J,tt,"â»","\\veebar",!0);_(I,P,tt,"â","\\odot",!0);_(I,P,tt,"â","\\oplus",!0);_(I,P,tt,"â","\\otimes",!0);_(I,P,ce,"â","\\partial",!0);_(I,P,tt,"â","\\oslash",!0);_(I,J,tt,"â","\\circledcirc",!0);_(I,J,tt,"â¡","\\boxdot",!0);_(I,P,tt,"â³","\\bigtriangleup");_(I,P,tt,"â½","\\bigtriangledown");_(I,P,tt,"â ","\\dagger");_(I,P,tt,"â","\\diamond");_(I,P,tt,"â","\\star");_(I,P,tt,"â","\\triangleleft");_(I,P,tt,"â¹","\\triangleright");_(I,P,js,"{","\\{");_(Me,P,ce,"{","\\{");_(Me,P,ce,"{","\\textbraceleft");_(I,P,Zn,"}","\\}");_(Me,P,ce,"}","\\}");_(Me,P,ce,"}","\\textbraceright");_(I,P,js,"{","\\lbrace");_(I,P,Zn,"}","\\rbrace");_(I,P,js,"[","\\lbrack",!0);_(Me,P,ce,"[","\\lbrack",!0);_(I,P,Zn,"]","\\rbrack",!0);_(Me,P,ce,"]","\\rbrack",!0);_(I,P,js,"(","\\lparen",!0);_(I,P,Zn,")","\\rparen",!0);_(Me,P,ce,"<","\\textless",!0);_(Me,P,ce,">","\\textgreater",!0);_(I,P,js,"â","\\lfloor",!0);_(I,P,Zn,"â","\\rfloor",!0);_(I,P,js,"â","\\lceil",!0);_(I,P,Zn,"â","\\rceil",!0);_(I,P,ce,"\\","\\backslash");_(I,P,ce,"â£","|");_(I,P,ce,"â£","\\vert");_(Me,P,ce,"|","\\textbar",!0);_(I,P,ce,"â¥","\\|");_(I,P,ce,"â¥","\\Vert");_(Me,P,ce,"â¥","\\textbardbl");_(Me,P,ce,"~","\\textasciitilde");_(Me,P,ce,"\\","\\textbackslash");_(Me,P,ce,"^","\\textasciicircum");_(I,P,te,"â","\\uparrow",!0);_(I,P,te,"â","\\Uparrow",!0);_(I,P,te,"â","\\downarrow",!0);_(I,P,te,"â","\\Downarrow",!0);_(I,P,te,"â","\\updownarrow",!0);_(I,P,te,"â","\\Updownarrow",!0);_(I,P,qr,"â","\\coprod");_(I,P,qr,"â","\\bigvee");_(I,P,qr,"â","\\bigwedge");_(I,P,qr,"â¨","\\biguplus");_(I,P,qr,"â","\\bigcap");_(I,P,qr,"â","\\bigcup");_(I,P,qr,"â«","\\int");_(I,P,qr,"â«","\\intop");_(I,P,qr,"â¬","\\iint");_(I,P,qr,"â","\\iiint");_(I,P,qr,"â","\\prod");_(I,P,qr,"â","\\sum");_(I,P,qr,"â¨","\\bigotimes");_(I,P,qr,"â¨","\\bigoplus");_(I,P,qr,"â¨","\\bigodot");_(I,P,qr,"â®","\\oint");_(I,P,qr,"â¯","\\oiint");_(I,P,qr,"â°","\\oiiint");_(I,P,qr,"â¨","\\bigsqcup");_(I,P,qr,"â«","\\smallint");_(Me,P,bd,"â¦","\\textellipsis");_(I,P,bd,"â¦","\\mathellipsis");_(Me,P,bd,"â¦","\\ldots",!0);_(I,P,bd,"â¦","\\ldots",!0);_(I,P,bd,"â¯","\\@cdots",!0);_(I,P,bd,"â±","\\ddots",!0);_(I,P,ce,"â®","\\varvdots");_(Me,P,ce,"â®","\\varvdots");_(I,P,pr,"Ë","\\acute");_(I,P,pr,"Ë","\\grave");_(I,P,pr,"¨","\\ddot");_(I,P,pr,"~","\\tilde");_(I,P,pr,"Ë","\\bar");_(I,P,pr,"Ë","\\breve");_(I,P,pr,"Ë","\\check");_(I,P,pr,"^","\\hat");_(I,P,pr,"â","\\vec");_(I,P,pr,"Ë","\\dot");_(I,P,pr,"Ë","\\mathring");_(I,P,ft,"î±","\\@imath");_(I,P,ft,"î·","\\@jmath");_(I,P,ce,"ı","ı");_(I,P,ce,"È·","È·");_(Me,P,ce,"ı","\\i",!0);_(Me,P,ce,"È·","\\j",!0);_(Me,P,ce,"Ã","\\ss",!0);_(Me,P,ce,"æ","\\ae",!0);_(Me,P,ce,"Å","\\oe",!0);_(Me,P,ce,"ø","\\o",!0);_(Me,P,ce,"Ã","\\AE",!0);_(Me,P,ce,"Å","\\OE",!0);_(Me,P,ce,"Ã","\\O",!0);_(Me,P,pr,"Ë","\\'");_(Me,P,pr,"Ë","\\`");_(Me,P,pr,"Ë","\\^");_(Me,P,pr,"Ë","\\~");_(Me,P,pr,"Ë","\\=");_(Me,P,pr,"Ë","\\u");_(Me,P,pr,"Ë","\\.");_(Me,P,pr,"¸","\\c");_(Me,P,pr,"Ë","\\r");_(Me,P,pr,"Ë","\\v");_(Me,P,pr,"¨",'\\"');_(Me,P,pr,"Ë","\\H");_(Me,P,pr,"â¯","\\textcircled");var mD={"--":!0,"---":!0,"``":!0,"''":!0};_(Me,P,ce,"â","--",!0);_(Me,P,ce,"â","\\textendash");_(Me,P,ce,"â","---",!0);_(Me,P,ce,"â","\\textemdash");_(Me,P,ce,"â","`",!0);_(Me,P,ce,"â","\\textquoteleft");_(Me,P,ce,"â","'",!0);_(Me,P,ce,"â","\\textquoteright");_(Me,P,ce,"â","``",!0);_(Me,P,ce,"â","\\textquotedblleft");_(Me,P,ce,"â","''",!0);_(Me,P,ce,"â","\\textquotedblright");_(I,P,ce,"°","\\degree",!0);_(Me,P,ce,"°","\\degree");_(Me,P,ce,"°","\\textdegree",!0);_(I,P,ce,"£","\\pounds");_(I,P,ce,"£","\\mathsterling",!0);_(Me,P,ce,"£","\\pounds");_(Me,P,ce,"£","\\textsterling",!0);_(I,J,ce,"â ","\\maltese");_(Me,J,ce,"â ","\\maltese");var oT='0123456789/@."';for(var Zb=0;Zb<oT.length;Zb++){var lT=oT.charAt(Zb);_(I,P,ce,lT,lT)}var cT='0123456789!@*()-=+";:?/.,';for(var Jb=0;Jb<cT.length;Jb++){var uT=cT.charAt(Jb);_(Me,P,ce,uT,uT)}var Sg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var ey=0;ey<Sg.length;ey++){var yf=Sg.charAt(ey);_(I,P,ft,yf,yf),_(Me,P,ce,yf,yf)}_(I,J,ce,"C","â");_(Me,J,ce,"C","â");_(I,J,ce,"H","â");_(Me,J,ce,"H","â");_(I,J,ce,"N","â");_(Me,J,ce,"N","â");_(I,J,ce,"P","â");_(Me,J,ce,"P","â");_(I,J,ce,"Q","â");_(Me,J,ce,"Q","â");_(I,J,ce,"R","â");_(Me,J,ce,"R","â");_(I,J,ce,"Z","â¤");_(Me,J,ce,"Z","â¤");_(I,P,ft,"h","â");_(Me,P,ft,"h","â");var gt="";for(var Mn=0;Mn<Sg.length;Mn++){var Sr=Sg.charAt(Mn);gt=String.fromCharCode(55349,56320+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt),gt=String.fromCharCode(55349,56372+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt),gt=String.fromCharCode(55349,56424+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt),gt=String.fromCharCode(55349,56580+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt),gt=String.fromCharCode(55349,56684+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt),gt=String.fromCharCode(55349,56736+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt),gt=String.fromCharCode(55349,56788+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt),gt=String.fromCharCode(55349,56840+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt),gt=String.fromCharCode(55349,56944+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt),Mn<26&&(gt=String.fromCharCode(55349,56632+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt),gt=String.fromCharCode(55349,56476+Mn),_(I,P,ft,Sr,gt),_(Me,P,ce,Sr,gt))}gt="ð";_(I,P,ft,"k",gt);_(Me,P,ce,"k",gt);for(var fl=0;fl<10;fl++){var to=fl.toString();gt=String.fromCharCode(55349,57294+fl),_(I,P,ft,to,gt),_(Me,P,ce,to,gt),gt=String.fromCharCode(55349,57314+fl),_(I,P,ft,to,gt),_(Me,P,ce,to,gt),gt=String.fromCharCode(55349,57324+fl),_(I,P,ft,to,gt),_(Me,P,ce,to,gt),gt=String.fromCharCode(55349,57334+fl),_(I,P,ft,to,gt),_(Me,P,ce,to,gt)}var s4="ÃÃþ";for(var ty=0;ty<s4.length;ty++){var vf=s4.charAt(ty);_(I,P,ft,vf,vf),_(Me,P,ce,vf,vf)}var wf=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],dT=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],xue=(e,t)=>{var r=e.charCodeAt(0),n=e.charCodeAt(1),s=(r-55296)*1024+(n-56320)+65536,a=t==="math"?0:1;if(119808<=s&&s<120484){var o=Math.floor((s-119808)/26);return[wf[o][2],wf[o][a]]}else if(120782<=s&&s<=120831){var l=Math.floor((s-120782)/10);return[dT[l][2],dT[l][a]]}else{if(s===120485||s===120486)return[wf[0][2],wf[0][a]];if(120486<s&&s<120782)return["",""];throw new ze("Unsupported character: "+e)}},q1=function(t,r,n){if(mr[n][t]){var s=mr[n][t].replace;s&&(t=s)}return{value:t,metrics:u5(t,r,n)}},zn=function(t,r,n,s,a){var o=q1(t,r,n),l=o.metrics;t=o.value;var u;if(l){var c=l.italic;(n==="text"||s&&s.font==="mathit")&&(c=0),u=new Cs(t,l.height,l.depth,c,l.skew,l.width,a)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+r+"' and mode '"+n+"'")),u=new Cs(t,0,0,0,0,0,a);if(s){u.maxFontSize=s.sizeMultiplier,s.style.isTight()&&u.classes.push("mtight");var d=s.getColor();d&&(u.style.color=d)}return u},d5=function(t,r,n,s){return s===void 0&&(s=[]),n.font==="boldsymbol"&&q1(t,"Main-Bold",r).metrics?zn(t,"Main-Bold",r,n,s.concat(["mathbf"])):t==="\\"||mr[r][t].font==="main"?zn(t,"Main-Regular",r,n,s):zn(t,"AMS-Regular",r,n,s.concat(["amsrm"]))},bue=function(t,r,n,s,a){return a!=="textord"&&q1(t,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},W1=function(t,r,n){var s=t.mode,a=t.text,o=["mord"],l=s==="math"||s==="text"&&r.font,u=l?r.font:r.fontFamily,c="",d="";if(a.charCodeAt(0)===55349&&([c,d]=xue(a,s)),c.length>0)return zn(a,c,s,r,o.concat(d));if(u){var h,m;if(u==="boldsymbol"){var f=bue(a,s,r,o,n);h=f.fontName,m=[f.fontClass]}else l?(h=a4[u].fontName,m=[u]):(h=Ef(u,r.fontWeight,r.fontShape),m=[u,r.fontWeight,r.fontShape]);if(q1(a,h,s).metrics)return zn(a,h,s,r,o.concat(m));if(mD.hasOwnProperty(a)&&h.slice(0,10)==="Typewriter"){for(var p=[],g=0;g<a.length;g++)p.push(zn(a[g],h,s,r,o.concat(m)));return Vi(p)}}if(n==="mathord")return zn(a,"Math-Italic",s,r,o.concat(["mathnormal"]));if(n==="textord"){var x=mr[s][a]&&mr[s][a].font;if(x==="ams"){var w=Ef("amsrm",r.fontWeight,r.fontShape);return zn(a,w,s,r,o.concat("amsrm",r.fontWeight,r.fontShape))}else if(x==="main"||!x){var y=Ef("textrm",r.fontWeight,r.fontShape);return zn(a,y,s,r,o.concat(r.fontWeight,r.fontShape))}else{var b=Ef(x,r.fontWeight,r.fontShape);return zn(a,b,s,r,o.concat(b,r.fontWeight,r.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},yue=(e,t)=>{if(Qo(e.classes)!==Qo(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n of Object.keys(e.style))if(e.style[n]!==t.style[n])return!1;for(var s of Object.keys(t.style))if(e.style[s]!==t.style[s])return!1;return!0},fD=e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof Cs&&n instanceof Cs&&yue(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e},h5=function(t){for(var r=0,n=0,s=0,a=0;a<t.children.length;a++){var o=t.children[a];o.height>r&&(r=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>s&&(s=o.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=s},Pe=function(t,r,n,s){var a=new xd(t,r,n,s);return h5(a),a},Zo=(e,t,r,n)=>new xd(e,t,r,n),Zu=function(t,r,n){var s=Pe([t],[],r);return s.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),s.style.borderBottomWidth=Ve(s.height),s.maxFontSize=1,s},vue=function(t,r,n,s){var a=new H1(t,r,n,s);return h5(a),a},Vi=function(t){var r=new gd(t);return h5(r),r},Ju=function(t,r){return t instanceof gd?Pe([],[t],r):t},wue=function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],s=-r[0].shift-r[0].elem.depth,a=s,o=1;o<r.length;o++){var l=-r[o].shift-a-r[o].elem.depth,u=l-(r[o-1].elem.height+r[o-1].elem.depth);a=a+l,n.push({type:"kern",size:u}),n.push(r[o])}return{children:n,depth:s}}var c;if(t.positionType==="top"){for(var d=t.positionData,h=0;h<t.children.length;h++){var m=t.children[h];d-=m.type==="kern"?m.size:m.elem.height+m.elem.depth}c=d}else if(t.positionType==="bottom")c=-t.positionData;else{var f=t.children[0];if(f.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")c=-f.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")c=-f.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:c}},zt=function(t,r){for(var{children:n,depth:s}=wue(t),a=0,o=0;o<n.length;o++){var l=n[o];if(l.type==="elem"){var u=l.elem;a=Math.max(a,u.maxFontSize,u.height)}}a+=2;var c=Pe(["pstrut"],[]);c.style.height=Ve(a);for(var d=[],h=s,m=s,f=s,p=0;p<n.length;p++){var g=n[p];if(g.type==="kern")f+=g.size;else{var x=g.elem,w=g.wrapperClasses||[],y=g.wrapperStyle||{},b=Pe(w,[c,x],void 0,y);b.style.top=Ve(-a-f-x.depth),g.marginLeft&&(b.style.marginLeft=g.marginLeft),g.marginRight&&(b.style.marginRight=g.marginRight),d.push(b),f+=x.height+x.depth}h=Math.min(h,f),m=Math.max(m,f)}var k=Pe(["vlist"],d);k.style.height=Ve(m);var T;if(h<0){var S=Pe([],[]),j=Pe(["vlist"],[S]);j.style.height=Ve(-h);var E=Pe(["vlist-s"],[new Cs("â")]);T=[Pe(["vlist-r"],[k,E]),Pe(["vlist-r"],[j])]}else T=[Pe(["vlist-r"],[k])];var A=Pe(["vlist-t"],T);return T.length===2&&A.classes.push("vlist-t2"),A.height=m,A.depth=-h,A},pD=(e,t)=>{var r=Pe(["mspace"],[],t),n=yr(e,t);return r.style.marginRight=Ve(n),r},Ef=function(t,r,n){var s="";switch(t){case"amsrm":s="AMS";break;case"textrm":s="Main";break;case"textsf":s="SansSerif";break;case"texttt":s="Typewriter";break;default:s=t}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Ital
1578ic":a="Regular",s+"-"+a},a4={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},gD={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},xD=function(t,r){var[n,s,a]=gD[t],o=new Xo(n),l=new Fi([o],{width:Ve(s),height:Ve(a),style:"width:"+Ve(s),viewBox:"0 0 "+1e3*s+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),u=Zo(["overlay"],[l],r);return u.height=a,u.style.height=Ve(a),u.style.width=Ve(s),u},xr={number:3,unit:"mu"},pl={number:4,unit:"mu"},hi={number:5,unit:"mu"},Eue={mord:{mop:xr,mbin:pl,mrel:hi,minner:xr},mop:{mord:xr,mop:xr,mrel:hi,minner:xr},mbin:{mord:pl,mop:pl,mopen:pl,minner:pl},mrel:{mord:hi,mop:hi,mopen:hi,minner:hi},mopen:{},mclose:{mop:xr,mbin:pl,mrel:hi,minner:xr},mpunct:{mord:xr,mop:xr,mrel:hi,mopen:xr,mclose:xr,mpunct:xr,minner:xr},minner:{mord:xr,mop:xr,mbin:pl,mrel:hi,mopen:xr,mpunct:xr,minner:xr}},kue={mord:{mop:xr},mop:{mord:xr,mop:xr},mbin:{},mrel:{},mopen:{},mclose:{mop:xr},mpunct:{},minner:{mop:xr}},bD={},Tg={},Cg={};function et(e){for(var{type:t,names:r,props:n,handler:s,htmlBuilder:a,mathmlBuilder:o}=e,l={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:s},u=0;u<r.length;++u)bD[r[u]]=l;t&&(a&&(Tg[t]=a),o&&(Cg[t]=o))}function gc(e){var{type:t,htmlBuilder:r,mathmlBuilder:n}=e;et({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var _g=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},$r=function(t){return t.type==="ordgroup"?t.body:[t]},Nue=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),Sue=new Set(["rightmost","mrel","mclose","mpunct"]),Tue={display:yt.DISPLAY,text:yt.TEXT,script:yt.SCRIPT,scriptscript:yt.SCRIPTSCRIPT},Cue={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Xr=function(t,r,n,s){s===void 0&&(s=[null,null]);for(var a=[],o=0;o<t.length;o++){var l=Ht(t[o],r);if(l instanceof gd){var u=l.children;a.push(...u)}else a.push(l)}if(fD(a),!n)return a;var c=r;if(t.length===1){var d=t[0];d.type==="sizing"?c=r.havingSize(d.size):d.type==="styling"&&(c=r.havingStyle(Tue[d.style]))}var h=Pe([s[0]||"leftmost"],[],r),m=Pe([s[1]||"rightmost"],[],r),f=n==="root";return i4(a,(p,g)=>{var x=g.classes[0],w=p.classes[0];x==="mbin"&&Sue.has(w)?g.classes[0]="mord":w==="mbin"&&Nue.has(x)&&(p.classes[0]="mord")},{node:h},m,f),i4(a,(p,g)=>{var x,w,y=l4(g),b=l4(p),k=y&&b?p.hasClass("mtight")?(x=kue[y])==null?void 0:x[b]:(w=Eue[y])==null?void 0:w[b]:null;if(k)return pD(k,c)},{node:h},m,f),a},i4=function(t,r,n,s,a){s&&t.push(s);for(var o=0;o<t.length;o++){var l=t[o],u=yD(l);if(u){i4(u.children,r,n,null,a);continue}var c=!l.hasClass("mspace");if(c){var d=r(l,n.node);d&&(n.insertAfter?n.insertAfter(d):(t.unshift(d),o++))}c?n.node=l:a&&l.hasClass("newline")&&(n.node=Pe(["leftmost"])),n.insertAfter=(h=>m=>{t.splice(h+1,0,m),o++})(o)}s&&t.pop()},yD=function(t){return t instanceof gd||t instanceof H1||t instanceof xd&&t.hasClass("enclosing")?t:null},o4=function(t,r){var n=yD(t);if(n){var s=n.children;if(s.length){if(r==="right")return o4(s[s.length-1],"right");if(r==="left")return o4(s[0],"left")}}return t},l4=function(t,r){if(!t)return null;r&&(t=o4(t,r));var n=t.classes[0];return Cue[n]||null},Ih=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return Pe(r.concat(n))},Ht=function(t,r,n){if(!t)return Pe();if(Tg[t.type]){var s=Tg[t.type](t,r);if(n&&r.size!==n.size){s=Pe(r.sizingClasses(n),[s],r);var a=r.sizeMultiplier/n.sizeMultiplier;s.height*=a,s.depth*=a}return s}else throw new ze("Got group of unknown type: '"+t.type+"'")};function kf(e,t){var r=Pe(["base"],e,t),n=Pe(["strut"]);return n.style.height=Ve(r.height+r.depth),r.depth&&(n.style.verticalAlign=Ve(-r.depth)),r.children.unshift(n),r}function c4(e,t){var r=null;e.length===1&&e[0].type==="tag"&&(r=e[0].tag,e=e[0].body);var n=Xr(e,t,"root"),s;n.length===2&&n[1].hasClass("tag")&&(s=n.pop());for(var a=[],o=[],l=0;l<n.length;l++)if(o.push(n[l]),n[l].hasClass("mbin")||n[l].hasClass("mrel")||n[l].hasClass("allowbreak")){for(var u=!1;l<n.length-1&&n[l+1].hasClass("mspace")&&!n[l+1].hasClass("newline");)l++,o.push(n[l]),n[l].hasClass("nobreak")&&(u=!0);u||(a.push(kf(o,t)),o=[])}else n[l].hasClass("newline")&&(o.pop(),o.length>0&&(a.push(kf(o,t)),o=[]),a.push(n[l]));o.length>0&&a.push(kf(o,t));var c;r?(c=kf(Xr(r,t,!0),t),c.classes=["tag"],a.push(c)):s&&a.push(s);var d=Pe(["katex-html"],a);if(d.setAttribute("aria-hidden","true"),c){var h=c.children[0];h.style.height=Ve(d.height+d.depth),d.depth&&(h.style.verticalAlign=Ve(-d.depth))}return d}function vD(e){return new gd(e)}class qe{constructor(t,r,n){this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=Qo(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof zr&&this.children[n+1]instanceof zr){for(var s=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof zr;)s+=this.children[++n].toText();t.appendChild(new zr(s).toNode())}else t.appendChild(this.children[n].toNode());return t}
vendor: 25,488 bytes, lines 1578-1579
1578toMarkup(){var t="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(t+=" "+r+'="',t+=Cn(this.attributes[r]),t+='"');this.classes.length>0&&(t+=' class ="'+Cn(Qo(this.classes))+'"'),t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class zr{constructor(t){this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Cn(this.toText())}toText(){return this.text}}class wD{constructor(t){this.width=t,t>=.05555&&t<=.05556?this.character="â":t>=.1666&&t<=.1667?this.character="â":t>=.2222&&t<=.2223?this.character="â ":t>=.2777&&t<=.2778?this.character="â â":t>=-.05556&&t<=-.05555?this.character="ââ£":t>=-.1667&&t<=-.1666?this.character="ââ£":t>=-.2223&&t<=-.2222?this.character="ââ£":t>=-.2778&&t<=-.2777?this.character="â â£":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",Ve(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Ve(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var _ue=new Set(["\\imath","\\jmath"]),Aue=new Set(["mrow","mtable"]),Ys=function(t,r,n){return mr[r][t]&&mr[r][t].replace&&t.charCodeAt(0)!==55349&&!(mD.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=mr[r][t].replace),new zr(t)},m5=function(t){return t.length===1?t[0]:new qe("mrow",t)},f5=function(t,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var s=t.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=t.text;if(_ue.has(a))return null;if(mr[s][a]){var o=mr[s][a].replace;o&&(a=o)}var l=a4[n].fontName;return u5(a,l,s)?a4[n].variant:null};function ry(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof zr&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var r=e.children[0];return r instanceof zr&&r.text===","}else return!1}var Is=function(t,r,n){if(t.length===1){var s=Zt(t[0],r);return n&&s instanceof qe&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var a=[],o,l=0;l<t.length;l++){var u=Zt(t[l],r);if(u instanceof qe&&o instanceof qe){if(u.type==="mtext"&&o.type==="mtext"&&u.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...u.children);continue}else if(u.type==="mn"&&o.type==="mn"){o.children.push(...u.children);continue}else if(ry(u)&&o.type==="mn"){o.children.push(...u.children);continue}else if(u.type==="mn"&&ry(o))u.children=[...o.children,...u.children],a.pop();else if((u.type==="msup"||u.type==="msub")&&u.children.length>=1&&(o.type==="mn"||ry(o))){var c=u.children[0];c instanceof qe&&c.type==="mn"&&(c.children=[...o.children,...c.children],a.pop())}else if(o.type==="mi"&&o.children.length===1){var d=o.children[0];if(d instanceof zr&&d.text==="̸"&&(u.type==="mo"||u.type==="mi"||u.type==="mn")){var h=u.children[0];h instanceof zr&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(u),o=u}return a},Jo=function(t,r,n){return m5(Is(t,r,n))},Zt=function(t,r){if(!t)return new qe("mrow");if(Cg[t.type]){var n=Cg[t.type](t,r);return n}else throw new ze("Got group of unknown type: '"+t.type+"'")};function hT(e,t,r,n,s){var a=Is(e,r),o;a.length===1&&a[0]instanceof qe&&Aue.has(a[0].type)?o=a[0]:o=new qe("mrow",a);var l=new qe("annotation",[new zr(t)]);l.setAttribute("encoding","application/x-tex");var u=new qe("semantics",[o,l]),c=new qe("math",[u]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var d=s?"katex":"katex-mathml";return Pe([d],[c])}var jue=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],mT=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],fT=function(t,r){return r.size<2?t:jue[t-1][r.size-1]};class xi{constructor(t){this.style=t.style,this.color=t.color,this.size=t.size||xi.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=mT[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(r,t),new xi(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:fT(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:mT[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=fT(xi.BASESIZE,t);return this.size===r&&this.textSize===xi.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==xi.BASESIZE?["sizing","reset-size"+this.size,"size"+xi.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=fue(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}xi.BASESIZE=6;var ED=function(t){return new xi({style:t.displayMode?yt.DISPLAY:yt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},kD=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=Pe(n,[t])}return t},Iue=function(t,r,n){var s=ED(n),a;if(n.output==="mathml")return hT(t,r,s,n.displayMode,!0);if(n.output==="html"){var o=c4(t,s);a=Pe(["katex"],[o])}else{var l=hT(t,r,s,n.displayMode,!1),u=c4(t,s);a=Pe(["katex"],[l,u])}return kD(a,n)},Rue=function(t,r,n){var s=ED(n),a=c4(t,s),o=Pe(["katex"],[a]);return kD(o,n)},Due={widehat:"^",widecheck:"Ë",widetilde:"~",utilde:"~",overleftarrow:"â",underleftarrow:"â",xleftarrow:"â",overrightarrow:"â",underrightarrow:"â",xrightarrow:"â",underbrace:"â",overbrace:"â",underbracket:"âµ",overbracket:"â´",overgroup:"â ",undergroup:"â¡",overleftrightarrow:"â",underleftrightarrow:"â",xleftrightarrow:"â",Overrightarrow:"â",xRightarrow:"â",overleftharpoon:"â¼",xleftharpoonup:"â¼",overrightharpoon:"â",xrightharpoonup:"â",xLeftarrow:"â",xLeftrightarrow:"â",xhookleftarrow:"â©",xhookrightarrow:"âª",xmapsto:"â¦",xrightharpoondown:"â",xleftharpoondown:"â½",xrightleftharpoons:"â",xleftrightharpoons:"â",xtwoheadleftarrow:"â",xtwoheadrightarrow:"â ",xlongequal:"=",xtofrom:"â",xrightleftarrows:"â",xrightequilibrium:"â",xleftequilibrium:"â","\\cdrightarrow":"â","\\cdleftarrow":"â","\\cdlongequal":"="},V1=function(t){var r=new qe("mo",[new zr(Due[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},Mue={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Oue=new Set(["widehat","widecheck","widetilde","utilde"]),G1=function(t,r){function n(){var l=4e5,u=t.label.slice(1);if(Oue.has(u)){var c=t,d=c.base.type==="ordgroup"?c.base.body.length:1,h,m,f;if(d>5)u==="widehat"||u==="widecheck"?(h=420,l=2364,f=.42,m=u+"4"):(h=312,l=2340,f=.34,m="tilde4");else{var p=[1,1,2,2,3,3][d];u==="widehat"||u==="widecheck"?(l=[0,1062,2364,2364,2364][p],h=[0,239,300,360,420][p],f=[0,.24,.3,.3,.36,.42][p],m=u+p):(l=[0,600,1033,2339,2340][p],h=[0,260,286,306,312][p],f=[0,.26,.286,.3,.306,.34][p],m="tilde"+p)}var g=new Xo(m),x=new Fi([g],{width:"100%",height:Ve(f),viewBox:"0 0 "+l+" "+h,preserveAspectRatio:"none"});return{span:Zo([],[x],r),minWidth:0,height:f}}else{var w=[],y=Mue[u],[b,k,T]=y,S=T/1e3,j=b.length,E,A;if(j===1){var R=y[3];E=["hide-tail"],A=[R]}else if(j===2)E=["halfarrow-left","halfarrow-right"],A=["xMinYMin","xMaxYMin"];else if(j===3)E=["brace-left","brace-center","brace-right"],A=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support 1579 `+j+" children.");for(var M=0;M<j;M++){var B=new Xo(b[M]),W=new Fi([B],{width:"400em",height:Ve(S),viewBox:"0 0 "+l+" "+T,preserveAspectRatio:A[M]+" slice"}),H=Zo([E[M]],[W],r);if(j===1)return{span:H,minWidth:k,height:S};H.style.height=Ve(S),w.push(H)}return{span:Pe(["stretchy"],w,r),minWidth:k,height:S}}}var{span:s,minWidth:a,height:o}=n();return s.height=o,s.style.height=Ve(o),a>0&&(s.style.minWidth=Ve(a)),s},Lue=function(t,r,n,s,a){var o,l=t.height+t.depth+n+s;if(/fbox|color|angl/.test(r)){if(o=Pe(["stretchy",r],[],a),r==="fbox"){var u=a.color&&a.getColor();u&&(o.style.borderColor=u)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new n4({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new n4({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Fi(c,{width:"100%",height:Ve(l)});o=Zo([],[d],a)}return o.height=l,o.style.height=Ve(l),o};function kt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function K1(e){var t=Y1(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Y1(e){return e&&(e.type==="atom"||gue.hasOwnProperty(e.type))?e:null}var ND=e=>{if(e instanceof Cs)return e;if(hue(e)&&e.children.length===1)return ND(e.children[0])},p5=(e,t)=>{var r,n,s;e&&e.type==="supsub"?(n=kt(e.base,"accent"),r=n.base,e.base=r,s=due(Ht(e,t)),e.base=n):(n=kt(e,"accent"),r=n.base);var a=Ht(r,t.havingCrampedStyle()),o=n.isShifty&&qi(r),l=0;if(o){var u,c;l=(u=(c=ND(a))==null?void 0:c.skew)!=null?u:0}var d=n.label==="\\c",h=d?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),m;if(n.isStretchy)m=G1(n,t),m=zt({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+Ve(2*l)+")",marginLeft:Ve(2*l)}:void 0}]});else{var f,p;n.label==="\\vec"?(f=xD("vec",t),p=gD.vec[1]):(f=W1({mode:n.mode,text:n.label},t,"textord"),f=uue(f),f.italic=0,p=f.width,d&&(h+=f.depth)),m=Pe(["accent-body"],[f]);var g=n.label==="\\textcircled";g&&(m.classes.push("accent-full"),h=a.height);var x=l;g||(x-=p/2),m.style.left=Ve(x),n.label==="\\textcircled"&&(m.style.top=".2em"),m=zt({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:m}]})}var w=Pe(["mord","accent"],[m],t);return s?(s.children[0]=w,s.height=Math.max(w.height,s.height),s.classes[0]="mord",s):w},SD=(e,t)=>{var r=e.isStretchy?V1(e.label):new qe("mo",[Ys(e.label,e.mode)]),n=new qe("mover",[Zt(e.base,t),r]);return n.setAttribute("accent","true"),n},Pue=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));et({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=_g(t[0]),n=!Pue.test(e.funcName),s=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:s,base:r}},htmlBuilder:p5,mathmlBuilder:SD});et({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:p5,mathmlBuilder:SD});et({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,s=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:s}},htmlBuilder:(e,t)=>{var r=Ht(e.base,t),n=G1(e,t),s=e.label==="\\utilde"?.12:0,a=zt({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:r}]});return Pe(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var r=V1(e.label),n=new qe("munder",[Zt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var Nf=e=>{var t=new qe("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};et({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:s}=e;return{type:"xArrow",mode:n.mode,label:s,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),s=Ju(Ht(e.body,n,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(a+"-arrow-pad");var o;e.below&&(n=t.havingStyle(r.sub()),o=Ju(Ht(e.below,n,t),t),o.classes.push(a+"-arrow-pad"));var l=G1(e,t),u=-t.fontMetrics().axisHeight+.5*l.height,c=-t.fontMetrics().axisHeight-.5*l.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(c-=s.depth);var d;if(o){var h=-t.fontMetrics().axisHeight+o.height+.5*l.height+.111;d=zt({positionType:"individualShift",children:[{type:"elem",elem:s,shift:c},{type:"elem",elem:l,shift:u},{type:"elem",elem:o,shift:h}]})}else d=zt({positionType:"individualShift",children:[{type:"elem",elem:s,shift:c},{type:"elem",elem:l,shift:u}]});return d.children[0].children[0].children[1].classes.push("svg-align"),Pe(["mrel","x-arrow"],[d],t)},mathmlBuilder(e,t){var r=V1(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var s=Nf(Zt(e.body,t));if(e.below){var a=Nf(Zt(e.below,t));n=new qe("munderover",[r,a,s])}else n=new qe("mover",[r,s])}else if(e.below){var o=Nf(Zt(e.below,t));n=new qe("munder",[r,o])}else n=Nf(),n=new qe("mover",[r,n]);return n}});function TD(e,t){var r=Xr(e.body,t,!0);return Pe([e.mclass],r,t)}function CD(e,t){var r,n=Is(e.body,t);return e.mclass==="minner"?r=new qe("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new qe("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new qe("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}et({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,s=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:$r(s),isCharacterBox:qi(s)}},htmlBuilder:TD,mathmlBuilder:CD});var Q1=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};et({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:Q1(t[0]),body:$r(t[1]),isCharacterBox:qi(t[1])}}});et({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,s=t[1],a=t[0],o;n!=="\\stackrel"?o=Q1(s):o="mrel";var l={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:$r(s)},u={type:"supsub",mode:a.mode,base:l,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:o,body:[u],isCharacterBox:qi(u)}},htmlBuilder:TD,mathmlBuilder:CD});et({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:Q1(t[0]),body:$r(t[0])}},htmlBuilder(e,t){var r=Xr(e.body,t,!0),n=Pe([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=Is(e.body,t),n=new qe("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var Fue={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},pT=()=>({type:"styling",body:[],mode:"math",style:"display"}),gT=e=>e.type==="textord"&&e.text==="@",Bue=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function Uue(e,t,r){var n=Fue[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var s=r.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},o=r.callFunction("\\Big",[a],[]),l=r.callFunction("\\\\cdright",[t[1]],[]),u={type:"ordgroup",mode:"math",body:[s,o,l]};return r.callFunction("\\\\cdparent",[u],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function $ue(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new ze("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],s=[n],a=0;a<t.length;a++){for(var o=t[a],l=pT(),u=0;u<o.length;u++)if(!gT(o[u]))l.body.push(o[u]);else{n.push(l),u+=1;var c=K1(o[u]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(c))if("<>AV".includes(c))for(var h=0;h<2;h++){for(var m=!0,f=u+1;f<o.length;f++){if(Bue(o[f],c)){m=!1,u=f;break}if(gT(o[f]))throw new ze("Missing a "+c+" character to complete a CD arrow.",o[f]);d[h].body.push(o[f])}if(m)throw new ze("Missing a "+c+" character to complete a CD arrow.",o[u])}else throw new ze('Expected one of "<>AV=|." after @',o[u]);var p=Uue(c,d,e),g={type:"styling",body:[p],mode:"math",style:"display"};n.push(g),l=pT()}a%2===0?n.push(l):n.shift(),n=[],s.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var x=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:x,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}et({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=Ju(Ht(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=Ve(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new qe("mrow",[Zt(e.label,t)]);return r=new qe("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new qe("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});et({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=Ju(Ht(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new qe("mrow",[Zt(e.fragment,t)])}});et({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=kt(t[0],"ordgroup"),s=n.body,a="",o=0;o<s.length;o++){var l=kt(s[o],"textord");a+=l.text}var u=parseInt(a),c;if(isNaN(u))throw new ze("\\@char has non-numeric argument "+a);if(u<0||u>=1114111)throw new ze("\\@char with invalid code point "+a);return u<=65535?c=String.fromCharCode(u):(u-=65536,c=String.fromCharCode((u>>10)+55296,(u&1023)+56320)),{type:"textord",mode:r.mode,text:c}}});var _D=(e,t)=>{var r=Xr(e.body,t.withColor(e.color),!1);return Vi(r)},AD=(e,t)=>{var r=Is(e.body,t.withColor(e.color)),n=new qe("mstyle",r);return n.setAttribute("mathcolor",e.color),n};et({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=kt(t[0],"color-token").color,s=t[1];return{type:"color",mode:r.mode,color:n,body:$r(s)}},htmlBuilder:_D,mathmlBuilder:AD});et({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,s=kt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",s);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:s,body:a}},htmlBuilder:_D,mathmlBuilder:AD});et({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,s=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTe
1579X, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:s&&kt(s,"size").value}},htmlBuilder(e,t){var r=Pe(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=Ve(yr(e.size,t)))),r},mathmlBuilder(e,t){var r=new qe("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",Ve(yr(e.size,t)))),r}});var u4={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},jD=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new ze("Expected a control sequence",e);return t},zue=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},ID=(e,t,r,n)=>{var s=e.gullet.macros.get(r.text);s==null&&(r.noexpand=!0,s={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,s,n)};et({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(u4[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=u4[n.text]),kt(t.parseFunction(),"internal");throw new ze("Invalid token after macro prefix",n)}});et({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),s=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new ze("Expected a control sequence",n);for(var a=0,o,l=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),l[a].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new ze('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new ze('Argument number "'+n.text+'" out of order');a++,l.push([])}else{if(n.text==="EOF")throw new ze("Expected a macro definition");l[a].push(n.text)}var{tokens:u}=t.gullet.consumeArg();return o&&u.unshift(o),(r==="\\edef"||r==="\\xdef")&&(u=t.gullet.expandTokens(u),u.reverse()),t.gullet.macros.set(s,{tokens:u,numArgs:a,delimiters:l},r===u4[r]),{type:"internal",mode:t.mode}}});et({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=jD(t.gullet.popToken());t.gullet.consumeSpaces();var s=zue(t);return ID(t,n,s,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});et({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=jD(t.gullet.popToken()),s=t.gullet.popToken(),a=t.gullet.popToken();return ID(t,n,a,r==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var w0=function(t,r,n){var s=mr.math[t]&&mr.math[t].replace,a=u5(s||t,r,n);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return a},g5=function(t,r,n,s){var a=n.havingBaseStyle(r),o=Pe(s.concat(a.sizingClasses(n)),[t],n),l=a.sizeMultiplier/n.sizeMultiplier;return o.height*=l,o.depth*=l,o.maxFontSize=a.sizeMultiplier,o},RD=function(t,r,n){var s=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/s.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=Ve(a),t.height-=a,t.depth+=a},Hue=function(t,r,n,s,a,o){var l=zn(t,"Main-Regular",a,s),u=g5(l,r,s,o);return RD(u,s,r),u},que=function(t,r,n,s){return zn(t,"Size"+r+"-Regular",n,s)},DD=function(t,r,n,s,a,o){var l=que(t,r,a,s),u=g5(Pe(["delimsizing","size"+r],[l],s),yt.TEXT,s,o);return n&&RD(u,s,yt.TEXT),u},ny=function(t,r,n){var s;r==="Size1-Regular"?s="delim-size1":s="delim-size4";var a=Pe(["delimsizinginner",s],[Pe([],[zn(t,r,n)])]);return{type:"elem",elem:a}},sy=function(t,r,n){var s=Va["Size4-Regular"][t.charCodeAt(0)]?Va["Size4-Regular"][t.charCodeAt(0)][4]:Va["Size1-Regular"][t.charCodeAt(0)][4],a=new Xo("inner",sue(t,Math.round(1e3*r))),o=new Fi([a],{width:Ve(s),height:Ve(r),style:"width:"+Ve(s),viewB
vendor: 66,669 bytes, lines 1579-1583
1579ox:"0 0 "+1e3*s+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),l=Zo([],[o],n);return l.height=r,l.style.height=Ve(r),l.style.width=Ve(s),{type:"elem",elem:l}},d4=.008,Sf={type:"kern",size:-1*d4},Wue=new Set(["|","\\lvert","\\rvert","\\vert"]),Vue=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),MD=function(t,r,n,s,a,o){var l,u,c,d,h="",m=0;l=c=d=t,u=null;var f="Size1-Regular";t==="\\uparrow"?c=d="â":t==="\\Uparrow"?c=d="â":t==="\\downarrow"?l=c="â":t==="\\Downarrow"?l=c="â":t==="\\updownarrow"?(l="\\uparrow",c="â",d="\\downarrow"):t==="\\Updownarrow"?(l="\\Uparrow",c="â",d="\\Downarrow"):Wue.has(t)?(c="â£",h="vert",m=333):Vue.has(t)?(c="â¥",h="doublevert",m=556):t==="["||t==="\\lbrack"?(l="â¡",c="â¢",d="â£",f="Size4-Regular",h="lbrack",m=667):t==="]"||t==="\\rbrack"?(l="â¤",c="â¥",d="â¦",f="Size4-Regular",h="rbrack",m=667):t==="\\lfloor"||t==="â"?(c=l="â¢",d="â£",f="Size4-Regular",h="lfloor",m=667):t==="\\lceil"||t==="â"?(l="â¡",c=d="â¢",f="Size4-Regular",h="lceil",m=667):t==="\\rfloor"||t==="â"?(c=l="â¥",d="â¦",f="Size4-Regular",h="rfloor",m=667):t==="\\rceil"||t==="â"?(l="â¤",c=d="â¥",f="Size4-Regular",h="rceil",m=667):t==="("||t==="\\lparen"?(l="â",c="â",d="â",f="Size4-Regular",h="lparen",m=875):t===")"||t==="\\rparen"?(l="â",c="â",d="â ",f="Size4-Regular",h="rparen",m=875):t==="\\{"||t==="\\lbrace"?(l="â§",u="â¨",d="â©",c="âª",f="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(l="â«",u="â¬",d="â",c="âª",f="Size4-Regular"):t==="\\lgroup"||t==="â®"?(l="â§",d="â©",c="âª",f="Size4-Regular"):t==="\\rgroup"||t==="â¯"?(l="â«",d="â",c="âª",f="Size4-Regular"):t==="\\lmoustache"||t==="â°"?(l="â§",d="â",c="âª",f="Size4-Regular"):(t==="\\rmoustache"||t==="â±")&&(l="â«",d="â©",c="âª",f="Size4-Regular");var p=w0(l,f,a),g=p.height+p.depth,x=w0(c,f,a),w=x.height+x.depth,y=w0(d,f,a),b=y.height+y.depth,k=0,T=1;if(u!==null){var S=w0(u,f,a);k=S.height+S.depth,T=2}var j=g+b+k,E=Math.max(0,Math.ceil((r-j)/(T*w))),A=j+E*T*w,R=s.fontMetrics().axisHeight;n&&(R*=s.sizeMultiplier);var M=A/2-R,B=[];if(h.length>0){var W=A-g-b,H=Math.round(A*1e3),L=aue(h,Math.round(W*1e3)),$=new Xo(h,L),ee=Ve(m/1e3),G=Ve(H/1e3),Q=new Fi([$],{width:ee,height:G,viewBox:"0 0 "+m+" "+H}),D=Zo([],[Q],s);D.height=H/1e3,D.style.width=ee,D.style.height=G,B.push({type:"elem",elem:D})}else{if(B.push(ny(d,f,a)),B.push(Sf),u===null){var K=A-g-b+2*d4;B.push(sy(c,K,s))}else{var V=(A-g-b-k)/2+2*d4;B.push(sy(c,V,s)),B.push(Sf),B.push(ny(u,f,a)),B.push(Sf),B.push(sy(c,V,s))}B.push(Sf),B.push(ny(l,f,a))}var C=s.havingBaseStyle(yt.TEXT),O=zt({positionType:"bottom",positionData:M,children:B});return g5(Pe(["delimsizing","mult"],[O],C),yt.TEXT,s,o)},ay=80,iy=.08,oy=function(t,r,n,s,a){var o=nue(t,s,n),l=new Xo(t,o),u=new Fi([l],{width:"400em",height:Ve(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Zo(["hide-tail"],[u],a)},Gue=function(t,r){var n=r.havingBaseSizing(),s=BD("\\surd",t*n.sizeMultiplier,FD,n),a=n.sizeMultiplier,o=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),l,u=0,c=0,d=0,h;return s.type==="small"?(d=1e3+1e3*o+ay,t<1?a=1:t<1.4&&(a=.7),u=(1+o+iy)/a,c=(1+o)/a,l=oy("sqrtMain",u,d,o,r),l.style.minWidth="0.853em",h=.833/a):s.type==="large"?(d=(1e3+ay)*U0[s.size],c=(U0[s.size]+o)/a,u=(U0[s.size]+o+iy)/a,l=oy("sqrtSize"+s.size,u,d,o,r),l.style.minWidth="1.02em",h=1/a):(u=t+o+iy,c=t+o,d=Math.floor(1e3*t+o)+ay,l=oy("sqrtTall",u,d,o,r),l.style.minWidth="0.742em",h=1.056),l.height=c,l.style.height=Ve(u),{span:l,advanceWidth:h,ruleWidth:(r.fontMetrics().sqrtRuleThickness+o)*a}},OD=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","â","â","\\lceil","\\rceil","â","â","\\surd"]),Kue=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","â®","â¯","\\lmoustache","\\rmoustache","â°","â±"]),LD=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),U0=[0,1.2,1.8,2.4,3],PD=function(t,r,n,s,a){if(t==="<"||t==="\\lt"||t==="â¨"?t="\\langle":(t===">"||t==="\\gt"||t==="â©")&&(t="\\rangle"),OD.has(t)||LD.has(t))return DD(t,r,!1,n,s,a);if(Kue.has(t))return MD(t,U0[r],!1,n,s,a);throw new ze("Illegal delimiter: '"+t+"'")},Yue=[{type:"small",style:yt.SCRIPTSCRIPT},{type:"small",style:yt.SCRIPT},{type:"small",style:yt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Que=[{type:"small",style:yt.SCRIPTSCRIPT},{type:"small",style:yt.SCRIPT},{type:"small",style:yt.TEXT},{type:"stack"}],FD=[{type:"small",style:yt.SCRIPTSCRIPT},{type:"small",style:yt.SCRIPT},{type:"small",style:yt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Xue=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var r=t.type;throw new Error("Add support for delim type '"+r+"' here.")},BD=function(t,r,n,s){for(var a=Math.min(2,3-s.style.size),o=a;o<n.length;o++){var l=n[o];if(l.type==="stack")break;var u=w0(t,Xue(l),"math"),c=u.height+u.depth;if(l.type==="small"){var d=s.havingBaseStyle(l.style);c*=d.sizeMultiplier}if(c>r)return l}return n[n.length-1]},h4=function(t,r,n,s,a,o){t==="<"||t==="\\lt"||t==="â¨"?t="\\langle":(t===">"||t==="\\gt"||t==="â©")&&(t="\\rangle");var l;LD.has(t)?l=Yue:OD.has(t)?l=FD:l=Que;var u=BD(t,r,l,s);return u.type==="small"?Hue(t,u.style,n,s,a,o):u.type==="large"?DD(t,u.size,n,s,a,o):MD(t,r,n,s,a,o)},ly=function(t,r,n,s,a,o){var l=s.fontMetrics().axisHeight*s.sizeMultiplier,u=901,c=5/s.fontMetrics().ptPerEm,d=Math.max(r-l,n+l),h=Math.max(d/500*u,2*d-c);return h4(t,h,!0,s,a,o)},xT={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Zue=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","â","â","\\lceil","\\rceil","â","â","<",">","\\langle","â¨","\\rangle","â©","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","â®","â¯","\\lmoustache","\\rmoustache","â°","â±","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function X1(e,t){var r=Y1(e);if(r&&Zue.has(r.text))return r;throw r?new ze("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new ze("Invalid delimiter type '"+e.type+"'",e)}et({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=X1(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:xT[e.funcName].size,mclass:xT[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?Pe([e.mclass]):PD(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Ys(e.delim,e.mode));var r=new qe("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=Ve(U0[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function bT(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}et({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new ze("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:X1(t[0],e).text,color:r}}});et({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=X1(t[0],e),n=e.parser;++n.leftrightDepth;var s=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=kt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:s,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{bT(e);for(var r=Xr(e.body,t,!0,["mopen","mclose"]),n=0,s=0,a=!1,o=0;o<r.length;o++)r[o].isMiddle?a=!0:(n=Math.max(r[o].height,n),s=Math.max(r[o].depth,s));n*=t.sizeMultiplier,s*=t.sizeMultiplier;var l;if(e.left==="."?l=Ih(t,["mopen"]):l=ly(e.left,n,s,t,e.mode,["mopen"]),r.unshift(l),a)for(var u=1;u<r.length;u++){var c=r[u],d=c.isMiddle;d&&(r[u]=ly(d.delim,n,s,d.options,e.mode,[]))}var h;if(e.right===".")h=Ih(t,["mclose"]);else{var m=e.rightColor?t.withColor(e.rightColor):t;h=ly(e.right,n,s,m,e.mode,["mclose"])}return r.push(h),Pe(["minner"],r,t)},mathmlBuilder:(e,t)=>{bT(e);var r=Is(e.body,t);if(e.left!=="."){var n=new qe("mo",[Ys(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var s=new qe("mo",[Ys(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),r.push(s)}return m5(r)}});et({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=X1(t[0],e);if(!e.parser.leftrightDepth)throw new ze("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=Ih(t,[]);else{r=PD(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?Ys("|","text"):Ys(e.delim,e.mode),n=new qe("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Z1=(e,t)=>{var r=Ju(Ht(e.body,t),t),n=e.label.slice(1),s=t.sizeMultiplier,a,o=0,l=qi(e.body);if(n==="sout")a=Pe(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/s,o=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var u=yr({number:.6,unit:"pt"},t),c=yr({number:.35,unit:"ex"},t),d=t.havingBaseSizing();s=s/d.sizeMultiplier;var h=r.height+r.depth+u+c;r.style.paddingLeft=Ve(h/2+u);var m=Math.floor(1e3*h*s),f=tue(m),p=new Fi([new Xo("phase",f)],{width:"400em",height:Ve(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});a=Zo(["hide-tail"],[p],t),a.style.height=Ve(h),o=r.depth+u+c}else{/cancel/.test(n)?l||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var g=0,x=0,w=0;/box/.test(n)?(w=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),g=t.fontMetrics().fboxsep+(n==="colorbox"?0:w),x=g):n==="angl"?(w=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),g=4*w,x=Math.max(0,.25-r.depth)):(g=l?.2:0,x=g),a=Lue(r,n,g,x,t),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=Ve(w)):n==="angl"&&w!==.049&&(a.style.borderTopWidth=Ve(w),a.style.borderRightWidth=Ve(w)),o=r.depth+x,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var y;if(e.backgroundColor)y=zt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:r,shift:0}]});else{var b=/cancel|phase/.test(n)?["svg-align"]:[];y=zt({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:b}]})}return/cancel/.test(n)&&(y.height=r.height,y.depth=r.depth),/cancel/.test(n)&&!l?Pe(["mord","cancel-lap"],[y],t):Pe(["mord"],[y],t)},J1=(e,t)=>{var r=0,n=new qe(e.label.includes("colorbox")?"mpadded":"menclose",[Zt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var s=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+Ve(s)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};et({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:s}=e,a=kt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:s,backgroundColor:a,body:o}},htmlBuilder:Z1,mathmlBuilder:J1});et({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:s}=e,a=kt(t[0],"color-token").color,o=kt(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:n.mode,label:s,backgroundColor:o,borderColor:a,body:l}},htmlBuilder:Z1,mathmlBuilder:J1});et({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}});et({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,s=t[0];return{type:"enclose",mode:r.mode,label:n,body:s}},htmlBuilder:Z1,mathmlBuilder:J1});et({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=t[0];return{type:"enclose",mode:r.mode,label:n,body:s}},htmlBuilder:Z1,mathmlBuilder:J1});et({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var UD={};function ei(e){for(var{type:t,names:r,props:n,handler:s,htmlBuilder:a,mathmlBuilder:o}=e,l={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},u=0;u<r.length;++u)UD[r[u]]=l;a&&(Tg[t]=a),o&&(Cg[t]=o)}var $D={};function z(e,t){$D[e]=t}class ss{constructor(t,r,n){this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new ss(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}}class ks{constructor(t,r){this.text=t,this.loc=r}range(t,r){return new ks(r,ss.range(this,t))}}function yT(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for(r==="\\relax"&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);r==="\\hline"||r==="\\hdashline";)e.consume(),t.push(r==="\\hdashline"),e.consumeSpaces(),r=e.fetch().text;return t}var ex=e=>{var t=e.parser.settings;if(!t.displayMode)throw new ze("{"+e.envName+"} can be used only in display mode.")},Jue=new Set(["gather","gather*"]);function x5(e){if(!e.includes("ed"))return!e.includes("*")}function cl(e,t,r){var{hskipBeforeAndAfter:n,addJot:s,cols:a,arraystretch:o,colSeparationType:l,autoTag:u,singleRow:c,emptySingleRow:d,maxNumCols:h,leqno:m}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var f=e.gullet.expandMacroAsText("\\arraystretch");if(f==null)o=1;else if(o=parseFloat(f),!o||o<0)throw new ze("Invalid \\arraystretch: "+f)}e.gullet.beginGroup();var p=[],g=[p],x=[],w=[],y=u!=null?[]:void 0;function b(){u&&e.gullet.macros.set("\\@eqnsw","1",!0)}function k(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new ks("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!u&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(b(),w.push(yT(e));;){var T=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var S={type:"ordgroup",mode:e.mode,body:T};r&&(S={type:"styling",mode:e.mode,style:r,body:[S]}),p.push(S);var j=e.fetch().text;if(j==="&"){if(h&&p.length===h){if(c||l)throw new ze("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(j==="\\end"){k(),p.length===1&&S.type==="styling"&&S.body.length===1&&S.body[0].type==="ordgroup"&&S.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),w.length<g.length+1&&w.push([]);break}else if(j==="\\\\"){e.consume();var E=void 0;e.gullet.future().text!==" "&&(E=e.parseSizeGroup(!0)),x.push(E?E.value:null),k(),w.push(yT(e)),p=[],g.push(p),b()}else throw new ze("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:o,body:g,cols:a,rowGaps:x,hskipBeforeAndAfter:n,hLinesBeforeRow:w,colSeparationType:l,tags:y,leqno:m}}function b5(e){return e.slice(0,1)==="d"?"display":"text"}var ti=function(t,r){var n,s,a=t.body.length,o=t.hLinesBeforeRow,l=0,u=new Array(a),c=[],d=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),h=1/r.fontMetrics().ptPerEm,m=5*h;if(t.colSeparationType&&t.colSeparationType==="small"){var f=r.havingStyle(yt.SCRIPT).sizeMultiplier;m=.2778*(f/r.sizeMultiplier)}var p=t.colSeparationType==="CD"?yr({number:3,unit:"ex"},r):12*h,g=3*h,x=t.arraystretch*p,w=.7*x,y=.3*x,b=0;function k(ue){for(var je=0;je<ue.length;++je)je>0&&(b+=.25),c.push({pos:b,isDashed:ue[je]})}for(k(o[0]),n=0;n<t.body.length;++n){var T=t.body[n],S=w,j=y;l<T.length&&(l=T.length);var E=new Array(T.length);for(s=0;s<T.length;++s){var A=Ht(T[s],r);j<A.depth&&(j=A.depth),S<A.height&&(S=A.height),E[s]=A}var R=t.rowGaps[n],M=0;R&&(M=yr(R,r),M>0&&(M+=y,j<M&&(j=M),M=0)),t.addJot&&n<t.body.length-1&&(j+=g),E.height=S,E.depth=j,b+=S,E.pos=b,b+=j+M,u[n]=E,k(o[n+1])}var B=b/2+r.fontMetrics().axisHeight,W=t.cols||[],H=[],L,$,ee=[];if(t.tags&&t.tags.some(ue=>ue))for(n=0;n<a;++n){var G=u[n],Q=G.pos-B,D=t.tags[n],K=void 0;D===!0?K=Pe(["eqn-num"],[],r):D===!1?K=Pe([],[],r):K=Pe([],Xr(D,r,!0),r),K.depth=G.depth,K.height=G.height,ee.push({type:"elem",elem:K,shift:Q})}for(s=0,$=0;s<l||$<W.length;++s,++$){for(var V,C=W[$],O=!0;((q=C)==null?void 0:q.type)==="separator";){var q;if(O||(L=Pe(["arraycolsep"],[]),L.style.width=Ve(r.fontMetrics().doubleRuleSep),H.push(L)),C.separator==="|"||C.separator===":"){var ne=C.separator==="|"?"solid":"dashed",he=Pe(["vertical-separator"],[],r);he.style.height=Ve(b),he.style.borderRightWidth=Ve(d),he.style.borderRightStyle=ne,he.style.margin="0 "+Ve(-d/2);var xe=b-B;xe&&(he.style.verticalAlign=Ve(-xe)),H.push(he)}else throw new ze("Invalid separator type: "+C.separator);$++,C=W[$],O=!1}if(!(s>=l)){var Oe=void 0;if(s>0||t.hskipBeforeAndAfter){var Se,we;Oe=(Se=(we=C)==null?void 0:we.pregap)!=null?Se:m,Oe!==0&&(L=Pe(["arraycolsep"],[]),L.style.width=Ve(Oe),H.push(L))}var Be=[];for(n=0;n<a;++n){var ve=u[n],Ye=ve[s];if(Ye){var Ae=ve.pos-B;Ye.depth=ve.depth,Ye.height=ve.height,Be.push({type:"elem",elem:Ye,shift:Ae})}}var Ee=zt({positionType:"individualShift",children:Be}),Ce=Pe(["col-align-"+(((V=C)==null?void 0:V.align)||"c")],[Ee]);if(H.push(Ce),s<l-1||t.hskipBeforeAndAfter){var X,pe;Oe=(X=(pe=C)==null?void 0:pe.postgap)!=null?X:m,Oe!==0&&(L=Pe(["arraycolsep"],[]),L.style.width=Ve(Oe),H.push(L))}}}var _e=Pe(["mtable"],H);if(c.length>0){for(var Ne=Zu("hline",r,d),de=Zu("hdashline",r,d),be=[{type:"elem",elem:_e,shift:0}];c.length>0;){var ie=c.pop(),De=ie.pos-B;ie.isDashed?be.push({type:"elem",elem:de,shift:De}):be.push({type:"elem",elem:Ne,shift:De})}_e=zt({positionType:"individualShift",children:be})}if(ee.length===0)return Pe(["mord"],[_e],r);var F=zt({positionType:"individualShift",children:ee}),se=Pe(["tag"],[F],r);return Vi([_e,se])},ede={c:"center ",l:"left ",r:"right "},ri=function(t,r){for(var n=[],s=new qe("mtd",[],["mtr-glue"]),a=new qe("mtd",[],["mml-eqn-num"]),o=0;o<t.body.length;o++){for(var l=t.body[o],u=[],c=0;c<l.length;c++)u.push(new qe("mtd",[Zt(l[c],r)]));t.tags&&t.tags[o]&&(u.unshift(s),u.push(s),t.leqno?u.unshift(a):u.push(a)),n.push(new qe("mtr",u))}var d=new qe("mtable",n),h=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);d.setAttribute("rowspacing",Ve(h));var m="",f="";if(t.cols&&t.cols.length>0){var p=t.cols,g="",x=!1,w=0,y=p.length;p[0].type==="separator"&&(m+="top ",w=1),p[p.length-1].type==="separator"&&(m+="bottom ",y-=1);for(var b=w;b<y;b++){var k=p[b];k.type==="align"?(f+=ede[k.align],x&&(g+="none "),x=!0):k.type==="separator"&&x&&(g+=k.separator==="|"?"solid ":"dashed ",x=!1)}d.setAttribute("columnalign",f.trim()),/[sd]/.test(g)&&d.setAttribute("columnlines",g.trim())}if(t.colSeparationType==="align"){for(var T=t.cols||[],S="",j=1;j<T.length;j++)S+=j%2?"0em ":"1em ";d.setAttribute("columnspacing",S.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?d.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?d.setAttribute("columnspacing","0.5em"):d.setAttribute("columnspacing","1em");var E="",A=t.hLinesBeforeRow;m+=A[0].length>0?"left ":"",m+=A[A.length-1].length>0?"right ":"";for(var R=1;R<A.length-1;R++)E+=A[R].length===0?"none ":A[R][0]?"dashed ":"solid ";return/[sd]/.test(E)&&d.setAttribute("rowlines",E.trim()),m!==""&&(d=new qe("menclose",[d]),d.setAttribute("notation",m.trim())),t.arraystretch&&t.arraystretch<1&&(d=new qe("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},zD=function(t,r){t.envName.includes("ed")||ex(t);var n=[],s=t.envName.includes("at")?"alignat":"align",a=t.envName==="split",o=cl(t.parser,{cols:n,addJot:!0,autoTag:a?void 0:x5(t.envName),emptySingleRow:!0,colSeparationType:s,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),l=0,u=0,c={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var d="",h=0;h<r[0].body.length;h++){var m=kt(r[0].body[h],"textord");d+=m.text}l=Number(d),u=l*2}var f=!u;o.body.forEach(function(w){for(var y=1;y<w.length;y+=2){var b=kt(w[y],"styling"),k=kt(b.body[0],"ordgroup");k.body.unshift(c)}if(f)u<w.length&&(u=w.length);else{var T=w.length/2;if(l<T)throw new ze("Too many math in a row: "+("expected "+l+", but got "+T),w[0])}});for(var p=0;p<u;++p){var g="r",x=0;p%2===1?g="l":p>0&&f&&(x=1),n[p]={type:"align",align:g,pregap:x,postgap:0}}return o.colSeparationType=f?"align":"alignat",o};ei({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=Y1(t[0]),n=r?[t[0]]:kt(t[0],"ordgroup").body,s=n.map(function(o){var l=K1(o),u=l.text;if("lcr".includes(u))return{type:"align",align:u};if(u==="|")return{type:"separator",separator:"|"};if(u===":")return{type:"separator",separator:":"};throw new ze("Unknown column alignment: "+u,o)}),a={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return cl(e.parser,a,b5(e.envName))},htmlBuilder:ti,mathmlBuilder:ri});ei({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),r=s.fetch().text,!"lcr".includes(r))throw new ze("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),n.cols=[{type:"align",align:r}]}}var a=cl(e.parser,n,b5(e.envName)),o=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(o).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:ti,mathmlBuilder:ri});ei({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=cl(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:ti,mathmlBuilder:ri});ei({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=Y1(t[0]),n=r?[t[0]]:kt(t[0],"ordgroup").body,s=n.map(function(l){var u=K1(l),c=u.text;if("lc".includes(c))return{type:"align",align:c};throw new ze("Unknown column alignment: "+c,l)});if(s.length>1)throw new ze("{subarray} can contain only one column");var a={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},o=cl(e.parser,a,"script");if(o.body.length>0&&o.body[0].length>1)throw new ze("{subarray} can contain only one column");return o},htmlBuilder:ti,mathmlBuilder:ri});ei({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=cl(e.parser,t,b5(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ti,mathmlBuilder:ri});ei({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:zD,htmlBuilder:ti,mathmlBuilder:ri});ei({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Jue.has(e.envName)&&ex(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:x5(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return cl(e.parser,t,"display")},htmlBuilder:ti,mathmlBuilder:ri});ei({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:zD,htmlBuilder:ti,mathmlBuilder:ri});ei({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ex(e);var t={autoTag:x5(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return cl(e.parser,t,"display")},htmlBuilder:ti,mathmlBuilder:ri});ei({type:"array",names:["CD"],props:{numArgs:0},handler(e){return ex(e),$ue(e.parser)},htmlBuilder:ti,mathmlBuilder:ri});z("\\nonumber","\\gdef\\@eqnsw{0}");z("\\notag","\\nonumber");et({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new ze(e.funcName+" valid only within array environment")}});var vT=UD;et({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,s=t[0];if(s.type!=="ordgroup")throw new ze("Invalid environment name",s);for(var a="",o=0;o<s.body.length;++o)a+=kt(s.body[o],"textord").text;if(n==="\\begin"){if(!vT.hasOwnProperty(a))throw new ze("No such environment: "+a,s);var l=vT[a],{args:u,optArgs:c}=r.parseArguments("\\begin{"+a+"}",l),d={mode:r.mode,envName:a,parser:r},h=l.handler(d,u,c);r.expect("\\end",!1);var m=r.nextToken,f=kt(r.parseFunction(),"environment");if(f.name!==a)throw new ze("Mismatch: \\begin{"+a+"} matched by \\end{"+f.name+"}",m);return h}return{type:"environment",mode:r.mode,name:a,nameGroup:s}}});var HD=(e,t)=>{var r=e.font,n=t.withFont(r);return Ht(e.body,n)},qD=(e,t)=>{var r=e.font,n=t.withFont(r);return Zt(e.body,n)},wT={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};et({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,s=_g(t[0]),a=n;return a in wT&&(a=wT[a]),{type:"font",mode:r.mode,font:a.slice(1),body:s}},htmlBuilder:HD,mathmlBuilder:qD});et({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:Q1(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:qi(n)}}});et({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:s}=e,{mode:a}=r,o=r.parseExpression(!0,s),l="math"+n.slice(1);return{type:"font",mode:a,font:l,body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:HD,mathmlBuilder:qD});var tde=(e,t)=>{var r=t.style,n=r.fracNum(),s=r.fracDen(),a;a=t.havingStyle(n);var o=Ht(e.numer,a,t);if(e.continued){var l=8.5/t.fontMetrics().ptPerEm,u=3.5/t.fontMetrics().ptPerEm;o.height=o.height<l?l:o.height,o.depth=o.depth<u?u:o.depth}a=t.havingStyle(s);var c=Ht(e.denom,a,t),d,h,m;e.hasBarLine?(e.barSize?(h=yr(e.barSize,t),d=Zu("frac-line",t,h)):d=Zu("frac-line",t),h=d.height,m=d.height):(d=null,h=0,m=t.fontMetrics().defaultRuleThickness);var f,p,g;r.size===yt.DISPLAY.size?(f=t.fontMetrics().num1,h>0?p=3*m:p=7*m,g=t.fontMetrics().denom1):(h>0?(f=t.fontMetrics().num2,p=m):(f=t.fontMetrics().num3,p=3*m),g=t.fontMetrics().denom2);var x;if(d){var y=t.fontMetrics().axisHeight;f-o.depth-(y+.5*h)<p&&(f+=p-(f-o.depth-(y+.5*h))),y-.5*h-(c.height-g)<p&&(g+=p-(y-.5*h-(c.height-g)));var b=-(y-.5*h);x=zt({positionType:"individualShift",children:[{type:"elem",elem:c,shift:g},{type:"elem",elem:d,shift:b},{type:"elem",elem:o,shift:-f}]})}else{var w=f-o.depth-(c.height-g);w<p&&(f+=.5*(p-w),g+=.5*(p-w)),x=zt({positionType:"individualShift",children:[{type:"elem",elem:c,shift:g},{type:"elem",elem:o,shift:-f}]})}a=t.havingStyle(r),x.height*=a.sizeMultiplier/t.sizeMultiplier,x.depth*=a.sizeMultiplier/t.sizeMultiplier;var k;r.size===yt.DISPLAY.size?k=t.fontMetrics().delim1:r.size===yt.SCRIPTSCRIPT.size?k=t.havingStyle(yt.SCRIPT).fontMetrics().delim2:k=t.fontMetrics().delim2;var T,S;return e.leftDelim==null?T=Ih(t,["mopen"]):T=h4(e.leftDelim,k,!0,t.havingStyle(r),e.mode,["mopen"]),e.continued?S=Pe([]):e.rightDelim==null?S=Ih(t,["mclose"]):S=h4(e.rightDelim,k,!0,t.havingStyle(r),e.mode,["mclose"]),Pe(["mord"].concat(a.sizingClasses(t)),[T,Pe(["mfrac"],[x]),S],t)},rde=(e,t)=>{var r=new qe("mfrac",[Zt(e.numer,t),Zt(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=yr(e.barSize,t);r.setAttribute("linethickness",Ve(n))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var a=new qe("mo",[new zr(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(r),e.rightDelim!=null){var o=new qe("mo",[new zr(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}return m5(s)}return r},WD=(e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r};et({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,s=t[0],a=t[1],o,l=null,u=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,l="(",u=")";break;case"\\\\bracefrac":o=!1,l="\\{",u="\\}";break;case"\\\\brackfrac":o=!1,l="[",u="]";break;default:throw new Error("Unrecognized genfrac command")}var c=n==="\\cfrac",d=null;return c||n.startsWith("\\d")?d="display":n.startsWith("\\t")&&(d="text"),WD({type:"genfrac",mode:r.mode,numer:s,denom:a,continued:c,hasBarLine:o,leftDelim:l,rightDelim:u,barSize:null},d)},htmlBuilder:tde,mathmlBuilder:rde});et({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,s;switch(r){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:s,token:n}}});var ET=["display","text","script","scriptscript"],kT=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};et({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],s=t[5],a=_g(t[0]),o=a.type==="atom"&&a.family==="open"?kT(a.text):null,l=_g(t[1]),u=l.type==="atom"&&l.family==="close"?kT(l.text):null,c=kt(t[2],"size"),d,h=null;c.isBlank?d=!0:(h=c.value,d=h.number>0);var m=null,f=t[3];if(f.type==="ordgroup"){if(f.body.length>0){var p=kt(f.body[0],"textord");m=ET[Number(p.text)]}}else f=kt(f,"textord"),m=ET[Number(f.text)];return WD({type:"genfrac",mode:r.mode,numer:n,denom:s,continued:!1,hasBarLine:d,barSize:h,leftDelim:o,rightDelim:u},m)}});et({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:s}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:kt(t[0],"size").value,token:s}}});et({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,s=t[0],a=kt(t[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var o=t[2],l=a.number>0;return{type:"genfrac",mode:r.mode,numer:s,denom:o,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null}}});var VD=(e,t)=>{var r=t.style,n,s;e.type==="supsub"?(n=e.sup?Ht(e.sup,t.havingStyle(r.sup()),t):Ht(e.sub,t.havingStyle(r.sub()),t),s=kt(e.base,"horizBrace")):s=kt(e,"horizBrace");var a=Ht(s.base,t.havingBaseStyle(yt.DISPLAY)),o=G1(s,t),l;if(s.isOver?(l=zt({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o}]}),l.children[0].children[0].children[1].classes.push("svg-align")):(l=zt({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a}]}),l.children[0].children[0].children[0].classes.push("svg-align")),n){var u=Pe(["minner",s.isOver?"mover":"munder"],[l],t);s.isOver?l=zt({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.2},{type:"elem",elem:n}]}):l=zt({positionType:"bottom",positionData:u.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:u}]})}return Pe(["minner",s.isOver?"mover":"munder"],[l],t)},nde=(e,t)=>{var r=V1(e.label);return new qe(e.isOver?"mover":"munder",[Zt(e.base,t),r])};et({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:VD,mathmlBuilder:nde});et({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],s=kt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:r.mode,href:s,body:$r(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Xr(e.body,t,!1);return vue(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Jo(e.body,t);return r instanceof qe||(r=new qe("mrow",[r])),r.setAttribute("href",e.href),r}});et({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=kt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var s=[],a=0;a<n.length;a++){var o=n[a];o==="~"&&(o="\\textasciitilde"),s.push({type:"textord",mode:"text",text:o})}var l={type:"text",mode:r.mode,font:"\\texttt",body:s};return{type:"href",mode:r.mode,href:n,body:$r(l)}}});et({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:$r(t[0])}},htmlBuilder(e,t){var r=Xr(e.body,t,!1);return Vi(r)},mathmlBuilder(e,t){return new qe("mrow",Is(e.body,t))}});et({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,token:s}=e,a=kt(t[0],"raw").string,o=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,u={};switch(n){case"\\htmlClass":u.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":u.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":u.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var c=a.split(","),d=0;d<c.length;d++){var h=c[d],m=h.indexOf("=");if(m<0)throw new ze("\\htmlData key/value '"+h+"' missing equals sign");var f=h.slice(0,m),p=h.slice(m+1);u["data-"+f.trim()]=p}l={command:"\\htmlData",attributes:u};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(l)?{type:"html",mode:r.mode,attributes:u,body:$r(o)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=Xr(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var s=Pe(n,r,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&s.setAttribute(a,e.attributes[a]);return s},mathmlBuilder:(e,t)=>Jo(e.body,t)});et({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:$r(t[0]),mathml:$r(t[1])}},htmlBuilder:(e,t)=>{var r=Xr(e.html,t,!1);return Vi(r)},mathmlBuilder:(e,t)=>Jo(e.mathml,t)});var cy=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new ze("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!cD(n))throw new ze("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};et({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,s={number:0,unit:"em"},a={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(r[0])for(var u=kt(r[0],"raw").string,c=u.split(","),d=0;d<c.length;d++){var h=c[d].split("=");if(h.length===2){var m=h[1].trim();switch(h[0].trim()){case"alt":l=m;break;case"width":s=cy(m);break;case"height":a=cy(m);break;case"totalheight":o=cy(m);break;default:throw new ze("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var f=kt(t[0],"url").url;return l===""&&(l=f,l=l.replace(/^.*[\\/]/,""),l=l.substring(0,l.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:f})?{type:"includegraphics",mode:n.mode,alt:l,width:s,height:a,totalheight:o,src:f}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=yr(e.height,t),n=0;e.totalheight.number>0&&(n=yr(e.totalheight,t)-r);var s=0;e.width.number>0&&(s=yr(e.width,t));var a={height:Ve(r+n)};s>0&&(a.width=Ve(s)),n>0&&(a.verticalAlign=Ve(-n));var o=new lue(e.src,e.alt,a);return o.height=r,o.depth=n,o},mathmlBuilder:(e,t)=>{var r=new qe("mglyph",[]);r.setAttribute("alt",e.alt);var n=yr(e.height,t),s=0;if(e.totalheight.number>0&&(s=yr(e.totalheight,t)-n,r.setAttribute("valign",Ve(-s))),r.setAttribute("height",Ve(n+s)),e.width.number>0){var a=yr(e.width,t);r.setAttribute("width",Ve(a))}return r.setAttribute("src",e.src),r}});et({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,s=kt(t[0],"size");if(r.settings.strict){var a=n[1]==="m",o=s.value.unit==="mu";a?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+s.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:s.value}},htmlBuilder(e,t){return pD(e.dimension,t)},mathmlBuilder(e,t){var r=yr(e.dimension,t);return new wD(r)}});et({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,s=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:s}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=Pe([],[Ht(e.body,t)]),r=Pe(["inner"],[r],t)):r=Pe(["inner"],[Ht(e.body,t)]);var n=Pe(["fix"],[]),s=Pe([e.alignment],[r,n],t),a=Pe(["strut"]);return a.style.height=Ve(s.height+s.depth),s.depth&&(a.style.verticalAlign=Ve(-s.depth)),s.children.unshift(a),s=Pe(["thinbox"],[s],t),Pe(["mord","vbox"],[s],t)},mathmlBuilder:(e,t)=>{var r=new qe("mpadded",[Zt(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});et({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,s=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",o=n.parseExpression(!1,a);return n.expect(a),n.switchMode(s),{type:"styling",mode:n.mode,style:"text",body:o}}});et({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new ze("Mismatched "+e.funcName)}});var NT=(e,t)=>{switch(t.style.size){case yt.DISPLAY.size:return e.display;case yt.TEXT.size:return e.text;case yt.SCRIPT.size:return e.script;case yt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};et({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:$r(t[0]),text:$r(t[1]),script:$r(t[2]),scriptscript:$r(t[3])}},htmlBuilder:(e,t)=>{var r=NT(e,t),n=Xr(r,t,!1);return Vi(n)},mathmlBuilder:(e,t)=>{var r=NT(e,t);return Jo(r,t)}});var GD=(e,t,r,n,s,a,o)=>{e=Pe([],[e]);var l=r&&qi(r),u,c;if(t){var d=Ht(t,n.havingStyle(s.sup()),n);c={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(r){var h=Ht(r,n.havingStyle(s.sub()),n);u={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}var m;if(c&&u){var f=n.fontMetrics().bigOpSpacing5+u.elem.height+u.elem.depth+u.kern+e.depth+o;m=zt({positionType:"bottom",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:Ve(-a)},{type:"kern",size:u.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ve(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(u){var p=e.height-o;m=zt({positionType:"top",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:Ve(-a)},{type:"kern",size:u.kern},{type:"elem",elem:e}]})}else if(c){var g=e.depth+o;m=zt({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ve(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var x=[m];if(u&&a!==0&&!l){var w=Pe(["mspace"],[],n);w.style.marginRight=Ve(a),x.unshift(w)}return Pe(["mop","op-limits"],x,n)},KD=new Set(["\\smallint"]),yd=(e,t)=>{var r,n,s=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=kt(e.base,"op"),s=!0):a=kt(e,"op");var o=t.style,l=!1;o.size===yt.DISPLAY.size&&a.symbol&&!KD.has(a.name)&&(l=!0);var u;if(a.symbol){var c=l?"Size2-Regular":"Size1-Regular",d="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(d=a.name.slice(1),a.name=d==="oiint"?"\\iint":"\\iiint"),u=zn(a.name,c,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),d.length>0){var h=u.italic,m=xD(d+"Size"+(l?"2":"1"),t);u=zt({positionType:"individualShift",children:[{type:"elem",elem:u,shift:0},{type:"elem",elem:m,shift:l?.08:0}]}),a.name="\\"+d,u.classes.unshift("mop"),u.italic=h}}else if(a.body){var f=Xr(a.body,t,!0);f.length===1&&f[0]instanceof Cs?(u=f[0],u.classes[0]="mop"):u=Pe(["mop"],f,t)}else{for(var p=[],g=1;g<a.name.length;g++)p.push(d5(a.name[g],a.mode,t));u=Pe(["mop"],p,t)}var x=0,w=0;return(u instanceof Cs||a.name==="\\oiint"||a.name==="\\oiiint")&&!a.suppressBaseShift&&(x=(u.height-u.depth)/2-t.fontMetrics().axisHeight,w=u.italic||0),s?GD(u,r,n,t,o,w,x):(x&&(u.style.position="relative",u.style.top=Ve(x)),u)},hm=(e,t)=>{var r;if(e.symbol)r=new qe("mo",[Ys(e.name,e.mode)]),KD.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new qe("mo",Is(e.body,t));else{r=new qe("mi",[new zr(e.name.slice(1))]);var n=new qe("mo",[Ys("â¡","text")]);e.parentIsSupSub?r=new qe("mrow",[r,n]):r=vD([r,n])}return r},sde={"â":"\\prod","â":"\\coprod","â":"\\sum","â":"\\bigwedge","â":"\\bigvee","â":"\\bigcap","â":"\\bigcup","â¨":"\\bigodot","â¨":"\\bigoplus","â¨":"\\bigotimes","â¨":"\\biguplus","â¨":"\\bigsqcup"};et({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","â","â","â","â","â","â","â","â¨","â¨","â¨","â¨","â¨"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,s=n;return s.length===1&&(s=sde[s]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:yd,mathmlBuilder:hm});et({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:$r(n)}},htmlBuilder:yd,mathmlBuilder:hm});var ade={"â«":"\\int","â¬":"\\iint","â":"\\iiint","â®":"\\oint","â¯":"\\oiint","â°":"\\oiiint"};et({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:yd,mathmlBuilder:hm});et({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:yd,mathmlBuilder:hm});et({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","â«","â¬","â","â®","â¯","â°"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=ade[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:yd,mathmlBuilder:hm});var YD=(e,t)=>{var r,n,s=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=kt(e.base,"operatorname"),s=!0):a=kt(e,"operatorname");var o;if(a.body.length>0){for(var l=a.body.map(h=>{var m="text"in h?h.text:void 0;return typeof m=="string"?{type:"textord",mode:h.mode,text:m}:h}),u=Xr(l,t.withFont("mathrm"),!0),c=0;c<u.length;c++){var d=u[c];d instanceof Cs&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Pe(["mop"],u,t)}else o=Pe(["mop"],[],t);return s?GD(o,r,n,t,t.style,0,0):o},ide=(e,t)=>{for(var r=Is(e.body,t.withFont("mathrm")),n=!0,s=0;s<r.length;s++){var a=r[s];if(!(a instanceof wD))if(a instanceof qe)switch(a.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var o=a.children[0];a.children.length===1&&o instanceof zr?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var l=r.map(d=>d.toText()).join("");r=[new zr(l)]}var u=new qe("mi",r);u.setAttribute("mathvariant","normal");var c=new qe("mo",[Ys("â¡","text")]);return e.parentIsSupSub?new qe("mrow",[u,c]):vD([u,c])};et({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,s=t[0];return{type:"operatorname",mode:r.mode,body:$r(s),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:YD,mathmlBuilder:ide});z("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");gc({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Vi(Xr(e.body,t,!1)):Pe(["mord"],Xr(e.body,t,!0),t)},mathmlBuilder(e,t){return Jo(e.body,t,!0)}});et({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=Ht(e.body,t.havingCrampedStyle()),n=Zu("overline-line",t),s=t.fontMetrics().defaultRuleThickness,a=zt({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:n},{type:"kern",size:s}]});return Pe(["mord","overline"],[a],t)},mathmlBuilder(e,t){var r=new qe("mo",[new zr("â¾")]);r.setAttribute("stretchy","true");var n=new qe("mover",[Zt(e.body,t),r]);return n.setAttribute("accent","true"),n}});et({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:$r(n)}},htmlBuilder:(e,t)=>{var r=Xr(e.body,t.withPhantom(),!1);return Vi(r)},mathmlBuilder:(e,t)=>{var r=Is(e.body,t);return new qe("mphantom",r)}});z("\\hphantom","\\smash{\\phantom{#1}}");et({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=Pe(["inner"],[Ht(e.body,t.withPhantom())]),n=Pe(["fix"],[]);return Pe(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=Is($r(e.body),t),n=new qe("mphantom",r),s=new qe("mpadded",[n]);return s.setAttribute("width","0px"),s}});et({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=kt(t[0],"size").value,s=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:s}},htmlBuilder(e,t){var r=Ht(e.body,t),n=yr(e.dy,t);return zt({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new qe("mpadded",[Zt(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}});et({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});et({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,s=r[0],a=kt(t[0],"size"),o=kt(t[1],"size");return{type:"rule",mode:n.mode,shift:s&&kt(s,"size").value,width:a.value,height:o.value}},htmlBuilder(e,t){var r=Pe(["mord","rule"],[],t),n=yr(e.width,t),s=yr(e.height,t),a=e.shift?yr(e.shift,t):0;return r.style.borderRightWidth=Ve(n),r.style.borderTopWidth=Ve(s),r.style.bottom=Ve(a),r.width=n,r.height=s+a,r.depth=-a,r.maxFontSize=s*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=yr(e.width,t),n=yr(e.height,t),s=e.shift?yr(e.shift,t):0,a=t.color&&t.getColor()||"black",o=new qe("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",Ve(r)),o.setAttribute("height",Ve(n));var l=new qe("mpadded",[o]);return s>=0?l.setAttribute("height",Ve(s)):(l.setAttribute("height",Ve(s)),l.setAttribute("depth",Ve(-s))),l.setAttribute("voffset",Ve(s)),l}});function QD(e,t,r){for(var n=Xr(e,t,!1),s=t.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var o=n[a].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[a].classes,t.sizingClasses(r)):n[a].classes[o+1]==="reset-size"+t.size&&(n[a].classes[o+1]="reset-size"+r.size),n[a].height*=s,n[a].depth*=s}return Vi(n)}var ST=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],ode=(e,t)=>{var r=t.havingSize(e.size);return QD(e.body,r,t)};et({type:"sizing",names:ST,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:s}=e,a=s.parseExpression(!1,r);return{type:"sizing",mode:s.mode,size:ST.indexOf(n)+1,body:a}},htmlBuilder:ode,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=Is(e.body,r),s=new qe("mstyle",n);return s.setAttribute("mathsize",Ve(r.sizeMultiplier)),s}});et({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,s=!1,a=!1,o=r[0]&&kt(r[0],"ordgroup");if(o)for(var l="",u=0;u<o.body.length;++u){var c=o.body[u];if(l=K1(c).text,l==="t")s=!0;else if(l==="b")a=!0;else{s=!1,a=!1;break}}else s=!0,a=!0;var d=t[0];return{type:"smash",mode:n.mode,body:d,smashHeight:s,smashDepth:a}},htmlBuilder:(e,t)=>{var r=Pe([],[Ht(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return Pe(["mord","smash"],[r],t);if(r.children)for(var n=0;n<r.children.length;n++)e.smashHeight&&(r.children[n].height=0),e.smashDepth&&(r.children[n].depth=0);var s=zt({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return Pe(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var r=new qe("mpadded",[Zt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});et({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,s=r[0],a=t[0];return{type:"sqrt",mode:n.mode,body:a,index:s}},htmlBuilder(e,t){var r=Ht(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=Ju(r,t);var n=t.fontMetrics(),s=n.defaultRuleThickness,a=s;t.style.id<yt.TEXT.id&&(a=t.fontMetrics().xHeight);var o=s+a/4,l=r.height+r.depth+o+s,{span:u,ruleWidth:c,advanceWidth:d}=Gue(l,t),h=u.height-c;h>r.height+r.depth+o&&(o=(o+h-r.height-r.depth)/2);var m=u.height-r.height-o-c;r.style.paddingLeft=Ve(d);var f=zt({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+m)},{type:"elem",elem:u},{type:"kern",size:c}]});if(e.index){var p=t.havingStyle(yt.SCRIPTSCRIPT),g=Ht(e.index,p,t),x=.6*(f.height-f.depth),w=zt({positionType:"shift",positionData:-x,children:[{type:"elem",elem:g}]}),y=Pe(["root"],[w]);return Pe(["mord","sqrt"],[y,f],t)}else return Pe(["mord","sqrt"],[f],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new qe("mroot",[Zt(r,t),Zt(n,t)]):new qe("msqrt",[Zt(r,t)])}});var TT={display:yt.DISPLAY,text:yt.TEXT,script:yt.SCRIPT,scriptscript:yt.SCRIPTSCRIPT};et({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:s}=e,a=s.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:s.mode,style:o,body:a}},htmlBuilder(e,t){var r=TT[e.style],n=t.havingStyle(r).withFont("");return QD(e.body,n,t)},mathmlBuilder(e,t){var r=TT[e.style],n=t.havingStyle(r),s=Is(e.body,n),a=new qe("mstyle",s),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=o[e.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a}});var lde=function(t,r){var n=t.base;if(n)if(n.type==="op"){var s=n.limits&&(r.style.size===yt.DISPLAY.size||n.alwaysHandleSupSub);return s?yd:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===yt.DISPLAY.size||n.limits);return a?YD:null}else{if(n.type==="accent")return qi(n.base)?p5:null;if(n.type==="horizBrace"){var o=!t.sub;return o===n.isOver?VD:null}else return null}else return null};gc({type:"supsub",htmlBuilder(e,t){var r=lde(e,t);if(r)return r(e,t);var{base:n,sup:s,sub:a}=e,o=Ht(n,t),l,u,c=t.fontMetrics(),d=0,h=0,m=n&&qi(n);if(s){var f=t.havingStyle(t.style.sup());l=Ht(s,f,t),m||(d=o.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(a){var p=t.havingStyle(t.style.sub());u=Ht(a,p,t),m||(h=o.depth+p.fontMetrics().subDrop*p.sizeMultiplier/t.sizeMultiplier)}var g;t.style===yt.DISPLAY?g=c.sup1:t.style.cramped?g=c.sup3:g=c.sup2;var x=t.sizeMultiplier,w=Ve(.5/c.ptPerEm/x),y=null;if(u){var b=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(o instanceof Cs||b)&&(y=Ve(-o.italic))}var k;if(l&&u){d=Math.max(d,g,l.depth+.25*c.xHeight),h=Math.max(h,c.sub2);var T=c.defaultRuleThickness,S=4*T;if(d-l.depth-(u.height-h)<S){h=S-(d-l.depth)+u.height;var j=.8*c.xHeight-(d-l.depth);j>0&&(d+=j,h-=j)}var E=[{type:"elem",elem:u,shift:h,marginRight:w,marginLeft:y},{type:"elem",elem:l,shift:-d,marginRight:w}];k=zt({positionType:"individualShift",children:E})}else if(u){h=Math.max(h,c.sub1,u.height-.8*c.xHeight);var A=[{type:"elem",elem:u,marginLeft:y,marginRight:w}];k=zt({positionType:"shift",positionData:h,children:A})}else if(l)d=Math.max(d,g,l.depth+.25*c.xHeight),k=zt({positionType:"shift",positionData:-d,children:[{type:"elem",elem:l,marginRight:w}]});else throw new Error("supsub must have either sup or sub.");var R=l4(o,"right")||"mord";return Pe([R],[o,Pe(["msupsub"],[k])],t)},mathmlBuilder(e,t){var r=!1,n,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[Zt(e.base,t)];e.sub&&a.push(Zt(e.sub,t)),e.sup&&a.push(Zt(e.sup,t));var o;if(r)o=n?"mover":"munder";else if(e.sub)if(e.sup){var c=e.base;c&&c.type==="op"&&c.limits&&t.style===yt.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(t.style===yt.DISPLAY||c.limits)?o="munderover":o="msubsup"}else{var u=e.base;u&&u.type==="op"&&u.limits&&(t.style===yt.DISPLAY||u.alwaysHandleSupSub)||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(u.limits||t.style===yt.DISPLAY)?o="munder":o="msub"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===yt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===yt.DISPLAY)?o="mover":o="msup"}return new qe(o,a)}});gc({type:"atom",htmlBuilder(e,t){return d5(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new qe("mo",[Ys(e.text,e.mode)]);if(e.family==="bin"){var n=f5(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var XD={mi:"italic",mn:"normal",mtext:"normal"};gc({type:"mathord",htmlBuilder(e,t){return W1(e,t,"mathord")},mathmlBuilder(e,t){var r=new qe("mi",[Ys(e.text,e.mode,t)]),n=f5(e,t)||"italic";return n!==XD[r.type]&&r.setAttribute("mathvariant",n),r}});gc({type:"textord",htmlBuilder(e,t){return W1(e,t,"textord")},mathmlBuilder(e,t){var r=Ys(e.text,e.mode,t),n=f5(e,t)||"normal",s;return e.mode==="text"?s=new qe("mtext",[r]):/[0-9]/.test(e.text)?s=new qe("mn",[r]):e.text==="\\prime"?s=new qe("mo",[r]):s=new qe("mi",[r]),n!==XD[s.type]&&s.setAttribute("mathvariant",n),s}});var uy={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},dy={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};gc({type:"spacing",htmlBuilder(e,t){if(dy.hasOwnProperty(e.text)){var r=dy[e.text].className||"";if(e.mode==="text"){var n=W1(e,t,"textord");return n.classes.push(r),n}else return Pe(["mspace",r],[d5(e.text,e.mode,t)],t)}else{if(uy.hasOwnProperty(e.text))return Pe(["mspace",uy[e.text]],[],t);throw new ze('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(dy.hasOwnProperty(e.text))r=new qe("mtext",[new zr(" ")]);else{if(uy.hasOwnProperty(e.text))return new qe("mspace");throw new ze('Unknown type of space "'+e.text+'"')}return r}});var CT=()=>{var e=new qe("mtd",[]);return e.setAttribute("width","50%"),e};gc({type:"tag",mathmlBuilder(e,t){var r=new qe("mtable",[new qe("mtr",[CT(),new qe("mtd",[Jo(e.body,t)]),CT(),new qe("mtd",[Jo(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var _T={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},AT={"\\textbf":"textbf","\\textmd":"textmd"},cde={"\\textit":"textit","\\textup":"textup"},jT=(e,t)=>{var r=e.font;if(r){if(_T[r])return t.withTextFontFamily(_T[r]);if(AT[r])return t.withTextFontWeight(AT[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(cde[r])};et({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,s=t[0];return{type:"text",mode:r.mode,body:$r(s),font:n}},htmlBuilder(e,t){var r=jT(e,t),n=Xr(e.body,r,!0);return Pe(["mord","text"],n,r)},mathmlBuilder(e,t){var r=jT(e,t);return Jo(e.body,r)}});et({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Ht(e.body,t),n=Zu("underline-line",t),s=t.fontMetrics().defaultRuleThickness,a=zt({positionType:"top",positionData:r.height,children:[{type:"kern",size:s},{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:r}]});return Pe(["mord","underline"],[a],t)},mathmlBuilder(e,t){var r=new qe("mo",[new zr("â¾")]);r.setAttribute("stretchy","true");var n=new qe("munder",[Zt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}});et({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Ht(e.body,t),n=t.fontMetrics().axisHeight,s=.5*(r.height-n-(r.depth+n));return zt({positionType:"shift",positionData:s,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){return new qe("mpadded",[Zt(e.body,t)],["vcenter"])}});et({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new ze("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=IT(e),n=[],s=t.havingStyle(t.style.text()),a=0;a<r.length;a++){var o=r[a];o==="~"&&(o="\\textasciitilde"),n.push(zn(o,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return Pe(["mord","text"].concat(s.sizingClasses(t)),fD(n),s)},mathmlBuilder(e,t){var r=new zr(IT(e)),n=new qe("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var IT=e=>e.body.replace(/ /g,e.star?"â£":" "),To=bD,ZD=`[ \r 1580 ]`,ude="\\\\[a-zA-Z@]+",dde="\\\\[^\uD800-\uDFFF]",hde="("+ude+")"+ZD+"*",mde=`\\\\( 1581|[ \r ]+ 1582?)[ \r ]*`,m4="[Ì-ͯ]",fde=new RegExp(m4+"+$"),pde="("+ZD+"+)|"+(mde+"|")+"([!-\\[\\]-â§âª-í¿ï¤-ï¿¿]"+(m4+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(m4+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+hde)+("|"+dde+")");class RT{constructor(t,r){this.input=t,this.settings=r,this.tokenRegex=new RegExp(pde,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new ks("EOF",new ss(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new ze("Unexpected character: '"+t[r]+"'",new ks(t[r],new ss(this,r,r+1)));var s=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[s]===14){var a=t.indexOf(` 1583`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new ks(s,new ss(this,r,this.tokenRegex.lastIndex))}}class gde{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ze("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var s=0;s<this.undefStack.length;s++)delete this.undefStack[s][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}}var xde=$D;z("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});z("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});z("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});z("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});z("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});z("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");z("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var DT={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};z("\\char",function(e){var t=e.popToken(),r,n=0;if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new ze("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=DT[t.text],n==null||n>=r)throw new ze("Invalid base-"+r+" digit "+t.text);for(var s;(s=DT[e.future().text])!=null&&s<r;)n*=r,n+=s,e.popToken()}return"\\@char{"+n+"}"});var y5=(e,t,r,n)=>{var s=e.consumeArg().tokens;if(s.length!==1)throw new ze("\\newcommand's first argument must be a macro name");var a=s[0].text,o=e.isDefined(a);if(o&&!t)throw new ze("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!o&&!r)throw new ze("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var l=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var u="",c=e.expandNextToken();c.text!=="]"&&c.text!=="EOF";)u+=c.text,c=e.expandNextToken();if(!u.match(/^\s*[0-9]+\s*$/))throw new ze("Invalid number of arguments: "+u);l=parseInt(u),s=e.consumeArg().tokens}return o&&n||e.macros.set(a,{tokens:s,numArgs:l}),""};z("\\newcommand",e=>y5(e,!1,!0,!1));z("\\renewcommand",e=>y5(e,!0,!1,!1));z("\\providecommand",e=>y5(e,!0,!0,!0));z("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});z("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});z("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),To[r],mr.math[r],mr.text[r]),""});z("\\bgroup","{");z("\\egroup","}");
vendor: 6,546 bytes, line 1583
1583z("~","\\nobreakspace");z("\\lq","`");z("\\rq","'");z("\\aa","\\r a");z("\\AA","\\r A");z("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");z("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");z("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");z("â¬","\\mathscr{B}");z("â°","\\mathscr{E}");z("â±","\\mathscr{F}");z("â","\\mathscr{H}");z("â","\\mathscr{I}");z("â","\\mathscr{L}");z("â³","\\mathscr{M}");z("â","\\mathscr{R}");z("â","\\mathfrak{C}");z("â","\\mathfrak{H}");z("â¨","\\mathfrak{Z}");z("\\Bbbk","\\Bbb{k}");z("\\llap","\\mathllap{\\textrm{#1}}");z("\\rlap","\\mathrlap{\\textrm{#1}}");z("\\clap","\\mathclap{\\textrm{#1}}");z("\\mathstrut","\\vphantom{(}");z("\\underbar","\\underline{\\text{#1}}");z("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');z("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`â }}");z("\\ne","\\neq");z("â ","\\neq");z("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`â}}");z("â","\\notin");z("â","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`â}}");z("â","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`â}}");z("â","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`â}}");z("â","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`â}}");z("â","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`â}}");z("â","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`â}}");z("â","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`â}}");z("â","\\perp");z("â¼","\\mathclose{!\\mkern-0.8mu!}");z("â","\\notni");z("â","\\ulcorner");z("â","\\urcorner");z("â","\\llcorner");z("â","\\lrcorner");z("©","\\copyright");z("®","\\textregistered");z("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');z("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');z("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');z("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');z("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");z("â®","\\vdots");z("\\varGamma","\\mathit{\\Gamma}");z("\\varDelta","\\mathit{\\Delta}");z("\\varTheta","\\mathit{\\Theta}");z("\\varLambda","\\mathit{\\Lambda}");z("\\varXi","\\mathit{\\Xi}");z("\\varPi","\\mathit{\\Pi}");z("\\varSigma","\\mathit{\\Sigma}");z("\\varUpsilon","\\mathit{\\Upsilon}");z("\\varPhi","\\mathit{\\Phi}");z("\\varPsi","\\mathit{\\Psi}");z("\\varOmega","\\mathit{\\Omega}");z("\\substack","\\begin{subarray}{c}#1\\end{subarray}");z("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");z("\\boxed","\\fbox{$\\displaystyle{#1}$}");z("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");z("\\implies","\\DOTSB\\;\\Longrightarrow\\;");z("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");z("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");z("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var MT={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},bde=new Set(["bin","rel"]);z("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in MT?t=MT[r]:(r.slice(0,4)==="\\not"||r in mr.math&&bde.has(mr.math[r].group))&&(t="\\dotsb"),t});var v5={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};z("\\dotso",function(e){var t=e.future().text;return t in v5?"\\ldots\\,":"\\ldots"});z("\\dotsc",function(e){var t=e.future().text;return t in v5&&t!==","?"\\ldots\\,":"\\ldots"});z("\\cdots",function(e){var t=e.future().text;return t in v5?"\\@cdots\\,":"\\@cdots"});z("\\dotsb","\\cdots");z("\\dotsm","\\cdots");z("\\dotsi","\\!\\cdots");z("\\dotsx","\\ldots\\,");z("\\DOTSI","\\relax");z("\\DOTSB","\\relax");z("\\DOTSX","\\relax");z("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");z("\\,","\\tmspace+{3mu}{.1667em}");z("\\thinspace","\\,");z("\\>","\\mskip{4mu}");z("\\:","\\tmspace+{4mu}{.2222em}");z("\\medspace","\\:");z("\\;","\\tmspace+{5mu}{.2777em}");z("\\thickspace","\\;");z("\\!","\\tmspace-{3mu}{.1667em}");z("\\negthinspace","\\!");z("\\negmedspace","\\tmspace-{4mu}{.2222em}");z("\\negthickspace","\\tmspace-{5mu}{.277em}");z("\\enspace","\\kern.5em ");z("\\enskip","\\hskip.5em\\relax");z("\\quad","\\hskip1em\\relax");z("\\qquad","\\hskip2em\\relax");z("\\tag","\\@ifstar\\tag@literal\\tag@paren");z("\\tag@paren","\\tag@literal{({#1})}");z("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new ze("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});z("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");z("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");z("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");z("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");z("\\newline","\\\\\\relax");z("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var JD=Ve(Va["Main-Regular"][84][1]-.7*Va["Main-Regular"][65][1]);z("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+JD+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");z("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+JD+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");
1583z("\\hspace","\\@ifstar\\@hspacer\\@hspace");z("\\@hspace","\\hskip #1\\relax");z("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");z("\\ordinarycolon",":");z("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");z("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');z("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');z("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');z("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');z("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');z("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');z("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');z("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');z("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');z("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');z("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');z("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');z("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');z("â·","\\dblcolon");z("â¹","\\eqcolon");z("â","\\coloneqq");z("â","\\eqqcolon");z("â©´","\\Coloneqq");z("\\ratio","\\vcentcolon");z("\\coloncolon","\\dblcolon");z("\\colonequals","\\coloneqq");z("\\coloncolonequals","\\Coloneqq");z("\\equalscolon","\\eqqcolon");z("\\equalscoloncolon","\\Eqqcolon");z("\\colonminus","\\coloneq");z("\\coloncolonminus","\\Coloneq");z("\\minuscolon","\\eqcolon");z("\\minuscoloncolon","\\Eqcolon");z("\\coloncolonapprox","\\Colonapprox");z("\\coloncolonsim","\\Colonsim");z("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");z("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");z("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");z("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");z("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`â}}");z("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");z("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");z("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");z("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");z("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");z("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");z("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");z("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");z("\\gvertneqq","\\html@mathml{\\@gvertneqq}{â©}");z("\\lvertneqq","\\html@mathml{\\@lvertneqq}{â¨}");z("\\ngeqq","\\html@mathml{\\@ngeqq}{â±}");z("\\ngeqslant","\\html@mathml{\\@ngeqslant}{â±}");z("\\nleqq","\\html@mathml{\\@nleqq}{â°}");z("\\nleqslant","\\html@mathml{\\@nleqslant}{â°}");z("\\nshortmid","\\html@mathml{\\@nshortmid}{â¤}");z("\\nshortparallel","\\html@mathml{\\@nshortparallel}{â¦}");z("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{â}");z("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{â}");z("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{â}");z("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{â«}");z("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{â}");z("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{â«}");z("\\imath","\\html@mathml{\\@imath}{ı}");z("\\jmath","\\html@mathml{\\@jmath}{È·}");z("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`â¦}}");z("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`â§}}");z("â¦","\\llbracket");z("â§","\\rrbracket");z("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}
1583{\\mathopen{\\char`â¦}}");z("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`â¦}}");z("â¦","\\lBrace");z("â¦","\\rBrace");z("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");z("⦵","\\minuso");z("\\darr","\\downarrow");z("\\dArr","\\Downarrow");z("\\Darr","\\Downarrow");z("\\lang","\\langle");z("\\rang","\\rangle");z("\\uarr","\\uparrow");z("\\uArr","\\Uparrow");z("\\Uarr","\\Uparrow");z("\\N","\\mathbb{N}");z("\\R","\\mathbb{R}");z("\\Z","\\mathbb{Z}");z("\\alef","\\aleph");z("\\alefsym","\\aleph");z("\\Alpha","\\mathrm{A}");z("\\Beta","\\mathrm{B}");z("\\bull","\\bullet");z("\\Chi","\\mathrm{X}");z("\\clubs","\\clubsuit");z("\\cnums","\\mathbb{C}");z("\\Complex","\\mathbb{C}");z("\\Dagger","\\ddagger");z("\\diamonds","\\diamondsuit");z("\\empty","\\emptyset");z("\\Epsilon","\\mathrm{E}");z("\\Eta","\\mathrm{H}");z("\\exist","\\exists");z("\\harr","\\leftrightarrow");z("\\hArr","\\Leftrightarrow");z("\\Harr","\\Leftrightarrow");z("\\hearts","\\heartsuit");z("\\image","\\Im");z("\\infin","\\infty");z("\\Iota","\\mathrm{I}");z("\\isin","\\in");z("\\Kappa","\\mathrm{K}");z("\\larr","\\leftarrow");z("\\lArr","\\Leftarrow");z("\\Larr","\\Leftarrow");z("\\lrarr","\\leftrightarrow");z("\\lrArr","\\Leftrightarrow");z("\\Lrarr","\\Leftrightarrow");z("\\Mu","\\mathrm{M}");z("\\natnums","\\mathbb{N}");z("\\Nu","\\mathrm{N}");z("\\Omicron","\\mathrm{O}");z("\\plusmn","\\pm");z("\\rarr","\\rightarrow");z("\\rArr","\\Rightarrow");z("\\Rarr","\\Rightarrow");z("\\real","\\Re");z("\\reals","\\mathbb{R}");z("\\Reals","\\mathbb{R}");z("\\Rho","\\mathrm{P}");z("\\sdot","\\cdot");z("\\sect","\\S");z("\\spades","\\spadesuit");z("\\sub","\\subset");z("\\sube","\\subseteq");z("\\supe","\\supseteq");z("\\Tau","\\mathrm{T}");z("\\thetasym","\\vartheta");z("\\weierp","\\wp");z("\\Zeta","\\mathrm{Z}");z("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");z("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");z("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");z("\\bra","\\mathinner{\\langle{#1}|}");z("\\ket","\\mathinner{|{#1}\\rangle}");z("\\braket","\\mathinner{\\langle{#1}\\rangle}");z("\\Bra","\\left\\langle#1\\right|");z("\\Ket","\\left|#1\\right\\rangle");var eM=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,s=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get("|"),l=t.macros.get("\\|");t.macros.beginGroup();var u=h=>m=>{e&&(m.macros.set("|",o),s.length&&m.macros.set("\\|",l));var f=h;if(!h&&s.length){var p=m.future();p.text==="|"&&(m.popToken(),f=!0)}return{tokens:f?s:n,numArgs:0}};t.macros.set("|",u(!1)),s.length&&t.macros.set("\\|",u(!0));var c=t.consumeArg().tokens,d=t.expandTokens([...a,...c,...r]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};z("\\bra@ket",eM(!1));z("\\bra@set",eM(!0));z("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");z("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");z("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");z("\\angln","{\\angl n}");z("\\blue","\\textcolor{##6495ed}{#1}");z("\\orange","\\textcolor{##ffa500}{#1}");z("\\pink","\\textcolor{##ff00af}{#1}");z("\\red","\\textcolor{##df0030}{#1}");z("\\green","\\textcolor{##28ae7b}{#1}");z("\\gray","\\textcolor{gray}{#1}");z("\\purple","\\textcolor{##9d38bd}{#1}");z("\\blueA","\\textcolor{##ccfaff}{#1}");z("\\blueB","\\textcolor{##80f6ff}{#1}");z("\\blueC","\\textcolor{##63d9ea}{#1}");z("\\blueD","\\textcolor{##11accd}{#1}");z("\\blueE","\\textcolor{##0c7f99}{#1}");z("\\tealA","\\textcolor{##94fff5}{#1}");z("\\tealB","\\textcolor{##26edd5}{#1}");z("\\tealC","\\textcolor{##01d1c1}{#1}");z("\\tealD","\\textcolor{##01a995}{#1}");z("\\tealE","\\textcolor{##208170}{#1}");z("\\greenA","\\textcolor{##b6ffb0}{#1}");
vendor: 3,687 bytes, line 1583
1583z("\\greenB","\\textcolor{##8af281}{#1}");z("\\greenC","\\textcolor{##74cf70}{#1}");z("\\greenD","\\textcolor{##1fab54}{#1}");z("\\greenE","\\textcolor{##0d923f}{#1}");z("\\goldA","\\textcolor{##ffd0a9}{#1}");z("\\goldB","\\textcolor{##ffbb71}{#1}");z("\\goldC","\\textcolor{##ff9c39}{#1}");z("\\goldD","\\textcolor{##e07d10}{#1}");z("\\goldE","\\textcolor{##a75a05}{#1}");z("\\redA","\\textcolor{##fca9a9}{#1}");z("\\redB","\\textcolor{##ff8482}{#1}");z("\\redC","\\textcolor{##f9685d}{#1}");z("\\redD","\\textcolor{##e84d39}{#1}");z("\\redE","\\textcolor{##bc2612}{#1}");z("\\maroonA","\\textcolor{##ffbde0}{#1}");z("\\maroonB","\\textcolor{##ff92c6}{#1}");z("\\maroonC","\\textcolor{##ed5fa6}{#1}");z("\\maroonD","\\textcolor{##ca337c}{#1}");z("\\maroonE","\\textcolor{##9e034e}{#1}");z("\\purpleA","\\textcolor{##ddd7ff}{#1}");z("\\purpleB","\\textcolor{##c6b9fc}{#1}");z("\\purpleC","\\textcolor{##aa87ff}{#1}");z("\\purpleD","\\textcolor{##7854ab}{#1}");z("\\purpleE","\\textcolor{##543b78}{#1}");z("\\mintA","\\textcolor{##f5f9e8}{#1}");z("\\mintB","\\textcolor{##edf2df}{#1}");z("\\mintC","\\textcolor{##e0e5cc}{#1}");z("\\grayA","\\textcolor{##f6f7f7}{#1}");z("\\grayB","\\textcolor{##f0f1f2}{#1}");z("\\grayC","\\textcolor{##e3e5e6}{#1}");z("\\grayD","\\textcolor{##d6d8da}{#1}");z("\\grayE","\\textcolor{##babec2}{#1}");z("\\grayF","\\textcolor{##888d93}{#1}");z("\\grayG","\\textcolor{##626569}{#1}");z("\\grayH","\\textcolor{##3b3e40}{#1}");z("\\grayI","\\textcolor{##21242c}{#1}");z("\\kaBlue","\\textcolor{##314453}{#1}");z("\\kaGreen","\\textcolor{##71B307}{#1}");var tM={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class yde{constructor(t,r,n){this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new gde(xde,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new RT(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,s;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:s,end:n}=this.consumeArg(["]"])}else({tokens:s,start:r,end:n}=this.consumeArg());return this.pushToken(new ks("EOF",n.loc)),this.pushTokens(s),new ks("",ss.range(r,n))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var s=this.future(),a,o=0,l=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new ze("Extra }",a)}else if(a.text==="EOF")throw new ze("Unexpected end of input in a macro argument, expected '"+(t&&n?t[l]:"}")+"'",a);if(t&&n)if((o===0||o===1&&t[l]==="{")&&a.text===t[l]){if(++l,l===t.length){r.splice(-l,l);break}}else l=0}while(o!==0||n);return s.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:s,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new ze("The length of delimiters doesn't match the number of args!");for(var n=r[0],s=0;s<n.length;s++){var a=this.popToken();if(n[s]!==a.text)throw new ze("Use of the macro doesn't match its definition",a)}}for(var o=[],l=0;l<t;l++)o.push(this.consumeArg(r&&r[l+1]).tokens);return o}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new ze("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,s=r.noexpand?null:this._getExpansion(n);
vendor: 1,269 bytes, line 1583
1583if(s==null||t&&s.unexpandable){if(t&&s==null&&n[0]==="\\"&&!this.isDefined(n))throw new ze("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=s.tokens,o=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var u=a[l];if(u.text==="#"){if(l===0)throw new ze("Incomplete placeholder at end of macro body",u);if(u=a[--l],u.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(u.text))a.splice(l,2,...o[+u.text-1]);else throw new ze("Not a valid argument number",u)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new ks(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),r.push(s)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];
vendor: 17,212 bytes, lines 1583-1584
1583if(n!=null&&n!==13)return}var s=typeof r=="function"?r(this):r;if(typeof s=="string"){var a=0;if(s.includes("#"))for(var o=s.replace(/##/g,"");o.includes("#"+(a+1));)++a;for(var l=new RT(s,this.settings),u=[],c=l.lex();c.text!=="EOF";)u.push(c),c=l.lex();u.reverse();var d={tokens:u,numArgs:a};return d}return s}isDefined(t){return this.macros.has(t)||To.hasOwnProperty(t)||mr.math.hasOwnProperty(t)||mr.text.hasOwnProperty(t)||tM.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:To.hasOwnProperty(t)&&!To[t].primitive}}var OT=/^[âââââââââââ âââââââᵢⱼââââââáµ£ââᵤᵥâᵦᵧᵨᵩᵪ]/,Tf=Object.freeze({"â":"+","â":"-","â":"=","â":"(","â":")","â":"0","â":"1","â":"2","â":"3","â":"4","â ":"5","â":"6","â":"7","â":"8","â":"9","â":"a","â":"e","â":"h","áµ¢":"i","â±¼":"j","â":"k","â":"l","â":"m","â":"n","â":"o","â":"p","áµ£":"r","â":"s","â":"t","ᵤ":"u","áµ¥":"v","â":"x","ᵦ":"β","áµ§":"γ","ᵨ":"Ï","ᵩ":"Ï","ᵪ":"Ï","âº":"+","â»":"-","â¼":"=","â½":"(","â¾":")","â°":"0","¹":"1","²":"2","³":"3","â´":"4","âµ":"5","â¶":"6","â·":"7","â¸":"8","â¹":"9","á´¬":"A","á´®":"B","á´°":"D","á´±":"E","á´³":"G","á´´":"H","á´µ":"I","á´¶":"J","á´·":"K","á´¸":"L","á´¹":"M","á´º":"N","á´¼":"O","á´¾":"P","á´¿":"R","áµ":"T","áµ":"U","â±½":"V","áµ":"W","áµ":"a","áµ":"b","á¶":"c","áµ":"d","áµ":"e","á¶ ":"f","áµ":"g",ʰ:"h","â±":"i",ʲ:"j","áµ":"k",Ë¡:"l","áµ":"m",â¿:"n","áµ":"o","áµ":"p",ʳ:"r",Ë¢:"s","áµ":"t","áµ":"u","áµ":"v",Ê·:"w",Ë£:"x",ʸ:"y","á¶»":"z","áµ":"β","áµ":"γ","áµ":"δ","áµ ":"Ï","ᵡ":"Ï","á¶¿":"θ"}),hy={"Ì":{text:"\\'",math:"\\acute"},"Ì":{text:"\\`",math:"\\grave"},"Ì":{text:'\\"',math:"\\ddot"},"Ì":{text:"\\~",math:"\\tilde"},"Ì":{text:"\\=",math:"\\bar"},"Ì":{text:"\\u",math:"\\breve"},"Ì":{text:"\\v",math:"\\check"},"Ì":{text:"\\^",math:"\\hat"},"Ì":{text:"\\.",math:"\\dot"},"Ì":{text:"\\r",math:"\\mathring"},"Ì":{text:"\\H"},"̧":{text:"\\c"}},LT={á:"aÌ",à :"aÌ",ä:"aÌ",Ç:"aÌÌ",ã:"aÌ",Ä:"aÌ",Ä:"aÌ",ắ:"aÌÌ",ằ:"aÌÌ",ẵ:"aÌÌ",Ç:"aÌ",â:"aÌ",ấ:"aÌÌ",ầ:"aÌÌ",ẫ:"aÌÌ",ȧ:"aÌ",Ç¡:"aÌÌ",Ã¥:"aÌ",Ç»:"aÌÌ",á¸:"bÌ",Ä:"cÌ",á¸:"çÌ",Ä:"cÌ",Ä:"cÌ",Ä:"cÌ",ç:"ç",Ä:"dÌ",á¸:"dÌ",á¸:"ḑ",é:"eÌ",è:"eÌ",ë:"eÌ",ẽ:"eÌ",Ä:"eÌ",á¸:"eÌÌ",á¸:"eÌÌ",Ä:"eÌ",á¸:"ȩÌ",Ä:"eÌ",ê:"eÌ",ế:"eÌÌ",á»:"eÌÌ",á» :"eÌÌ",Ä:"eÌ",È©:"ȩ",á¸:"fÌ",ǵ:"gÌ",ḡ:"gÌ",Ä:"gÌ",ǧ:"gÌ",Ä:"gÌ",Ä¡:"gÌ",Ä£:"ģ",ḧ:"hÌ",È:"hÌ",Ä¥:"hÌ",ḣ:"hÌ",ḩ:"ḩ",Ã:"iÌ",ì:"iÌ",ï:"iÌ",ḯ:"iÌÌ",Ä©:"iÌ",Ä«:"iÌ",Ä:"iÌ",Ç:"iÌ",î:"iÌ",ǰ:"jÌ",ĵ:"jÌ",ḱ:"kÌ",Ç©:"kÌ",Ä·:"ķ",ĺ:"lÌ",ľ:"lÌ",ļ:"ļ",ḿ:"mÌ",á¹:"mÌ",Å:"nÌ",ǹ:"nÌ",ñ:"nÌ",Å:"nÌ",á¹ :"nÌ",Å:"ņ",ó:"oÌ",ò:"oÌ",ö:"oÌ",È«:"oÌÌ",õ:"oÌ",á¹:"oÌÌ",á¹:"oÌÌ",È:"oÌÌ",Å:"oÌ",á¹:"oÌÌ",á¹:"oÌÌ",Å:"oÌ",Ç:"oÌ",ô:"oÌ",á»:"oÌÌ",á»:"oÌÌ",á»:"oÌÌ",ȯ:"oÌ",ȱ:"oÌÌ",Å:"oÌ",á¹:"pÌ",á¹:"pÌ",Å:"rÌ",Å:"rÌ",á¹:"rÌ",Å:"ŗ",Å:"sÌ",á¹¥:"sÌÌ",Å¡:"sÌ",á¹§:"sÌÌ",Å:"sÌ",ṡ:"sÌ",Å:"ş",áº:"tÌ",Å¥:"tÌ",ṫ:"tÌ",Å£:"ţ",ú:"uÌ",ù:"uÌ",ü:"uÌ",Ç:"uÌÌ",Ç:"uÌÌ",Ç:"uÌÌ",Ç:"uÌÌ",Å©:"uÌ",á¹¹:"uÌÌ",Å«:"uÌ",á¹»:"uÌÌ",Å:"uÌ",Ç:"uÌ",û:"uÌ",ů:"uÌ",ű:"uÌ",á¹½:"vÌ",áº:"wÌ",áº:"wÌ",Ạ:"wÌ",ŵ:"wÌ",áº:"wÌ",áº:"wÌ",áº:"xÌ",áº:"xÌ",ý:"yÌ",ỳ:"yÌ",ÿ:"yÌ",ỹ:"yÌ",ȳ:"yÌ",Å·:"yÌ",áº:"yÌ",áº:"yÌ",ź:"zÌ",ž:"zÌ",áº:"zÌ",ż:"zÌ",Ã:"AÌ",Ã:"AÌ",Ã:"AÌ",Ç:"AÌÌ",Ã:"AÌ",Ä:"AÌ",Ä:"AÌ",Ắ:"AÌÌ",Ằ:"AÌÌ",Ẵ:"AÌÌ",Ç:"AÌ",Ã:"AÌ",Ấ:"AÌÌ",Ầ:"AÌÌ",Ẫ:"AÌÌ",Ȧ:"AÌ",Ç :"AÌÌ",à :"AÌ",Ǻ:"AÌÌ",á¸:"BÌ",Ä:"CÌ",á¸:"ÇÌ",Ä:"CÌ",Ä:"CÌ",Ä:"CÌ",Ã:"Ç",Ä:"DÌ",á¸:"DÌ",á¸:"Ḑ",Ã:"EÌ",Ã:"EÌ",Ã:"EÌ",Ẽ:"EÌ",Ä:"EÌ",á¸:"EÌÌ",á¸:"EÌÌ",Ä:"EÌ",á¸:"ȨÌ",Ä:"EÌ",Ã:"EÌ",Ế:"EÌÌ",á»:"EÌÌ",á»:"EÌÌ",Ä:"EÌ",Ȩ:"Ȩ",á¸:"FÌ",Ç´:"GÌ",Ḡ:"GÌ",Ä:"GÌ",Ǧ:"GÌ",Ä:"GÌ",Ä :"GÌ",Ä¢:"Ģ",Ḧ:"HÌ",È:"HÌ",Ĥ:"HÌ",Ḣ:"HÌ",Ḩ:"Ḩ",Ã:"IÌ",Ã:"IÌ",Ã:"IÌ",Ḯ:"IÌÌ",Ĩ:"IÌ",Ī:"IÌ",Ĭ:"IÌ",Ç:"IÌ",Ã:"IÌ",İ:"IÌ",Ä´:"JÌ",Ḱ:"KÌ",Ǩ:"KÌ",Ķ:"Ķ",Ĺ:"LÌ",Ľ:"LÌ",Ä»:"Ļ",Ḿ:"MÌ",á¹:"MÌ",Å:"NÌ",Ǹ:"NÌ",Ã:"NÌ",Å:"NÌ",á¹:"NÌ",Å :"Ņ",Ã:"OÌ",Ã:"OÌ",Ã:"OÌ",Ȫ:"OÌÌ",Ã:"OÌ",á¹:"OÌÌ",á¹:"OÌÌ",Ȭ:"OÌÌ",Å:"OÌ",á¹:"OÌÌ",á¹:"OÌÌ",Å:"OÌ",Ç:"OÌ",Ã:"OÌ",á»:"OÌÌ",á»:"OÌÌ",á»:"OÌÌ",È®:"OÌ",Ȱ:"OÌÌ",Å:"OÌ",á¹:"PÌ",á¹:"PÌ",Å:"RÌ",Å:"RÌ",á¹:"RÌ",Å:"Ŗ",Å:"SÌ",Ṥ:"SÌÌ",Å :"SÌ",Ṧ:"SÌÌ",Å:"SÌ",á¹ :"SÌ",Å:"Ş",Ť:"TÌ",Ṫ:"TÌ",Å¢:"Ţ",Ã:"UÌ",Ã:"UÌ",Ã:"UÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ũ:"UÌ",Ṹ:"UÌÌ",Ū:"UÌ",Ṻ:"UÌÌ",Ŭ:"UÌ",Ç:"UÌ",Ã:"UÌ",Å®:"UÌ",Ű:"UÌ",á¹¼:"VÌ",áº:"WÌ",áº:"WÌ",áº:"WÌ",Å´:"WÌ",áº:"WÌ",áº:"XÌ",áº:"XÌ",Ã:"YÌ",Ỳ:"YÌ",Ÿ:"YÌ",Ỹ:"YÌ",Ȳ:"YÌ",Ŷ:"YÌ",áº:"YÌ",Ź:"ZÌ",Ž:"ZÌ",áº:"ZÌ",Å»:"ZÌ",ά:"αÌ",á½°:"αÌ",á¾±:"αÌ",á¾°:"αÌ",Î:"εÌ",á½²:"εÌ",ή:"ηÌ",á½´:"ηÌ",ί:"ιÌ",á½¶:"ιÌ",Ï:"ιÌ",Î:"ιÌÌ",á¿:"ιÌÌ",á¿:"ιÌ",á¿:"ιÌ",Ï:"οÌ",ὸ:"οÌ",Ï:"Ï Ì",ὺ:"Ï Ì",Ï:"Ï Ì",ΰ:"Ï ÌÌ",á¿¢:"Ï ÌÌ",á¿¡:"Ï Ì",á¿ :"Ï Ì",Ï:"ÏÌ",á½¼:"ÏÌ",Î:"Î¥Ì",Ὺ:"Î¥Ì",Ϋ:"Î¥Ì",á¿©:"Î¥Ì",Ῠ:"Î¥Ì",Î:"ΩÌ",Ὼ:"ΩÌ"};let rM=class nM{constructor(t,r){this.mode="math",this.gullet=new yde(t,r,this.mode),this.settings=r,this.leftrightDepth=0,this.nextToken=null}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new ze("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new ks("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(nM.endOfExpression.has(s.text)||r&&s.text===r||t&&To[s.text]&&To[s.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,s=0;s<t.length;s++){var a=t[s];if(a.type==="infix"){if(r!==-1)throw new ze("only one infix operator per group",a.token);r=s,n=a.replaceWith}}if(r!==-1&&n){var o,l,u=t.slice(0,r),c=t.slice(r+1);u.length===1&&u[0].type==="ordgroup"?o=u[0]:o={type:"ordgroup",mode:this.mode,body:u},c.length===1&&c[0].type==="ordgroup"?l=c[0]:l={type:"ordgroup",mode:this.mode,body:c};var d;return n==="\\\\abovefrac"?d=this.callFunction(n,[o,t[r],l],[]):d=this.callFunction(n,[o,l],[]),[d]}else return t}handleSupSubscript(t){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var s;do{var a;s=this.parseGroup(t)}while(((a=s)==null?void 0:a.type)==="internal");if(!s)throw new ze("Expected group after '"+n+"'",r);return s}formatUnsupportedCmd(t){for(var r=[],n=0;n<t.length;n++)r.push({type:"textord",mode:"text",text:t[n]});var s={type:"text",mode:this.mode,body:r},a={type:"color",mode:this.mode,color:this.settings.errorColor,body:[s]};return a}parseAtom(t){var r=this.parseGroup("atom",t);if((r==null?void 0:r.type)==="internal"||this.mode==="text")return r;for(var n,s;;){this.consumeSpaces();var a=this.fetch();if(a.text==="\\limits"||a.text==="\\nolimits"){if(r&&r.type==="op"){var o=a.text==="\\limits";r.limits=o,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=a.text==="\\limits");else throw new ze("Limit controls must follow a math operator",a);this.consume()}else if(a.text==="^"){if(n)throw new ze("Double superscript",a);n=this.handleSupSubscript("superscript")}else if(a.text==="_"){if(s)throw new ze("Double subscript",a);s=this.handleSupSubscript("subscript")}else if(a.text==="'"){if(n)throw new ze("Double superscript",a);var l={type:"textord",mode:this.mode,text:"\\prime"},u=[l];for(this.consume();this.fetch().text==="'";)u.push(l),this.consume();this.fetch().text==="^"&&u.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:u}}else if(Tf[a.text]){var c=OT.test(a.text),d=[];for(d.push(new ks(Tf[a.text])),this.consume();;){var h=this.fetch().text;if(!Tf[h]||OT.test(h)!==c)break;d.unshift(new ks(Tf[h])),this.consume()}var m=this.subparse(d);c?s={type:"ordgroup",mode:"math",body:m}:n={type:"ordgroup",mode:"math",body:m}}else break}return n||s?{type:"supsub",mode:this.mode,base:r,sup:n,sub:s}:r}parseFunction(t,r){var n=this.fetch(),s=n.text,a=To[s];if(!a)return null;if(this.consume(),r&&r!=="atom"&&!a.allowedInArgument)throw new ze("Got function '"+s+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!a.allowedInText)throw new ze("Can't use function '"+s+"' in text mode",n);if(this.mode==="math"&&a.allowedInMath===!1)throw new ze("Can't use function '"+s+"' in math mode",n);var{args:o,optArgs:l}=this.parseArguments(s,a);return this.callFunction(s,o,l,n,t)}callFunction(t,r,n,s,a){var o={funcName:t,parser:this,token:s,breakOnTokenText:a},l=To[t];if(l&&l.handler)return l.handler(o,r,n);throw new ze("No function handler for "+t)}parseArguments(t,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var s=[],a=[],o=0;o<n;o++){var l=r.argTypes&&r.argTypes[o],u=o<r.numOptionalArgs;("primitive"in r&&r.primitive&&l==null||r.type==="sqrt"&&o===1&&a[0]==null)&&(l="primitive");var c=this.parseGroupOfType("argument to '"+t+"'",l,u);if(u)a.push(c);else if(c!=null)s.push(c);else throw new ze("Null argument, please report this as a bug")}return{args:s,optArgs:a}}parseGroupOfType(t,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var s=this.parseArgumentGroup(n,"text");return s!=null?{type:"styling",mode:s.mode,body:[s],style:"text"}:null}case"raw":{var a=this.parseStringGroup("raw",n);return a!=null?{type:"raw",mode:"text",string:a.text}:null}case"primitive":{if(n)throw new ze("A primitive argument cannot be optional");var o=this.parseGroup(t);if(o==null)throw new ze("Expected group as "+t,this.fetch());return o}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new ze("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var s="",a;(a=this.fetch()).text!=="EOF";)s+=a.text,this.consume();return this.consume(),n.text=s,n}parseRegexGroup(t,r){for(var n=this.fetch(),s=n,a="",o;(o=this.fetch()).text!=="EOF"&&t.test(a+o.text);)s=o,a+=s.text,this.consume();if(a==="")throw new ze("Invalid "+r+": '"+n.text+"'",n);return n.range(s,a)}parseColorGroup(t){var r=this.parseStringGroup("color",t);if(r==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new ze("Invalid color: '"+r.text+"'",r);var s=n[0];return/^[0-9a-f]{6}$/i.test(s)&&(s="#"+s),{type:"color-token",mode:this.mode,color:s}}parseSizeGroup(t){var r,n=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",t),!r)return null;!t&&r.text.length===0&&(r.text="0pt",n=!0);var s=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!s)throw new ze("Invalid size: '"+r.text+"'",r);var a={number:+(s[1]+s[2]),unit:s[3]};if(!cD(a))throw new ze("Invalid unit: '"+a.unit+"'",r);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(t,r){var n=this.gullet.scanArgument(t);if(n==null)return null;var s=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return r&&this.switchMode(s),o}parseGroup(t,r){var n=this.fetch(),s=n.text,a;if(s==="{"||s==="\\begingroup"){this.consume();var o=s==="{"?"}":"\\endgroup";this.gullet.beginGroup();var l=this.parseExpression(!1,o),u=this.fetch();this.expect(o),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:ss.range(n,u),body:l,semisimple:s==="\\begingroup"||void 0}}else if(a=this.parseFunction(r,t)||this.parseSymbol(),a==null&&s[0]==="\\"&&!tM.hasOwnProperty(s)){if(this.settings.throwOnError)throw new ze("Undefined control sequence: "+s,n);a=this.formatUnsupportedCmd(s),this.consume()}return a}formLigatures(t){for(var r=t.length-1,n=0;n<r;++n){var s=t[n];if(s.type==="textord"){var a=s.text,o=t[n+1];if(!(!o||o.type!=="textord")){if(a==="-"&&o.text==="-"){var l=t[n+2];n+1<r&&l&&l.type==="textord"&&l.text==="-"?(t.splice(n,3,{type:"textord",mode:"text",loc:ss.range(s,l),text:"---"}),r-=2):(t.splice(n,2,{type:"textord",mode:"text",loc:ss.range(s,o),text:"--"}),r-=1)}(a==="'"||a==="`")&&o.text===a&&(t.splice(n,2,{type:"textord",mode:"text",loc:ss.range(s,o),text:a+a}),r-=1)}}}}parseSymbol(){var t=this.fetch(),r=t.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),s=n.charAt(0)==="*";if(s&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new ze(`\\verb assertion failed -- 1584 please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:s}}LT.hasOwnProperty(r[0])&&!mr[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=LT[r[0]]+r.slice(1));var a=fde.exec(r);a&&(r=r.substring(0,a.index),r==="i"?r="ı":r==="j"&&(r="È·"));var o;if(mr[this.mode][r]){this.settings.strict&&this.mode==="math"&&s4.includes(r)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var l=mr[this.mode][r].group,u=ss.range(t),c;if(pue.hasOwnProperty(l)){var d=l;c={type:"atom",mode:this.mode,family:d,loc:u,text:r}}else c={type:l,mode:this.mode,loc:u,text:r};o=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&(lD(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:ss.range(t),text:r};else return null;if(this.consume(),a)for(var h=0;h<a[0].length;h++){var m=a[0][h];if(!hy[m])throw new ze("Unknown accent ' "+m+"'",t);var f=hy[m][this.mode]||hy[m].text;if(!f)throw new ze("Accent "+m+" unsupported in "+this.mode+" mode",t);o={type:"accent",mode:this.mode,loc:ss.range(t),label:f,isStretchy:!1,isShifty:!0,base:o}}return o}};rM.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var w5=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new rM(t,r);delete n.gullet.macros.current["\\df@tag"];var s=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new ze("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:n.subparse([new ks("\\df@tag")])}]}return s},sM=function(t,r,n){r.textContent="";var s=E5(t,n).toNode();r.appendChild(s)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),sM=function(){throw new ze("KaTeX doesn't work in quirks mode.")});var vde=function(t,r){var n=E5(t,r).toMarkup();return n},wde=function(t,r){var n=new l5(r);return w5(t,n)},aM=function(t,r,n){if(n.throwOnError||!(t instanceof ze))throw t;var s=Pe(["katex-error"],[new Cs(r)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+n.errorColor),s},E5=function(t,r){var n=new l5(r);try{var s=w5(t,n);return Iue(s,t,n)}catch(a){return aM(a,t,n)}},Ede=function(t,r){var n=new l5(r);try{var s=w5(t,n);return Rue(s,t,n)}catch(a){return aM(a,t,n)}},kde="0.16.44",Nde={Span:xd,Anchor:H1,SymbolNode:Cs,SvgNode:Fi,PathNode:Xo,LineN
1584ode:n4},PT={version:kde,render:sM,renderToString:vde,ParseError:ze,SETTINGS_SCHEMA:e4,__parse:wde,__renderToDomTree:E5,__renderToHTMLTree:Ede,__setFontMetrics:mue,__defineSymbol:_,__defineFunction:et,__defineMacro:z,__domTree:Nde};const Sde={};function Tde(e){const t=this,r=e||Sde,n=t.data(),s=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);s.push(Lce(r)),a.push(_ce()),o.push(Ace(r))}const Cde=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","
1584sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],FT={0:"�",128:"â¬",130:"â",131:"Æ",132:"â",133:"â¦",134:"â ",135:"â¡",136:"Ë",137:"â°",138:"Å ",139:"â¹",140:"Å",142:"Ž",145:"â",146:"â",147:"â",148:"â",149:"â¢",150:"â",151:"â",152:"Ë",153:"â¢",154:"Å¡",155:"âº",156:"Å",158:"ž",159:"Ÿ"};function iM(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function _de(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Ade(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function BT(e){return Ade(e)||iM(e)}const jde=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function k5(e,t){const r=t||{},n=typeof r.additional=="string"?r.additional.charCodeAt(0):r.additional,s=[];let a=0,o=-1,l="",u,c;r.position&&("start"in r.position||"indent"in r.position?(c=r.position.indent,u=r.position.start):u=r.position);let d=(u?u.line:0)||1,h=(u?u.column:0)||1,m=p(),f;for(a--;++a<=e.length;)if(f===10&&(h=(c?c[o]:0)||1),f=e.charCodeAt(a),f===38){const w=e.charCodeAt(a+1);if(w===9||w===10||w===12||w===32||w===38||w===60||Number.isNaN(w)||n&&w===n){l+=String.fromCharCode(f),h++;continue}const y=a+1;let b=y,k=y,T;if(w===35){k=++b;const W=e.charCodeAt(k);W===88||W===120?(T="hexadecimal",k=++b):T="decimal"}else T="named";let S="",j="",E="";const A=T==="named"?BT:T==="decimal"?iM:_de;for(k--;++k<=e.length;){const W=e.charCodeAt(k);if(!A(W))break;E+=String.fromCharCode(W),T==="named"&&Cde.includes(E)&&(S=E,j=_h(E))}let R=e.charCodeAt(k)===59;if(R){k++;const W=T==="named"?_h(E):!1;W&&(S=E,j=W)}let M=1+k-y,B="";if(!(!R&&r.nonTerminated===!1))if(!E)T!=="named"&&g(4,M);else if(T==="named"){if(R&&!j)g(5,1);else if(S!==E&&(k=b+S.length,M=1+k-b,R=!1),!R){const W=S?1:3;if(r.attribute){const H=e.charCodeAt(k);H===61?(g(W,M),j=""):BT(H)?j="":g(W,M)}else g(W,M)}B=j}else{R||g(2,M);let W=Number.parseInt(E,T==="hexadecimal"?16:10);if(Ide(W))g(7,M),B="�";else if(W in FT)g(6,M),B=FT[W];else{let H="";Rde(W)&&g(6,M),W>65535&&(W-=65536,H+=String.fromCharCode(W>>>10|55296),W=56320|W&1023),B=H+String.fromCharCode(W)}}if(B){x(),m=p(),a=k-1,h+=k-y+1,s.push(B);const W=p();W.offset++,r.reference&&r.reference.call(r.referenceContext||void 0,B,{start:m,end:W},e.slice(y-1,k)),m=W}else E=e.slice(y-1,k),l+=E,h+=E.length,a=k-1}else f===10&&(d++,o++,h=0),Number.isNaN(f)?x():(l+=String.fromCharCode(f),h++);return s.join("");function p(){return{line:d,column:h,offset:a+((u?u.offset:0)||0)}}function g(w,y){let b;r.warning&&(b=p(),b.column+=y,b.offset+=y,r.warning.call(r.warningContext||void 0,jde[w],b,w))}function x(){l&&(s.push(l),r.text&&r.text.call(r.textContext||void 0,l,{start:m,end:p()}),l="")}}function Ide(e){return e>=55296&&e<=57343||e>1114111}function Rde(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const Dde=/["&'<>`]/g,Mde=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ode=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Lde=/[|\\{}()[\]^$+*?.]/g,UT=new WeakMap;function Pde(e,t){if(e=e.replace(t.subset?Fde(t.subset):Dde,n),t.subset||t.escapeOnly)return e;return e.replace(Mde,r).replace(Ode,n);function r(s,a,o){return t.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,o.charCodeAt(a+2),t)}function n(s,a,o){return t.format(s.charCodeAt(0),o.charCodeAt(a+1),t)}}function Fde(e){let t=UT.get(e);return t||(t=Bde(e),UT.set(e,t)),t}function Bde(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(Lde,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function Ude(e){return"&#x"+e.toString(16).toUpperCase()+";"}function $de(e,t){return Pde(e,Object.assign({format:Ude},t))}const zde={}.hasOwnProperty,Hde={},$T=/^[^\t\n\r "#'.<=>`}]+$/,qde=/^[^\t\n\r "'<=>`}]+$/;
1584function Wde(){return{canContainEols:["textDirective"],enter:{directiveContainer:Gde,directiveContainerAttributes:fy,directiveContainerLabel:Qde,directiveLeaf:Kde,directiveLeafAttributes:fy,directiveText:Yde,directiveTextAttributes:fy},exit:{directiveContainer:vy,directiveContainerAttributeClassValue:gy,directiveContainerAttributeIdValue:py,directiveContainerAttributeName:by,directiveContainerAttributeValue:xy,directiveContainerAttributes:yy,directiveContainerLabel:Xde,directiveContainerName:my,directiveLeaf:vy,directiveLeafAttributeClassValue:gy,directiveLeafAttributeIdValue:py,directiveLeafAttributeName:by,directiveLeafAttributeValue:xy,directiveLeafAttributes:yy,directiveLeafName:my,directiveText:vy,directiveTextAttributeClassValue:gy,directiveTextAttributeIdValue:py,directiveTextAttributeName:by,directiveTextAttributeValue:xy,directiveTextAttributes:yy,directiveTextName:my}}}function Vde(e){const t=Hde;if(t.quote!=='"'&&t.quote!=="'"&&t.quote!==null&&t.quote!==void 0)throw new Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return r.peek=Zde,{handlers:{containerDirective:r,leafDirective:r,textDirective:r},unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:` 1585`,inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}]};function r(a,o,l,u){const c=l.createTracker(u),d=Jde(a),h=l.enter(a.type);let m=c.move(d+(a.name||"")),f;if(a.type==="containerDirective"){const p=(a.children||[])[0];f=zT(p)?p:void 0}else f=a;if(f&&f.children&&f.children.length>0){const p=l.enter("label"),g=`${a.type}Label`,x=l.enter(g);m+=c.move("["),m+=c.move(l.containerPhrasing(f,{...c.current(),before:m,after:"]"})),m+=c.move("]"),x(),p()}if(m+=c.move(n(a,l)),a.type==="containerDirective"){const p=(a.children||[])[0];let g=a;zT(p)&&(g=Object.assign({},a,{children:a.children.slice(1)})),g&&g.children&&g.children.length>0&&(m+=c.move(` 1586`),m+=c.move(l.containerFlow(g,c.current()))),m+=c.move(` 1587`+d)}return h(),m}function n(a,o){const l=a.attributes||{},u=[];let c,d,h,m;for(m in l)if(zde.call(l,m)&&l[m]!==void 0&&l[m]!==null){const f=String(l[m]);if(m==="id")h=t.preferShortcut!==!1&&$T.test(f)?"#"+f:s("id",f,a,o);else if(m==="class"){const p=f.split(/[\t\n\r ]+/g),g=[],x=[];let w=-1;for(;++w<p.length;)(t.preferShortcut!==!1&&$T.test(p[w])?x:g).push(p[w]);c=g.length>0?s("class",g.join(" "),a,o):"",d=x.length>0?"."+x.join("."):""}else u.push(s(m,f,a,o))}return c&&u.unshift(c),d&&u.unshift(d),h&&u.unshift(h),u.length>0?"{"+u.join(" ")+"}":""}function s(a,o,l,u){if(t.collapseEmptyAttributes!==!1&&!o)return a;if(t.preferUnquoted&&qde.test(o))return a+"="+o;const c=t.quote||u.options.quote||'"',d=c==='"'?"'":'"',h=t.quoteSmart&&Eg(o,c)>Eg(o,d)?d:c,m=l.type==="textDirective"?[h]:[h,` 1588`,"\r"];return a+"="+h+$de(o,{subset:m})+h}}function Gde(e){N5.call(this,"containerDirective",e)}function Kde(e){N5.call(this,"leafDirective",e)}function Yde(e){N5.call(this,"textDirective",e)}function N5(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function my(e){const t=this.stack[this.stack.length-1];t.type==="containerDirective"||t.type==="leafDirective"||t.type,t.name=this.sliceSerialize(e)}function Qde(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function Xde(e){this.exit(e)}function fy(){this.data.directiveAttributes=[],this.buffer()}function py(e){this.data.directiveAttributes.push(["id",k5(this.sliceSerialize(e),{attribute:!0})])}function gy(e){this.data.directiveAttributes.push(["class",k5(this.sliceSerialize(e),{attribute:!0})])}function xy(e){const t=this.data.directiveAttributes;t[t.length-1][1]=k5(this.sliceSerialize(e),{attribute:!0})}function by(e){this.data.directiveAttributes.push([this.sliceSerialize(e),""])}function yy(){const e=this.data.directiveAttributes,t={};let r=-1;for(;++r<e.length;){const s=e[r];s[0]==="class"&&t.class?t.class+=" "+s[1]:t[s[0]]=s[1]}this.data.directiveAttributes=void 0,this.resume();const n=this.stack[this.stack.length-1];n.type==="containerDirective"||n.type==="leafDirective"||n.type,n.attributes=t}function vy(e){this.exit(e)}function Zde(){return":"}function zT(e){return!!(e&&e.type==="paragraph"&&e.data&&e.data.directiveLabel)}function Jde(e){let t=0;return e.type==="containerDirective"?(z1(e,function(r,n){if(r.type==="containerDirective"){let s=n.length,a=0;for(;s--;)n[s].type==="containerDirective"&&a++;a>t&&(t=a)}}),t+=3):e.type==="leafDirective"?t=2:t=1,":".repeat(t)}function S5(e,t,r,n,s,a,o,l,u,c,d,h,m,f,p){let g,x;return w;function w(L){return e.enter(n),e.enter(s),e.consume(L),e.exit(s),y}function y(L){return L===35?(g=o,b(L)):L===46?(g=l,b(L)):p&&_t(L)?bt(e,y,"whitespace")(L):!p&&Lt(L)?Ci(e,y)(L):L===null||Ze(L)||ba(L)||Yo(L)&&L!==45&&L!==95?H(L):(e.enter(a),e.enter(u),e.consume(L),S)}function b(L){const $=g+"Marker";return e.enter(a),e.enter(g),e.enter($),e.consume(L),e.exit($),k}function k(L){if(L===null||L===34||L===35||L===39||L===46||L===60||L===61||L===62||L===96||L===125||Lt(L))return r(L);const $=g+"Value";return e.enter($),e.consume(L),T}function T(L){if(L===null||L===34||L===39||L===60||L===61||L===62||L===96)return r(L);if(L===35||L===46||L===125||Lt(L)){const $=g+"Value";return e.exit($),e.exit(g),e.exit(a),y(L)}return e.consume(L),T}function S(L){return L===null||Ze(L)||ba(L)||Yo(L)&&L!==45&&L!==46&&L!==58&&L!==95?(e.exit(u),p&&_t(L)?bt(e,j,"whitespace")(L):!p&&Lt(L)?Ci(e,j)(L):j(L)):(e.consume(L),S)}function j(L){return L===61?(e.enter(c),e.consume(L),e.exit(c),E):(e.exit(a),y(L))}function E(L){return L===null||L===60||L===61||L===62||L===96||L===125||p&&Ze(L)?r(L):L===34||L===39?(e.enter(d),e.enter(m),e.consume(L),e.exit(m),x=L,R):p&&_t(L)?bt(e,E,"whitespace")(L):!p&&Lt(L)?Ci(e,E)(L):(e.enter(h),e.enter(f),e.consume(L),x=void 0,A)}function A(L){return L===null||L===34||L===39||L===60||L===61||L===62||L===96?r(L):L===125||Lt(L)?(e.exit(f),e.exit(h),e.exit(a),y(L)):(e.consume(L),A)}function R(L){return L===x?(e.enter(m),e.consume(L),e.exit(m),e.exit(d),e.exit(a),W):(e.enter(h),M(L))}function M(L){return L===x?(e.exit(h),R(L)):L===null?r(L):Ze(L)?p?r(L):Ci(e,M)(L):(e.enter(f),e.consume(L),B)}function B(L){return L===x||L===null||Ze(L)?(e.exit(f),M(L)):(e.consume(L),B)}function W(L){return L===125||Lt(L)?y(L):H(L)}function H(L){return L===125?(e.enter(s),e.consume(L),e.exit(s),e.exit(n),t):r(L)}}function T5(e,t,r,n,s,a,o){let l=0,u=0,c;return d;function d(x){return e.enter(n),e.enter(s),e.consume(x),e.exit(s),h}function h(x){return x===93?(e.enter(s),e.consume(x),e.exit(s),e.exit(n),t):(e.enter(a),m(x))}function m(x){if(x===93&&!u)return g(x);const w=e.enter("chunkText",{_contentTypeTextTrailing:!0,contentType:"text",previous:c});return c&&(c.next=w),c=w,f(x)}function f(x){return x===null||l>999||x===91&&++u>32?r(x):x===93&&!u--?(e.exit("chunkText"),g(x)):Ze(x)?o?r(x):(e.consume(x),e.exit("chunkText"),m):(e.consume(x),x===92?p:f)}function p(x){return x===91||x===92||x===93?(e.consume(x),l++,f):f(x)}
1588function g(x){return e.exit(a),e.enter(s),e.consume(x),e.exit(s),e.exit(n),t}}function C5(e,t,r,n){const s=this;return a;function a(l){return l===null||Ze(l)||Yo(l)||ba(l)?r(l):(e.enter(n),e.consume(l),o)}function o(l){return l===null||Ze(l)||ba(l)||Yo(l)&&l!==45&&l!==95?(e.exit(n),s.previous===45||s.previous===95?r(l):t(l)):(e.consume(l),o)}}const e0e={tokenize:n0e,concrete:!0},t0e={tokenize:s0e,partial:!0},r0e={tokenize:a0e,partial:!0},Cf={tokenize:i0e,partial:!0};function n0e(e,t,r){const n=this,s=n.events[n.events.length-1],a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0;let o=0,l;return u;function u(A){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),c(A)}function c(A){return A===58?(e.consume(A),o++,c):o<3?r(A):(e.exit("directiveContainerSequence"),C5.call(n,e,d,r,"directiveContainerName")(A))}function d(A){return A===91?e.attempt(t0e,h,h)(A):h(A)}function h(A){return A===123?e.attempt(r0e,m,m)(A):m(A)}function m(A){return bt(e,f,"whitespace")(A)}function f(A){return e.exit("directiveContainerFence"),A===null?j(A):Ze(A)?n.interrupt?t(A):e.attempt(Cf,p,j)(A):r(A)}function p(A){return A===null?j(A):Ze(A)?e.check(Cf,b,j)(A):(e.enter("directiveContainerContent"),g(A))}function g(A){return e.attempt({tokenize:E,partial:!0},S,a?bt(e,x,"linePrefix",a+1):x)(A)}function x(A){return A===null?S(A):Ze(A)?e.check(Cf,y,S)(A):y(A)}function w(A){if(A===null){const R=e.exit("chunkDocument");return n.parser.lazy[R.start.line]=!1,S(A)}return Ze(A)?e.check(Cf,k,T)(A):(e.consume(A),w)}function y(A){const R=e.enter("chunkDocument",{contentType:"document",previous:l});return l&&(l.next=R),l=R,w(A)}function b(A){return e.enter("directiveContainerContent"),g(A)}function k(A){e.consume(A);const R=e.exit("chunkDocument");return n.parser.lazy[R.start.line]=!1,g}function T(A){const R=e.exit("chunkDocument");return n.parser.lazy[R.start.line]=!1,S(A)}function S(A){return e.exit("directiveContainerContent"),j(A)}function j(A){return e.exit("directiveContainer"),t(A)}function E(A,R,M){let B=0;return bt(A,W,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function W($){return A.enter("directiveContainerFence"),A.enter("directiveContainerSequence"),H($)}function H($){return $===58?(A.consume($),B++,H):B<o?M($):(A.exit("directiveContainerSequence"),bt(A,L,"whitespace")($))}function L($){return $===null||Ze($)?(A.exit("directiveContainerFence"),R($)):M($)}}}function s0e(e,t,r){return T5(e,t,r,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function a0e(e,t,r){return S5(e,t,r,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function i0e(e,t,r){const n=this;return s;function s(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}const o0e={tokenize:u0e},l0e={tokenize:d0e,partial:!0},c0e={tokenize:h0e,partial:!0};function u0e(e,t,r){const n=this;return s;function s(d){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(d),a}function a(d){return d===58?(e.consume(d),e.exit("directiveLeafSequence"),C5.call(n,e,o,r,"directiveLeafName")):r(d)}function o(d){return d===91?e.attempt(l0e,l,l)(d):l(d)}function l(d){return d===123?e.attempt(c0e,u,u)(d):u(d)}function u(d){return bt(e,c,"whitespace")(d)}function c(d){return d===null||Ze(d)?(e.exit("directiveLeaf"),t(d)):r(d)}}function d0e(e,t,r){return T5(e,t,r,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function h0e(e,t,r){return S5(e,t,r,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const m0e={tokenize:x0e,previous:g0e},f0e={tokenize:b0e,partial:!0},p0e={tokenize:y0e,partial:!0};function g0e(e){return e!==58||this.events[this.events.length-1][1].type==="characterEscape"}function x0e(e,t,r){const n=this;return s;function s(u){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(u),e.exit("directiveTextMarker"),C5.call(n,e,a,r,"directiveTextName")}function a(u){return u===58?r(u):u===91?e.attempt(f0e,o,o)(u):o(u)}function o(u){return u===123?e.attempt(p0e,l,l)(u):l(u)}function l(u){return e.exit("directiveText"),t(u)}}function b0e(e,t,r){return T5(e,t,r,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function y0e(e,t,r){return S5(e,t,r,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function v0e(){return{text:{58:m0e},flow:{58:[e0e,o0e]}}}function w0e(){const t=this.data(),r=t.micromarkExtensions||(t.micromarkExtensions=[]),n=t.fromMarkdownExtensions||(t.fromMarkdownExtensions=[]),s=t.toMarkdownExtensions||(t.toMarkdownExtensions=[]);r.push(v0e()),n.push(Wde()),s.push(Vde())}const HT=function(e,t,r){const n=cm(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t]},ul=function(e){if(e==null)return N0e;if(typeof e=="string")return k0e(e);if(typeof e=="object")return E0e(e);if(typeof e=="function")return _5(e);throw new Error("Expected function, string, or array as `test`")};function E0e(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=ul(e[r]);return _5(n);function n(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function k0e(e){return _5(t);function t(r){return r.tagName===e}}function _5(e){return t;function t(r,n,s){return!!(S0e(r)&&e.call(this,r,typeof n=="number"?n:void 0,s||void 0))}}function N0e(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function S0e(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const qT=/\n/g,WT=/[\t ]+/g,f4=ul("br"),VT=ul(R0e),T0e=ul("p"),GT=ul("tr"),C0e=ul(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",I0e,D0e]),oM=ul(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function lM(e,t){const r=t||{},n="children"in e?e.children:[],s=oM(e),a=dM(e,{whitespace:r.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...uM(e,{breakBefore:!0,breakAfter:!0}));let l=-1;for(;++l<n.length;)o.push(...cM(n[l],e,{whitespace:a,breakBefore:l?void 0:s,breakAfter:l<n.length-1?f4(n[l+1]):s}));const u=[];let c;for(l=-1;++l<o.length;){const d=o[l];typeof d=="number"?c!==void 0&&d>c&&(c=d):d&&(c!==void 0&&c>-1&&u.push(` 1589`.repeat(c)||" "),c=-1,u.push(d))}return u.join("")}function cM(e,t,r){return e.type==="element"?_0e(e,t,r):e.type==="text"?r.whitespace==="normal"?uM(e,r):A0e(e):[]}function _0e(e,t,r){const n=dM(e,r),s=e.children||[];let a=-1,o=[];if(C0e(e))return o;let l,u;for(f4(e)||GT(e)&&HT(t,e,GT)?u=` 1590`:T0e(e)?(l=2,u=2):oM(e)&&(l=1,u=1);++a<s.length;)o=o.concat(cM(s[a],e,{whitespace:n,breakBefore:a?void 0:l,breakAfter:a<s.length-1?f4(s[a+1]):u}));return VT(e)&&HT(t,e,VT)&&o.push(" "),l&&o.unshift(l),u&&o.push(u),o}function uM(e,t){const r=String(e.value),n=[],s=[];let a=0;for(;a<=r.length;){qT.lastIndex=a;const u=qT.exec(r),c=u&&"index"in u?u.index:r.length;n.push(j0e(r.slice(a,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,c===r.length?t.breakAfter:!0)),a=c+1}let o=-1,l;for(;++o<n.length;
1590)n[o].charCodeAt(n[o].length-1)===8203||o<n.length-1&&n[o+1].charCodeAt(0)===8203?(s.push(n[o]),l=void 0):n[o]?(typeof l=="number"&&s.push(l),s.push(n[o]),l=0):(o===0||o===n.length-1)&&s.push(0);return s}function A0e(e){return[String(e.value)]}function j0e(e,t,r){const n=[];let s=0,a;for(;s<e.length;){WT.lastIndex=s;const o=WT.exec(e);a=o?o.index:e.length,!s&&!a&&o&&!t&&n.push(""),s!==a&&n.push(e.slice(s,a)),s=o?a+o[0].length:a}return s!==a&&!r&&n.push(""),n.join(" ")}function dM(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function I0e(e){return!!(e.properties||{}).hidden}function R0e(e){return e.tagName==="td"||e.tagName==="th"}function D0e(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function M0e(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",o="(?!struct)("+n+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},f=t.optional(s)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_
1590noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],x=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],w=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],k={type:g,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:x},T={className:"function.dispatch",relevance:0,keywords:{_hint:w},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},S=[T,h,l,r,e.C_BLOCK_COMMENT_MODE,d,c],j={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:S.concat([{begin:/\(/,end:/\)/,keywords:k,contains:S.concat(["self"]),relevance:0}]),relevance:0},E={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:k,relevance:0},{begin:f,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,r,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:k,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(j,E,T,S,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:k,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:k},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function O0e(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","
vendor: 8,082 bytes, line 1590
1590EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},r=M0e(e),n=r.keywords;return n.type=[...n.type,...t.type],n.literal=[...n.literal,...t.literal],n.built_in=[...n.built_in,...t.built_in],n._hints=t._hints,r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}function L0e(e){const t=e.regex,r={},n={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,s]};s.contains.push(l);const u={match:/\\"/},c={className:"string",begin:/'/,end:/'/},d={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,r]},m=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],f=e.SHEBANG({binary:`(${m.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},g=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],x=["true","false"],w={match:/(\/[a-z._-]+)+/},y=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],b=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],k=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],T=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:g,literal:x,built_in:[...y,...b,"set","shopt",...k,...T]},contains:[f,e.SHEBANG(),p,h,a,o,w,l,u,c,d,r]}}function P0e(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",o="("+n+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."}
vendor: 5,118 bytes, line 1590
1590,e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},f=t.optional(s)+e.IDENT_RE+"\\s*\\(",x={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},w=[h,l,r,e.C_BLOCK_COMMENT_MODE,d,c],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:w.concat([{begin:/\(/,end:/\)/,keywords:x,contains:w.concat(["self"]),relevance:0}]),relevance:0},b={begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:x,relevance:0},{begin:f,returnBegin:!0,contains:[e.inherit(m,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,r,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:x,disableAutodetect:!0,illegal:"</",contains:[].concat(y,b,w,[h,{begin:e.IDENT_RE+"::",keywords:x},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:h,strings:c,keywords:x}}}function F0e(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",o="(?!struct)("+n+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},f=t.optional(s)+e.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_
1590noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],x=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],w=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],k={type:g,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:x},T={className:"function.dispatch",relevance:0,keywords:{_hint:w},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},S=[T,h,l,r,e.C_BLOCK_COMMENT_MODE,d,c],j={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:S.concat([{begin:/\(/,end:/\)/,keywords:k,contains:S.concat(["self"]),relevance:0}]),relevance:0},E={className:"function",begin:"("+o+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:k,relevance:0},{begin:f,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,c,d,l,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,c,d,l]}]},l,r,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:k,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(j,E,T,S,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:k,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:k},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function B0e(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],n=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","
1590sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:s.concat(a),built_in:t,literal:n},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),u={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},h=e.inherit(d,{illegal:/\n/}),m={className:"subst",begin:/\{/,end:/\}/,keywords:o},f=e.inherit(m,{illegal:/\n/}),p={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,f]},g={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},m]},x=e.inherit(g,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]});m.contains=[g,p,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.C_BLOCK_COMMENT_MODE],f.contains=[x,p,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const w={variants:[c,g,p,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},b=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",k={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},w,u,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+b+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[w,u,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},k]}}const U0e=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),$0e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],z0e=["def
1590s","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],H0e=[...$0e,...z0e],q0e=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),W0e=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),V0e=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),G0e=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-
1590area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function K0e(e){const t=e.regex,r=U0e(e),n={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",a=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,n,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0}
vendor: 19,657 bytes, lines 1590-1591
1590,{className:"selector-class",begin:"\\."+o,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+W0e.join("|")+")"},{begin:":(:)?("+V0e.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+G0e.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:q0e.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+H0e.join("|")+")\\b"}]}}function Y0e(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Q0e(e){const a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:a,illegal:/["']/}]}]}}function X0e(e){const t=e.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(r,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function Z0e(e){const t=e.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},n=e.COMMENT();n.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:"literal",begin:/\bon|off|true|false|yes|no\b/},o={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},l={begin:/\[/,end:/\]/,contains:[n,a,s,o,r,"self"],relevance:0},u=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,d=/'[^']*'/,h=t.either(u,c,d),m=t.concat(h,"(\\s*\\.\\s*",h,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[n,{className:"section",begin:/\[+/,end:/\]+/},{begin:m,className:"attr",starts:{end:/$/,contains:[n,l,a,s,o,r]}}]}}var Wc="[0-9](_*[0-9])*",_f=`\\.(${Wc})`,Af="[0-9a-fA-F](_*[0-9a-fA-F])*",KT={className:"number",variants:[{begin:`(\\b(${Wc})((${_f})|\\.)?|(${_f}))[eE][+-]?(${Wc})[fFdD]?\\b`},{begin:`\\b(${Wc})((${_f})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${_f})[fFdD]?\\b`},{begin:`\\b(${Wc})[fFdD]\\b`},{begin:`\\b0[xX]((${Af})\\.?|(${Af})?\\.(${Af}))[pP][+-]?(${Wc})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Af})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function hM(e,t,r){return r===-1?"":e.replace(t,n=>hM(e,t,r-1))}function J0e(e){const t=e.regex,r="[Ã-ʸa-zA-Z_$][Ã-ʸa-zA-Z_$0-9]*",n=r+hM("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),u={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},d={className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:u,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+n+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:u,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,KT,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},KT,c]}}const YT="[A-Za-z$_][0-9A-Za-z$_]*",ehe=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],the=["true","false","null","undefined","NaN","Infinity"],mM=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],fM=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],pM=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],rhe=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],nhe=[].concat(pM,mM,fM);function she(e){const t=e.regex,r=(G,{after:Q})=>{const D="</"+G[0].slice(1);return G.input.indexOf(D,Q)!==-1},n=YT,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(G,Q)=>{const D=G[0].length+G.index,K=G.input[D];if(K==="<"||K===","){Q.ignoreMatch();return}K===">"&&(r(G,{after:D})||Q.ignoreMatch());let V;const C=G.input.substring(D);if(V=C.match(/^\s*=/)){Q.ignoreMatch();return}if((V=C.match(/^\s+extends\s+/))&&V.index===0){Q.ignoreMatch();return}}},l={$pattern:YT,keyword:ehe,literal:the,built_in:nhe,"variable.language":rhe},u="[0-9](_?[0-9])*",c=`\\.(${u})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${u})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},b=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,g,x,{match:/\$\d+/},h];m.contains=b.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(b)});const k=[].concat(y,m.contains),T=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(k)}]),S={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:T},j={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},E={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...mM,...fM]}},A={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},R={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},M={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(G){return t.concat("(?!",G.join("|"),")")}const W={match:t.concat(/\b/,B([...pM,"super","import"].map(G=>`${G}\\s*\\(`)),n,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},H={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},L={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},$="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ee={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead($)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:E},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),A,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,g,x,y,{match:/\$\d+/},h,E,{scope:"attr",match:n+t.lookahead(":"),relevance:0},ee,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:$,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},R,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[S,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},H,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},W,M,j,L,{match:/\$[(.]/}]}}function ahe(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},n=["true","false","null"],s={scope:"literal",beginKeywords:n.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:n},contains:[t,r,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Vc="[0-9](_*[0-9])*",jf=`\\.(${Vc})`,If="[0-9a-fA-F](_*[0-9a-fA-F])*",ihe={className:"number",variants:[{begin:`(\\b(${Vc})((${jf})|\\.)?|(${jf}))[eE][+-]?(${Vc})[fFdD]?\\b`},{begin:`\\b(${Vc})((${jf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${jf})[fFdD]?\\b`},{begin:`\\b(${Vc})[fFdD]\\b`},{begin:`\\b0[xX]((${If})\\.?|(${If})?\\.(${If}))[pP][+-]?(${Vc})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${If})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function ohe(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},r={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,s]}]};s.contains.push(o);const l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},u={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},c=ihe,d=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),h={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},m=h;return m.variants[1].contains=[h],h.variants[1].contains=[m],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,d,r,n,l,u,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[h,e.C_LINE_COMMENT_MODE,d],relevance:0},e.C_LINE_COMMENT_MODE,d,l,u,o,e.C_NUMBER_MODE]},d]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},l,u]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` 1591`},c]}}const lhe=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),che=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],uhe=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],dhe=[...che,...uhe],hhe=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),gM=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invali
1591d","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),xM=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),mhe=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-
1591area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),fhe=gM.concat(xM).sort().reverse();function phe(e){const t=lhe(e),r=fhe,n="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",o=[],l=[],u=function(b){return{className:"string",begin:"~?"+b+".*?"+b}},c=function(b,k,T){return{className:b,begin:k,relevance:T}},d={$pattern:/[a-z-]+/,keyword:n,attribute:hhe.join(" ")},h={begin:"\\(",end:"\\)",contains:l,keywords:d,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u("'"),u('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,h,c("variable","@@?"+s,10),c("variable","@\\{"+s+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const m=l.concat({begin:/\{/,end:/\}/,contains:o}),f={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},p={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+mhe.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},g={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?ke
1591yframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:d,returnEnd:!0,contains:l,relevance:0}},x={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:m}},w={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c("keyword","all\\b"),c("variable","@\\{"+s+"\\}"),{begin:"\\b("+dhe.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",a,0),c("selector-id","#"+a),c("selector-class","\\."+a,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+gM.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+xM.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:m},{begin:"!important"},t.FUNCTION_DISPATCH]},y={begin:s+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[w]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,x,y,p,w,f,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function ghe(e){const t="\\[=*\\[",r="\\]=*\\]",n={begin:t,end:r,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,r,{contains:[n],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:r,contains:[n],relevance:5}])}}function xhe(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},n={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,r]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,r,n,s,a,o]}}function bhe(e){const t=e.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0}
vendor: 30,132 bytes, lines 1591-1592
1591,{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,u={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(c,{contains:[]}),m=e.inherit(d,{contains:[]});c.contains.push(m),d.contains.push(h);let f=[r,u];return[c,d,h,m].forEach(w=>{w.contains=w.contains.concat(f)}),f=f.concat(c,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:f},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:f}]}]},r,a,c,d,{className:"quote",begin:"^>\\s+",contains:f,end:"$"},s,n,u,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function yhe(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},u={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+u.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:u,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function vhe(e){const t=e.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],n=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:r.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},o={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},u={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[e.BACKSLASH_ESCAPE,a,u],h=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],m=(g,x,w="\\1")=>{const y=w==="\\1"?w:t.concat(w,x);return t.concat(t.concat("(?:",g,")"),x,/(?:\\.|[^\\\/])*?/,y,/(?:\\.|[^\\\/])*?/,w,n)},f=(g,x,w)=>t.concat(t.concat("(?:",g,")"),x,/(?:\\.|[^\\\/])*?/,w,n),p=[u,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:m("s|tr|y",t.either(...h,{capture:!0}))},{begin:m("s|tr|y","\\(","\\)")},{begin:m("s|tr|y","\\[","\\]")},{begin:m("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:f("(?:m|qr)?",/\//,/\//)},{begin:f("m|qr",t.either(...h,{capture:!0}),/\1/)},{begin:f("m|qr",/\(/,/\)/)},{begin:f("m|qr",/\[/,/\]/)},{begin:f("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:p}}function whe(e){const t=e.regex,r=/(?![A-Za-z0-9])(?![$])/,n=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),a=t.concat(/[A-Z]+/,r),o={scope:"variable",match:"\\$+"+n},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},u={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),d=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(u)}),h={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(u),"on:begin":(H,L)=>{L.data._beginMatch=H[1]||H[2]},"on:end":(H,L)=>{L.data._beginMatch!==H[1]&&L.ignoreMatch()}},m=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),f=`[ 1592]`,p={scope:"string",variants:[d,c,h,m]},g={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},x=["false","null","true"],w=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],y=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],k={keyword:w,literal:(H=>{const L=[];return H.forEach($=>{L.push($),$.toLowerCase()===$?L.push($.toUpperCase()):L.push($.toLowerCase())}),L})(x),built_in:y},T=H=>H.map(L=>L.replace(/\|\d+$/,"")),S={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",T(y).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},j=t.concat(n,"\\b(?!\\()"),E={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),j],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),j],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},A={scope:"attr",match:t.concat(n,t.lookahead(":"),t.lookahead(/(?!::)/))},R={relevance:0,begin:/\(/,end:/\)/,keywords:k,contains:[A,o,E,e.C_BLOCK_COMMENT_MODE,p,g,S]},M={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",T(w).join("\\b|"),"|",T(y).join("\\b|"),"\\b)"),n,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[R]};R.contains.push(M);const B=[A,E,e.C_BLOCK_COMMENT_MODE,p,g,S],W={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:x,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:x,keyword:["new","array"]},contains:["self",...B]},...B,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:k,contains:[W,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},o,M,E,{match:[/const/,/\s/,n],scope:{1:"keyword",3:"variable.constant"}},S,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:k,contains:["self",W,o,E,e.C_BLOCK_COMMENT_MODE,p,g]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},p,g]}}function Ehe(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function khe(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Nhe(e){const t=e.regex,r=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),n=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:n,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},u={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},d={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,u],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,u,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,u,d,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},m="[0-9](_?[0-9])*",f=`(\\b(${m}))?\\.(${m})|\\b(${m})\\.`,p=`\\b|${n.join("|")}`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${m})|(${f}))[eE][+-]?(${m})[jJ]?(?=${p})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${m})[jJ](?=${p})`}]},x={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},w={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",u,g,h,e.HASH_COMMENT_MODE]}]};return c.contains=[h,g,u],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[u,g,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,x,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[w]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,w,h]}]}}function She(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function The(e){const t=e.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,n=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,n]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,n]},{scope:{1:"punctuation",2:"number"},match:[a,n]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,n]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Che(e){const t=e.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",n=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(n,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},u={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:o},h={className:"string",contains:[e.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,d]})]}]},m="[1-9](_?[0-9])*|0",f="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${m})(\\.(${f}))?([eE][+-]?(${f})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},g={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},S=[h,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:o},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:n,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[g]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:r}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(u,c),relevance:0}].concat(u,c);d.contains=S,g.contains=S;const R=[{begin:/^\s*=>/,starts:{end:"$",contains:S}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:S}}];return c.unshift(u),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(R).concat(c).concat(S)}}function _he(e){const t=e.regex,r=/(r#)?/,n=t.concat(r,e.UNDERSCORE_IDENT_RE),s=t.concat(r,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],u=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:l,literal:u,built_in:c},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+o},{begin:"\\b0o([0-7_]+)"+o},{begin:"\\b0x([A-Fa-f0-9_]+)"+o},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+o}],relevance:0},{begin:[/fn/,/\s+/,n],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,n],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,n,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:d}},{className:"punctuation",begin:"->"},a]}}const Ahe=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),jhe=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Ihe=["def
1592s","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Rhe=[...jhe,...Ihe],Dhe=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Mhe=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Ohe=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Lhe=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-
1592area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Phe(e){const t=Ahe(e),r=Ohe,n=Mhe,s="@[a-z-]+",a="and or not only",l={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0}
vendor: 1,113 bytes, line 1592
1592,{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Rhe.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+n.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Lhe.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inl
1592ine-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,l,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:Dhe.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function Fhe(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Bhe(e){const t=e.regex,r=e.COMMENT("--","$"),n={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],u=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","ver
1592sioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],m=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],f=d,p=[...c,...u].filter(T=>!d.includes(T)),g={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},x={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},w={match:t.concat(/\b/,t.either(...f),/\s*\(/),relevance:0,keywords:{built_in:f}};function y(T){return t.concat(/\b/,t.either(...T.map(S=>S.replace(/\s+/,"\\s+"))),/\b/)}const b={scope:"keyword",match:y(m),relevance:0};function k(T,{exceptions:S,when:j}={}){const E=j;return S=S||[],T.map(A=>A.match(/\|\d+$/)||S.includes(A)?A:E(A)?`${A}|0`:A)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:k(p,{when:T=>T.length<3}),literal:a,type:l,built_in:h},contains:[{scope:"type",match:y(o)},b,w,g,n,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,r,x]}}function bM(e){return e?typeof e=="string"?e:e.source:null}function c0(e){return Xt("(?=",e,")")}function Xt(...e){return e.map(r=>bM(r)).join("")}function Uhe(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Pn(...e){return"("+(Uhe(e).capture?"":"?:")+e.map(n=>bM(n)).join("|")+")"}const A5=e=>Xt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),$he=["Protocol","Type"].map(A5),QT=["init","self"].map(A5),zhe=["Any","Self"],wy=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],XT=["false","nil","true"],Hhe=["assignment","associativity","higherThan","left","lowerThan","none","right"],qhe=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],ZT=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","
vendor: 15,627 bytes, line 1592
1592withoutActuallyEscaping","zip"],yM=Pn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),vM=Pn(yM,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Ey=Xt(yM,vM,"*"),wM=Pn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Ag=Pn(wM,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Da=Xt(wM,Ag,"*"),Rf=Xt(/[A-Z]/,Ag,"*"),Whe=["attached","autoclosure",Xt(/convention\(/,Pn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Xt(/objc\(/,Da,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Vhe=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Ghe(e){const t={match:/\s+/,relevance:0},r=e.COMMENT("/\\*","\\*/",{contains:["self"]}),n=[e.C_LINE_COMMENT_MODE,r],s={match:[/\./,Pn(...$he,...QT)],className:{2:"keyword"}},a={match:Xt(/\./,Pn(...wy)),relevance:0},o=wy.filter(Ee=>typeof Ee=="string").concat(["_|0"]),l=wy.filter(Ee=>typeof Ee!="string").concat(zhe).map(A5),u={variants:[{className:"keyword",match:Pn(...l,...QT)}]},c={$pattern:Pn(/\b\w+/,/#\w+/),keyword:o.concat(qhe),literal:XT},d=[s,a,u],h={match:Xt(/\./,Pn(...ZT)),relevance:0},m={className:"built_in",match:Xt(/\b/,Pn(...ZT),/(?=\()/)},f=[h,m],p={match:/->/,relevance:0},g={className:"operator",relevance:0,variants:[{match:Ey},{match:`\\.(\\.|${vM})+`}]},x=[p,g],w="([0-9]_*)+",y="([0-9a-fA-F]_*)+",b={className:"number",relevance:0,variants:[{match:`\\b(${w})(\\.(${w}))?([eE][+-]?(${w}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${w}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},k=(Ee="")=>({className:"subst",variants:[{match:Xt(/\\/,Ee,/[0\\tnr"']/)},{match:Xt(/\\/,Ee,/u\{[0-9a-fA-F]{1,8}\}/)}]}),T=(Ee="")=>({className:"subst",match:Xt(/\\/,Ee,/[\t ]*(?:[\r\n]|\r\n)/)}),S=(Ee="")=>({className:"subst",label:"interpol",begin:Xt(/\\/,Ee,/\(/),end:/\)/}),j=(Ee="")=>({begin:Xt(Ee,/"""/),end:Xt(/"""/,Ee),contains:[k(Ee),T(Ee),S(Ee)]}),E=(Ee="")=>({begin:Xt(Ee,/"/),end:Xt(/"/,Ee),contains:[k(Ee),S(Ee)]}),A={className:"string",variants:[j(),j("#"),j("##"),j("###"),E(),E("#"),E("##"),E("###")]},R=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],M={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:R},B=Ee=>{const Ce=Xt(Ee,/\//),X=Xt(/\//,Ee);return{begin:Ce,end:X,contains:[...R,{scope:"comment",begin:`#(?!.*${X})`,end:/$/}]}},W={scope:"regexp",variants:[B("###"),B("##"),B("#"),M]},H={match:Xt(/`/,Da,/`/)},L={className:"variable",match:/\$\d+/},$={className:"variable",match:`\\$${Ag}+`},ee=[H,L,$],G={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Vhe,contains:[...x,b,A]}]}},Q={scope:"keyword",match:Xt(/@/,Pn(...Whe),c0(Pn(/\(/,/\s+/)))},D={scope:"meta",match:Xt(/@/,Da)},K=[G,Q,D],V={match:c0(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Xt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ag,"+")},{className:"type",match:Rf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Xt(/\s+&\s+/,c0(Rf)),relevance:0}]},C={begin:/</,end:/>/,keywords:c,contains:[...n,...d,...K,p,V]};V.contains.push(C);const O={match:Xt(Da,/\s*:/),keywords:"_|0",relevance:0},q={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",O,...n,W,...d,...f,...x,b,A,...ee,...K,V]},ne={begin:/</,end:/>/,keywords:"repeat each",contains:[...n,V]},he={begin:Pn(c0(Xt(Da,/\s*:/)),c0(Xt(Da,/\s+/,Da,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Da}]},xe={begin:/\(/,end:/\)/,keywords:c,contains:[he,...n,...d,...x,b,A,...K,V,q],endsParent:!0,illegal:/["']/},Oe={match:[/(func|macro)/,/\s+/,Pn(H.match,Da,Ey)],className:{1:"keyword",3:"title.function"},contains:[ne,xe,t],illegal:[/\[/,/%/]},Se={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ne,xe,t],illegal:/\[|%/},we={match:[/operator/,/\s+/,Ey],className:{1:"keyword",3:"title"}},Be={begin:[/precedencegroup/,/\s+/,Rf],className:{1:"keyword",3:"title"},contains:[V],keywords:[...Hhe,...XT],end:/}/},ve={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Ye={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ae={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Da,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[ne,...d,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:Rf},...d],relevance:0}]};for(const Ee of A.variants){const Ce=Ee.contains.find(pe=>pe.label==="interpol");Ce.keywords=c;const X=[...d,...f,...x,b,A,...ee];Ce.contains=[...X,{begin:/\(/,end:/\)/,contains:["self",...X]}]}return{name:"Swift",keywords:c,contains:[...n,Oe,Se,ve,Ye,Ae,we,Be,{beginKeywords:"import",end:/$/,contains:[...n],relevance:0},W,...d,...f,...x,b,A,...ee,...K,V,q]}}const jg="[A-Za-z$_][0-9A-Za-z$_]*",EM=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],kM=["true","false","null","undefined","NaN","Infinity"],NM=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],SM=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],TM=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],CM=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],_M=[].concat(TM,NM,SM);function Khe(e){const t=e.regex,r=(G,{after:Q})=>{const D="</"+G[0].slice(1);return G.input.indexOf(D,Q)!==-1},n=jg,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(G,Q)=>{const D=G[0].length+G.index,K=G.input[D];if(K==="<"||K===","){Q.ignoreMatch();return}K===">"&&(r(G,{after:D})||Q.ignoreMatch());let V;const C=G.input.substring(D);if(V=C.match(/^\s*=/)){Q.ignoreMatch();return}if((V=C.match(/^\s+extends\s+/))&&V.index===0){Q.ignoreMatch();return}}},l={$pattern:jg,keyword:EM,literal:kM,built_in:_M,"variable.language":CM},u="[0-9](_?[0-9])*",c=`\\.(${u})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${d})((${c})|\\.)?|(${c}))[eE][+-]?(${u})\\b`},{begin:`\\b(${d})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},f={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},b=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,g,x,{match:/\$\d+/},h];m.contains=b.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(b)});const k=[].concat(y,m.contains),T=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(k)}]),S={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:T},j={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},E={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...NM,...SM]}},A={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},R={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},M={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(G){return t.concat("(?!",G.join("|"),")")}const W={match:t.concat(/\b/,B([...TM,"super","import"].map(G=>`${G}\\s*\\(`)),n,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},H={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},L={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},$="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ee={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead($)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:E},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),A,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,p,g,x,y,{match:/\$\d+/},h,E,{scope:"attr",match:n+t.lookahead(":"),relevance:0},ee,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:$,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},R,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[S,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},H,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},W,M,j,L,{match:/\$[(.]/}]}}function Yhe(e){const t=e.regex,r=Khe(e),n=jg,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[r.exports.CLASS_REFERENCE]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},u=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:jg,keyword:EM.concat(u),literal:kM,built_in:_M.concat(s),"variable.language":CM},d={className:"meta",begin:"@"+n},h=(g,x,w)=>{const y=g.contains.findIndex(b=>b.label===x);if(y===-1)throw new Error("can not find mode to replace");g.contains.splice(y,1,w)};Object.assign(r.keywords,c),r.exports.PARAMS_CONTAINS.push(d);const m=r.contains.find(g=>g.scope==="attr"),f=Object.assign({},m,{match:t.concat(n,t.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,m,f]),r.contains=r.contains.concat([d,a,o,f]),h(r,"shebang",e.SHEBANG()),h(r,"use_strict",l);const p=r.contains.find(g=>g.label==="func.def");return p.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function Qhe(e){const t=e.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},n={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,u={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,s),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(a,s),/ +/,t.either(o,l),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},h=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),m=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step
1592stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,n,u,c,d,h,m,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[m]}]}}function Xhe(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const r=e.COMMENT(/;;/,/$/),n=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},u={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:n},contains:[r,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,o,s,e.QUOTE_STRING_MODE,u,c,l]}}function Zhe(e){const t=e.regex,r=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),n=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),u=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:n,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,u,l,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,o,u,l]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[u]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(r,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Jhe(e){const t="true false yes no null",r="[\\w#;
vendor: 20,359 bytes, lines 1592-1594
1592/?:@&=+$,.~*'()[\\]]+",n={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},l=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},f={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},p={begin:/\{/,end:/\}/,contains:[f],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]",contains:[f],illegal:"\\n",relevance:0},x=[n,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},m,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},p,g,a,o],w=[...x];return w.pop(),w.push(l),f.contains=w,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:x}}const eme={arduino:O0e,bash:L0e,c:P0e,cpp:F0e,csharp:B0e,css:K0e,diff:Y0e,go:Q0e,graphql:X0e,ini:Z0e,java:J0e,javascript:she,json:ahe,kotlin:ohe,less:phe,lua:ghe,makefile:xhe,markdown:bhe,objectivec:yhe,perl:vhe,php:whe,"php-template":Ehe,plaintext:khe,python:Nhe,"python-repl":She,r:The,ruby:Che,rust:_he,scss:Phe,shell:Fhe,sql:Bhe,swift:Ghe,typescript:Yhe,vbnet:Qhe,wasm:Xhe,xml:Zhe,yaml:Jhe};function AM(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const r=e[t],n=typeof r;(n==="object"||n==="function")&&!Object.isFrozen(r)&&AM(r)}),e}let JT=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function jM(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Co(e,...t){const r=Object.create(null);for(const n in e)r[n]=e[n];return t.forEach(function(n){for(const s in n)r[s]=n[s]}),r}const tme="</span>",e8=e=>!!e.scope,rme=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const r=e.split(".");return[`${t}${r.shift()}`,...r.map((n,s)=>`${n}${"_".repeat(s+1)}`)].join(" ")}return`${t}${e}`};class nme{constructor(t,r){this.buffer="",this.classPrefix=r.classPrefix,t.walk(this)}addText(t){this.buffer+=jM(t)}openNode(t){if(!e8(t))return;const r=rme(t.scope,{prefix:this.classPrefix});this.span(r)}closeNode(t){e8(t)&&(this.buffer+=tme)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const t8=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class j5{constructor(){this.rootNode=t8(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const r=t8({scope:t});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,r){return typeof r=="string"?t.addText(r):r.children&&(t.openNode(r),r.children.forEach(n=>this._walk(t,n)),t.closeNode(r)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(r=>typeof r=="string")?t.children=[t.children.join("")]:t.children.forEach(r=>{j5._collapse(r)}))}}class sme extends j5{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,r){const n=t.root;r&&(n.scope=`language:${r}`),this.add(n)}toHTML(){return new nme(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Rh(e){return e?typeof e=="string"?e:e.source:null}function IM(e){return xc("(?=",e,")")}function ame(e){return xc("(?:",e,")*")}function ime(e){return xc("(?:",e,")?")}function xc(...e){return e.map(r=>Rh(r)).join("")}function ome(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function I5(...e){return"("+(ome(e).capture?"":"?:")+e.map(n=>Rh(n)).join("|")+")"}function RM(e){return new RegExp(e.toString()+"|").exec("").length-1}function lme(e,t){const r=e&&e.exec(t);return r&&r.index===0}const cme=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function R5(e,{joinWith:t}){let r=0;return e.map(n=>{r+=1;const s=r;let a=Rh(n),o="";for(;a.length>0;){const l=cme.exec(a);if(!l){o+=a;break}o+=a.substring(0,l.index),a=a.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?o+="\\"+String(Number(l[1])+s):(o+=l[0],l[0]==="("&&r++)}return o}).map(n=>`(${n})`).join(t)}const ume=/\b\B/,DM="[a-zA-Z]\\w*",D5="[a-zA-Z_]\\w*",MM="\\b\\d+(\\.\\d+)?",OM="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",LM="\\b(0b[01]+)",dme="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",hme=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=xc(t,/.*\b/,e.binary,/\b.*/)),Co({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(r,n)=>{r.index!==0&&n.ignoreMatch()}},e)},Dh={begin:"\\\\[\\s\\S]",relevance:0},mme={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Dh]},fme={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Dh]},pme={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},tx=function(e,t,r={}){const n=Co({scope:"comment",begin:e,end:t,contains:[]},r);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const s=I5("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:xc(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},gme=tx("//","$"),xme=tx("/\\*","\\*/"),bme=tx("#","$"),yme={scope:"number",begin:MM,relevance:0},vme={scope:"number",begin:OM,relevance:0},wme={scope:"number",begin:LM,relevance:0},Eme={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Dh,{begin:/\[/,end:/\]/,relevance:0,contains:[Dh]}]},kme={scope:"title",begin:DM,relevance:0},Nme={scope:"title",begin:D5,relevance:0},Sme={begin:"\\.\\s*"+D5,relevance:0},Tme=function(e){return Object.assign(e,{"on:begin":(t,r)=>{r.data._beginMatch=t[1]},"on:end":(t,r)=>{r.data._beginMatch!==t[1]&&r.ignoreMatch()}})};var Df=Object.freeze({__proto__:null,APOS_STRING_MODE:mme,BACKSLASH_ESCAPE:Dh,BINARY_NUMBER_MODE:wme,BINARY_NUMBER_RE:LM,COMMENT:tx,C_BLOCK_COMMENT_MODE:xme,C_LINE_COMMENT_MODE:gme,C_NUMBER_MODE:vme,C_NUMBER_RE:OM,END_SAME_AS_BEGIN:Tme,HASH_COMMENT_MODE:bme,IDENT_RE:DM,MATCH_NOTHING_RE:ume,METHOD_GUARD:Sme,NUMBER_MODE:yme,NUMBER_RE:MM,PHRASAL_WORDS_MODE:pme,QUOTE_STRING_MODE:fme,REGEXP_MODE:Eme,RE_STARTERS_RE:dme,SHEBANG:hme,TITLE_MODE:kme,UNDERSCORE_IDENT_RE:D5,UNDERSCORE_TITLE_MODE:Nme});function Cme(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function _me(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Ame(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Cme,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function jme(e,t){Array.isArray(e.illegal)&&(e.illegal=I5(...e.illegal))}function Ime(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Rme(e,t){e.relevance===void 0&&(e.relevance=1)}const Dme=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach(n=>{delete e[n]}),e.keywords=r.keywords,e.begin=xc(r.beforeMatch,IM(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},Mme=["of","and","for","in","not","or","if","then","parent","list","value"],Ome="keyword";function PM(e,t,r=Ome){const n=Object.create(null);return typeof e=="string"?s(r,e.split(" ")):Array.isArray(e)?s(r,e):Object.keys(e).forEach(function(a){Object.assign(n,PM(e[a],t,a))}),n;function s(a,o){t&&(o=o.map(l=>l.toLowerCase())),o.forEach(function(l){const u=l.split("|");n[u[0]]=[a,Lme(u[0],u[1])]})}}function Lme(e,t){return t?Number(t):Pme(e)?0:1}function Pme(e){return Mme.includes(e.toLowerCase())}const r8={},Hl=e=>{console.error(e)},n8=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Fc=(e,t)=>{r8[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),r8[`${e}/${t}`]=!0)},Ig=new Error;function FM(e,t,{key:r}){let n=0;const s=e[r],a={},o={};for(let l=1;l<=t.length;l++)o[l+n]=s[l],a[l+n]=!0,n+=RM(t[l-1]);e[r]=o,e[r]._emit=a,e[r]._multi=!0}function Fme(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Hl("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ig;if(typeof e.beginScope!="object"||e.beginScope===null)throw Hl("beginScope must be object"),Ig;FM(e,e.begin,{key:"beginScope"}),e.begin=R5(e.begin,{joinWith:""})}}function Bme(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Hl("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ig;if(typeof e.endScope!="object"||e.endScope===null)throw Hl("endScope must be object"),Ig;FM(e,e.end,{key:"endScope"}),e.end=R5(e.end,{joinWith:""})}}function Ume(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function $me(e){Ume(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Fme(e),Bme(e)}function zme(e){function t(o,l){return new RegExp(Rh(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,l]),this.matchAt+=RM(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(u=>u[1]);this.matcherRe=t(R5(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const u=this.matcherRe.exec(l);if(!u)return null;const c=u.findIndex((h,m)=>m>0&&h!==void 0),d=this.matchIndexes[c];return u.splice(0,c),Object.assign(u,d)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const u=new r;return this.rules.slice(l).forEach(([c,d])=>u.addRule(c,d)),u.compile(),this.multiRegexes[l]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,u){this.rules.push([l,u]),u.type==="begin"&&this.count++}exec(l){const u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let c=u.exec(l);if(this.resumingScanAtSamePosition()&&!(c&&c.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,c=d.exec(l)}return c&&(this.regexIndex+=c.position+1,this.regexIndex===this.count&&this.considerAll()),c}}function s(o){const l=new n;return o.contains.forEach(u=>l.addRule(u.begin,{rule:u,type:"begin"})),o.terminatorEnd&&l.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&l.addRule(o.illegal,{type:"illegal"}),l}function a(o,l){const u=o;if(o.isCompiled)return u;[_me,Ime,$me,Dme].forEach(d=>d(o,l)),e.compilerExtensions.forEach(d=>d(o,l)),o.__beforeBegin=null,[Ame,jme,Rme].forEach(d=>d(o,l)),o.isCompiled=!0;let c=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),c=o.keywords.$pattern,delete o.keywords.$pattern),c=c||/\w+/,o.keywords&&(o.keywords=PM(o.keywords,e.case_insensitive)),u.keywordPatternRe=t(c,!0),l&&(o.begin||(o.begin=/\B|\b/),u.beginRe=t(u.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(u.endRe=t(u.end)),u.terminatorEnd=Rh(u.end)||"",o.endsWithParent&&l.terminatorEnd&&(u.terminatorEnd+=(o.end?"|":"")+l.terminatorEnd)),o.illegal&&(u.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(d){return Hme(d==="self"?o:d)})),o.contains.forEach(function(d){a(d,u)}),o.starts&&a(o.starts,l),u.matcher=s(u),u}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Co(e.classNameAliases||{}),a(e)}function BM(e){return e?e.endsWithParent||BM(e.starts):!1}function Hme(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Co(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:BM(e)?Co(e,{starts:e.starts?Co(e.starts):null}):Object.isFrozen(e)?Co(e):e}var qme="11.11.1";class Wme extends Error{constructor(t,r){super(t),this.name="HTMLInjectionError",this.html=r}}const ky=jM,s8=Co,a8=Symbol("nomatch"),Vme=7,UM=function(e){const t=Object.create(null),r=Object.create(null),n=[];let s=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:sme};function u($){return l.noHighlightRe.test($)}function c($){let ee=$.className+" ";ee+=$.parentNode?$.parentNode.className:"";const G=l.languageDetectRe.exec(ee);if(G){const Q=E(G[1]);return Q||(n8(a.replace("{}",G[1])),n8("Falling back to no-highlight mode for this block.",$)),Q?G[1]:"no-highlight"}return ee.split(/\s+/).find(Q=>u(Q)||E(Q))}function d($,ee,G){let Q="",D="";typeof ee=="object"?(Q=$,G=ee.ignoreIllegals,D=ee.language):(Fc("10.7.0","highlight(lang, code, ...args) has been deprecated."),Fc("10.7.0",`Please use highlight(code, options) instead. 1593https://github.com/highlightjs/highlight.js/issues/2277`),D=$,Q=ee),G===void 0&&(G=!0);const K={code:Q,language:D};H("before:highlight",K);const V=K.result?K.result:h(K.language,K.code,G);return V.code=K.code,H("after:highlight",V),V}function h($,ee,G,Q){const D=Object.create(null);function K(F,se){return F.keywords[se]}function V(){if(!X.keywords){_e.addText(Ne);return}let F=0;X.keywordPatternRe.lastIndex=0;let se=X.keywordPatternRe.exec(Ne),ue="";for(;se;){ue+=Ne.substring(F,se.index);const je=Ae.case_insensitive?se[0].toLowerCase():se[0],Ge=K(X,je);if(Ge){const[mt,Ft]=Ge;if(_e.addText(ue),ue="",D[je]=(D[je]||0)+1,D[je]<=Vme&&(de+=Ft),mt.startsWith("_"))ue+=se[0];else{const ur=Ae.classNameAliases[mt]||mt;q(se[0],ur)}}else ue+=se[0];F=X.keywordPatternRe.lastIndex,se=X.keywordPatternRe.exec(Ne)}ue+=Ne.substring(F),_e.addText(ue)}function C(){if(Ne==="")return;let F=null;if(typeof X.subLanguage=="string"){if(!t[X.subLanguage]){_e.addText(Ne);return}F=h(X.subLanguage,Ne,!0,pe[X.subLanguage]),pe[X.subLanguage]=F._top}else F=f(Ne,X.subLanguage.length?X.subLanguage:null);X.relevance>0&&(de+=F.relevance),_e.__addSublanguage(F._emitter,F.language)}function O(){X.subLanguage!=null?C():V(),Ne=""}function q(F,se){F!==""&&(_e.startScope(se),_e.addText(F),_e.endScope())}function ne(F,se){let ue=1;const je=se.length-1;for(;ue<=je;){if(!F._emit[ue]){ue++;continue}const Ge=Ae.classNameAliases[F[ue]]||F[ue],mt=se[ue];Ge?q(mt,Ge):(Ne=mt,V(),Ne=""),ue++}}function he(F,se){return F.scope&&typeof F.scope=="string"&&_e.openNode(Ae.classNameAliases[F.scope]||F.scope),F.beginScope&&(F.beginScope._wrap?(q(Ne,Ae.classNameAliases[F.beginScope._wrap]||F.beginScope._wrap),Ne=""):F.beginScope._multi&&(ne(F.beginScope,se),Ne="")),X=Object.create(F,{parent:{value:X}}),X}function xe(F,se,ue){let je=lme(F.endRe,ue);if(je){if(F["on:end"]){const Ge=new JT(F);F["on:end"](se,Ge),Ge.isMatchIgnored&&(je=!1)}if(je){for(;F.endsParent&&F.parent;)F=F.parent;return F}}if(F.endsWithParent)return xe(F.parent,se,ue)}function Oe(F){return X.matcher.regexIndex===0?(Ne+=F[0],1):(De=!0,0)}function Se(F){const se=F[0],ue=F.rule,je=new JT(ue),Ge=[ue.__beforeBegin,ue["on:begin"]];for(const mt of Ge)if(mt&&(mt(F,je),je.isMatchIgnored))return Oe(se);return ue.skip?Ne+=se:(ue.excludeBegin&&(Ne+=se),O(),!ue.returnBegin&&!ue.excludeBegin&&(Ne=se)),he(ue,F),ue.returnBegin?0:se.length}function we(F){const se=F[0],ue=ee.substring(F.index),je=xe(X,F,ue);if(!je)return a8;const Ge=X;X.endScope&&X.endScope._wrap?(O(),q(se,X.endScope._wrap)):X.endScope&&X.endScope._multi?(O(),ne(X.endScope,F)):Ge.skip?Ne+=se:(Ge.returnEnd||Ge.excludeEnd||(Ne+=se),O(),Ge.excludeEnd&&(Ne=se));do X.scope&&_e.closeNode(),!X.skip&&!X.subLanguage&&(de+=X.relevance),X=X.parent;while(X!==je.parent);return je.starts&&he(je.starts,F),Ge.returnEnd?0:se.length}function Be(){const F=[];for(let se=X;se!==Ae;se=se.parent)se.scope&&F.unshift(se.scope);F.forEach(se=>_e.openNode(se))}let ve={};function Ye(F,se){const ue=se&&se[0];if(Ne+=F,ue==null)return O(),0;if(ve.type==="begin"&&se.type==="end"&&ve.index===se.index&&ue===""){if(Ne+=ee.slice(se.index,se.index+1),!s){const je=new Error(`0 width match regex (${$})`);throw je.languageName=$,je.badRule=ve.rule,je}return 1}if(ve=se,se.type==="begin")return Se(se);if(se.type==="illegal"&&!G){const je=new Error('Illegal lexeme "'+ue+'" for mode "'+(X.scope||"<unnamed>")+'"');throw je.mode=X,je}else if(se.type==="end"){const je=we(se);if(je!==a8)return je}if(se.type==="illegal"&&ue==="")return Ne+=` 1594`,1;if(ie>1e5&&ie>se.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ne+=ue,ue.length}const Ae=E($);if(!Ae)throw Hl(a.replace("{}",$)),new Error('Unknown language: "'+$+'"');const Ee=zme(Ae);let Ce="",X=Q||Ee;const pe={},_e=new l.__emitter(l);Be();let Ne="",de=0,be=0,ie=0,De=!1;try{if(Ae.__emitTokens)Ae.__emitTokens(ee,_e);else{for(X.matcher.considerAll();;){ie++,De?De=!1:X.matcher.considerAll(),X.matcher.lastIndex=be;const F=X.matcher.exec(ee);if(!F)break;const se=ee.substring(be,F.index),ue=Ye(se,F);be=F.index+ue}Ye(ee.substring(be))}return _e.finalize(),Ce=_e.toHTML(),{language:$,value:Ce,relevance:de,illegal:!1,_emitter:_e,_top:X}}catch(F){if(F.message&&F.message.includes("Illegal"))return{language:$,value:ky(ee),illegal:!0,relevance:0,_illegalBy:{message:F.message,index:be,context:ee.slice(be-100,be+100),mode:F.mode,resultSoFar:Ce},_emitter:_e};if(s)return{language:$,value:ky(ee),illegal:!1,relevance:0,errorRaised:F,_emitter:_e,_top:X};throw F}}function m($){const ee={value:ky($),illegal:!1,relevance:0,_top:o,_emitter:new l.__emitter(l)};return ee._emitter.addText($),ee}function f($,ee){ee=ee||l.languages||Object.keys(t);const G=m($),Q=ee.filter(E).filter(R).map(O=>h(O,$,!1));Q.unshift(G);const D=Q.sort((O,q)=>{if(O.relevance!==q.relevance)return q.relevance-O.relevance;if(O.language&&q.language){if(E(O.language).supersetOf===q.language)return 1;if(E(q.language).supersetOf===O.language)return-1}return 0}),[K,V]=D,C=K;return C.secondBest=V,C}function p($,ee,G){const Q=ee&&r[ee]||G;$.classList.add("hljs"),$.classList.add(`language-${Q}`)}function g($){let ee=null;const G=c($);if(u(G))return;if(H("before:highlightElement",{el:$,language:G}),$.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",$);return}if($.children.length>
15940&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn($)),l.throwUnescapedHTML))throw new Wme("One of your code blocks includes unescaped HTML.",$.innerHTML);ee=$;const Q=ee.textContent,D=G?d(Q,{language:G,ignoreIllegals:!0}):f(Q);$.innerHTML=D.value,$.dataset.highlighted="yes",p($,G,D.language),$.result={language:D.language,re:D.relevance,relevance:D.relevance},D.secondBest&&($.secondBest={language:D.secondBest.language,relevance:D.secondBest.relevance}),H("after:highlightElement",{el:$,result:D,text:Q})}function x($){l=s8(l,$)}const w=()=>{k(),Fc("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){k(),Fc("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let b=!1;function k(){function $(){k()}if(document.readyState==="loading"){b||window.addEventListener("DOMContentLoaded",$,!1),b=!0;return}document.querySelectorAll(l.cssSelector).forEach(g)}function T($,ee){let G=null;try{G=ee(e)}catch(Q){if(Hl("Language definition for '{}' could not be registered.".replace("{}",$)),s)Hl(Q);else throw Q;G=o}G.name||(G.name=$),t[$]=G,G.rawDefinition=ee.bind(null,e),G.aliases&&A(G.aliases,{languageName:$})}function S($){delete t[$];for(const ee of Object.keys(r))r[ee]===$&&delete r[ee]}function j(){return Object.keys(t)}function E($){return $=($||"").toLowerCase(),t[$]||t[r[$]]}function A($,{languageName:ee}){typeof $=="string"&&($=[$]),$.forEach(G=>{r[G.toLowerCase()]=ee})}function R($){const ee=E($);return ee&&!ee.disableAutodetect}function M($){$["before:highlightBlock"]&&!$["before:highlightElement"]&&($["before:highlightElement"]=ee=>{$["before:highlightBlock"](Object.assign({block:ee.el},ee))}),$["after:highlightBlock"]&&!$["after:highlightElement"]&&($["after:highlightElement"]=ee=>{$["after:highlightBlock"](Object.assign({block:ee.el},ee))})}function B($){M($),n.push($)}function W($){const ee=n.indexOf($);ee!==-1&&n.splice(ee,1)}function H($,ee){const G=$;n.forEach(function(Q){Q[G]&&Q[G](ee)})}function L($){return Fc("10.7.0","highlightBlock will be removed entirely in v12.0"),Fc("10.7.0","Please use highlightElement now."),g($)}Object.assign(e,{highlight:d,highlightAuto:f,highlightAll:k,highlightElement:g,highlightBlock:L,configure:x,initHighlighting:w,initHighlightingOnLoad:y,registerLanguage:T,unregisterLanguage:S,listLanguages:j,getLanguage:E,registerAliases:A,autoDetection:R,inherit:s8,addPlugin:B,removePlugin:W}),e.debugMode=function(){s=!1},e.safeMode=function(){s=!0},e.versionString=qme,e.regex={concat:xc,lookahead:IM,either:I5,optional:ime,anyNumberOfTimes:ame};for(const $ in Df)typeof Df[$]=="object"&&AM(Df[$]);return Object.assign(e,Df),e},ed=UM({});ed.newInstance=()=>UM({});var Gme=ed;ed.HighlightJS=ed;ed.default=ed;const Kme=Bi(Gme),i8={},Yme="hljs-";function Qme(e){const t=Kme.newInstance();return e&&a(e),{highlight:r,highlightAuto:n,listLanguages:s,register:a,registerAlias:o,registered:l};function r(u,c,d){const h=d||i8,m=typeof h.prefix=="string"?h.prefix:Yme;if(!t.getLanguage(u))throw new Error("Unknown language: `"+u+"` is not registered");t.configure({__emitter:Xme,classPrefix:m});const f=t.highlight(c,{ignoreIllegals:!0,language:u});if(f.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:f.errorRaised});const p=f._emitter.root,g=p.data;return g.language=f.language,g.relevance=f.relevance,p}function n(u,c){const h=(c||i8).subset||s();let m=-1,f=0,p;for(;++m<h.length;){const g=h[m];if(!t.getLanguage(g))continue;const x=r(g,u,c);x.data&&x.data.relevance!==void 0&&x.data.relevance>f&&(f=x.data.relevance,p=x)}return p||{type:"root",children:[],data:{language:void 0,relevance:f}}}function s(){return t.listLanguages()}function a(u,c){if(typeof u=="string")t.registerLanguage(u,c);else{let d;for(d in u)Object.hasOwn(u,d)&&t.registerLanguage(d,u[d])}}function o(u,c){if(typeof u=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:u});else{let d;for(d in u)if(Object.hasOwn(u,d)){const h=u[d];t.registerAliases(typeof h=="string"?h:[...h],{languageName:d})}}}function l(u){return!!t.getLanguage(u)}}class Xme{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const r=this.stack[this.stack.length-1],n=r.children[r.children.length-1];n&&n.type==="text"?n.value+=t:r.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,r){const n=this.stack[this.stack.length-1],s=t.root.children;r?n.children.push({type:"element",tagName:"span",properties:{className:[r]},children:s}):n.children.push(...s)}openNode(t){const r=this,n=t.split(".").map(function(o,l){return l?o+"_".repeat(l):r.options.classPrefix+o}),s=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:n},children:[]};s.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const Zme={};function Jme(e){const t=e||Zme,r=t.aliases,n=t.detect||!1,s=t.languages||eme,a=t.plainText,o=t.prefix,l=t.subset;let u="hljs";const c=Qme(s);if(r&&c.registerAlias(r),o){const d=o.indexOf("-");u=d===-1?o:o.slice(0,d)}return function(d,h){pc(d,"element",function(m,f,p){if(m.tagName!=="code"||!p||p.type!=="element"||p.tagName!=="pre")return;const g=efe(m);if(g===!1||!g&&!n||g&&a&&a.includes(g))return;Array.isArray(m.properties.className)||(m.properties.className=[]),m.properties.className.includes(u)||m.properties.className.unshift(u);const x=lM(m,{whitespace:"pre"});let w;try{w=g?c.highlight(g,x,{prefix:o}):c.highlightAuto(x,{prefix:o,subset:l})}catch(y){const b=y;if(g&&/Unknown language/.test(b.message)){h.message("Cannot highlight as `"+g+"`, itâs not registered",{ancestors:[p,m],cause:b,place:m.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw b}!g&&w.data&&w.data.language&&m.properties.className.push("language-"+w.data.language),w.children.length>
vendor: 7,371 bytes, lines 1594-1595
15940&&(m.children=w.children)})}}function efe(e){const t=e.properties.className;let r=-1;if(!Array.isArray(t))return;let n;for(;++r<t.length;){const s=String(t[r]);if(s==="no-highlight"||s==="nohighlight")return!1;!n&&s.slice(0,5)==="lang-"&&(n=s.slice(5)),!n&&s.slice(0,9)==="language-"&&(n=s.slice(9))}return n}const o8=/[#.]/g;function tfe(e,t){const r=e||"",n={};let s=0,a,o;for(;s<r.length;){o8.lastIndex=s;const l=o8.exec(r),u=r.slice(s,l?l.index:r.length);u&&(a?a==="#"?n.id=u:Array.isArray(n.className)?n.className.push(u):n.className=[u]:o=u,s+=u.length),l&&(a=l[0],s++)}return{type:"element",tagName:o||t||"div",properties:n,children:[]}}function $M(e,t,r){const n=r?afe(r):void 0;function s(a,o,...l){let u;if(a==null){u={type:"root",children:[]};const c=o;l.unshift(c)}else{u=tfe(a,t);const c=u.tagName.toLowerCase(),d=n?n.get(c):void 0;if(u.tagName=d||c,rfe(o))l.unshift(o);else for(const[h,m]of Object.entries(o))nfe(e,u.properties,h,m)}for(const c of l)p4(u.children,c);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return s}function rfe(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const s=t[n];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const o of a)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function nfe(e,t,r,n){const s=L1(e,r);let a;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;a=n}else typeof n=="boolean"?a=n:typeof n=="string"?s.spaceSeparated?a=hS(n):s.commaSeparated?a=oS(n):s.commaOrSpaceSeparated?a=hS(oS(n).join(" ")):a=l8(s,s.property,n):Array.isArray(n)?a=[...n]:a=s.property==="style"?sfe(n):String(n);if(Array.isArray(a)){const o=[];for(const l of a)o.push(l8(s,s.property,l));a=o}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function p4(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)p4(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?p4(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function l8(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||Th(r)===Th(t)))return!0}return r}function sfe(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function afe(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const ife=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],zM=$M(om,"div"),HM=$M(ol,"g",ife),Ga={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ofe(e,t){return qM(e,{})||{type:"root",children:[]}}function qM(e,t){const r=lfe(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function lfe(e,t){switch(e.nodeType){case 1:return hfe(e,t);case 3:return ufe(e);case 8:return dfe(e);case 9:return c8(e,t);case 10:return cfe();case 11:return c8(e,t);default:return}}function c8(e,t){return{type:"root",children:WM(e,t)}}function cfe(){return{type:"doctype"}}function ufe(e){return{type:"text",value:e.nodeValue||""}}function dfe(e){return{type:"comment",value:e.nodeValue||""}}function hfe(e,t){const r=e.namespaceURI,n=r===Ga.svg?HM:zM,s=r===Ga.html?e.tagName.toLowerCase():e.tagName,a=r===Ga.html&&s==="template"?e.content:e,o=e.getAttributeNames(),l={};let u=-1;for(;++u<o.length;)l[o[u]]=e.getAttribute(o[u])||"";return n(s,l,WM(a,t))}function WM(e,t){const r=e.childNodes,n=[];let s=-1;for(;++s<r.length;){const a=qM(r[s],t);a!==void 0&&n.push(a)}return n}new DOMParser;function mfe(e,t){const r=ffe(e);return ofe(r)}function ffe(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const pfe={},gfe=[];function xfe(e){const t=e||pfe;return function(r,n){z1(r,"element",function(s,a){const o=Array.isArray(s.properties.className)?s.properties.className:gfe,l=o.includes("language-math"),u=o.includes("math-display"),c=o.includes("math-inline");let d=u;if(!l&&!u&&!c)return;let h=a[a.length-1],m=s;if(s.tagName==="code"&&l&&h&&h.type==="element"&&h.tagName==="pre"&&(m=h,h=a[a.length-2],d=!0),!h)return;const f=lM(m,{whitespace:"pre"});let p;try{p=PT.renderToString(f,{...t,displayMode:d,throwOnError:!0})}catch(x){const w=x,y=w.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...a,s],cause:w,place:s.position,ruleId:y,source:"rehype-katex"});try{p=PT.renderToString(f,{...t,displayMode:d,strict:"ignore",throwOnError:!1})}catch{p=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(x)},children:[{type:"text",value:f}]}]}}typeof p=="string"&&(p=mfe(p).children);const g=h.children.indexOf(m);return h.children.splice(g,1,...p),B0})}}function bfe(e){const t=String(e),r=[];return{toOffset:s,toPoint:n};function n(a){if(typeof a=="number"&&a>-1&&a<=t.length){let o=0;for(;;){let l=r[o];if(l===void 0){const u=u8(t,r[o-1]);l=u===-1?t.length+1:u+1,r[o]=l}if(l>a)return{line:o+1,column:a-(o>0?r[o-1]:0)+1,offset:a};o++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;r.length<a.line;){const l=r[r.length-1],u=u8(t,l),c=u===-1?t.length+1:u+1;if(l===c)break;r.push(c)}const o=(a.line>1?r[a.line-2]:0)+a.column-1;if(o<r[a.line-1])return o}}}function u8(e,t){const r=e.indexOf("\r",t),n=e.indexOf(` 1595`,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}const VM={}.hasOwnProperty,yfe=Object.prototype;function vfe(e,t){const r=t||{};return M5({file:r.file||void 0,location:!1,schema:r.space==="svg"?ol:om,verbose:r.verbose||!1},e)}function M5(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},yp(e,n,r),r}case"#document":case"#document-fragment":{const n=t,s="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:GM(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),o=bfe(a),l=o.toPoint(0),u=o.toPoint(a.length);r.position={start:l,end:u}}return r}case"#documentType":{const n=t;return r={type:"doctype"},yp(e,n,r),r}case"#text":{const n=t;return r={type:"text",value:n.value},yp(e,n,r),r}default:return r=wfe(e,t),r}}function GM(e,t){let r=-1;const n=[];for(;++r<t.length;){const s=M5(e,t[r]);n.push(s)}return n}function wfe(e,t){const r=e.schema;e.schema=t.namespaceURI===Ga.svg?ol:om;let n=-1;const s={};for(;++n<t.attrs.length;){const l=t.attrs[n],u=(l.prefix?l.prefix+":":"")+l.name;VM.call(yfe,u)||(s[u]=l.value)}
vendor: 12,191 bytes, line 1595
1595const o=(e.schema.space==="svg"?HM:zM)(t.tagName,s,GM(e,t.childNodes));if(yp(e,t,o),o.tagName==="template"){const l=t,u=l.sourceCodeLocation,c=u&&u.startTag&&ou(u.startTag),d=u&&u.endTag&&ou(u.endTag),h=M5(e,l.content);c&&d&&e.file&&(h.position={start:c.end,end:d.start}),o.content=h}return e.schema=r,o}function yp(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=Efe(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function Efe(e,t,r){const n=ou(r);if(t.type==="element"){const s=t.children[t.children.length-1];if(n&&!r.endTag&&s&&s.position&&s.position.end&&(n.end=Object.assign({},s.position.end)),e.verbose){const a={};let o;if(r.attrs)for(o in r.attrs)VM.call(r.attrs,o)&&(a[L1(e.schema,o).property]=ou(r.attrs[o]));r.startTag;const l=ou(r.startTag),u=r.endTag?ou(r.endTag):void 0,c={opening:l};u&&(c.closing=u),c.properties=a,t.data={position:c}}}return n}function ou(e){const t=d8({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=d8({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function d8(e){return e.line&&e.column?e:void 0}const kfe={},Nfe={}.hasOwnProperty,KM=$R("type",{handlers:{root:Tfe,element:Ife,text:Afe,comment:jfe,doctype:_fe}});function Sfe(e,t){const n=(t||kfe).space;return KM(e,n==="svg"?ol:om)}function Tfe(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=O5(e.children,r,t),vd(e,r),r}function Cfe(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=O5(e.children,r,t),vd(e,r),r}function _fe(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return vd(e,t),t}function Afe(e){const t={nodeName:"#text",value:e.value,parentNode:null};return vd(e,t),t}function jfe(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return vd(e,t),t}function Ife(e,t){const r=t;let n=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=ol);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&Nfe.call(e.properties,a)){const u=Rfe(n,a,e.properties[a]);u&&s.push(u)}}const o=n.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Ga[o],childNodes:[],parentNode:null};return l.childNodes=O5(e.children,l,n),vd(e,l),e.tagName==="template"&&e.content&&(l.content=Cfe(e.content,n)),l}function Rfe(e,t,r){const n=L1(e,t);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?tR(r):cR(r));const s={name:n.attribute,value:r===!0?"":String(r)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=n.attribute.slice(0,a)),s.namespace=Ga[n.space]}return s}function O5(e,t,r){let n=-1;const s=[];if(e)for(;++n<e.length;){const a=KM(e[n],r);a.parentNode=t,s.push(a)}return s}function vd(e,t){const r=e.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}const Dfe=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Mfe=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),dr="�";var Y;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(Y||(Y={}));const es={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function YM(e){return e>=55296&&e<=57343}function Ofe(e){return e>=56320&&e<=57343}function Lfe(e,t){return(e-55296)*1024+9216+t}function QM(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function XM(e){return e>=64976&&e<=65007||Mfe.has(e)}var ye;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ye||(ye={}));const Pfe=65536;class Ffe{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Pfe,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,r){const{line:n,col:s,offset:a}=this,o=s+r,l=a+r;return{code:t,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const r=this.html.charCodeAt(this.pos+1);if(Ofe(r))return this.pos++,this._addGap(),Lfe(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Y.EOF;return this._err(ye.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){const r=this.pos+t;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Y.EOF;const n=this.html.charCodeAt(r);return n===Y.CARRIAGE_RETURN?Y.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Y.EOF;let t=this.html.charCodeAt(this.pos);return t===Y.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,Y.LINE_FEED):t===Y.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,YM(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===Y.LINE_FEED||t===Y.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){QM(t)?this._err(ye.controlCharacterInInputStream):XM(t)&&this._err(ye.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var jt;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(jt||(jt={}));function ZM(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}const Bfe=new Uint16Array('
vendor: 16,129 bytes, line 1595
1595áµ<ÃıÊÒÕ»×ÙµÛÞ¢ßà à©àªà¶¡à¹à¼à¼¦áá¨á¡ááááá¥\0\0\0\0\0\0á«áá¦á°á·á½¾â â°âââ»ââ ¤â¤â´â¹â¿ããºã¹ã¬ã£¾ã¨¨ã©±ã« 㬮à EMabcfglmnoprstu\\bfms�¦³¹ÃÃligè»ÃäPè»&ä¦cuteè»Ãäreve;äÄiyx}rcè»Ãä;är;ìðraveè»Ãäpha;äacr;äd;æ©Ägp¡on;äf;ìð¸plyFunction;æ¡ingè»Ã
ä
Äcs¾Ãr;ìðign;æildeè»Ãämlè»ÃäÐaceforsuåûþÄÄĢħĪÄcrêòkslash;æÅ¶Ã¶Ã¸;æ«§ed;æy;äÆcrtÄ
ÄÄause;æµnoullis;æ¬a;är;ìð
pf;ìð¹eve;äcòÄmpeq;æÜHOacdefhilorsuÅÅÅÆÆÆ¢ÆµÆ·ÆºÇÈɳɸɾcy;ä§PYè»Â©ä©ÆcpyÅŢźute;äÄ;iŧŨætalDifferentialD;æ
leys;æÈaeioÆÆÆÆron;ädilè»Ãärc;änint;æ°ot;äÄdnƧÆilla;ä¸terDot;ä·Ã²Å¿i;ä§rcleÈDMPTÇÇÇÇot;æinus;ælus;æimes;æoÄcsǢǸkwiseContourIntegral;æ²eCurlyÄDQÈÈoubleQuote;æuote;æÈlnpuÈȨÉÉonÄ;eȥȦæ·;æ©´ÆgitȯȶȺruent;æ¡nt;æ¯ourIntegral;æ®ÄfrÉÉ;æoduct;ænterClockwiseContourIntegral;æ³oss;樯cr;ìðpÄ;CÊÊ
æap;æÖDJSZacefiosÊ Ê¬Ê°Ê´Ê¸ËËˡ˦̳ÒÄ;oŹʥtrahd;æ¤cy;äcy;ä
cy;äÆgrsÊ¿ËËger;æ¡r;æ¡hv;櫤ÄayËËron;ä;älÄ;tËËæa;är;ìðÄaf˫̧Äcm˰̢riticalÈADGTÌÌÌÌcute;ä´oÅ´ÌÌ;äbleAcute;ärave;ä ilde;äond;æferentialD;æ
Ѱ̽\0\0\0ÍÍ\0Ð
f;ìð»Æ;DEÍÍÍä¨ot;æqual;æbleÌCDLRUVͣͲÎÏϢϸontourIntegraìȹoɴ͹\0\0ͻ»ÍnArrow;æÄeoÎΤftÆARTÎÎΡrrow;æightArrow;æeÃ¥ËngÄLRΫÏeftÄARγιrrow;æ¸ightArrow;æºightArrow;æ¹ightÄATÏÏrrow;æee;æ¨pÉÏ©\0\0ϯrrow;æownArrow;æerticalBar;æ¥nÌABLRTaÐЪаÑѿͼrrowÆ;BUÐÐТæar;æ¤pArrow;æµreve;äeftËк\0Ñ\0ÑightVector;æ¥eeVector;æ¥ectorÄ;BÑÑæ½ar;æ¥ightÇѧ\0ѱeeVector;æ¥ectorÄ;BѺѻæar;æ¥eeÄ;AÒÒæ¤rrow;æ§ÄctÒÒr;ìðrok;äà NTacdfglmopqstuxÒ½ÓÓÓÓÓ¢Ó§Ó®ÓµÔ¡Ô¯Ô¶ÕÕÕ Õ¥G;ä
Hè»Ãäcuteè»ÃäÆaiyÓÓÓron;ärcè»Ãä;äot;är;ìðraveè»Ãäement;æÄapÓºÓ¾cr;ätyÉÔ\0\0ÔmallSquare;æ»erySmallSquare;æ«ÄgpÔ¦Ôªon;äf;ìð¼silon;äuÄaiÔ¼ÕlÄ;TÕÕæ©µilde;ælibrium;æÄciÕÕr;æ°m;橳a;ämlè»ÃäÄipÕªÕ¯sts;æonentialE;æ
ÊcfiosÖ
ÖÖÖ²×y;ä¤r;ìðlledÉÖ\0\0Ö£mallSquare;æ¼erySmallSquare;æªÍ°Öº\0Ö¿\0\0×f;ìð½All;æriertrf;æ±cÃ²×ØJTabcdfgorst×¨×¬×¯×ºØØØØØØ£Ù¬Ù²cy;äè»>ä¾mmaÄ;d׷׸ä;äreve;äÆeiyØØØdil;ä¢rc;ä;äot;ä r;ìð;æpf;ìð¾eaterÌEFGLSTصÙÙÙÙÙ¦qualÄ;Lؾؿæ¥ess;æullEqual;æ§reater;檢ess;æ·lantEqual;橾ilde;æ³cr;ìð¢;æ«ÐAacfiosuÚ
ÚÚÚÚÚªÚ¾ÛRDcy;äªÄctÚÚek;ä;äirc;ä¤r;ælbertSpace;æÇ°Ú¯\0Ú²f;æizontalLine;æÄctÛÛ
òکrok;ä¦mpÅÛÛownHumðįqual;æÜEJOacdfgmnostuÛºÛ¾ÜÜÜÜÜܡܨÝݸÞÞÞcy;älig;ä²cy;äcuteè»ÃäÄiyÜÜrcè»Ãä;äot;ä°r;æraveè»ÃäÆ;apÜ Ü¯Ü¿ÄcgÜ´Ü·r;äªinaryI;æ
lieóÏÇ´Ý\0Ý¢Ä;eÝÝæ¬ÄgrÝÝral;æ«section;æisibleÄCTݬݲomma;æ£imes;æ¢ÆgptÝ¿ÞÞon;ä®f;ìða;äcr;æilde;ä¨Ç«Þ\0Þcy;älè»ÃäÊcfosuÞ¬Þ·Þ¼ßßÄiyÞ±Þµrc;ä´;är;ìðpf;ìðÇ£ß\0ßr;ìð¥rcy;äkcy;äÎHJacfosߤߨ߽߬߱à à cy;ä¥cy;äppa;äÄeyß¶ß»dil;ä¶;är;ìðpf;ìðcr;ìð¦ÖJTaceflmostà ¥à ©à ¬à¡à¡£à¦³à¦¸à§à§à¨·à©cy;äè»<ä¼Êcmnprà ·à ¼à¡à¡à¡ute;ä¹bda;äg;æªlacetrf;ær;æÆaeyà¡à¡à¡¡ron;ä½dil;ä»;äÄfsࡨ॰tÔACDFRTUVarࡾࢩࢱࣦ࣠ࣼयà¥Î४Änrà¢à¢gleBracket;æ¨rowÆ;BRà¢à¢à¢æar;æ¤ightArrow;æeiling;æoǵࢷ\0à£bleBracket;æ¦nÇà£\0à£eeVector;楡ectorÄ;Bà£à£æar;æ¥loor;æightÄAV࣯ࣵrrow;æector;æ¥Äerà¤à¤eÆ;AVà¤à¤à¤æ£rrow;æ¤ector;æ¥iangleÆ;BEतथऩæ²ar;æ§qual;æ´pÆDTVषà¥à¥ownVector;æ¥eeVector;æ¥ ectorÄ;Bà¥à¥æ¿ar;æ¥ectorÄ;B॥०æ¼ar;æ¥ightáÎsÌEFGLSTॾà¦à¦à¦à¦¢à¦qualGreater;æullEqual;æ¦reater;æ¶ess;檡lantEqual;橽ilde;æ²r;ìðÄ;eঽাæftarrow;æidot;ä¿Ænpwà§à¨à¨gÈLRlrà§à§·à¨à¨eftÄAR০৬rrow;æµightArrow;æ·ightArrow;æ¶eftÄarγà¨ightáοightáÏf;ìðerÄLRਢਬeftArrow;æightArrow;æÆchtਾà©à©Ã²à¡;æ°rok;ä
;æªÐacefiosuà©à©à© ੷੼àª
àªàªp;æ¤
y;äÄdl੥੯iumSpace;ælintrf;æ³r;ìðnusPlus;æpf;ìðcò੶;äÒJacefostuણધàªà«à¬à¬à¶à¶à¶cy;äcute;ä
Æaey઴હાron;ä
dil;ä
;äÆgswà«à«°à¬ativeÆMTVà«à«à«¨ediumSpace;æhiÄcn૦à«Ã«à«eryThiîà«tedÄGL૸à¬reaterGreateòٳessLesóà©Line;är;ìðÈBnptଢନଷ଺reak;æ BreakingSpace;ä f;æÚ;CDEGHLNPRSTVàààªà¼à®¡à¯«à°à±à²à²¦à³àµ¡à¶
櫬Äouàà¤ngruent;æ¢pCap;æoubleVerticalBar;æ¦Ælqxà®à®à®ement;æualÄ;Tà®à®æ ilde;ìâ̸ists;æreaterÎ;EFGLSTஶஷ஽à¯à¯à¯à¯¥æ¯qual;æ±ullEqual;ìâ§Ì¸reater;ìâ«Ì¸ess;æ¹lantEqual;ì⩾̸ilde;æµumpÅ௲௽ownHump;ìâ̸qual;ìâ̸eÄfsà°à°§tTriangleÆ;BEà°à°à°¡æªar;ìâ§Ì¸qual;æ¬sÌ;EGLSTవశ఼à±à±à±æ®qual;æ°reater;æ¸ess;ìâªÌ¸lantEqual;ì⩽̸ilde;æ´estedÄGL౨౹reaterGreater;ì⪢̸essLess;ì⪡̸recedesÆ;ESà²à²à²æqual;ì⪯̸lantEqual;æ ÄeiಫಹverseElement;æghtTriangleÆ;BEà³à³à³æ«ar;ìâ§Ì¸qual;æÄquà³à´uareSuÄbp೨೹setÄ;Eà³°à³³ìâ̸qual;æ¢ersetÄ;Eà´à´ìâ̸qual;æ£Æbcpà´à´¤àµsetÄ;Eà´à´ìââqual;æceedsÈ;ESTà´²à´³à´»àµæqual;ì⪰̸lantEqual;æ¡ilde;ìâ¿Ì¸ersetÄ;Eàµàµìââqual;æildeÈ;EFT൮൯൵ൿæqual;æullEqual;æilde;æerticalBar;æ¤cr;ìð©ildeè»Ãä;äÜEacdfgmoprstuvà¶½à·à·à·à·à· à·§à·¼à¸à¸ ยา฿à¹lig;ä
cuteè»ÃäÄiyà·à·rcè»Ãä;äblac;ä
r;ìðraveè»ÃäÆaei෮ෲ෶cr;ä
ga;ä©cron;äpf;ìðenCurlyÄDQà¸à¸oubleQuote;æuote;æ;æ©Äclวฬr;ìðªashè»ÃäiŬื฼deè»Ãäes;樷mlè»ÃäerÄBPà¹à¹ Äarà¹à¹r;æ¾acÄekà¹à¹;æet;æ´arenthesis;æÒacfhilors๿àºàºàºàºàºàºàº°à»¼rtialD;æy;är;ìði;ä¦;ä usMinus;ä±ÄipຢàºncareplanÃ¥Úf;æÈ;eio຺ູ໠໤檻cedesÈ;ESTà»à»à»à»æºqual;檯lantEqual;æ¼ilde;æ¾me;æ³Ädp໩໮uct;æortionÄ;aȥ໹l;æÄcià¼à¼r;ìð«;ä¨ÈUfosà¼à¼à¼à¼OTè»"ä¢r;ìðpf;æcr;ìð¬ØBEacefhiorsu༾à½à½à½ ཱིྦྷྪà¾áá©á´á¾arr;æ¤Gè»Â®ä®Æcnrà½à½à½ute;ä
g;æ«rÄ;tà½à½æ l;æ¤Æaeyཧཬཱron;ä
dil;ä
;ä Ä;vླྀཹæerseÄEUà¾à¾Älqà¾à¾ement;æuilibrium;æpEquilibrium;楯r»ཹo;ä¡ghtÐACDFTUVaà¿à¿«à¿³á¢á¨ááÏÄnrà¿à¿gleBracket;æ©rowÆ;BLà¿à¿à¿¡æar;æ¥eftArrow;æeiling;æoǵ࿹\0á
bleBracket;æ§nÇá\0áeeVector;æ¥ectorÄ;Bááæar;æ¥loor;æÄerááeÆ;AVáµá¶á¼æ¢rrow;æ¦ector;æ¥iangleÆ;BEáááæ³ar;æ§qual;æµpÆDTVá£á®á¸ownVector;æ¥eeVector;æ¥ectorÄ;Bááæ¾ar;æ¥ectorÄ;Bááæar;æ¥Äpuááf;ændImplies;楰ightarrow;æÄchá¹á¼r;æ;æ±leDelayed;æ§´ÚHOacfhimoqstuá¤á±á·á½ááá
á
á
¡á
§áµá»á¿ÄCcá©á®Hcy;ä©y;ä¨FTcy;ä¬cute;ä
Ê;aeiyáááááæª¼ron;ä
dil;ä
rc;ä
;ä¡r;ìðortÈDLRUáªá´á¾á
ownArrow»ÐeftArrow»à¢ightArrow»à¿pArrow;ægma;ä£allCircle;æpf;ìðɲá
\0\0á
°t;æareÈ;ISUá
ȇ
¼áá¯æ¡ntersection;æuÄbpáásetÄ;Eááæqual;æersetÄ;Eá¨á©æqual;ænion;æcr;ìð®ar;æÈbcmpááááÄ;sááæetÄ;Eááqual;æÄchá á
eedsÈ;ESTáá®á´á¿æ»qual;檰lantEqual;æ½ilde;æ¿Tháà¾;æÆ;esááá£ærsetÄ;Eááæqual;æet»áÖHRSacfhiorsá¾ááááá±á¶ááááORNè»ÃäADE;æ¢ÄHcáácy;äy;ä¦Äbuáá;ä;䤯aeyá¥áªá¯ron;ä
¤dil;ä
¢;ä¢r;ìðÄeiá»áDzá\0áefore;æ´a;äÄcnáákSpace;ìââSpace;ældeÈ;EFTá«á¬á²á¼æ¼qual;æullEqual;æ
ilde;æpf;ìðipleDot;æÄctáár;ìð¯rok;ä
¦à«¡á·ááá¦\0á¬á±\0\0\0\0\0á¸á½á·á
\0á¿áááÄcrá»áuteè»ÃärÄ;oááæcir;æ¥rÇ£á\0áy;äve;ä
¬Äiyáá£rcè»Ãä;ä£blac;ä
°r;ìðraveè»Ãäacr;ä
ªÄdiáá©erÄBPááÄaráár;äacÄekáá;æet;æµarenthesis;æonÄ;Pá°á±ælus;æÄgpá»á¿on;ä
²f;ìðÐADETadpsáá®á¸áϨááá³rrowÆ;BDá
á á¤ar;æ¤ownArrow;æ
ownArrow;æquilibrium;楮eeÄ;Aááæ¥rrow;æ¥ownáϳerÄLRáá¨eftArrow;æightArrow;æiÄ;lá¹áºäon;ä¥ing;ä
®cr;ìð°ilde;ä
¨mlè»ÃäÒDbcdefosvá§á¬á°á³á¾á
áááash;æ«ar;æ««y;äashÄ;lá»á¼æ©;櫦Äeráá
;æÆbtyáááºar;æÄ;iáácalÈBLSTá¡á¥áªá´ar;æ£ine;ä¼eparator;æilde;æThinSpace;ær;ìðpf;ìðcr;ìð±dash;æªÊcefosá§á¬á±á¶á¼irc;ä
´dge;ær;ìðpf;ìðcr;ìð²Èfiosáááár;ìð;äpf;ìðcr;ìð³ÒAIUacfosuá±áµá¹á½ááááá cy;ä¯cy;äcy;ä®cuteè»ÃäÄiyáárc;ä
¶;ä«r;ìðpf;ìðcr;ìð´ml;ä
¸ÐHacdefosáµá¹á¿áááá á¤cy;äcute;ä
¹Äayááron;ä
½;äot;ä
»Ç²á\0áoWidtèà«a;är;æ¨pf;æ¤cr;ìðµà¯¡ááá\0á°á¶á¿\0\0\0\0ááá«áá\0ááá²á¹\0á¾cuteè»Ã¡ä¡reve;äÌ;Ediuyááá¡á£á¨áæ¾;ìâ¾Ì³;æ¿rcè»Ã¢ä¢teè»Â´Ì;ä°ligè»Ã¦ä¦Ä;r²áº;ìðraveè»Ã ä ÄepááÄfpáásym;æµÃ¨áha;ä±ÄapácÄclá¤á§r;äg;樿ɤá°\0\0áÊ;adsváºá»á¿ááæ§nd;æ©;æ©lope;æ©;æ©Î;elmrszááááá¿ááæ ;榤e»ásdÄ;aá¥á¦æ¡Ñ¡á°á²á´á¶á¸áºá¼á¾;榨;榩;榪;榫;榬;æ¦;榮;榯tÄ;vá
áæbÄ;dááæ¾;æ¦Äptááh;æ¢Â»Â¹arr;æ¼Ägpá£á§on;ä
f;ìðÎ;Eaeiopáá»á½áááá;æ©°cir;橯;æd;æs;ä§roxÄ;eááñáingè»Ã¥ä¥Æctyá¡á¦á¨r;ìð¶;äªmpÄ;eáá¯Ã±Êildeè»Ã£ä£mlè»Ã¤ä¤Äciááoninôɲnt;æ¨à Nabcdefiklnoprsuáá±á°á¼ááá¸á½á á¦á ¹á¡á᤽á¥á¥°ot;æ«Äcrá¶ákÈcepsáá
ááong;æpsilon;ä¶rime;æµimÄ;eááæ½q;æÅ¶á¢á¦ee;æ½edÄ;gá¬áæ
e»árkÄ;táá·brk;æ¶Äoyáá;ä±quo;æÊcmprtááá¡á¤á¨ausÄ;eÄÄptyv;榰séánoÃµÄÆahwá¯á±á³;ä²;æ¶een;æ¬r;ìðgÎcostuvwááá³ááááÆaiuáááÃ°Ý rc;æ¯pÂ»á±Ædptá¤á¨áot;æ¨lus;æ¨imes;æ¨É±á¹\0\0á¾cup;æ¨ar;æ
riangleÄduááown;æ½p;æ³plus;æ¨eÃ¥áÃ¥áarow;æ¤Æakoáá ¦á µÄcná²á £kÆlstáºÖ«á ozenge;æ§«riangleÈ;dlrá á á á æ´own;æ¾eft;æight;æ¸k;æ£Æ±á «\0á ³Æ²á ¯\0á ±;æ;æ4;æck;æÄeoá ¾á¡Ä;qá¡á¡ì=â¥uiv;ìâ¡â¥t;æÈptwxá¡á¡á¡§á¡¬f;ìðÄ;táá¡£om»átie;æØDHUVbdhmptuvá¢
á¢á¢ªá¢»á£á£á£¬á£¿á¤
á¤á¤á¤¡ÈLRlrá¢á¢á¢á¢;æ;æ;æ;æÊ;DUduᢡᢢᢤᢦᢨæ;æ¦;æ©;æ¤;æ§ÈLRlrᢳᢵᢷᢹ;æ;æ;æ;æÎ;HLRhlrá£á£á£á£á£á£á£æ;æ¬;æ£;æ ;æ«;æ¢;æox;æ§ÈLRlrᣤᣦᣨᣪ;æ;æ;æ;æÊ;DUduڽ᣷᣹᣻᣽;æ¥;æ¨;æ¬;æ´inus;ælus;æimes;æ ÈLRlrá¤á¤á¤á¤;æ;æ;æ;æÎ;HLRhlrᤰᤱᤳᤵᤷ᤻᤹æ;æª;æ¡;æ;æ¼;æ¤;æÄevÄ£á¥barè»Â¦ä¦Èceioá¥á¥á¥á¥ r;ìð·mi;æmÄ;eáálÆ;bhᥨᥩᥫä;æ§
sub;æÅ¬á¥´á¥¾lÄ;e᥹᥺æ¢t»᥺pÆ;Eeįá¦
á¦;檮Ä;qÛÛೡᦧ\0᧨á¨á¨á¨²\0ᨷá©\0\0᪴\0\0á«\0\0ᬡᬮáá\0᯽\0á°Æcprá¦á¦²á§ute;äÌ;abcdsᦿá§á§á§á§á§æ©nd;æ©rcup;æ©Äauá§á§p;æ©p;æ©ot;æ©;ìâ©ï¸Äeo᧢᧥t;æÃ®ÚÈaeiuá§°á§»á¨á¨
ǰ᧵\0᧸s;æ©on;ädilè»Ã§ä§rc;äpsÄ;sá¨á¨æ©m;æ©ot;äÆdmná¨á¨ ᨦilè»Â¸Æptyv;榲tè¢;eá¨á¨®ä¢räƲr;ìð Æceiᨽá©á©y;äckÄ;má©á©æark»á©;ärÎ;Ecefmsá©á© ᩢᩫ᪤᪪᪮æ;æ§Æ;elᩩᩪá©äq;æeɡᩴ\0\0áªrrowÄlr᩼áªeft;æºight;æ»ÊRSacdáªáªáªáªáªÂ»à½;æst;æirc;æash;ænint;æ¨id;櫯cir;æ§ubsÄ;u᪻᪼æ£it»᪼ˬá«á«á«º\0á¬onÄ;eá«á«äºÄ;qÃÃÉá«\0\0á«¢aÄ;tá«á«ä¬;äÆ;fl᫨᫩᫫æÃ®á
eÄmx᫱᫶ent»᫩eóÉǧ᫾\0á¬Ä;dá»á¬ot;æ©nÃ´ÉÆfryá¬á¬á¬;ìðoäÉè©;sÅá¬r;æÄaoᬥᬩrr;æµss;æÄcuᬲᬷr;ìð¸ÄbpᬼáÄ;eááæ«;æ«Ä;eááæ«;æ«dot;æ¯Îdelprvwá á¬á·á®á®¬á¯á¯¹arrÄlrá¨áª;椸;椵ɰá²\0\0áµr;æc;æarrÄ;pá¿á®æ¶;椽Ì;bcdosá®á®á®á®¡á®¥á®¨æªrcap;æ©Äauá®á®p;æ©p;æ©ot;ær;æ©
;ìâªï¸Èalrv᮵ᮿá¯á¯£rrÄ;mᮼᮽæ·;椼yÆevwá¯á¯á¯qɰá¯\0\0á¯reãá³uãáµee;æedge;æenè»Â¤ä¤earrowÄlrᯮ᯳eft»á®ight»ᮽeäá¯Äciá°á°oninôǷnt;æ±lcty;æà¦AHabcdefhijlorstuwz᰸᰻᰿á±á±©á±µá²á²á²¬á²·á³»á³¿á´áµ»á¶á¶«á¶»á·á·ròÎar;楥Èglrsá±á±á±á±ger;æ eth;æ¸Ã²á³hÄ;vá±á±æÂ»à¤Å«á±¡á±§arow;æ¤aãÌÄayᱮᱳron;ä;ä´Æ;ao̲ᱼá²ÄgrÊ¿á²r;ætseq;æ©·Æglmá²á²á²è»Â°ä°ta;ä´ptyv;榱ÄirᲣᲨsht;楿;ìð¡arÄlrᲳᲵ»à£Â»áÊaegsvá³Í¸á³á³á³ mÆ;oșá³á³ndÄ;șá³uit;æ¦amma;äin;æ²Æ;io᳧᳨᳸ä·deè÷;oá³§á³°ntimes;ænø᳷cy;äcɯá´\0\0á´rn;æop;æÊlptuwá´á´á´¢áµáµlar;ä¤f;ìðÊ;empsÌá´á´·á´½áµqÄ;dÍá´³ot;æinus;æ¸lus;æquare;æ¡blebarwedgåúnÆadhá®áµáµ§ownarrowóá²arpoonÄlrᵲᵶefôᲴighôᲶŢᵿá¶
karo÷à½É¯á¶\0\0á¶rn;æop;æÆcotá¶á¶£á¶¦Äryá¶á¶¡;ìð¹;äl;æ§¶rok;äÄdrá¶°á¶´ot;æ±iÄ;fá¶ºá æ¿Äahá·á·ròЩaòྦangle;榦Äciá·á·y;ägrarr;æ¿à¤Dacdefglmnopqrstuxá¸á¸á¸á¸¸Õ¸á¸¼á¹á¹¡á¹¾áº¥áº¯áº½á»¡á¼ªá¼·á½á½á½ÄDoá¸á´´oôá²Äcsá¸á¸uteè»Ã©ä©ter;æ©®ÈaioyḢḧḱḶron;ärÄ;cá¸á¸®æè»Ãªäªlon;æ;äot;äÄDrá¹á¹
ot;æ;ìð¢Æ;rsá¹á¹á¹æªaveè»Ã¨ä¨Ä;dá¹á¹æªot;æªÈ;ilsṪṫṲṴæªnters;æ§;æÄ;dṹṺæªot;æªÆapsáº
áºáºcr;ätyÆ;sváºáºáºæ
et»áºpÄ1;áºáº¤Ä³áº¡áº£;æ;æ
æÄgsẪẬ;ä
p;æÄgpẴẸon;äf;ìðÆalsá»á»á»rÄ;sá»á»æl;æ§£us;橱iÆ;lvá»á»á»äµon»á»;äµÈcsuvỪỳá¼á¼£Äioữḱrc»Ḯɩỹ\0\0á»»ÃÕantÄglá¼á¼tr»á¹ess»ṺÆaeiá¼á¼á¼ls;ä½st;ævÄ;DȵἠD;橸parsl;æ§¥ÄDaἯἳot;ærr;楱Æcdiá¼¾á½á»¸r;æ¯oôÍÄahá½á½;ä·è»Ã°ä°Ämrá½á½lè»Ã«ä«o;æ¬Æcipὡὤὧl;ä¡sôծÄeoὬὴctatioîÕnentialåչৡá¾\0á¾\0ᾡᾧ\0\0á¿á¿\0á¿\0ῦῪâ\0ââllingdotseñá¹y;ämale;æÆilrá¾á¾³á¿lig;èï¬É©á¾¹\0\0á¾½g;èï¬ig;èï¬;ìð£lig;èï¬lig;ìfjÆaltá¿á¿á¿¡t;æig;èï¬ns;æ±of;äǰ΅\0ῳf;ìðÄakÖ¿á¿·Ä;vῼ´æ;æ«artint;æ¨ÄaoââÄcsââαââ°â¸â
â\0âβâ¢â¥â§âªâ¬\0â®è»Â½ä½;æ
è»Â¼ä¼;æ
;æ
;æ
Ƴâ´\0â¶;æ
;æ
Ê´â¾â\0\0âè»Â¾ä¾;æ
;æ
5;æ
ƶâ\0â;æ
;æ
8;æ
l;æwn;æ¢cr;ìð»à¢Eabcdefgijlnorstvââââ¥â°â´â°âµâºâ¿âââ¸Ìâ¾â
âÄ;lÙâ;æªÆcmpâââute;äµmaÄ;dâá³ä³;æªreve;äÄiyâªâ®rc;ä;ä³ot;ä¡È;lqsؾÙâ½âÆ;qsؾÙâlanô٥È;cdlÙ¥âââ¥c;檩otÄ;oââæªÄ;lâ¢â£æª;æªÄ;eâªâìâï¸s;æªr;ìð¤Ä;gÙ³Ømel;æ·cy;äÈ;EajÙâââ;æª;檥;檤ÈEaesâââ©â´;æ©pÄ;pâ£â¤æªrox»â¤Ä;qâ®â¯æªÄ;qâ®âim;æ§pf;ìðÄciâ
â
r;æmÆ;elÙ«â
â
;æª;æªè>;cdlqr×®â
â
ªâ
®â
³â
¹Äciâ
¥â
§;檧r;橺ot;æPar;æ¦uest;橼Êadelsââ
ªâÙâǰâ\0âproøâr;楸qÄlqØ¿âlesóâiÃÙ«Äenâ£ârtneqq;ìâ©ï¸Ã
âªÔAabcefkosyâââ±âµâºâââ¯â¨â½ròΠÈilmrâââârsðáf»â¤ilôکÄdrâ â¤cy;äÆ;cwࣴâ«â¯ir;æ¥;æar;æirc;䥯alrââârtsÄ;uââæ¥it»âlip;æ¦con;æ¹r;ìð¥sÄewâ£â©arow;椥arow;椦Êamoprâºâ¾âââ£rr;æ¿tht;æ»kÄlrââeftarrow;æ©ightarrow;æªf;ìðbar;æÆcltâ¯â´â¸r;ìð½asèâ´rok;ä§Äbpââull;æhen»á±à«¡â£\0âª\0â¸â
â\0ââ³\0\0â¸â¢â§â¢â¿\0ââªâ´cuteè»ÃäÆ;iyݱâ°âµrcè»Ã®ä®;ä¸Äcxâ¼â¿y;äµclè»Â¡ä¡ÄfrÎâ;ìð¦raveè»Ã¬ä¬È;inoܾââ©â®Äinâ¢â¦nt;æ¨t;æfin;æ§ta;æ©lig;䳯aopâ¾ââÆcgtâ
ââr;䫯elpÜââinÃ¥ÞarÃ´Ü h;ä±f;æ·ed;äµÊ;cfotÓ´â¬â±â½âare;æ
inÄ;tâ¸â¹æie;æ§doôâÊ;celpÝââââ¡al;æºÄgrââeróá£Ã£âarhk;æ¨rod;樼Ècgptâ¯â²â¶â»y;äon;ä¯f;ìða;ä¹uestè»Â¿ä¿Äciââr;ìð¾nÊ;EdsvÓ´âââ¡Ó³;æ¹ot;æµÄ;vâ¦â§æ´;æ³Ä;iÝ·â®lde;ä©Ç«â¸\0â¼cy;älè»Ã¯ä¯Ìcfmosuââââ¡â§âµÄiyâârc;äµ;ä¹r;ìð§ath;ä·pf;ìðÇ£â¬\0â±r;ìð¿rcy;äkcy;äÐacfghjosâââ¢â§ââ±âµâ»ppaÄ;vââäº;ä°Äeyââ dil;ä·;äºr;ìð¨reen;ä¸cy;ä
cy;äpf;ìðcr;ìðà®ABEHabcdefghjlmnoprstuvâ°ââââââ½âââââ¥â¹â½ââ²âââ¨âââ â Æartâ·âºâ¼ròà§Ã²Îail;æ¤arr;æ¤Ä;gà¦â;æªar;楢ॣâ¥\0âª\0â±\0\0\0\0\0âµâº\0âââ\0â¹ute;äºmptyv;榴raîà¡bda;ä»gÆ;dlà¢ââ;æ¦Ã¥à¢;æª
uoè»Â«ä«rÐ;bfhlpstà¢ââ¦â©â«â®â±âµÄ;fà¢â£s;æ¤s;æ¤Ã«âp;æ«l;椹im;楳l;æ¢Æ;aeâ¿ââæª«il;æ¤Ä;sââæª;ìâªï¸Æabrââârr;æ¤rk;æ²Äakâ¢â¬cÄekâ¨âª;ä»;äÄesâ±â³;æ¦lÄduâ¹â»;æ¦;æ¦Èaeuyââââron;ä¾Ädiââil;ä¼Ã¬à¢°Ã¢â©;
vendor: 4,294 bytes, line 1595
1595ä»Ècqrsâ£â¦ââ½a;椶uoÄ;rà¸áÄduâ²â·har;楧shar;æ¥h;æ²Ê;fgqsââà¦â³â¿æ¤tÊahlrtââ¤â·ââ¨rrowÄ;tà¢â¡aéâ¶arpoonÄduâ¯â´own»Ñp»०eftarrows;æightÆahsââârrowÄ;sࣴࢧarpoonóà¾quigarro÷â°hreetimes;æÆ;qsâà¦âºlanôবÊ;cdgsবââââ¨c;檨otÄ;oââæ©¿Ä;rââæª;æªÄ;eâ¢â¥ìâï¸s;æªÊadegsâ³â¹â½ââpproøâot;æqÄgqââ
ôà¦gtòâôà¦iÃলÆilrâ࣡âsht;楼;ìð©Ä;Eà¦â£;æªÅ¡â©â¶rÄduâ²â®Ä;l॥â³;楪lk;æcy;äÊ;achtà©ââââròâorneòá´ard;楫ri;æºÄioââ¤dot;ä
ustÄ;aâ¬âæ°che»âÈEaesâ»â½ââ;æ¨pÄ;pââæªrox»âÄ;qââæªÄ;qââ»im;æ¦Ðabnoptwzâ©â´â·ââ¯âââÄnrâ®â±g;æ¬r;æ½rëà£gÆlmrâ¿ââeftÄar০âightá৲apsto;æ¼ightá৽parrowÄlrâ¥â©efôâight;æ¬Æaflâ¶â¹â½r;æ¦
;ìðus;æ¨imes;樴šââst;æÃ¡áÆ;efââá ænge»âarÄ;lâ¤â¥ä¨t;æ¦Êachmtâ³â¶â¼â
âròࢨorneòá¶arÄ;dà¾â;æ¥;æri;æ¿Ìachiqtââà©â¢â®â»quo;æ¹r;ìðmÆ;egলâªâ¬;æª;æªÄbuâªâ³oÄ;rà¸â¹;ærok;ä
è<;cdhilqrà «ââ¹ââ â¥âªâ°Äciââ;檦r;橹reÃ¥â²mes;æarr;楶uest;æ©»ÄPiâµâ¹ar;æ¦Æ;efâ à¤á ærÄduâ â shar;æ¥har;楦Äenâ â ¡rtneqq;ìâ¨ï¸Ã
â ÜDacdefhilnopsuâ¡â¡
â¢â¢â¢â¢ ⢥⢨â£â£¢â£¤àªâ£³â¤Dot;æºÈclprâ¡â¡â¡£â¡½rè»Â¯ä¯Äetâ¡â¡;æÄ;eâ¡â¡æ se»â¡Ä;sá»â¡¨toÈ;dluá»â¡³â¡·â¡»owîÒefôà¤Ã°áker;æ®Äoyâ¢â¢mma;権;ä¼ash;æasuredangle»á¦r;ìðªo;æ§Æcdn⢯⢴â£roè»ÂµäµÈ;acdá¤â¢½â£â£sôá§ir;æ«°otè»Â·ÆµusÆ;bdâ£á¤â£æÄ;uá´¼â£;横ţâ£â£¡p;æ«Ã²âðàªÄdp⣩⣮els;æ§f;ìðÄct⣸⣽r;ìðpos»áÆ;lmâ¤â¤â¤ä¼timap;æ¸à°GLRVabcdefghijlmoprstuvwâ¥â¥â¥¾â¦â¦â§â§©â¨â¨â©â©âªâªâª¤âª¨â¬â¬ââ¿â®®â°´â±§â±¼â³©Ägtâ¥â¥;ìâ̸Ä;vâ¥à¯ìâ«âÆeltâ¥â¥²â¥¶ftÄar⥡⥧rrow;æightarrow;æ;ìâ̸Ä;v⥻à±ìâªâightarrow;æÄDdâ¦â¦ash;æ¯ash;æ®Êbcnpt⦣⦧⦬⦱â§la»Ëute;ä
g;ìâ âÊ;Eiopà¶â¦¼â§â§
â§;ì⩰̸d;ìâ̸s;ä
roøà¶urÄ;aâ§â§æ®lÄ;sâ§à¬¸Ç³â§\0â§£pè»Â ଷmpÄ;e௹à°Êaeouyâ§´â§¾â¨â¨â¨Ç°â§¹\0â§»;æ©on;ä
dil;ä
ngÄ;dൾâ¨ot;ìâ©Ì¸p;æ©;ä½ash;æÎ;Aadqsxà®â¨©â¨â¨»â©â©
â©rr;ærÄhr⨳⨶k;椤Ä;oá²á°ot;ìâ̸uiöà£Äeiâ©â©ar;椨Ãà®istÄ;sà® à®r;ìð«ÈEestà¯
⩦⩹⩼Æ;qs஼â©à¯¡Æ;qs஼à¯
â©´lanô௢iÃ௪Ä;rà®¶âªÂ»à®·ÆAapâªâªâªrò⥱rr;æ®ar;櫲Æ;svà¾âªà¾Ä;d⪡⪢æ¼;æºcy;äÎAEadest⪷⪺⪾â«â«
⫶⫹rò⥦;ìâ¦Ì¸rr;ær;æ¥È;fqsà°»â«â«£â«¯tÄarâ«â«rro÷â«ightarroÃ·âªÆ;qs఻⪺⫪lanôà±Ä;sà±â«´Â»à°¶iÃà±Ä;rవ⫾iÄ;eà°à°¥iäà¶Äptâ¬â¬f;ìðè¬;inâ¬â¬â¬¶ä¬nÈ;Edvà®â¬¤â¬¨â¬®;ìâ¹Ì¸ot;ìâµÌ¸Ç¡à®â¬³â¬µ;æ·;æ¶iÄ;vಸ⬼ǡಸââ;æ¾;æ½Æaorââ£â©rÈ;astà»âââlleìà»l;ì⫽â¥;ìâ̸lint;æ¨Æ;ceà²â°â³uåಥÄ;cà²â¸Ä;eà²â½Ã±à²ÈAaitâ®â®â®â®§ròâ¦rrÆ;cwâ®â®â®æ;ì⤳̸;ìâ̸ghtarrow»â®riÄ;eà³à³Îchimpqu⮽â¯â¯â¬à¸â¯¤â¯¯È;cerà´²â¯à´·â¯uÃ¥àµ
;ìðortÉâ¬
\0\0â¯aráâmÄ;e൮â¯Ä;q൴൳suÄbp⯫â¯Ã¥à³¸Ã¥à´Æbcp⯶â°â°È;Ees⯿â°à´¢â°æ;ìâ«
̸etÄ;eà´â°qÄ;qà´£â°cÄ;eà´²â°Ã±à´¸È;EesⰢⰣàµâ°§æ
;ìâ«Ì¸etÄ;eàµâ°®qÄ;qൠⰣÈgilrⰽⰿâ±
â±Ã¬à¯ldeè»Ã±ä±Ã§à±iangleÄlrâ±â±eftÄ;eà°â±Ã±à°¦ightÄ;eà³â±¥Ã±à³Ä;mⱬâ±ä½Æ;esⱴⱵⱹä£ro;æp;æÒDHadgilrsâ²â²â²â²â²£â²°â²¶â³â³£ash;æarr;æ¤p;ìââash;æ¬ÄetⲨⲬ;ìâ¥â;ì>ânfin;æ§ÆAetâ²½â³â³
rr;æ¤;ìâ¤âÄ;râ³â³ì<âie;ìâ´âÄAtâ³â³rr;æ¤rie;ìâµâim;ìâ¼âÆAanâ³°â³´â´rr;ærÄhr⳺⳽k;椣Ä;oá§á¥ear;椧ááª\0\0\0\0\0\0\0\0\0\0\0\0\0â´\0â´¸âµâµ ⵥ⵲â¶á¬\0\0â¶â¶«\0â·â·\0â·â¸â¸«â¸¾â¹Äcsâ´±áªuteè»Ã³ä³Äiyâ´¼âµ
rÄ;cáªâµè»Ã´ä´;ä¾Êabios᪠âµâµÇâµlac;ä
v;樸old;榼lig;ä
Äcr⵩âµir;榿;ìð¬Í¯âµ¹\0\0âµ¼\0â¶n;äaveè»Ã²ä²;æ§Äbmâ¶à·´ar;榵Èacitâ¶â¶â¶¥â¶¨ròáªÄirâ¶â¶ r;榾oss;榻nÃ¥à¹;æ§Æaeiⶱⶵⶹcr;ä
ga;äÆcdnâ·â·
Çron;ä¿;榶pf;ìð Æaelâ·â·Çr;榷rp;榹Î;adiosvⷪⷫⷮâ¸â¸â¸â¸æ¨ròáªÈ;efmâ··â·¸â¸â¸
æ©rÄ;oⷾⷿæ´f»ⷿè»Âªäªè»Âºäºgof;æ¶r;æ©lope;æ©;æ©Æcloâ¸â¸¡â¸§Ã²â¸ashè»Ã¸ä¸l;æiŬⸯ⸴deè»ÃµäµesÄ;aÇ⸺s;樶mlè»Ã¶ä¶bar;æ½à«¡â¹\0â¹½\0âºâº\0⺢⺹\0\0â»àº\0â¼\0\0⼫⾼\0â¿rÈ;
vendor: 6,210 bytes, line 1595
1595astÐâ¹§â¹²àº
è¶;lâ¹â¹®ä¶leìÐɩ⹸\0\0â¹»m;櫳;櫽y;ä¿rÊcimptâºâºâºá¡¥âºnt;ä¥od;ä®il;æ°enk;æ±r;ìðÆimo⺨⺰⺴Ä;vâºâº®ä;ämaô੶ne;æÆ;tv⺿â»â»ächfork»´;äÄauâ»â»nÄckâ»â»kÄ;hâ´â»;æÃ¶â´sÒ;abcdemst⻳⻴á¤â»¹â»½â¼â¼â¼â¼ä«cir;樣ir;樢Äouáµâ¼;樥;橲nè»Â±àºim;樦wo;樧Æipuâ¼â¼ â¼¥ntint;æ¨f;ìð¡ndè»Â£ä£Ô;Eaceinosuà»â¼¿â½â½â½â¾â¾â¾â½¾â¾¶;檳p;檷uÃ¥à»Ä;cà»â½Ì;acensà»â½â½â½¦â½¨â½¾pproøâ½urlyeñà»Ã±à»Æaes⽯⽶⽺pprox;檹qq;檵im;æ¨iÃà»meÄ;sâ¾àº®æ²ÆEas⽸â¾â½ºÃ°â½µÆdfp໬â¾â¾¯Æals⾠⾥⾪lar;æ®ine;æurf;æÄ;t໻⾴ï໻rel;æ°Äciâ¿â¿
r;ìð
;äncsp;æÌfiopsuâ¿â¢â¿â¿¥â¿«â¿±r;ìð®pf;ìð¢rime;æcr;ìðÆaeo⿸ããtÄei⿾ã
rnionóڰnt;æ¨stÄ;eããä¿Ã±á¼Ã´à¼àªABHabcdefhilmnoprstuxããããã ãã«ã
ã
¢ã
²ãããã¤ã©ãã®ã²ãã°ã·Æartãããròá³Ã²Ïail;æ¤aròᱥar;楤Îcdenqrtã¨ãµã¸ã¿ãããÄeuãã±;ìâ½Ì±te;ä
iãá
®mptyv;榳gÈ;delà¿ããã;æ¦;榥åà¿uoè»Â»ä»rÖ;abcfhlpstwà¿ã¬ã¯ã·ã¹ã¼ã¾ããããp;極Ä;fà¿ ã´s;æ¤ ;椳s;æ¤Ã«âðâ®l;æ¥
im;楴l;æ£;æÄaiããil;æ¤oÄ;nããæ¶alÃ³à¼Æabrã§ãªã®ròá¥rk;æ³Äakã³ã½cÄekã¹ã»;ä½;äÄesãã;æ¦lÄduãã;æ¦;æ¦Èaeuyããã§ã©ron;ä
Ädiã¡ã¥il;ä
ì࿲âãº;äÈclqsã´ã·ã½ã
a;椷dhar;楩uoÄ;rÈÈh;æ³Æacgã
ã
à½lÈ;ipsླྀã
ã
ánÃ¥á»arôྩt;æÆilrã
©á£ã
®sht;楽;ìð¯Äaoã
·ãrÄduã
½ã
¿Â»Ñ»Ä;láã;楬Ä;vããä;䱯gnsãã¹ã¼htÌahlrstã¤ã°ããã¤ã®rrowÄ;tà¿ãaéãarpoonÄduã»ã¿owîã
¾p»áeftÄahããrrowó࿪arpoonóÕightarrows;æquigarro÷ãhreetimes;æg;äingdotseñἲÆahmãããrò࿪aòÕ;æoustÄ;aããæ±che»ãmid;æ«®Èabptã²ã½ããÄnrã·ãºg;ær;æ¾rëáÆaflãããr;æ¦;ìð£us;樮imes;樵Äapãã§rÄ;gã£ã¤ä©t;æ¦olint;æ¨aròã£Èachqã»ãá¼ã
quo;æºr;ìðÄbuã»ãoÄ;rÈÈÆhirããã reÃ¥ã¸mes;æiÈ;eflãªáá ¡ã«æ¹tri;æ§luhar;楨;æàµ¡ãããã¬ã¸ã±\0ãºã¤\0\0ã¬ã°\0ã¨ãããã±ãã±\0ã\0\0ã³cute;ä
quïâºÔ;Eaceinpsyáã³ãµã¿ããããã¦ã©;檴ǰãº\0ã¼;檸on;ä
¡uÃ¥á¾Ä;dá³ãil;ä
rc;ä
ÆEasããã;檶p;檺im;æ©olint;æ¨iÃá;äotÆ;beã´áµãµæ
;橦ÎAacmstxãããããã£ãrr;ærÄhrããëâ¨Ä;oਸ਼਴tè»Â§ä§i;ä»war;椩mÄinã©Ã°nuóñt;æ¶rÄ;oã¶âìð°Èacoyãããã rp;æ¯Ähyããcy;ä;ärtÉã\0\0ãiäá¤araì⹯è»ÂäÄgmã¨ã´maÆ;fvã±ã²ã²ä;äÐ;deglnprá«ã
ããããã¡ã¦ot;橪Ä;qá±á°Ä;Eããæª;æª Ä;Eããæª;æªe;ælus;樤arr;楲aròá½Èaeitã¸ãããÄlsã½ãlsetméãªhp;樳parsl;槤Ädlá£ãe;æ£Ä;eããæªªÄ;sã¢ã£æª¬;ìâª¬ï¸Æflpã®ã³ãtcy;äÄ;bã¸ã¹ä¯Ä;aã¾ã¿æ§r;æ¿f;ìð¤aÄdrãÐesÄ;uããæ it»ãÆcsuã ã¹ãÄauã¥ã¯pÄ;sáã«;ìâï¸pÄ;sá´ãµ;ìâï¸uÄbpã¿ãÆ;esááãetÄ;eáãñáÆ;esá¨áãetÄ;eá¨ãÃ±á®Æ;afá
»ã¦Ö°rÅ¥ã«Ö±Â»á
¼aròá
Ècemtã¹ã¾ãã
r;ìðtmîñiìãaræá¾ÄarããrÄ;fãá¿æÄanããightÄepã£ãªpsiloîỠhé⺯s»â¡Êbcmnpã»ãáããÒ;Edemnprsãããããã£ã¬ã±ã¶æ;æ«
ot;檽Ä;dáãot;æ«ult;æ«ÄEeã¨ãª;æ«;ælus;檿arr;楹Æeiuã½ããtÆ;enãã
ãqÄ;qáãeqÄ;qã«ã¨m;æ«Äbpãã;æ«;æ«cÌ;acensáã¬ã²ã¹ã»ã¦pproøãºurlyeñá¾Ã±á³Æaesãããpproøãqñãg;æªÚ123;Edehlmnpsã©ã¬ã¯áã²ã´ãããããã¨ãè»Â¹ä¹è»Â²ä²è»Â³ä³;æ«Äosã¹ã¼t;檾ub;æ«Ä;dá¢ã
ot;æ«sÄouããl;æb;æ«arr;楻ult;æ«ÄEeã¤ã¦;æ«;ælus;æ«Æeiuã´ããtÆ;enáã¼ãqÄ;qá¢ã²eqÄ;qã§ã¤m;æ«Äbpãã;æ«;æ«ÆAanãã ãrr;ærÄhrã¦ã¨Ã«â®Ä;oਫ਩war;椪ligè»Ãä௡ããã áã³ã¹\0ã¾ã\0\0\0\0\0ãã\0ãã¬\0\0\0ãɲã\0\0ãget;æ;ärÃ«à¹Æaeyã¦ã«ã°ron;ä
¥dil;ä
£;älrec;ær;ìð±Èeikoãããµã¼Ç²ã\0ãeÄ4fááaÆ;svãããä¸ym;äÄcnã¢ã²kÄasã¨ã®pproøáim»á¬sðáÄasãºã®Ã°árnè»Ã¾ä¾Ç¬Ìãâ§esèÃ;bdãããäÄ;aá¤ãr;樱;樰Æepsã¡ã£ãáâ©È;bcfÒã¬ã°ã´ot;æ¶ir;櫱Ä;oã¹ã¼ìð¥rk;æ«Ã¡ã¢rime;æ´Æaipããã¤dÃ¥áÎadempstã¡ããããããngleÊ;dlqrã°ã±ã¶ããæµown»ᶻeftÄ;eâ ã¾Ã±à¤®;æightÄ;eãªãñáot;æ¬inus;樺lus;樹b;æ§ime;樻ezium;æ¢Æchtã²ã½ãÄryã·ã»;ìð;äcy;ärok;ä
§Äioããxôá·headÄlrãã eftarro÷à¡ightarrow»à½à¤AHabcdfghlmoprstuwãããã¤ã°ã¼ã ã 㠣㠴ã¡ã¡ã¡«ã¢©ã£ã£ã£ªã£¶ròÏar;楣Äcrãã¢uteè»ÃºäºÃ²á
rÇ£ãª\0ãy;äve;ä
Äiyãµãºrcè»Ã»ä»;äÆabhã ã ã ròálac;ä
±aòáÄirã ã sht;楾;ìð²raveè»Ã¹ä¹Å¡ã §ã ±rÄlr㠬㠮»à¥Â»álk;æÄctã ¹ã¡É¯ã ¿\0\0ã¡rnÄ;eã¡
ã¡ær»ã¡op;æri;æ¸Äalã¡ã¡cr;ä
«è»Â¨ÍÄgp㡢㡦on;ä
³f;ìð¦Ìadhlsuá
㡸㡽á²ã¢ã¢ ownáá³arpoonÄlrã¢ã¢efôã ighô㠯iÆ;hlã¢ã¢ã¢ä
»áºon»ã¢parrows;æÆcit㢰ã£ã£É¯ã¢¶\0\0ã£rnÄ;e㢼㢽ær»㢽op;æng;ä
¯ri;æ¹cr;ìðÆdirã£ã£ã£¢ot;æ°lde;ä
©iÄ;fã°ã£¨Â»á Äam㣯㣲rò㢨lè»Ã¼ä¼angle;榧ÞABDacdeflnoprszã¤ã¤ã¤©ã¤ã¦µã¦¸ã¦½ã§ã§¤ã§¨ã§³ã§¹ã§½ã¨ã¨ ròϷarÄ;v㤦㤧櫨;æ«©asèϡÄnr㤲㤷grt;æ¦Îeknprstã£ã¥ã¥ã¥ã¥ã¥¤ã¦appáâothinÃ§áºÆhirã«â»ã¥opô⾵Ä;há·ã¥¢Ã¯ãÄiu㥩ã¥gmáã³Äbp㥲ã¦setneqÄ;q㥽ã¦ìâï¸;ìâ«ï¸setneqÄ;qã¦ã¦ìâï¸;ìâ«ï¸Ährã¦ã¦etáãiangleÄlr㦪㦯eft»थight»áy;ä²ashÂ»á¶Æelrã§ã§ã§Æ;beâ·ªã§ã§ar;æ»q;ælip;æ®Äbtã§á¨aòá©r;ìð³tré㦮suÄbp㧯㧱»à´Â»àµpf;ìð§roð໻tré㦴Äcuã¨ã¨r;ìðÄbpã¨ã¨nÄEeã¦ã¨Â»ã¥¾nÄEeã¦ã¨Â»ã¦igzag;æ¦Îcefoprs㨶㨻ã©ã©ã©ã©¡ã©ªirc;ä
µÄdiã©ã©Äbgã©
ã©ar;æ©eÄ;qáºã©;æerp;ær;ìð´pf;ìð¨Ä;eá¹ã©¦atèá¹cr;ìðà«£áãª\0ãª\0ãªãª\0\0ãªãª¨ãª«ãª¯\0\0ã«ã«\0ã«áátréár;ìðµÄAaãªãªròÏrò৶;ä¾ÄAa㪡㪤ròθrò৫aðâis;æ»Ædptá¤ãªµãª¾Äfl㪺á©;ìð©imÃ¥á²ÄAaã«ã«ròÏròà¨Äcqã«á¸r;ìðÄptáã«réáÐacefiosu㫰㫽ã¬ã¬ã¬ã¬ã¬ã¬¡cÄuyã«¶ã«»teè»Ã½ä½;äÄiyã¬ã¬rc;ä
·;änè»Â¥ä¥r;ìð¶cy;äpf;ìðªcr;ìðÄcm㬦㬩y;älè»Ã¿ä¿Ôacdefhioswããããã¤ã©ãã´ãºã®cute;ä
ºÄayããron;ä
¾;ä·ot;ä
¼Äetãã¡træáa;ä¶r;ìð·cy;ä¶grarr;æpf;ìð«cr;ìðÄjnã®
ã®;æj;æ
1595'.split("").map(e=>e.charCodeAt(0))),Ufe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function $fe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ufe.get(e))!==null&&t!==void 0?t:e}var sn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(sn||(sn={}));const zfe=32;var _o;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(_o||(_o={}));function g4(e){return e>=sn.ZERO&&e<=sn.NINE}function Hfe(e){return e>=sn.UPPER_A&&e<=sn.UPPER_F||e>=sn.LOWER_A&&e<=sn.LOWER_F}function qfe(e){return e>=sn.UPPER_A&&e<=sn.UPPER_Z||e>=sn.LOWER_A&&e<=sn.LOWER_Z||g4(e)}function Wfe(e){return e===sn.EQUALS||qfe(e)}var tn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(tn||(tn={}));var Ei;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ei||(Ei={}));class Vfe{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=tn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ei.Strict}startEntity(t){this.decodeMode=t,this.state=tn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case tn.EntityStart:return t.charCodeAt(r)===sn.NUM?(this.state=tn.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=tn.NamedEntity,this.stateNamedEntity(t,r));case tn.NumericStart:return this.stateNumericStart(t,r);case tn.NumericDecimal:return this.stateNumericDecimal(t,r);case tn.NumericHex:return this.stateNumericHex(t,r);case tn.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|zfe)===sn.LOWER_X?(this.state=tn.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=tn.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,s){if(r!==n){const a=n-r;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(r,a),s),this.consumed+=a}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const s=t.charCodeAt(r);if(g4(s)||Hfe(s))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const s=t.charCodeAt(r);if(g4(s))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===sn.SEMI)this.consumed+=1;
vendor: 4,917 bytes, line 1595
1595else if(this.decodeMode===Ei.Strict)return 0;return this.emitCodePoint($fe(this.result),this.consumed),this.errors&&(t!==sn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let s=n[this.treeIndex],a=(s&_o.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const o=t.charCodeAt(r);if(this.treeIndex=Gfe(n,s,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return this.result===0||this.decodeMode===Ei.Attribute&&(a===0||Wfe(o))?0:this.emitNotTerminatedNamedEntity();if(s=n[this.treeIndex],a=(s&_o.VALUE_LENGTH)>>14,a!==0){if(o===sn.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ei.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,s=(n[r]&_o.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:s}=this;return this.emitCodePoint(r===1?s[t]&~_o.VALUE_LENGTH:s[t+1],n),r===3&&this.emitCodePoint(s[t+2],n),n}end(){var t;switch(this.state){case tn.NamedEntity:return this.result!==0&&(this.decodeMode!==Ei.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case tn.NumericDecimal:return this.emitNumericEntity(0,2);case tn.NumericHex:return this.emitNumericEntity(0,3);case tn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case tn.EntityStart:return 0}}}function Gfe(e,t,r,n){const s=(t&_o.BRANCH_LENGTH)>>7,a=t&_o.JUMP_TABLE;if(s===0)return a!==0&&n===a?r:-1;if(a){const u=n-a;return u<0||u>=s?-1:e[r+u]-1}let o=r,l=o+s-1;for(;o<=l;){const u=o+l>>>1,c=e[u];if(c<n)o=u+1;else if(c>n)l=u-1;else return e[u+s]}return-1}var Le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(Le||(Le={}));var ql;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(ql||(ql={}));var $s;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})($s||($s={}));var me;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(me||(me={}));var N;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="
1595COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(N||(N={}));const Kfe=new Map([[me.A,N.A],[me.ADDRESS,N.ADDRESS],[me.ANNOTATION_XML,N.ANNOTATION_XML],[me.APPLET,N.APPLET],[me.AREA,N.AREA],[me.ARTICLE,N.ARTICLE],[me.ASIDE,N.ASIDE],[me.B,N.B],[me.BASE,N.BASE],[me.BASEFONT,N.BASEFONT],[me.BGSOUND,N.BGSOUND],[me.BIG,N.BIG],[me.BLOCKQUOTE,N.BLOCKQUOTE],[me.BODY,N.BODY],[me.BR,N.BR],[me.BUTTON,N.BUTTON],[me.CAPTION,N.CAPTION],[me.CENTER,N.CENTER],[me.CODE,N.CODE],[me.COL,N.COL],[me.COLGROUP,N.COLGROUP],[me.DD,N.DD],[me.DESC,N.DESC],[me.DETAILS,N.DETAILS],[me.DIALOG,N.DIALOG],[me.DIR,N.DIR],[me.DIV,N.DIV],[me.DL,N.DL],[me.DT,N.DT],[me.EM,N.EM],[me.EMBED,N.EMBED],[me.FIELDSET,N.FIELDSET],[me.FIGCAPTION,N.FIGCAPTION],[me.FIGURE,N.FIGURE],[me.FONT,N.FONT],[me.FOOTER,N.FOOTER],[me.FOREIGN_OBJECT,N.FOREIGN_OBJECT],[me.FORM,N.FORM],[me.FRAME,N.FRAME],[me.FRAMESET,N.FRAMESET],[me.H1,N.H1],[me.H2,N.H2],[me.H3,N.H3],[me.H4,N.H4],[me.H5,N.H5],[me.H6,N.H6],[me.HEAD,N.HEAD],[me.HEADER,N.HEADER],[me.HGROUP,N.HGROUP],[me.HR,N.HR],[me.HTML,N.HTML],[me.I,N.I],[me.IMG,N.IMG],[me.IMAGE,N.IMAGE],[me.INPUT,N.INPUT],[me.IFRAME,N.IFRAME],[me.KEYGEN,N.KEYGEN],[me.LABEL,N.LABEL],[me.LI,N.LI],[me.LINK,N.LINK],[me.LISTING,N.LISTING],[me.MAIN,N.MAIN],[me.MALIGNMARK,N.MALIGNMARK],[me.MARQUEE,N.MARQUEE],[me.MATH,N.MATH],[me.MENU,N.MENU],[me.META,N.META],[me.MGLYPH,N.MGLYPH],[me.MI,N.MI],[me.MO,N.MO],[me.MN,N.MN],[me.MS,N.MS],[me.MTEXT,N.MTEXT],[me.NAV,N.NAV],[me.NOBR,N.NOBR],[me.NOFRAMES,N.NOFRAMES],[me.NOEMBED,N.NOEMBED],[me.NOSCRIPT,N.NOSCRIPT],[me.OBJECT,N.OBJECT],[me.OL,N.OL],[me.OPTGROUP,N.OPTGROUP],[me.OPTION,N.OPTION],[me.P,N.P],[me.PARAM,N.PARAM],[me.PLAINTEXT,N.PLAINTEXT],[me.PRE,N.PRE],[me.RB,N.RB],[me.RP,N.RP],[me.RT,N.RT],[me.RTC,N.RTC],[me.RUBY,N.RUBY],[me.S,N.S],[me.SCRIPT,N.SCRIPT],[me.SEARCH,N.SEARCH],[me.SECTION,N.SECTION],[me.SELECT,N.SELECT],[me.SOURCE,N.SOURCE],[me.SMALL,N.SMALL],[me.SPAN,N.SPAN],[me.STRIKE,N.STRIKE],[me.STRONG,N.STRONG],[me.STYLE,N.STYLE],[me.SUB,N.SUB],[me.SUMMARY,N.SUMMARY],[me.SUP,N.SUP],[me.TABLE,N.TABLE],[me.TBODY,N.TBODY],[me.TEMPLATE,N.TEMPLATE],[me.TEXTAREA,N.TEXTAREA],[me.TFOOT,N.TFOOT],[me.TD,N.TD],[me.TH,N.TH],[me.THEAD,N.THEAD],[me.TITLE,N.TITLE],[me.TR,N.TR],[me.TRACK,N.TRACK],[me.TT,N.TT],[me.U,N.U],[me.UL,N.UL],[me.SVG,N.SVG],[me.VAR,N.VAR],[me.WBR,N.WBR],[me.XMP,N.XMP]]);function wd(e){var t;return(t=Kfe.get(e))!==null&&t!==void 0?t:N.UNKNOWN}const Fe=N,Yfe={[Le.HTML]:new Set([Fe.ADDRESS,Fe.APPLET,Fe.AREA,Fe.ARTICLE,Fe.ASIDE,Fe.BASE,Fe.BASEFONT,Fe.BGSOUND,Fe.BLOCKQUOTE,Fe.BODY,Fe.BR,Fe.BUTTON,Fe.CAPTION,Fe.CENTER,Fe.COL,Fe.COLGROUP,Fe.DD,Fe.DETAILS,Fe.DIR,Fe.DIV,Fe.DL,Fe.DT,Fe.EMBED,Fe.FIELDSET,Fe.FIGCAPTION,Fe.FIGURE,Fe.FOOTER,Fe.FORM,Fe.FRAME,Fe.FRAMESET,Fe.H1,Fe.H2,Fe.H3,Fe.H4,Fe.H5,Fe.H6,Fe.HEAD,Fe.HEADER,Fe.HGROUP,Fe.HR,Fe.HTML,Fe.IFRAME,Fe.IMG,Fe.INPUT,Fe.LI,Fe.LINK,Fe.LISTING,Fe.MAIN,Fe.MARQUEE,Fe.MENU,Fe.META,Fe.NAV,Fe.NOEMBED,Fe.NOFRAMES,Fe.NOSCRIPT,Fe.OBJECT,Fe.OL,Fe.P,Fe.PARAM,Fe.PLAINTEXT,Fe.PRE,Fe.SCRIPT,Fe.SECTION,Fe.SELECT,Fe.SOURCE,Fe.STYLE,Fe.SUMMARY,Fe.TABLE,Fe.TBODY,Fe.TD,Fe.TEMPLATE,Fe.TEXTAREA,Fe.TFOOT,Fe.TH,Fe.THEAD,Fe.TITLE,Fe.TR,Fe.TRACK,Fe.UL,Fe.WBR,Fe.XMP]),[Le.MATHML]:new Set([Fe.MI,Fe.MO,Fe.MN,Fe.MS,Fe.MTEXT,Fe.ANNOTATION_XML]),[Le.SVG]:new Set([Fe.TITLE,Fe.FOREIGN_OBJECT,Fe.DESC]),[Le.XLINK]:new Set,[Le.XML]:new Set,[Le.XMLNS]:new Set},x4=new Set([Fe.H1,Fe.H2,Fe.H3,Fe.H4,Fe.H5,Fe.H6]);me.STYLE,me.SCRIPT,me.XMP,me.IFRAME,me.NOEMBED,me.NOFRAMES,me.PLAINTEXT;var Z;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(Z||(Z={}));const jr={DATA:Z.DATA,RCDATA:Z.RCDATA,RAWTEXT:Z.RAWTEXT,SCRIPT_DATA:Z.SCRIPT_DATA,PLAINTEXT:Z.PLAINTEXT,CDATA_SECTION:Z.CDATA_SECTION};function Qfe(e){return e>=Y.DIGIT_0&&e<=Y.DIGIT_9}function E0(e){return e>=Y.LATIN_CAPITAL_A&&e<=Y.LATIN_CAPITAL_Z}function Xfe(e){return e>=Y.LATIN_SMALL_A&&e<=Y.LATIN_SMALL_Z}function so(e){return Xfe(e)||E0(e)}function h8(e){return so(e)||Qfe(e)}function Mf(e){return e+32}function JM(e){return e===Y.SPACE||e===Y.LINE_FEED||e===Y.TABULATION||e===Y.FORM_FEED}function m8(e){return JM(e)||e===Y.SOLIDUS||e===Y.GREATER_THAN_SIGN}function Zfe(e){return e===Y.NULL?ye.nullCharacterReference:e>1114111?ye.characterReferenceOutsideUnicodeRange:YM(e)?ye.surrogateCharacterReference:XM(e)?ye.noncharacterCharacterReference:QM(e)||e===Y.CARRIAGE_RETURN?ye.controlCharacterReference:null}class Jfe{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=Z.DATA,this.returnState=Z.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Ffe(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Vfe(Bfe,(n,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ye.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(ye.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const s=Zfe(n);s&&this._err(s,1)}}:void 0)}_err(t,r=0){var n,s;(s=(n=this.handler).onParseError)===null||s===void 0||s.call(n,this.preprocessor.getError(t,r))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n==null||n()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;
vendor: 83,493 bytes, line 1595
1595for(let r=0;r<t;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,r){return this.preprocessor.startsWith(t,r)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:jt.START_TAG,tagName:"",tagID:N.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:jt.END_TAG,tagName:"",tagID:N.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:jt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:jt.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,r){this.currentCharacterToken={type:t,chars:r,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,r;const n=this.currentToken;if(ZM(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const s=(t=(r=n.location).attrs)!==null&&t!==void 0?t:r.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ye.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=wd(t.tagName),t.type===jt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ye.endTagWithAttributes),t.selfClosing&&this._err(ye.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case jt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case jt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case jt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:jt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,r)}_emitCodePoint(t){const r=JM(t)?jt.WHITESPACE_CHARACTER:t===Y.NULL?jt.NULL_CHARACTER:jt.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(jt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=Z.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ei.Attribute:Ei.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Z.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Z.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case Z.DATA:{this._stateData(t);break}case Z.RCDATA:{this._stateRcdata(t);break}case Z.RAWTEXT:{this._stateRawtext(t);break}case Z.SCRIPT_DATA:{this._stateScriptData(t);break}case Z.PLAINTEXT:{this._statePlaintext(t);break}case Z.TAG_OPEN:{this._stateTagOpen(t);break}case Z.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case Z.TAG_NAME:{this._stateTagName(t);break}case Z.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case Z.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case Z.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case Z.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case Z.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case Z.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case Z.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case Z.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case Z.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case Z.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case Z.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case Z.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case Z.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case Z.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case Z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case Z.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case Z.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case Z.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case Z.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case Z.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case Z.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case Z.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case Z.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case Z.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case Z.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case Z.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case Z.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case Z.BOGUS_COMMENT:{this._stateBogusComment(t);break}case Z.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case Z.COMMENT_START:{this._stateCommentStart(t);break}case Z.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case Z.COMMENT:{this._stateComment(t);break}case Z.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case Z.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case Z.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case Z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case Z.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case Z.COMMENT_END:{this._stateCommentEnd(t);break}case Z.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case Z.DOCTYPE:{this._stateDoctype(t);break}case Z.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case Z.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case Z.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case Z.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case Z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case Z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case Z.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case Z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case Z.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case Z.CDATA_SECTION:{this._stateCdataSection(t);break}case Z.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case Z.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case Z.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case Z.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=Z.TAG_OPEN;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this._emitCodePoint(t);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case Y.AMPERSAND:{this._startCharacterReference();break}case Y.LESS_THAN_SIGN:{this.state=Z.RCDATA_LESS_THAN_SIGN;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this._emitChars(dr);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=Z.RAWTEXT_LESS_THAN_SIGN;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this._emitChars(dr);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case Y.LESS_THAN_SIGN:{this.state=Z.SCRIPT_DATA_LESS_THAN_SIGN;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this._emitChars(dr);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case Y.NULL:{this._err(ye.unexpectedNullCharacter),this._emitChars(dr);break}case Y.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(so(t))this._createStartTagToken(),this.state=Z.TAG_NAME,this._stateTagName(t);else switch(t){case Y.EXCLAMATION_MARK:{this.state=Z.MARKUP_DECLARATION_OPEN;break}case Y.SOLIDUS:{this.state=Z.END_TAG_OPEN;break}case Y.QUESTION_MARK:{this._err(ye.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(t);break}case Y.EOF:{this._err(ye.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ye.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Z.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(so(t))this._createEndTagToken(),this.state=Z.TAG_NAME,this._stateTagName(t);else switch(t){case Y.GREATER_THAN_SIGN:{this._err(ye.missingEndTagName),this.state=Z.DATA;break}case Y.EOF:{this._err(ye.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ye.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const r=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Z.BEFORE_ATTRIBUTE_NAME;break}case Y.SOLIDUS:{this.state=Z.SELF_CLOSING_START_TAG;break}case Y.GREATER_THAN_SIGN:{this.state=Z.DATA,this.emitCurrentTagToken();break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),r.tagName+=dr;break}case Y.EOF:{this._err(ye.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(E0(t)?Mf(t):t)}}_stateRcdataLessThanSign(t){t===Y.SOLIDUS?this.state=Z.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=Z.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){so(t)?(this.state=Z.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=Z.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Z.BEFORE_ATTRIBUTE_NAME,!1;case Y.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Z.SELF_CLOSING_START_TAG,!1;case Y.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Z.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Z.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===Y.SOLIDUS?this.state=Z.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=Z.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){so(t)?(this.state=Z.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=Z.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Z.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case Y.SOLIDUS:{this.state=Z.SCRIPT_DATA_END_TAG_OPEN;break}case Y.EXCLAMATION_MARK:{this.state=Z.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=Z.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){so(t)?(this.state=Z.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=Z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===Y.HYPHEN_MINUS?(this.state=Z.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=Z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===Y.HYPHEN_MINUS?(this.state=Z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=Z.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case Y.HYPHEN_MINUS:{this.state=Z.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this._emitChars(dr);break}case Y.EOF:{this._err(ye.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case Y.HYPHEN_MINUS:{this.state=Z.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_ESCAPED,this._emitChars(dr);break}case Y.EOF:{this._err(ye.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case Y.HYPHEN_MINUS:{this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Z.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case Y.GREATER_THAN_SIGN:{this.state=Z.SCRIPT_DATA,this._emitChars(">");break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_ESCAPED,this._emitChars(dr);break}case Y.EOF:{this._err(ye.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Z.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===Y.SOLIDUS?this.state=Z.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:so(t)?(this._emitChars("<"),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){so(t)?(this.state=Z.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(es.SCRIPT,!1)&&m8(this.preprocessor.peek(es.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<es.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Z.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case Y.HYPHEN_MINUS:{this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this._emitChars(dr);break}case Y.EOF:{this._err(ye.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case Y.HYPHEN_MINUS:{this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(dr);break}case Y.EOF:{this._err(ye.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case Y.HYPHEN_MINUS:{this._emitChars("-");break}case Y.LESS_THAN_SIGN:{this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case Y.GREATER_THAN_SIGN:{this.state=Z.SCRIPT_DATA,this._emitChars(">");break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(dr);break}case Y.EOF:{this._err(ye.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===Y.SOLIDUS?(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(es.SCRIPT,!1)&&m8(this.preprocessor.peek(es.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<es.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=Z.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Z.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.SOLIDUS:case Y.GREATER_THAN_SIGN:case Y.EOF:{this.state=Z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Y.EQUALS_SIGN:{this._err(ye.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=Z.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=Z.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:case Y.SOLIDUS:case Y.GREATER_THAN_SIGN:case Y.EOF:{this._leaveAttrName(),this.state=Z.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case Y.EQUALS_SIGN:{this._leaveAttrName(),this.state=Z.BEFORE_ATTRIBUTE_VALUE;break}case Y.QUOTATION_MARK:case Y.APOSTROPHE:case Y.LESS_THAN_SIGN:{this._err(ye.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this.currentAttr.name+=dr;break}default:this.currentAttr.name+=String.fromCodePoint(E0(t)?Mf(t):t)}}_stateAfterAttributeName(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.SOLIDUS:{this.state=Z.SELF_CLOSING_START_TAG;break}case Y.EQUALS_SIGN:{this.state=Z.BEFORE_ATTRIBUTE_VALUE;break}case Y.GREATER_THAN_SIGN:{this.state=Z.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(ye.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=Z.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{this.state=Z.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this.state=Z.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(ye.missingAttributeValue),this.state=Z.DATA,this.emitCurrentTagToken();break}default:this.state=Z.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case Y.QUOTATION_MARK:{this.state=Z.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this.currentAttr.value+=dr;break}case Y.EOF:{this._err(ye.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case Y.APOSTROPHE:{this.state=Z.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this.currentAttr.value+=dr;break}case Y.EOF:{this._err(ye.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this._leaveAttrValue(),this.state=Z.BEFORE_ATTRIBUTE_NAME;break}case Y.AMPERSAND:{this._startCharacterReference();break}case Y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=Z.DATA,this.emitCurrentTagToken();break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),this.currentAttr.value+=dr;break}case Y.QUOTATION_MARK:case Y.APOSTROPHE:case Y.LESS_THAN_SIGN:case Y.EQUALS_SIGN:case Y.GRAVE_ACCENT:{this._err(ye.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case Y.EOF:{this._err(ye.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this._leaveAttrValue(),this.state=Z.BEFORE_ATTRIBUTE_NAME;break}case Y.SOLIDUS:{this._leaveAttrValue(),this.state=Z.SELF_CLOSING_START_TAG;break}case Y.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=Z.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(ye.eofInTag),this._emitEOFToken();break}default:this._err(ye.missingWhitespaceBetweenAttributes),this.state=Z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case Y.GREATER_THAN_SIGN:{const r=this.currentToken;r.selfClosing=!0,this.state=Z.DATA,this.emitCurrentTagToken();break}case Y.EOF:{this._err(ye.eofInTag),this._emitEOFToken();break}default:this._err(ye.unexpectedSolidusInTag),this.state=Z.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const r=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.state=Z.DATA,this.emitCurrentComment(r);break}case Y.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),r.data+=dr;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(es.DASH_DASH,!0)?(this._createCommentToken(es.DASH_DASH.length+1),this.state=Z.COMMENT_START):this._consumeSequenceIfMatch(es.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(es.DOCTYPE.length+1),this.state=Z.DOCTYPE):this._consumeSequenceIfMatch(es.CDATA_START,!0)?this.inForeignNode?this.state=Z.CDATA_SECTION:(this._err(ye.cdataInHtmlContent),this._createCommentToken(es.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=Z.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ye.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Z.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case Y.HYPHEN_MINUS:{this.state=Z.COMMENT_START_DASH;break}case Y.GREATER_THAN_SIGN:{this._err(ye.abruptClosingOfEmptyComment),this.state=Z.DATA;const r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=Z.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const r=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=Z.COMMENT_END;break}case Y.GREATER_THAN_SIGN:{this._err(ye.abruptClosingOfEmptyComment),this.state=Z.DATA,this.emitCurrentComment(r);break}case Y.EOF:{this._err(ye.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=Z.COMMENT,this._stateComment(t)}}_stateComment(t){const r=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=Z.COMMENT_END_DASH;break}case Y.LESS_THAN_SIGN:{r.data+="<",this.state=Z.COMMENT_LESS_THAN_SIGN;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),r.data+=dr;break}case Y.EOF:{this._err(ye.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const r=this.currentToken;switch(t){case Y.EXCLAMATION_MARK:{r.data+="!",this.state=Z.COMMENT_LESS_THAN_SIGN_BANG;break}case Y.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=Z.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===Y.HYPHEN_MINUS?this.state=Z.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Z.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===Y.HYPHEN_MINUS?this.state=Z.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Z.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==Y.GREATER_THAN_SIGN&&t!==Y.EOF&&this._err(ye.nestedComment),this.state=Z.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const r=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{this.state=Z.COMMENT_END;break}case Y.EOF:{this._err(ye.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=Z.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const r=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.state=Z.DATA,this.emitCurrentComment(r);break}case Y.EXCLAMATION_MARK:{this.state=Z.COMMENT_END_BANG;break}case Y.HYPHEN_MINUS:{r.data+="-";break}case Y.EOF:{this._err(ye.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=Z.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const r=this.currentToken;switch(t){case Y.HYPHEN_MINUS:{r.data+="--!",this.state=Z.COMMENT_END_DASH;break}case Y.GREATER_THAN_SIGN:{this._err(ye.incorrectlyClosedComment),this.state=Z.DATA,this.emitCurrentComment(r);break}case Y.EOF:{this._err(ye.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=Z.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Z.BEFORE_DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this.state=Z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case Y.EOF:{this._err(ye.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(ye.missingWhitespaceBeforeDoctypeName),this.state=Z.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(E0(t))this._createDoctypeToken(String.fromCharCode(Mf(t))),this.state=Z.DOCTYPE_NAME;else switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.NULL:{this._err(ye.unexpectedNullCharacter),this._createDoctypeToken(dr),this.state=Z.DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this._err(ye.missingDoctypeName),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=Z.DATA;break}case Y.EOF:{this._err(ye.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=Z.DOCTYPE_NAME}}_stateDoctypeName(t){const r=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Z.AFTER_DOCTYPE_NAME;break}case Y.GREATER_THAN_SIGN:{this.state=Z.DATA,this.emitCurrentDoctype(r);break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),r.name+=dr;break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(E0(t)?Mf(t):t)}}_stateAfterDoctypeName(t){const r=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.state=Z.DATA,this.emitCurrentDoctype(r);break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(es.PUBLIC,!1)?this.state=Z.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(es.SYSTEM,!1)?this.state=Z.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ye.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const r=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Z.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.QUOTATION_MARK:{this._err(ye.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(ye.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(ye.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(r);break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(ye.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{r.publicId="",this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{r.publicId="",this.state=Z.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(ye.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(r);break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(ye.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case Y.QUOTATION_MARK:{this.state=Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),r.publicId+=dr;break}case Y.GREATER_THAN_SIGN:{this._err(ye.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=Z.DATA;break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case Y.APOSTROPHE:{this.state=Z.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),r.publicId+=dr;break}case Y.GREATER_THAN_SIGN:{this._err(ye.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=Z.DATA;break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Z.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case Y.GREATER_THAN_SIGN:{this.state=Z.DATA,this.emitCurrentDoctype(r);break}case Y.QUOTATION_MARK:{this._err(ye.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(ye.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(ye.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const r=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=Z.DATA;break}case Y.QUOTATION_MARK:{r.systemId="",this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{r.systemId="",this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(ye.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const r=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:{this.state=Z.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.QUOTATION_MARK:{this._err(ye.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{this._err(ye.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(ye.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(r);break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(ye.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.QUOTATION_MARK:{r.systemId="",this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case Y.APOSTROPHE:{r.systemId="",this.state=Z.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case Y.GREATER_THAN_SIGN:{this._err(ye.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=Z.DATA,this.emitCurrentDoctype(r);break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(ye.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case Y.QUOTATION_MARK:{this.state=Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),r.systemId+=dr;break}case Y.GREATER_THAN_SIGN:{this._err(ye.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=Z.DATA;break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case Y.APOSTROPHE:{this.state=Z.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter),r.systemId+=dr;break}case Y.GREATER_THAN_SIGN:{this._err(ye.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=Z.DATA;break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case Y.SPACE:case Y.LINE_FEED:case Y.TABULATION:case Y.FORM_FEED:break;case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=Z.DATA;break}case Y.EOF:{this._err(ye.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(ye.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Z.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const r=this.currentToken;switch(t){case Y.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=Z.DATA;break}case Y.NULL:{this._err(ye.unexpectedNullCharacter);break}case Y.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case Y.RIGHT_SQUARE_BRACKET:{this.state=Z.CDATA_SECTION_BRACKET;break}case Y.EOF:{this._err(ye.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===Y.RIGHT_SQUARE_BRACKET?this.state=Z.CDATA_SECTION_END:(this._emitChars("]"),this.state=Z.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case Y.GREATER_THAN_SIGN:{this.state=Z.DATA;break}case Y.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=Z.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Y.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&h8(this.preprocessor.peek(1))?Z.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){h8(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===Y.SEMICOLON&&this._err(ye.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const eO=new Set([N.DD,N.DT,N.LI,N.OPTGROUP,N.OPTION,N.P,N.RB,N.RP,N.RT,N.RTC]),f8=new Set([...eO,N.CAPTION,N.COLGROUP,N.TBODY,N.TD,N.TFOOT,N.TH,N.THEAD,N.TR]),Rg=new Set([N.APPLET,N.CAPTION,N.HTML,N.MARQUEE,N.OBJECT,N.TABLE,N.TD,N.TEMPLATE,N.TH]),epe=new Set([...Rg,N.OL,N.UL]),tpe=new Set([...Rg,N.BUTTON]),p8=new Set([N.ANNOTATION_XML,N.MI,N.MN,N.MO,N.MS,N.MTEXT]),g8=new Set([N.DESC,N.FOREIGN_OBJECT,N.TITLE]),rpe=new Set([N.TR,N.TEMPLATE,N.HTML]),npe=new Set([N.TBODY,N.TFOOT,N.THEAD,N.TEMPLATE,N.HTML]),spe=new Set([N.TABLE,N.TEMPLATE,N.HTML]),ape=new Set([N.TD,N.TH]);class ipe{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=N.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===N.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){const n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){const s=this._indexOf(t)+1;this.items.splice(s,0,r),this.tagIDs.splice(s,0,n),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==Le.HTML);this.shortenToLength(Math.max(r,0))}shortenToLength(t){for(;this.stackTop>=t;){const r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<t)}}popUntilElementPopped(t){const r=this._indexOf(t);this.shortenToLength(Math.max(r,0))}popUntilPopped(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(x4,Le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ape,Le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,r){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(spe,Le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(npe,Le.HTML)}clearBackToTableRowContext(){this.clearBackTo(rpe,Le.HTML)}remove(t){const r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===N.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===N.HTML}hasInDynamicScope(t,r){for(let n=this.stackTop;n>=0;n--){const s=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case Le.HTML:{if(s===t)return!0;if(r.has(s))return!1;break}case Le.SVG:{if(g8.has(s))return!1;break}case Le.MATHML:{if(p8.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Rg)}hasInListItemScope(t){return this.hasInDynamicScope(t,epe)}hasInButtonScope(t){return this.hasInDynamicScope(t,tpe)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case Le.HTML:{if(x4.has(r))return!0;if(Rg.has(r))return!1;break}case Le.SVG:{if(g8.has(r))return!1;break}case Le.MATHML:{if(p8.has(r))return!1;break}}}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===Le.HTML)switch(this.tagIDs[r]){case t:return!0;case N.TABLE:case N.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Le.HTML)switch(this.tagIDs[t]){case N.TBODY:case N.THEAD:case N.TFOOT:return!0;case N.TABLE:case N.HTML:return!1}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===Le.HTML)switch(this.tagIDs[r]){case t:return!0;case N.OPTION:case N.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&eO.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&f8.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&f8.has(this.currentTagId);)this.pop()}}const Ny=3;var $a;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})($a||($a={}));const x8={type:$a.Marker};class ope{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){const n=[],s=r.length,a=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const u=this.entries[l];if(u.type===$a.Marker)break;const{element:c}=u;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===o){const d=this.treeAdapter.getAttrList(c);d.length===s&&n.push({idx:l,attrs:d})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<Ny)return;const r=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,r);if(n.length<Ny)return;const s=new Map(r.map(o=>[o.name,o.value]));let a=0;for(let o=0;o<n.length;o++){const l=n[o];l.attrs.every(u=>s.get(u.name)===u.value)&&(a+=1,a>=Ny&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(x8)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:$a.Element,element:t,token:r})}insertElementAfterBookmark(t,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:$a.Element,element:t,token:r})}removeEntry(t){const r=this.entries.indexOf(t);r!==-1&&this.entries.splice(r,1)}clearToLastMarker(){const t=this.entries.indexOf(x8);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const r=this.entries.find(n=>n.type===$a.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===$a.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===$a.Element&&r.element===t)}}const ao={createDocument(){return{nodeName:"#document",mode:$s.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){const s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=r,s.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};ao.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(ao.isTextNode(r)){r.value+=t;return}}ao.appendChild(e,ao.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&ao.isTextNode(n)?n.value+=t:ao.insertBefore(e,ao.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},tO="html",lpe="about:legacy-compat",cpe="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",rO=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],upe=[...rO,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],dpe=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),nO=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],hpe=[...nO,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function b8(e,t){return t.some(r=>e.startsWith(r))}function mpe(e){return e.name===tO&&e.publicId===null&&(e.systemId===null||e.systemId===lpe)}function fpe(e){if(e.name!==tO)return $s.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===cpe)return $s.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),dpe.has(r))return $s.QUIRKS;let n=t===null?upe:rO;if(b8(r,n))return $s.QUIRKS;if(n=t===null?nO:hpe,b8(r,n))return $s.LIMITED_QUIRKS}return $s.NO_QUIRKS}const y8={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},ppe="definitionurl",gpe="definitionURL",xpe=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),bpe=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:Le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Le.XMLNS}]]),ype=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),vpe=new Set([N.B,N.BIG,N.BLOCKQUOTE,N.BODY,N.BR,N.CENTER,N.CODE,N.DD,N.DIV,N.DL,N.DT,N.EM,N.EMBED,N.H1,N.H2,N.H3,N.H4,N.H5,N.H6,N.HEAD,N.HR,N.I,N.IMG,N.LI,N.LISTING,N.MENU,N.META,N.NOBR,N.OL,N.P,N.PRE,N.RUBY,N.S,N.SMALL,N.SPAN,N.STRONG,N.STRIKE,N.SUB,N.SUP,N.TABLE,N.TT,N.U,N.UL,N.VAR]);function wpe(e){const t=e.tagID;return t===N.FONT&&e.attrs.some(({name:n})=>n===ql.COLOR||n===ql.SIZE||n===ql.FACE)||vpe.has(t)}function sO(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===ppe){e.attrs[t].name=gpe;break}}function aO(e){for(let t=0;t<e.attrs.length;t++){const r=xpe.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function L5(e){for(let t=0;t<e.attrs.length;t++){const r=bpe.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function Epe(e){const t=ype.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=wd(e.tagName))}function kpe(e,t){return t===Le.MATHML&&(e===N.MI||e===N.MO||e===N.MN||e===N.MS||e===N.MTEXT)}function Npe(e,t,r){if(t===Le.MATHML&&e===N.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===ql.ENCODING){const s=r[n].value.toLowerCase();return s===y8.TEXT_HTML||s===y8.APPLICATION_XML}}return t===Le.SVG&&(e===N.FOREIGN_OBJECT||e===N.DESC||e===N.TITLE)}function Spe(e,t,r,n){return(!n||n===Le.HTML)&&Npe(e,t,r)||(!n||n===Le.MATHML)&&kpe(e,t)}const Tpe="hidden",Cpe=8,_pe=3;var re;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(re||(re={}));const Ape={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},iO=new Set([N.TABLE,N.TBODY,N.TFOOT,N.THEAD,N.TR]),v8={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ao,onParseError:null};class w8{constructor(t,r,n=null,s=null){this.fragmentContext=n,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=re.INITIAL,this.originalInsertionMode=re.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...v8,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new Jfe(this.options,this),this.activeFormattingElements=new ope(this.treeAdapter),this.fragmentContextID=n?wd(this.treeAdapter.getTagName(n)):N.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new ipe(this.document,this.treeAdapter,this)}static parse(t,r){const n=new this(r);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,r){const n={...v8,...r};t??(t=n.treeAdapter.createElement(me.TEMPLATE,Le.HTML,[]));const s=n.treeAdapter.createElement("documentmock",Le.HTML,[]),a=new this(n,s,t);return a.fragmentContextID===N.TEMPLATE&&a.tmplInsertionModeStack.unshift(re.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,n){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:Ape,o={code:r,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(t,r,n){var s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var n,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(n=this.treeAdapter).onItemPop)===null||s===void 0||s.call(n,t,this.openElements.current),r){let a,o;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,o=this.fragmentContextID):{current:a,currentTagId:o}=this.openElements,this._setContextModes(a,o)}}_setContextModes(t,r){const n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===Le.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&r!==void 0&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,Le.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=re.TEXT}switchToPlaintextParsing(){this.insertionMode=re.TEXT,this.originalInsertionMode=re.IN_BODY,this.tokenizer.state=jr.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===me.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Le.HTML))switch(this.fragmentContextID){case N.TITLE:case N.TEXTAREA:{this.tokenizer.state=jr.RCDATA;break}case N.STYLE:case N.XMP:case N.IFRAME:case N.NOEMBED:case N.NOFRAMES:case N.NOSCRIPT:{this.tokenizer.state=jr.RAWTEXT;break}case N.SCRIPT:{this.tokenizer.state=jr.SCRIPT_DATA;break}case N.PLAINTEXT:{this.tokenizer.state=jr.PLAINTEXT;break}}}_setDocumentType(t){const r=t.name||"",n=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,s),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){const n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){const n=this.treeAdapter.createElement(t,Le.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){const r=this.treeAdapter.createElement(t.tagName,Le.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(me.HTML,Le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,N.HTML)}_appendCommentNode(t,r){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(r),a=n?s.lastIndexOf(n):s.length,o=s[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:u,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:u,endCol:c,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){const n=r.location,s=this.treeAdapter.getTagName(t),a=r.type===jt.END_TAG&&s===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===N.SVG&&this.treeAdapter.getTagName(r)===me.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===Le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===N.MGLYPH||t.tagID===N.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,r,Le.HTML)}_processToken(t){switch(t.type){case jt.CHARACTER:{this.onCharacter(t);break}case jt.NULL_CHARACTER:{this.onNullCharacter(t);break}case jt.COMMENT:{this.onComment(t);break}case jt.DOCTYPE:{this.onDoctype(t);break}case jt.START_TAG:{this._processStartTag(t);break}case jt.END_TAG:{this.onEndTag(t);break}case jt.EOF:{this.onEof(t);break}case jt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){const s=this.treeAdapter.getNamespaceURI(r),a=this.treeAdapter.getAttrList(r);return Spe(t,s,a,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const r=this.activeFormattingElements.entries.findIndex(s=>s.type===$a.Marker||this.openElements.contains(s.element)),n=r===-1?t-1:r-1;for(let s=n;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=re.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(N.P),this.openElements.popUntilTagNamePopped(N.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case N.TR:{this.insertionMode=re.IN_ROW;return}case N.TBODY:case N.THEAD:case N.TFOOT:{this.insertionMode=re.IN_TABLE_BODY;return}case N.CAPTION:{this.insertionMode=re.IN_CAPTION;return}case N.COLGROUP:{this.insertionMode=re.IN_COLUMN_GROUP;return}case N.TABLE:{this.insertionMode=re.IN_TABLE;return}case N.BODY:{this.insertionMode=re.IN_BODY;return}case N.FRAMESET:{this.insertionMode=re.IN_FRAMESET;return}case N.SELECT:{this._resetInsertionModeForSelect(t);return}case N.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case N.HTML:{this.insertionMode=this.headElement?re.AFTER_HEAD:re.BEFORE_HEAD;return}case N.TD:case N.TH:{if(t>0){this.insertionMode=re.IN_CELL;return}break}case N.HEAD:{if(t>0){this.insertionMode=re.IN_HEAD;return}break}}this.insertionMode=re.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){const n=this.openElements.tagIDs[r];if(n===N.TEMPLATE)break;if(n===N.TABLE){this.insertionMode=re.IN_SELECT_IN_TABLE;return}}this.insertionMode=re.IN_SELECT}_isElementCausesFosterParenting(t){return iO.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case N.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===Le.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case N.TABLE:{const n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){const n=this.treeAdapter.getNamespaceURI(t);return Yfe[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){a1e(this,t);return}switch(this.insertionMode){case re.INITIAL:{u0(this,t);break}case re.BEFORE_HTML:{$0(this,t);break}case re.BEFORE_HEAD:{z0(this,t);break}case re.IN_HEAD:{H0(this,t);break}case re.IN_HEAD_NO_SCRIPT:{q0(this,t);break}case re.AFTER_HEAD:{W0(this,t);break}case re.IN_BODY:case re.IN_CAPTION:case re.IN_CELL:case re.IN_TEMPLATE:{lO(this,t);break}case re.TEXT:case re.IN_SELECT:case re.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case re.IN_TABLE:case re.IN_TABLE_BODY:case re.IN_ROW:{Sy(this,t);break}case re.IN_TABLE_TEXT:{fO(this,t);break}case re.IN_COLUMN_GROUP:{Dg(this,t);break}case re.AFTER_BODY:{Mg(this,t);break}case re.AFTER_AFTER_BODY:{vp(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){s1e(this,t);return}switch(this.insertionMode){case re.INITIAL:{u0(this,t);break}case re.BEFORE_HTML:{$0(this,t);break}case re.BEFORE_HEAD:{z0(this,t);break}case re.IN_HEAD:{H0(this,t);break}case re.IN_HEAD_NO_SCRIPT:{q0(this,t);break}case re.AFTER_HEAD:{W0(this,t);break}case re.TEXT:{this._insertCharacters(t);break}case re.IN_TABLE:case re.IN_TABLE_BODY:case re.IN_ROW:{Sy(this,t);break}case re.IN_COLUMN_GROUP:{Dg(this,t);break}case re.AFTER_BODY:{Mg(this,t);break}case re.AFTER_AFTER_BODY:{vp(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){b4(this,t);return}switch(this.insertionMode){case re.INITIAL:case re.BEFORE_HTML:case re.BEFORE_HEAD:case re.IN_HEAD:case re.IN_HEAD_NO_SCRIPT:case re.AFTER_HEAD:case re.IN_BODY:case re.IN_TABLE:case re.IN_CAPTION:case re.IN_COLUMN_GROUP:case re.IN_TABLE_BODY:case re.IN_ROW:case re.IN_CELL:case re.IN_SELECT:case re.IN_SELECT_IN_TABLE:case re.IN_TEMPLATE:case re.IN_FRAMESET:case re.AFTER_FRAMESET:{b4(this,t);break}case re.IN_TABLE_TEXT:{d0(this,t);break}case re.AFTER_BODY:{Lpe(this,t);break}case re.AFTER_AFTER_BODY:case re.AFTER_AFTER_FRAMESET:{Ppe(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case re.INITIAL:{Fpe(this,t);break}case re.BEFORE_HEAD:case re.IN_HEAD:case re.IN_HEAD_NO_SCRIPT:case re.AFTER_HEAD:{this._err(t,ye.misplacedDoctype);break}case re.IN_TABLE_TEXT:{d0(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ye.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?i1e(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case re.INITIAL:{u0(this,t);break}case re.BEFORE_HTML:{Bpe(this,t);break}case re.BEFORE_HEAD:{$pe(this,t);break}case re.IN_HEAD:{ka(this,t);break}case re.IN_HEAD_NO_SCRIPT:{qpe(this,t);break}case re.AFTER_HEAD:{Vpe(this,t);break}case re.IN_BODY:{jn(this,t);break}case re.IN_TABLE:{td(this,t);break}case re.IN_TABLE_TEXT:{d0(this,t);break}case re.IN_CAPTION:{zge(this,t);break}case re.IN_COLUMN_GROUP:{B5(this,t);break}case re.IN_TABLE_BODY:{sx(this,t);break}case re.IN_ROW:{ax(this,t);break}case re.IN_CELL:{Wge(this,t);break}case re.IN_SELECT:{xO(this,t);break}case re.IN_SELECT_IN_TABLE:{Gge(this,t);break}case re.IN_TEMPLATE:{Yge(this,t);break}case re.AFTER_BODY:{Xge(this,t);break}case re.IN_FRAMESET:{Zge(this,t);break}case re.AFTER_FRAMESET:{e1e(this,t);break}case re.AFTER_AFTER_BODY:{r1e(this,t);break}case re.AFTER_AFTER_FRAMESET:{n1e(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?o1e(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case re.INITIAL:{u0(this,t);break}case re.BEFORE_HTML:{Upe(this,t);break}case re.BEFORE_HEAD:{zpe(this,t);break}case re.IN_HEAD:{Hpe(this,t);break}case re.IN_HEAD_NO_SCRIPT:{Wpe(this,t);break}case re.AFTER_HEAD:{Gpe(this,t);break}case re.IN_BODY:{nx(this,t);break}case re.TEXT:{Rge(this,t);break}case re.IN_TABLE:{Mh(this,t);break}case re.IN_TABLE_TEXT:{d0(this,t);break}case re.IN_CAPTION:{Hge(this,t);break}case re.IN_COLUMN_GROUP:{qge(this,t);break}case re.IN_TABLE_BODY:{y4(this,t);break}case re.IN_ROW:{gO(this,t);break}case re.IN_CELL:{Vge(this,t);break}case re.IN_SELECT:{bO(this,t);break}case re.IN_SELECT_IN_TABLE:{Kge(this,t);break}case re.IN_TEMPLATE:{Qge(this,t);break}case re.AFTER_BODY:{vO(this,t);break}case re.IN_FRAMESET:{Jge(this,t);break}case re.AFTER_FRAMESET:{t1e(this,t);break}case re.AFTER_AFTER_BODY:{vp(this,t);break}}}onEof(t){switch(this.insertionMode){case re.INITIAL:{u0(this,t);break}case re.BEFORE_HTML:{$0(this,t);break}case re.BEFORE_HEAD:{z0(this,t);break}case re.IN_HEAD:{H0(this,t);break}case re.IN_HEAD_NO_SCRIPT:{q0(this,t);break}case re.AFTER_HEAD:{W0(this,t);break}case re.IN_BODY:case re.IN_TABLE:case re.IN_CAPTION:case re.IN_COLUMN_GROUP:case re.IN_TABLE_BODY:case re.IN_ROW:case re.IN_CELL:case re.IN_SELECT:case re.IN_SELECT_IN_TABLE:{hO(this,t);break}case re.TEXT:{Dge(this,t);break}case re.IN_TABLE_TEXT:{d0(this,t);break}case re.IN_TEMPLATE:{yO(this,t);break}case re.AFTER_BODY:case re.IN_FRAMESET:case re.AFTER_FRAMESET:case re.AFTER_AFTER_BODY:case re.AFTER_AFTER_FRAMESET:{F5(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===Y.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case re.IN_HEAD:case re.IN_HEAD_NO_SCRIPT:case re.AFTER_HEAD:case re.TEXT:case re.IN_COLUMN_GROUP:case re.IN_SELECT:case re.IN_SELECT_IN_TABLE:case re.IN_FRAMESET:case re.AFTER_FRAMESET:{this._insertCharacters(t);break}case re.IN_BODY:case re.IN_CAPTION:case re.IN_CELL:case re.IN_TEMPLATE:case re.AFTER_BODY:case re.AFTER_AFTER_BODY:case re.AFTER_AFTER_FRAMESET:{oO(this,t);break}case re.IN_TABLE:case re.IN_TABLE_BODY:case re.IN_ROW:{Sy(this,t);break}case re.IN_TABLE_TEXT:{mO(this,t);break}}}}function jpe(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):dO(e,t),r}function Ipe(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const s=e.openElements.items[n];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[n])&&(r=s)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}function Rpe(e,t,r){let n=t,s=e.openElements.getCommonAncestor(t);for(let a=0,o=s;o!==r;a++,o=s){s=e.openElements.getCommonAncestor(o);const l=e.activeFormattingElements.getElementEntry(o),u=l&&a>=_pe;!l||u?(u&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(o)):(o=Dpe(e,l),n===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(o,n),n=o)}return n}function Dpe(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function Mpe(e,t,r){const n=e.treeAdapter.getTagName(t),s=wd(n);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(r);else{const a=e.treeAdapter.getNamespaceURI(t);s===N.TEMPLATE&&a===Le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function Ope(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:s}=r,a=e.treeAdapter.createElement(s.tagName,n,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,s.tagID)}function P5(e,t){for(let r=0;r<Cpe;r++){const n=jpe(e,t);if(!n)break;const s=Ipe(e,n);if(!s)break;e.activeFormattingElements.bookmark=n;const a=Rpe(e,s,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&Mpe(e,o,a),Ope(e,s,n)}}function b4(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Lpe(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Ppe(e,t){e._appendCommentNode(t,e.document)}function F5(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(n);if(s&&!s.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(a);o&&!o.endTag&&e._setEndLocation(a,t)}}}}function Fpe(e,t){e._setDocumentType(t);const r=t.forceQuirks?$s.QUIRKS:fpe(t);mpe(t)||e._err(t,ye.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=re.BEFORE_HTML}function u0(e,t){e._err(t,ye.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,$s.QUIRKS),e.insertionMode=re.BEFORE_HTML,e._processToken(t)}function Bpe(e,t){t.tagID===N.HTML?(e._insertElement(t,Le.HTML),e.insertionMode=re.BEFORE_HEAD):$0(e,t)}function Upe(e,t){const r=t.tagID;(r===N.HTML||r===N.HEAD||r===N.BODY||r===N.BR)&&$0(e,t)}function $0(e,t){e._insertFakeRootElement(),e.insertionMode=re.BEFORE_HEAD,e._processToken(t)}function $pe(e,t){switch(t.tagID){case N.HTML:{jn(e,t);break}case N.HEAD:{e._insertElement(t,Le.HTML),e.headElement=e.openElements.current,e.insertionMode=re.IN_HEAD;break}default:z0(e,t)}}function zpe(e,t){const r=t.tagID;r===N.HEAD||r===N.BODY||r===N.HTML||r===N.BR?z0(e,t):e._err(t,ye.endTagWithoutMatchingOpenElement)}function z0(e,t){e._insertFakeElement(me.HEAD,N.HEAD),e.headElement=e.openElements.current,e.insertionMode=re.IN_HEAD,e._processToken(t)}function ka(e,t){switch(t.tagID){case N.HTML:{jn(e,t);break}case N.BASE:case N.BASEFONT:case N.BGSOUND:case N.LINK:case N.META:{e._appendElement(t,Le.HTML),t.ackSelfClosing=!0;break}case N.TITLE:{e._switchToTextParsing(t,jr.RCDATA);break}case N.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,jr.RAWTEXT):(e._insertElement(t,Le.HTML),e.insertionMode=re.IN_HEAD_NO_SCRIPT);break}case N.NOFRAMES:case N.STYLE:{e._switchToTextParsing(t,jr.RAWTEXT);break}case N.SCRIPT:{e._switchToTextParsing(t,jr.SCRIPT_DATA);break}case N.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=re.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(re.IN_TEMPLATE);break}case N.HEAD:{e._err(t,ye.misplacedStartTagForHeadElement);break}default:H0(e,t)}}function Hpe(e,t){switch(t.tagID){case N.HEAD:{e.openElements.pop(),e.insertionMode=re.AFTER_HEAD;break}case N.BODY:case N.BR:case N.HTML:{H0(e,t);break}case N.TEMPLATE:{bc(e,t);break}default:e._err(t,ye.endTagWithoutMatchingOpenElement)}}function bc(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==N.TEMPLATE&&e._err(t,ye.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(N.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ye.endTagWithoutMatchingOpenElement)}function H0(e,t){e.openElements.pop(),e.insertionMode=re.AFTER_HEAD,e._processToken(t)}function qpe(e,t){switch(t.tagID){case N.HTML:{jn(e,t);break}case N.BASEFONT:case N.BGSOUND:case N.HEAD:case N.LINK:case N.META:case N.NOFRAMES:case N.STYLE:{ka(e,t);break}case N.NOSCRIPT:{e._err(t,ye.nestedNoscriptInHead);break}default:q0(e,t)}}function Wpe(e,t){switch(t.tagID){case N.NOSCRIPT:{e.openElements.pop(),e.insertionMode=re.IN_HEAD;break}case N.BR:{q0(e,t);break}default:e._err(t,ye.endTagWithoutMatchingOpenElement)}}function q0(e,t){const r=t.type===jt.EOF?ye.openElementsLeftAfterEof:ye.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=re.IN_HEAD,e._processToken(t)}function Vpe(e,t){switch(t.tagID){case N.HTML:{jn(e,t);break}case N.BODY:{e._insertElement(t,Le.HTML),e.framesetOk=!1,e.insertionMode=re.IN_BODY;break}case N.FRAMESET:{e._insertElement(t,Le.HTML),e.insertionMode=re.IN_FRAMESET;break}case N.BASE:case N.BASEFONT:case N.BGSOUND:case N.LINK:case N.META:case N.NOFRAMES:case N.SCRIPT:case N.STYLE:case N.TEMPLATE:case N.TITLE:{e._err(t,ye.abandonedHeadElementChild),e.openElements.push(e.headElement,N.HEAD),ka(e,t),e.openElements.remove(e.headElement);break}case N.HEAD:{e._err(t,ye.misplacedStartTagForHeadElement);break}default:W0(e,t)}}function Gpe(e,t){switch(t.tagID){case N.BODY:case N.HTML:case N.BR:{W0(e,t);break}case N.TEMPLATE:{bc(e,t);break}default:e._err(t,ye.endTagWithoutMatchingOpenElement)}}function W0(e,t){e._insertFakeElement(me.BODY,N.BODY),e.insertionMode=re.IN_BODY,rx(e,t)}function rx(e,t){switch(t.type){case jt.CHARACTER:{lO(e,t);break}case jt.WHITESPACE_CHARACTER:{oO(e,t);break}case jt.COMMENT:{b4(e,t);break}case jt.START_TAG:{jn(e,t);break}case jt.END_TAG:{nx(e,t);break}case jt.EOF:{hO(e,t);break}}}function oO(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function lO(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Kpe(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Ype(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function Qpe(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Le.HTML),e.insertionMode=re.IN_FRAMESET)}function Xpe(e,t){e.openElements.hasInButtonScope(N.P)&&e._closePElement(),e._insertElement(t,Le.HTML)}function Zpe(e,t){e.openElements.hasInButtonScope(N.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&x4.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Le.HTML)}function Jpe(e,t){e.openElements.hasInButtonScope(N.P)&&e._closePElement(),e._insertElement(t,Le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ege(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(N.P)&&e._closePElement(),e._insertElement(t,Le.HTML),r||(e.formElement=e.openElements.current))}function tge(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const s=e.openElements.tagIDs[n];if(r===N.LI&&s===N.LI||(r===N.DD||r===N.DT)&&(s===N.DD||s===N.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==N.ADDRESS&&s!==N.DIV&&s!==N.P&&e._isSpecialElement(e.openElements.items[n],s))break}e.openElements.hasInButtonScope(N.P)&&e._closePElement(),e._insertElement(t,Le.HTML)}function rge(e,t){e.openElements.hasInButtonScope(N.P)&&e._closePElement(),e._insertElement(t,Le.HTML),e.tokenizer.state=jr.PLAINTEXT}function nge(e,t){e.openElements.hasInScope(N.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(N.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Le.HTML),e.framesetOk=!1}function sge(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(me.A);r&&(P5(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,Le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function age(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ige(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(N.NOBR)&&(P5(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function oge(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function lge(e,t){e.treeAdapter.getDocumentMode(e.document)!==$s.QUIRKS&&e.openElements.hasInButtonScope(N.P)&&e._closePElement(),e._insertElement(t,Le.HTML),e.framesetOk=!1,e.insertionMode=re.IN_TABLE}function cO(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function uO(e){const t=ZM(e,ql.TYPE);return t!=null&&t.toLowerCase()===Tpe}function cge(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Le.HTML),uO(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function uge(e,t){e._appendElement(t,Le.HTML),t.ackSelfClosing=!0}function dge(e,t){e.openElements.hasInButtonScope(N.P)&&e._closePElement(),e._appendElement(t,Le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function hge(e,t){t.tagName=me.IMG,t.tagID=N.IMG,cO(e,t)}function mge(e,t){e._insertElement(t,Le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=jr.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=re.TEXT}
1595function fge(e,t){e.openElements.hasInButtonScope(N.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,jr.RAWTEXT)}function pge(e,t){e.framesetOk=!1,e._switchToTextParsing(t,jr.RAWTEXT)}function E8(e,t){e._switchToTextParsing(t,jr.RAWTEXT)}function gge(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===re.IN_TABLE||e.insertionMode===re.IN_CAPTION||e.insertionMode===re.IN_TABLE_BODY||e.insertionMode===re.IN_ROW||e.insertionMode===re.IN_CELL?re.IN_SELECT_IN_TABLE:re.IN_SELECT}function xge(e,t){e.openElements.currentTagId===N.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Le.HTML)}function bge(e,t){e.openElements.hasInScope(N.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Le.HTML)}function yge(e,t){e.openElements.hasInScope(N.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(N.RTC),e._insertElement(t,Le.HTML)}function vge(e,t){e._reconstructActiveFormattingElements(),sO(t),L5(t),t.selfClosing?e._appendElement(t,Le.MATHML):e._insertElement(t,Le.MATHML),t.ackSelfClosing=!0}function wge(e,t){e._reconstructActiveFormattingElements(),aO(t),L5(t),t.selfClosing?e._appendElement(t,Le.SVG):e._insertElement(t,Le.SVG),t.ackSelfClosing=!0}function k8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Le.HTML)}function jn(e,t){switch(t.tagID){case N.I:case N.S:case N.B:case N.U:case N.EM:case N.TT:case N.BIG:case N.CODE:case N.FONT:case N.SMALL:case N.STRIKE:case N.STRONG:{age(e,t);break}case N.A:{sge(e,t);break}case N.H1:case N.H2:case N.H3:case N.H4:case N.H5:case N.H6:{Zpe(e,t);break}case N.P:case N.DL:case N.OL:case N.UL:case N.DIV:case N.DIR:case N.NAV:case N.MAIN:case N.MENU:case N.ASIDE:case N.CENTER:case N.FIGURE:case N.FOOTER:case N.HEADER:case N.HGROUP:case N.DIALOG:case N.DETAILS:case N.ADDRESS:case N.ARTICLE:case N.SEARCH:case N.SECTION:case N.SUMMARY:case N.FIELDSET:case N.BLOCKQUOTE:case N.FIGCAPTION:{Xpe(e,t);break}case N.LI:case N.DD:case N.DT:{tge(e,t);break}case N.BR:case N.IMG:case N.WBR:case N.AREA:case N.EMBED:case N.KEYGEN:{cO(e,t);break}case N.HR:{dge(e,t);break}case N.RB:case N.RTC:{bge(e,t);break}case N.RT:case N.RP:{yge(e,t);break}case N.PRE:case N.LISTING:{Jpe(e,t);break}
vendor: 25,479 bytes, line 1595
1595case N.XMP:{fge(e,t);break}case N.SVG:{wge(e,t);break}case N.HTML:{Kpe(e,t);break}case N.BASE:case N.LINK:case N.META:case N.STYLE:case N.TITLE:case N.SCRIPT:case N.BGSOUND:case N.BASEFONT:case N.TEMPLATE:{ka(e,t);break}case N.BODY:{Ype(e,t);break}case N.FORM:{ege(e,t);break}case N.NOBR:{ige(e,t);break}case N.MATH:{vge(e,t);break}case N.TABLE:{lge(e,t);break}case N.INPUT:{cge(e,t);break}case N.PARAM:case N.TRACK:case N.SOURCE:{uge(e,t);break}case N.IMAGE:{hge(e,t);break}case N.BUTTON:{nge(e,t);break}case N.APPLET:case N.OBJECT:case N.MARQUEE:{oge(e,t);break}case N.IFRAME:{pge(e,t);break}case N.SELECT:{gge(e,t);break}case N.OPTION:case N.OPTGROUP:{xge(e,t);break}case N.NOEMBED:case N.NOFRAMES:{E8(e,t);break}case N.FRAMESET:{Qpe(e,t);break}case N.TEXTAREA:{mge(e,t);break}case N.NOSCRIPT:{e.options.scriptingEnabled?E8(e,t):k8(e,t);break}case N.PLAINTEXT:{rge(e,t);break}case N.COL:case N.TH:case N.TD:case N.TR:case N.HEAD:case N.FRAME:case N.TBODY:case N.TFOOT:case N.THEAD:case N.CAPTION:case N.COLGROUP:break;default:k8(e,t)}}function Ege(e,t){if(e.openElements.hasInScope(N.BODY)&&(e.insertionMode=re.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function kge(e,t){e.openElements.hasInScope(N.BODY)&&(e.insertionMode=re.AFTER_BODY,vO(e,t))}function Nge(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function Sge(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(N.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(N.FORM):r&&e.openElements.remove(r))}function Tge(e){e.openElements.hasInButtonScope(N.P)||e._insertFakeElement(me.P,N.P),e._closePElement()}function Cge(e){e.openElements.hasInListItemScope(N.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(N.LI),e.openElements.popUntilTagNamePopped(N.LI))}function _ge(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function Age(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function jge(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function Ige(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(me.BR,N.BR),e.openElements.pop(),e.framesetOk=!1}function dO(e,t){const r=t.tagName,n=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],o=e.openElements.tagIDs[s];if(n===o&&(n!==N.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,o))break}}function nx(e,t){switch(t.tagID){case N.A:case N.B:case N.I:case N.S:case N.U:case N.EM:case N.TT:case N.BIG:case N.CODE:case N.FONT:case N.NOBR:case N.SMALL:case N.STRIKE:case N.STRONG:{P5(e,t);break}case N.P:{Tge(e);break}case N.DL:case N.UL:case N.OL:case N.DIR:case N.DIV:case N.NAV:case N.PRE:case N.MAIN:case N.MENU:case N.ASIDE:case N.BUTTON:case N.CENTER:case N.FIGURE:case N.FOOTER:case N.HEADER:case N.HGROUP:case N.DIALOG:case N.ADDRESS:case N.ARTICLE:case N.DETAILS:case N.SEARCH:case N.SECTION:case N.SUMMARY:case N.LISTING:case N.FIELDSET:case N.BLOCKQUOTE:case N.FIGCAPTION:{Nge(e,t);break}case N.LI:{Cge(e);break}case N.DD:case N.DT:{_ge(e,t);break}case N.H1:case N.H2:case N.H3:case N.H4:case N.H5:case N.H6:{Age(e);break}case N.BR:{Ige(e);break}case N.BODY:{Ege(e,t);break}case N.HTML:{kge(e,t);break}case N.FORM:{Sge(e);break}case N.APPLET:case N.OBJECT:case N.MARQUEE:{jge(e,t);break}case N.TEMPLATE:{bc(e,t);break}default:dO(e,t)}}function hO(e,t){e.tmplInsertionModeStack.length>0?yO(e,t):F5(e,t)}function Rge(e,t){var r;t.tagID===N.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Dge(e,t){e._err(t,ye.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Sy(e,t){if(e.openElements.currentTagId!==void 0&&iO.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=re.IN_TABLE_TEXT,t.type){case jt.CHARACTER:{fO(e,t);break}case jt.WHITESPACE_CHARACTER:{mO(e,t);break}}else mm(e,t)}function Mge(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Le.HTML),e.insertionMode=re.IN_CAPTION}function Oge(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Le.HTML),e.insertionMode=re.IN_COLUMN_GROUP}function Lge(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(me.COLGROUP,N.COLGROUP),e.insertionMode=re.IN_COLUMN_GROUP,B5(e,t)}function Pge(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Le.HTML),e.insertionMode=re.IN_TABLE_BODY}function Fge(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(me.TBODY,N.TBODY),e.insertionMode=re.IN_TABLE_BODY,sx(e,t)}function Bge(e,t){e.openElements.hasInTableScope(N.TABLE)&&(e.openElements.popUntilTagNamePopped(N.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Uge(e,t){uO(t)?e._appendElement(t,Le.HTML):mm(e,t),t.ackSelfClosing=!0}function $ge(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function td(e,t){switch(t.tagID){case N.TD:case N.TH:case N.TR:{Fge(e,t);break}case N.STYLE:case N.SCRIPT:case N.TEMPLATE:{ka(e,t);break}case N.COL:{Lge(e,t);break}case N.FORM:{$ge(e,t);break}case N.TABLE:{Bge(e,t);break}case N.TBODY:case N.TFOOT:case N.THEAD:{Pge(e,t);break}case N.INPUT:{Uge(e,t);break}case N.CAPTION:{Mge(e,t);break}case N.COLGROUP:{Oge(e,t);break}default:mm(e,t)}}function Mh(e,t){switch(t.tagID){case N.TABLE:{e.openElements.hasInTableScope(N.TABLE)&&(e.openElements.popUntilTagNamePopped(N.TABLE),e._resetInsertionMode());break}case N.TEMPLATE:{bc(e,t);break}case N.BODY:case N.CAPTION:case N.COL:case N.COLGROUP:case N.HTML:case N.TBODY:case N.TD:case N.TFOOT:case N.TH:case N.THEAD:case N.TR:break;default:mm(e,t)}}function mm(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,rx(e,t),e.fosterParentingEnabled=r}function mO(e,t){e.pendingCharacterTokens.push(t)}function fO(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function d0(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)mm(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const pO=new Set([N.CAPTION,N.COL,N.COLGROUP,N.TBODY,N.TD,N.TFOOT,N.TH,N.THEAD,N.TR]);function zge(e,t){const r=t.tagID;pO.has(r)?e.openElements.hasInTableScope(N.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(N.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=re.IN_TABLE,td(e,t)):jn(e,t)}function Hge(e,t){const r=t.tagID;switch(r){case N.CAPTION:case N.TABLE:{e.openElements.hasInTableScope(N.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(N.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=re.IN_TABLE,r===N.TABLE&&Mh(e,t));break}case N.BODY:case N.COL:case N.COLGROUP:case N.HTML:case N.TBODY:case N.TD:case N.TFOOT:case N.TH:case N.THEAD:case N.TR:break;default:nx(e,t)}}function B5(e,t){switch(t.tagID){case N.HTML:{jn(e,t);break}case N.COL:{e._appendElement(t,Le.HTML),t.ackSelfClosing=!0;break}case N.TEMPLATE:{ka(e,t);break}default:Dg(e,t)}}function qge(e,t){switch(t.tagID){case N.COLGROUP:{e.openElements.currentTagId===N.COLGROUP&&(e.openElements.pop(),e.insertionMode=re.IN_TABLE);break}case N.TEMPLATE:{bc(e,t);break}case N.COL:break;default:Dg(e,t)}}function Dg(e,t){e.openElements.currentTagId===N.COLGROUP&&(e.openElements.pop(),e.insertionMode=re.IN_TABLE,e._processToken(t))}function sx(e,t){switch(t.tagID){case N.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Le.HTML),e.insertionMode=re.IN_ROW;break}case N.TH:case N.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(me.TR,N.TR),e.insertionMode=re.IN_ROW,ax(e,t);break}case N.CAPTION:case N.COL:case N.COLGROUP:case N.TBODY:case N.TFOOT:case N.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=re.IN_TABLE,td(e,t));break}default:td(e,t)}}function y4(e,t){const r=t.tagID;switch(t.tagID){case N.TBODY:case N.TFOOT:case N.THEAD:{e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=re.IN_TABLE);break}case N.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=re.IN_TABLE,Mh(e,t));break}case N.BODY:case N.CAPTION:case N.COL:case N.COLGROUP:case N.HTML:case N.TD:case N.TH:case N.TR:break;default:Mh(e,t)}}function ax(e,t){switch(t.tagID){case N.TH:case N.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,Le.HTML),e.insertionMode=re.IN_CELL,e.activeFormattingElements.insertMarker();break}case N.CAPTION:case N.COL:case N.COLGROUP:case N.TBODY:case N.TFOOT:case N.THEAD:case N.TR:{e.openElements.hasInTableScope(N.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=re.IN_TABLE_BODY,sx(e,t));break}default:td(e,t)}}function gO(e,t){switch(t.tagID){case N.TR:{e.openElements.hasInTableScope(N.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=re.IN_TABLE_BODY);break}case N.TABLE:{e.openElements.hasInTableScope(N.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=re.IN_TABLE_BODY,y4(e,t));break}case N.TBODY:case N.TFOOT:case N.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(N.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=re.IN_TABLE_BODY,y4(e,t));break}case N.BODY:case N.CAPTION:case N.COL:case N.COLGROUP:case N.HTML:case N.TD:case N.TH:break;default:Mh(e,t)}}function Wge(e,t){const r=t.tagID;pO.has(r)?(e.openElements.hasInTableScope(N.TD)||e.openElements.hasInTableScope(N.TH))&&(e._closeTableCell(),ax(e,t)):jn(e,t)}function Vge(e,t){const r=t.tagID;switch(r){case N.TD:case N.TH:{e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=re.IN_ROW);break}case N.TABLE:case N.TBODY:case N.TFOOT:case N.THEAD:case N.TR:{e.openElements.hasInTableScope(r)&&(e._closeTableCell(),gO(e,t));break}case N.BODY:case N.CAPTION:case N.COL:case N.COLGROUP:case N.HTML:break;default:nx(e,t)}}function xO(e,t){switch(t.tagID){case N.HTML:{jn(e,t);break}case N.OPTION:{e.openElements.currentTagId===N.OPTION&&e.openElements.pop(),e._insertElement(t,Le.HTML);break}case N.OPTGROUP:{e.openElements.currentTagId===N.OPTION&&e.openElements.pop(),e.openElements.currentTagId===N.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Le.HTML);break}case N.HR:{e.openElements.currentTagId===N.OPTION&&e.openElements.pop(),e.openElements.currentTagId===N.OPTGROUP&&e.openElements.pop(),e._appendElement(t,Le.HTML),t.ackSelfClosing=!0;break}case N.INPUT:case N.KEYGEN:case N.TEXTAREA:case N.SELECT:{e.openElements.hasInSelectScope(N.SELECT)&&(e.openElements.popUntilTagNamePopped(N.SELECT),e._resetInsertionMode(),t.tagID!==N.SELECT&&e._processStartTag(t));break}case N.SCRIPT:case N.TEMPLATE:{ka(e,t);break}}}function bO(e,t){switch(t.tagID){case N.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===N.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===N.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===N.OPTGROUP&&e.openElements.pop();break}case N.OPTION:{e.openElements.currentTagId===N.OPTION&&e.openElements.pop();break}case N.SELECT:{e.openElements.hasInSelectScope(N.SELECT)&&(e.openElements.popUntilTagNamePopped(N.SELECT),e._resetInsertionMode());break}case N.TEMPLATE:{bc(e,t);break}}}function Gge(e,t){const r=t.tagID;r===N.CAPTION||r===N.TABLE||r===N.TBODY||r===N.TFOOT||r===N.THEAD||r===N.TR||r===N.TD||r===N.TH?(e.openElements.popUntilTagNamePopped(N.SELECT),e._resetInsertionMode(),e._processStartTag(t)):xO(e,t)}function Kge(e,t){const r=t.tagID;r===N.CAPTION||r===N.TABLE||r===N.TBODY||r===N.TFOOT||r===N.THEAD||r===N.TR||r===N.TD||r===N.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(N.SELECT),e._resetInsertionMode(),e.onEndTag(t)):bO(e,t)}function Yge(e,t){switch(t.tagID){case N.BASE:case N.BASEFONT:case N.BGSOUND:case N.LINK:case N.META:case N.NOFRAMES:case N.SCRIPT:case N.STYLE:case N.TEMPLATE:case N.TITLE:{ka(e,t);break}case N.CAPTION:case N.COLGROUP:case N.TBODY:case N.TFOOT:case N.THEAD:{e.tmplInsertionModeStack[0]=re.IN_TABLE,e.insertionMode=re.IN_TABLE,td(e,t);break}case N.COL:{e.tmplInsertionModeStack[0]=re.IN_COLUMN_GROUP,e.insertionMode=re.IN_COLUMN_GROUP,B5(e,t);break}case N.TR:{e.tmplInsertionModeStack[0]=re.IN_TABLE_BODY,e.insertionMode=re.IN_TABLE_BODY,sx(e,t);break}case N.TD:case N.TH:{e.tmplInsertionModeStack[0]=re.IN_ROW,e.insertionMode=re.IN_ROW,ax(e,t);break}default:e.tmplInsertionModeStack[0]=re.IN_BODY,e.insertionMode=re.IN_BODY,jn(e,t)}}function Qge(e,t){t.tagID===N.TEMPLATE&&bc(e,t)}function yO(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(N.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):F5(e,t)}function Xge(e,t){t.tagID===N.HTML?jn(e,t):Mg(e,t)}function vO(e,t){var r;if(t.tagID===N.HTML){if(e.fragmentContext||(e.insertionMode=re.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===N.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else Mg(e,t)}function Mg(e,t){e.insertionMode=re.IN_BODY,rx(e,t)}function Zge(e,t){switch(t.tagID){case N.HTML:{jn(e,t);break}case N.FRAMESET:{e._insertElement(t,Le.HTML);break}case N.FRAME:{e._appendElement(t,Le.HTML),t.ackSelfClosing=!0;break}case N.NOFRAMES:{ka(e,t);break}}}function Jge(e,t){t.tagID===N.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==N.FRAMESET&&(e.insertionMode=re.AFTER_FRAMESET))}function e1e(e,t){switch(t.tagID){case N.HTML:{jn(e,t);break}case N.NOFRAMES:{ka(e,t);break}}}function t1e(e,t){t.tagID===N.HTML&&(e.insertionMode=re.AFTER_AFTER_FRAMESET)}function r1e(e,t){t.tagID===N.HTML?jn(e,t):vp(e,t)}function vp(e,t){e.insertionMode=re.IN_BODY,rx(e,t)}function n1e(e,t){switch(t.tagID){case N.HTML:{jn(e,t);break}case N.NOFRAMES:{ka(e,t);break}}}function s1e(e,t){t.chars=dr,e._insertCharacters(t)}function a1e(e,t){e._insertCharacters(t),e.framesetOk=!1}function wO(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function i1e(e,t){if(wpe(t))wO(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===Le.MATHML?sO(t):n===Le.SVG&&(Epe(t),aO(t)),L5(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function o1e(e,t){if(t.tagID===N.P||t.tagID===N.BR){wO(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===Le.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(n);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(r);break}}}me.AREA,me.BASE,me.BASEFONT,me.BGSOUND,me.BR,me.COL,me.EMBED,me.FRAME,me.HR,me.IMG,me.INPUT,me.KEYGEN,me.LINK,me.META,me.PARAM,me.SOURCE,me.TRACK,me.WBR;const l1e=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,c1e=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),N8={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function EO(e,t){const r=y1e(e),n=$R("type",{handlers:{root:u1e,element:d1e,text:h1e,comment:NO,doctype:m1e,raw:p1e},unknown:g1e}),s={parser:r?new w8(N8):w8.getFragmentParser(void 0,N8),handle(l){n(l,s)},stitches:!1,options:t||{}};n(e,s),Ed(s,Za());const a=r?s.parser.document:s.parser.getFragment(),o=vfe(a,{file:s.options.file});return s.stitches&&pc(o,"comment",function(l,u,c){const d=l;if(d.value.stitch&&c&&u!==void 0){const h=c.children;return h[u]=d.value.stitch,u}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function kO(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function u1e(e,t){kO(e.children,t)}function d1e(e,t){x1e(e,t),kO(e.children,t),b1e(e,t)}function h1e(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:jt.CHARACTER,chars:e.value,location:fm(e)};Ed(t,Za(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function m1e(e,t){const r={type:jt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:fm(e)};Ed(t,Za(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function f1e(e,t){t.stitches=!0;const r=v1e(e);if("children"in e&&"children"in r){const n=EO({type:"root",children:e.children},t.options);r.children=n.children}NO({type:"comment",value:{stitch:r}},t)}function NO(e,t){const r=e.value,n={type:jt.COMMENT,data:r,location:fm(e)};Ed(t,Za(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function p1e(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,SO(t,Za(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(l1e,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function g1e(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))f1e(r,t);else{let n="";throw c1e.has(r.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+n)}}function Ed(e,t){SO(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=jr.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function SO(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function x1e(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===jr.PLAINTEXT)return;Ed(t,Za(e));const n=t.parser.openElements.current;let s="namespaceURI"in n?n.namespaceURI:Ga.html;s===Ga.html&&r==="svg"&&(s=Ga.svg);const a=Sfe({...e,children:[]},{space:s===Ga.svg?"svg":"html"}),o={type:jt.START_TAG,tagName:r,tagID:wd(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:fm(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function b1e(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Dfe.includes(r)||t.parser.tokenizer.state===jr.PLAINTEXT)return;Ed(t,F1(e));const n={type:jt.END_TAG,tagName:r,tagID:wd(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:fm(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===jr.RCDATA||t.parser.tokenizer.state===jr.RAWTEXT||t.parser.tokenizer.state===jr.SCRIPT_DATA)&&(t.parser.tokenizer.state=jr.DATA)}function y1e(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function fm(e){const t=Za(e)||{line:void 0,column:void 0,offset:void 0},r=F1(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function v1e(e){return"children"in e?lc({...e,children:[]}):lc(e)}function w1e(e){return function(t,r){return EO(t,{...e,file:r})}}const E1e=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D
15957E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,k1e=Object.hasOwnProperty;class N1e{constructor(){this.occurrences,this.reset()}slug(t,r){const n=this;let s=S1e(t,r===!0);const a=s;for(;k1e.call(n.occurrences,s);)n.occurrences[a]++,s=a+"-"+n.occurrences[a];return n.occurrences[s]=0,s}reset(){this.occurrences=Object.create(null)}}function S1e(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(E1e,"").replace(/ /g,"-"))}function TO(e){const t=e.type==="element"?e.tagName.toLowerCase():"",r=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return r>48&&r<55?r-48:void 0}function T1e(e){return"children"in e?CO(e):"value"in e?e.value:""}function C1e(e){return e.type==="text"?e.value:"children"in e?CO(e):""}function CO(e){let t=-1;const r=[];for(;++t<e.children.length;)r[t]=C1e(e.children[t]);return r.join("")}const _1e={},S8=new N1e;function A1e(e){const r=(e||_1e).prefix||"";return function(n){S8.reset(),pc(n,"element",function(s){TO(s)&&!s.properties.id&&(s.properties.id=r+S8.slug(T1e(s)))})}}const T8={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},j1e={};function I1e(e){const t=e||j1e;let r=t.properties;const n=t.headingProperties,s=t.behavior||"prepend",a=t.content,o=t.group,l=ul(t.test);let u;return s==="after"||s==="before"?u=d:s==="wrap"?u=h:(u=c,r||(r={ariaHidden:"true",tabIndex:-1})),function(m){pc(m,"element",function(f,p,g){if(TO(f)&&f.properties.id&&l(f,p,g))return Object.assign(f.properties,Of(n,f)),u(f,p,g)})};function c(m){const f=C8(a||T8,m);return m.children[s==="prepend"?"unshift":"push"](Ty(m,Of(r,m),f)),[B0]}function d(m,f,p){if(typeof f!="number"||!p)return;const g=C8(a||T8,m),x=Ty(m,Of(r,m),g);let w=s==="before"?[x,m]:[m,x];if(o){const y=_O(o,m);y&&!Array.isArray(y)&&y.type==="element"&&(y.children=w,w=[y])}return p.children.splice(f,1,...w),[B0,f+w.length]}function h(m){let f=m.children,p=[];return typeof a=="function"?(f=[],p=a(m)):a&&(p=U5(a)),m.children=[Ty(m,Of(r,m),Array.isArray(p)?[...f,...p]:[...f,p])],[B0]}}function U5(e){return lc(e)}function Ty(e,t,r){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:r}}function C8(e,t){const r=_O(e,t);return Array.isArray(r)?r:[r]}function _O(e,t){return typeof e=="function"?e(t):U5(e)}function Of(e,t){return typeof e=="function"?e(t):e?U5(e):{}}const R1e={tabs:"tab",cards:"card"};function AO(e,t){if(t(e),e.children)for(const r of e.children)AO(r,t)}function D1e(){return e=>{AO(e,t=>{if(t.type==="containerDirective"||t.type==="leafDirective"||t.type==="textDirective"){(t.name?R1e[t.name]:void 0)&&t.type==="containerDirective"&&typeof import.meta<"u";const n=t.data||(t.data={}),s={"data-directive":t.name};
1595for(const[a,o]of Object.entries(t.attributes||{}))o!=null&&(s[`data-${a}`]=o);n.hName=t.type==="textDirective"?"span":"div",n.hProperties=s}})}}const v4={note:{icon:c2,bg:"bg-blue-50 dark:bg-blue-950/30",border:"border-blue-200 dark:border-blue-800",iconColor:"text-blue-500"},info:{icon:c2,bg:"bg-blue-50 dark:bg-blue-950/30",border:"border-blue-200 dark:border-blue-800",iconColor:"text-blue-500"},tip:{icon:FV,bg:"bg-emerald-50 dark:bg-emerald-950/30",border:"border-emerald-200 dark:border-emerald-800",iconColor:"text-emerald-500"},warning:{icon:pV,bg:"bg-amber-50 dark:bg-amber-950/30",border:"border-amber-200 dark:border-amber-800",iconColor:"text-amber-500"},danger:{icon:p1,bg:"bg-red-50 dark:bg-red-950/30",border:"border-red-200 dark:border-red-800",iconColor:"text-red-500"}},M1e={"â¹ï¸":"info","â ï¸":"warning","ð¡":"tip","â":"danger"};function O1e({type:e,title:t,children:r}){const n=v4[e]??v4.note,s=n.icon;return i.jsxs("div",{className:`callout flex gap-3 items-start rounded-xl border px-4 py-3.5 my-5 ${n.bg} ${n.border}`,children:[i.jsx(s,{className:`w-5 h-5 mt-0.5 shrink-0 ${n.iconColor}`}),i.jsxs("div",{className:"flex-1 text-sm leading-relaxed [&>p]:m-0 [&>p:first-child]:mt-0",children:[t&&i.jsx("div",{className:"font-semibold mb-1 text-[var(--text-primary)]",children:t}),r]})]})}function L1e({children:e}){return i.jsx("div",{className:"docs-steps my-5",children:e})}function P1e({title:e,children:t}){return i.jsxs("details",{className:"my-4 rounded-xl border border-[var(--border-default)] bg-[var(--bg-secondary)] overflow-hidden",children:[i.jsx("summary",{className:"cursor-pointer px-4 py-3 font-medium text-[var(--text-primary)] select-none hover:bg-[var(--bg-tertiary)] transition-colors",children:e||"Details"}),i.jsx("div",{className:"px-4 pb-4 pt-1 text-sm [&>p]:my-2 [&>p:first-child]:mt-2",children:t})]})}function F1e({children:e}){return i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 my-5",children:e})}function B1e({title:e,href:t,children:r}){const n=!!t&&/^https?:\/\//.test(t),s=i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-1.5 font-semibold text-[var(--text-primary)]",children:[e,t&&i.jsx(bV,{className:"w-3.5 h-3.5 text-[var(--text-tertiary)] group-hover:text-ui-accent transition-colors"})]}),r&&i.jsx("div",{className:"mt-1 text-sm text-[var(--text-secondary)] [&>p]:m-0",children:r})]}),a="group block p-4 rounded-xl border border-[var(--border-default)] bg-[var(--bg-secondary)] hover:border-ui-accent/40 transition-colors";return t?i.jsx("a",{href:t,className:a,...n?{target:"_blank",rel:"noopener noreferrer"}:{},children:s}):i.jsx("div",{className:a,children:s})}const w4=new Map,E4=new Set;function U1e(e,t){w4.get(e)!==t&&(w4.set(e,t),E4.forEach(r=>r()))}function $1e(e){return E4.add(e),()=>{E4.delete(e)}}function jO(e){const t=e.join("|"),r=v.useSyncExternalStore($1e,()=>w4.get(t)??e[0],()=>e[0]),n=v.useCallback(s=>U1e(t,s),[t]);return[r,n]}function z1e(e){return v.isValidElement(e)&&e.props["data-directive"]==="tab"}function H1e({children:e}){const t=v.Children.toArray(e).filter(z1e).map((l,u)=>({label:String(l.props["data-label"]??`Tab ${u+1}`),content:l.props.children})),r=t.map(l=>l.label),[n,s]=jO(r.length?r:[""]);if(!t.length)return null;const a=t.find(l=>l.label===n)??t[0],o=l=>{if(l.key!=="ArrowRight"&&l.key!=="ArrowLeft")return;l.preventDefault();const u=t.findIndex(d=>d.label===a.label),c=l.key==="ArrowRight"?(u+1)%t.length:(u-1+t.length)%t.length;s(t[c].label)};return i.jsxs("div",{className:"my-5 rounded-xl border border-[var(--border-default)] overflow-hidden",children:[i.jsx("div",{role:"tablist",onKeyDown:o,className:"flex gap-1 px-2 pt-2 border-b border-[var(--border-default)] bg-[var(--bg-secondary)]",children:t.map(l=>{const u=l.label===a.label;return i.jsx("button",{role:"tab","aria-selected":u,tabIndex:u?0:-1,onClick:()=>s(l.label),className:`px-3 py-1.5 text-sm rounded-t-lg transition-colors ${u?"bg-[var(--bg-primary)] text-ui-accent font-medium border border-b-0 border-[var(--border-default)]":"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]"}`,children:l.label},l.label)})}),i.jsx("div",{role:"tabpanel",className:"p-4 text-sm [&>p:first-child]:mt-0 [&>p:last-child]:mb-0",children:a.content})]})}function q1e(e){let t=null;const r=n=>{if(t||!v.isValidElement(n))return;const s=n.props,a=s.className;
1595if(typeof a=="string"){const o=a.match(/language-([\w-]+)/);if(o){t=o[1];return}}v.Children.forEach(s.children,r)};return r(e),t}function W1e({children:e}){const r=v.Children.toArray(e).filter(v.isValidElement).map((u,c)=>{const d=q1e(u);return{label:d?d.toUpperCase():`Code ${c+1}`,node:u}}),n=r.map(u=>u.label),[s,a]=jO(n.length?n:[""]);if(!r.length)return null;const o=Math.max(0,r.findIndex(u=>u.label===s)),l=u=>{if(u.key!=="ArrowRight"&&u.key!=="ArrowLeft")return;u.preventDefault();const c=u.key==="ArrowRight"?(o+1)%r.length:(o-1+r.length)%r.length;a(r[c].label)};return i.jsxs("div",{className:"my-5 rounded-xl border border-[var(--border-default)] overflow-hidden [&_pre]:!my-0 [&_pre]:!rounded-none [&_pre]:!border-0",children:[i.jsx("div",{role:"tablist",onKeyDown:l,className:"flex gap-1 px-2 pt-2 border-b border-[var(--border-default)] bg-[var(--bg-secondary)]",children:r.map((u,c)=>{const d=c===o;return i.jsx("button",{role:"tab","aria-selected":d,tabIndex:d?0:-1,onClick:()=>a(u.label),className:`px-3 py-1.5 text-xs font-mono rounded-t-lg transition-colors ${d?"bg-[var(--bg-primary)] text-ui-accent font-medium border border-b-0 border-[var(--border-default)]":"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]"}`,children:u.label},`${u.label}:${c}`)})}),i.jsx("div",{role:"tabpanel",children:r[o].node})]})}const V1e=new Set(["note","info","tip","warning","danger"]);function G1e(e,t){const r=t["data-title"],n=t.children;if(V1e.has(e))return i.jsx(O1e,{type:e,title:r,children:n});switch(e){case"tabs":return i.jsx(H1e,{children:n});case"steps":return i.jsx(L1e,{children:n});case"cards":return i.jsx(F1e,{children:n});case"card":return i.jsx(B1e,{title:r,href:t["data-href"],children:n});case"codegroup":return i.jsx(W1e,{children:n});case"details":case"accordion":return i.jsx(P1e,{title:r,children:n});default:return null}}function K1e({code:e}){const{t}=We(),{copy:r,copied:n}=C1();return i.jsx("button",{onClick:()=>r(e),className:"absolute top-2 right-2 px-2 py-1 rounded text-xs bg-white/80 dark:bg-gray-700/80 text-gray-600 dark:text-gray-300 hover:bg-white dark:hover:bg-gray-600 border border-gray-200 dark:border-gray-600 transition-colors",title:t("common.copyCode"),children:t(n?"common.codeCopied":"common.copyCode")})}function Og(e){var t;return typeof e=="string"?e:Array.isArray(e)?e.map(Og).join(""):(t=e==null?void 0:e.props)!=null&&t.children?Og(e.props.children):""}function k4(e,t){var r;if(typeof e=="string"){const n=e.indexOf(t);return n!==-1?e.slice(0,n)+e.slice(n+t.length):e}if(Array.isArray(e)){let n=!1;return e.map(s=>{if(n)return s;const a=k4(s,t);return a!==s&&(n=!0),a})}if((r=e==null?void 0:e.props)!=null&&r.children){const n=k4(e.props.children,t);if(n!==e.props.children)return{...e,props:{...e.props,children:n}}}return e}function Y1e(e){const t=Og(e);for(const[r,n]of Object.entries(M1e))if(t.trimStart().startsWith(r))return{type:n,cleanChildren:k4(e,r)};return{type:null,cleanChildren:e}}const Q1e={behavior:"append",properties:{className:["heading-anchor"],ariaHidden:!0,tabIndex:-1},content:[]};function $5({content:e,className:t=""}){const r=Er(),{lang:n="zh-CN"}=Ut();return i.jsxs("div",{className:`markdown-body prose prose-slate max-w-none dark:prose-invert ${t}`,children:[i.jsx(poe,{remarkPlugins:[Cce,Tde,w0e,D1e],rehypePlugins:[xfe,Jme,w1e,A1e,[I1e,Q1e]],components:{div({children:s,...a}){const o=a["data-directive"];if(o){const l=G1e(o,{...a,children:s});if(l)return i.jsx(i.Fragment,{children:l})}return i.jsx("div",{...a,children:s})},blockquote({children:s}){const{type:a,cleanChildren:o}=Y1e(s);if(a){const l=v4[a],u=l.icon;return i.jsxs("div",{className:`callout flex gap-3 items-start rounded-xl border px-4 py-3.5 my-5 ${l.bg} ${l.border}`,children:[i.jsx(u,{className:`w-5 h-5 mt-0.5 shrink-0 ${l.iconColor}`}),i.jsx("div",{className:"flex-1 text-sm leading-relaxed [&>p]:m-0 [&>p:first-child]:mt-0",children:o})]})}return i.jsx("blockquote",{children:s})},pre({children:s,...a}){const o=Og(s);return i.jsxs("div",{className:"relative group",children:[i.jsx("pre",{...a,children:s}),i.jsx(K1e,{code:o})]})},img({src:s,alt:a,...o}){return i.jsx("img",{src:s,alt:a,loading:"lazy",className:"rounded-lg shadow-sm max-w-full h-auto",...o})},a({href:s,children:a,...o}){const l=s==null?void 0:s.startsWith("http");return s&&!l&&s.startsWith("/")?i.jsx("a",{href:`/${n}${s}`,onClick:c=>{c.preventDefault(),r(`/${n}${s}`)},...o,children:a}):i.jsx("a",{href:s,...l?{target:"_blank",rel:"noopener noreferrer"}:{},...o,children:a})}},children:e}),i.jsx("style",{children:` 1596 .markdown-body { 1597 color: var(--text-primary, #1e293b); 1598 font-size: 0.95rem; 1599 line-height: 1.8; 1600 } 1601 1602 /* ââ Headings ââ */ 1603 .markdown-body h1 { 1604 font-size: 1.875em; 1605 font-weight: 800; 1606 margin-top: 0.8em; 1607 margin-bottom: 0.8em; 1608 letter-spacing: -0.025em; 1609 background: linear-gradient(135deg, var(--ui-accent, #6366f1), #a78bfa); 1610 -webkit-background-clip: text; 1611 -webkit-text-fill-color: transparent; 1612 background-clip: text; 1613 } 1614 .markdown-body h2 { 1615 font-size: 1.4em; 1616 font-weight: 700; 1617 margin-top: 2.5em; 1618 margin-bottom: 0.8em; 1619 padding-left: 0.75em; 1620 border-left: 4px solid var(--ui-accent, #6366f1); 1621 color: var(--text-primary); 1622 display: flex; 1623 align-items: center; 1624 min-height: 1.4em; 1625 } 1626 .markdown-body h3 { 1627 font-size: 1.15em; 1628 font-weight: 600; 1629 margin-top: 1.8em; 1630 margin-bottom: 0.5em; 1631 color: var(--ui-accent, #6366f1); 1632 } 1633 1634 /* ââ Heading permalink anchor (rehype-autolink-headings) ââ */ 1635 .markdown-body :is(h1, h2, h3, h4, h5, h6) .heading-anchor { 1636 opacity: 0; 1637 margin-left: 0.4em; 1638 font-weight: 400; 1639 background: none; 1640 color: var(--text-secondary, #475569); 1641 -webkit-text-fill-color: currentColor; 1642 transition: opacity 0.2s; 1643 } 1644 .markdown-body :is(h1, h2, h3, h4, h5, h6) .heading-anchor::after { 1645 content: '#'; 1646 } 1647 .markdown-body :is(h1, h2, h3, h4, h5, h6):hover .heading-anchor, 1648 .markdown-body .heading-anchor:focus-visible { 1649 opacity: 0.6; 1650 } 1651 1652 .markdown-body p { 1653 margin: 1em 0; 1654 } 1655 1656 /* ââ Steps directive (CSS counter) ââ */ 1657 .docs-steps ol { 1658 counter-reset: step; 1659 list-style: none; 1660 padding-left: 0; 1661 margin: 0; 1662 } 1663 .docs-steps ol > li { 1664 counter-increment: step; 1665 position: relative; 1666 padding-left: 2.75em; 1667 margin: 0 0 1.25em; 1668 min-height: 1.8em; 1669 } 1670 .docs-steps ol > li::before { 1671 content: counter(step); 1672 position: absolute; 1673 left: 0; 1674 top: 0; 1675 width: 1.8em; 1676 height: 1.8em; 1677 display: flex; 1678 align-items: center; 1679 justify-content: center; 1680 border-radius: 9999px; 1681 background: var(--ui-accent, #6366f1); 1682 color: #fff; 1683 font-size: 0.85em; 1684 font-weight: 700; 1685 } 1686 .docs-steps ol > li:last-child { 1687 margin-bottom: 0; 1688 } 1689
1690 /* ââ Code ââ */ 1691 .markdown-body pre { 1692 border-radius: 12px; 1693 overflow-x: auto; 1694 margin: 1.5em 0; 1695 padding: 1.2em; 1696 font-size: 0.875em; 1697 background: #0f172a !important; 1698 color: #e2e8f0; 1699 border: 1px solid #1e293b; 1700 box-shadow: 0 4px 16px rgba(0,0,0,0.12); 1701 } 1702 .markdown-body :not(pre) > code { 1703 background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(167,139,250,0.08)); 1704 color: var(--ui-accent, #6366f1); 1705 padding: 0.2em 0.5em; 1706 border-radius: 6px; 1707 font-size: 0.875em; 1708 font-weight: 600; 1709 border: 1px solid rgba(99,102,241,0.15); 1710 } 1711 .dark .markdown-body :not(pre) > code { 1712 background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(167,139,250,0.1)); 1713 border-color: rgba(99,102,241,0.25); 1714 } 1715 1716 /* ââ Tables ââ */ 1717 .markdown-body table { 1718 border-collapse: separate; 1719 border-spacing: 0; 1720 width: 100%; 1721 margin: 1.5em 0; 1722 font-size: 0.9em; 1723 border-radius: 12px; 1724 overflow: hidden; 1725 box-shadow: 0 2px 12px rgba(0,0,0,0.06); 1726 border: 1px solid var(--border-default, #e5e7eb); 1727 } 1728 .dark .markdown-body table { 1729 box-shadow: 0 2px 12px rgba(0,0,0,0.25); 1730 border-color: #1e293b; 1731 } 1732 .markdown-body thead tr { 1733 background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(167,139,250,0.03)); 1734 } 1735 .dark .markdown-body thead tr { 1736 background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(167,139,250,0.06)); 1737 } 1738 .markdown-body th { 1739 font-weight: 600; 1740 text-align: left; 1741 font-size: 0.85em; 1742 color: var(--text-secondary, #475569); 1743 } 1744 .markdown-body th, .markdown-body td { 1745 border-bottom: 1px solid var(--border-default, #e5e7eb); 1746 padding: 0.8em 1.1em; 1747 } 1748 .dark .markdown-body th, .dark .markdown-body td { 1749 border-color: #1e293b; 1750 } 1751 .markdown-body tr:last-child td { 1752 border-bottom: none; 1753 } 1754 .markdown-body tbody tr { 1755 transition: all 0.2s; 1756 } 1757 .markdown-body tbody tr:hover { 1758 background: linear-gradient(135deg, rgba(99,102,241,0.04), rgba(167,139,250,0.02)); 1759 } 1760 .dark .markdown-body tbody tr:hover { 1761 background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(167,139,250,0.04)); 1762 } 1763 .markdown-body td strong { 1764 color: var(--ui-accent, #6366f1); 1765 font-weight: 600; 1766 } 1767 1768 /* ââ Blockquote â callout card ââ */ 1769 .markdown-body blockquote { 1770 position: relative; 1771 border: 1px solid rgba(99,102,241,0.2); 1772 border-left: 4px solid var(--ui-accent, #6366f1); 1773 padding: 1em 1.25em; 1774 margin: 1.5em 0; 1775 background: linear-gradient(135deg, rgba(99,102,241,0.04), rgba(167,139,250,0.02)); 1776 border-radius: 0 12px 12px 0; 1777 backdrop-filter: blur(8px); 1778 } 1779 .dark .markdown-body blockquote { 1780 background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(167,139,250,0.04)); 1781 border-color: rgba(99,102,241,0.3); 1782 border-left-color: var(--ui-accent, #6366f1); 1783 } 1784 .markdown-body blockquote p { 1785 margin: 0.4em 0; 1786 } 1787 1788 /* ââ Lists ââ */ 1789 .markdown-body ul, .markdown-body ol { 1790 padding-left: 1.5em; 1791 margin: 1em 0; 1792 } 1793 .markdown-body li { 1794 margin: 0.4em 0; 1795 } 1796 .markdown-body ul > li::marker { 1797 color: var(--text-secondary, #475569); 1798 } 1799 .markdown-body ol > li::marker { 1800 color: var(--text-secondary, #475569); 1801 font-weight: 600; 1802 } 1803 .markdown-body li > strong:first-child { 1804 color: var(--text-primary); 1805 } 1806 1807 /* ââ Images ââ */ 1808 .markdown-body img { 1809 max-width: 100%; 1810 height: auto; 1811 border-radius: 12px; 1812 margin: 1.5em 0; 1813 box-shadow: 0 4px 20px rgba(0,0,0,0.08); 1814 border: 1px solid var(--border-default, #e5e7eb); 1815 } 1816 .dark .markdown-body img { 1817 border-color: #1e293b; 1818 box-shadow: 0 4px 20px rgba(0,0,0,0.3); 1819 } 1820 1821 /* ââ Horizontal rule ââ */ 1822 .markdown-body hr { 1823 border: none; 1824 height: 2px; 1825 margin: 2.5em 0; 1826 background: linear-gradient(90deg, transparent, var(--border-default, #e5e7eb), transparent); 1827 } 1828 .dark .markdown-body hr { 1829 background: linear-gradient(90deg, transparent, #334155, transparent); 1830 } 1831 1832 /* ââ Links ââ */ 1833 .markdown-body a { 1834 color: var(--ui-accent, #6366f1); 1835 text-decoration: none; 1836 font-weight: 500; 1837 background: linear-gradient(transparent 60%, rgba(99,102,241,0.12) 60%); 1838 transition: background 0.2s; 1839 } 1840 .markdown-body a:hover { 1841 background: linear-gradient(transparent 0%, rgba(99,102,241,0.12) 0%); 1842 } 1843 1844 /* ââ Video embeds ââ */ 1845 .markdown-body iframe, .markdown-body video { 1846 border-radius: 12px; 1847 margin: 1.5em 0; 1848 max-width: 100%; 1849 box-shadow: 0 4px 16px rgba(0,0,0,0.1); 1850 } 1851 1852 /* ââ Task lists ââ */ 1853 .markdown-body ul:has(input[type="checkbox"]) { 1854 list-style: none; 1855 padding-left: 0; 1856 } 1857 .markdown-body li:has(> input[type="checkbox"]) { 1858 display: flex; 1859 align-items: baseline; 1860 gap: 0.5em; 1861 } 1862 `})]})}function X1e({items:e}){return e.length===0?null:i.jsx("nav",{className:"flex items-center gap-1.5 text-sm flex-wrap",children:e.map((t,r)=>i.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[r>0&&i.jsx(Gs,{className:"w-3.5 h-3.5 text-[var(--text-tertiary)] shrink-0"}),t.href?i.jsx(Ke,{to:t.href,className:"text-ui-accent hover:underline transition-colors",children:t.label}):i.jsx("span",{className:"text-[var(--text-secondary)]",children:t.label})]},r))})}function IO(e){const[t,r]=v.useState([]);return v.useEffect(()=>{const n=()=>{const o=document.querySelector(".markdown-body");
1862return o?Array.from(o.querySelectorAll("h2[id], h3[id]")).map(l=>({id:l.id,text:(l.textContent??"").trim(),level:l.tagName==="H3"?3:2})):[]};let s=0;const a=n();return a.length>0?r(a):s=requestAnimationFrame(()=>r(n())),()=>{s&&cancelAnimationFrame(s)}},[e]),t}function ix({content:e,className:t}){const{t:r}=We(),[n,s]=v.useState(!1),[a,o]=v.useState(""),l=IO(e);return v.useEffect(()=>{if(l.length===0)return;const u=new IntersectionObserver(c=>{for(const d of c)if(d.isIntersecting){o(d.target.id);break}},{rootMargin:"-80px 0px -60% 0px",threshold:.1});for(const c of l){const d=document.getElementById(c.id);d&&u.observe(d)}return()=>u.disconnect()},[l]),l.length<2?null:i.jsxs("nav",{className:Uo("text-sm",t),"aria-label":r("cms.toc"),children:[i.jsxs("button",{onClick:()=>s(u=>!u),className:"flex items-center gap-2 font-bold text-[var(--text-primary)] mb-4 text-xs uppercase tracking-widest xl:cursor-default","aria-expanded":!n,children:[i.jsx(zV,{className:"w-4 h-4 text-ui-accent"}),r("cms.toc"),i.jsx("span",{className:"xl:hidden",children:n?i.jsx(Gs,{className:"w-3 h-3"}):i.jsx(dn,{className:"w-3 h-3"})})]}),i.jsxs("div",{className:Uo("relative",n&&"hidden xl:block"),children:[i.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-[2px] rounded-full bg-[var(--border-default)]"}),i.jsx("ul",{className:"space-y-0.5",children:l.map(u=>i.jsx("li",{style:{paddingLeft:`${(u.level-2)*12}px`},children:i.jsxs("a",{href:`#${u.id}`,"aria-current":a===u.id?"location":void 0,className:Uo("group relative flex items-center gap-1 py-1.5 pl-4 text-sm transition-all",a===u.id?"text-ui-accent font-semibold before:absolute before:left-0 before:top-1 before:bottom-1 before:w-[2px] before:rounded-full before:bg-ui-accent":"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]"),onClick:c=>{c.preventDefault();const d=document.getElementById(u.id);if(!d)return;const h=window.matchMedia("(prefers-reduced-motion: reduce)").matches;d.scrollIntoView({behavior:h?"auto":"smooth"}),d.setAttribute("tabindex","-1"),d.focus({preventScroll:!0})},children:[i.jsx(RV,{className:"w-3 h-3 shrink-0 opacity-0 group-hover:opacity-60 transition-opacity","aria-hidden":"true"}),i.jsx("span",{className:"truncate",children:u.text})]})},u.id))})]})]})}function z5({content:e}){return IO(e).length<2?null:i.jsx("div",{className:"xl:hidden mb-8 border border-[var(--border-default)] rounded-xl p-4 bg-gradient-to-br from-[var(--bg-secondary)] to-[var(--bg-primary)]",children:i.jsx(ix,{content:e})})}function Z1e(e){const t=e.replace(/```[\s\S]*?```/g,"").replace(/`[^`]+`/g,"").replace(/!?\[.*?\]\(.*?\)/g,"").replace(/[#*_~>|-]/g,"").trim(),r=(t.match(/[\u4e00-\u9fff\u3400-\u4dbf]/g)||[]).length,n=(t.match(/[a-zA-Z]+/g)||[]).length,s=r/400+n/200;return Math.max(1,Math.round(s))}function Oh({content:e,className:t=""}){const{t:r}=We(),n=v.useMemo(()=>Z1e(e),[e]);return i.jsxs("span",{className:`inline-flex items-center gap-1 text-muted-foreground ${t}`,children:[i.jsx(bh,{className:"w-3.5 h-3.5"}),r("cms.readingTime",{min:n})]})}function J1e({body:e}){const{t}=We(),{copy:r,copied:n}=C1();return i.jsxs("button",{type:"button",onClick:()=>r(e),"aria-label":t("cms.copyMarkdown"),className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-sm border border-[var(--border-default)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-ui-accent/40 transition-colors",children:[n?i.jsx(Fr,{className:"w-3.5 h-3.5 text-emerald-500"}):i.jsx(b1,{className:"w-3.5 h-3.5"}),t(n?"common.copied":"cms.copyMarkdown")]})}function RO(e,t){for(const r of e)r.slug&&t.push({slug:r.slug,label:r.label}),RO(r.children,t);return t}function exe({tree:e,currentSlug:t,lang:r}){const{t:n}=We(),s=v.useMemo(()=>RO(e,[]),[e]),a=t?s.findIndex(u=>u.slug===t):-1;if(a<0)return null;const o=a>0?s[a-1]:null,l=a<s.length-1?s[a+1]:null;return!o&&!l?null:i.jsxs("nav",{className:"mt-12 pt-8 border-t border-[var(--border-default)] grid grid-cols-1 sm:grid-cols-2 gap-4","aria-label":n("cms.docNav"),children:[o?i.jsxs(Ke,{to:`/${r}/docs/${o.slug}`,rel:"prev",className:"group flex flex-col gap-1 p-4 rounded-xl border border-[var(--border-default)] hover:border-ui-accent/40 hover:bg-[var(--bg-secondary)] transition-colors",children:[i.jsxs("span",{className:"flex items-center gap-1 text-xs text-[var(--text-tertiary)]",children:[i.jsx(g1,{className:"w-3.5 h-3.5"})," ",n("cms.prevPage")]}),i.jsx("span",{className:"text-sm font-medium text-[var(--text-primary)] group-hover:text-ui-accent truncate",children:o.label})]}):i.jsx("span",{"aria-hidden":"true"}),l?i.jsxs(Ke,{to:`/${r}/docs/${l.slug}`,rel:"next",className:"group flex flex-col gap-1 p-4 rounded-xl border border-[var(--border-default)] hover:border-ui-accent/40 hover:bg-[var(--bg-secondary)] transition-colors text-right sm:items-end",children:[i.jsxs("span",{className:"flex items-center gap-1 text-xs text-[var(--text-tertiary)]",children:[n("cms.nextPage")," ",i.jsx(fr,{className:"w-3.5 h-3.5"})]}),i.jsx("span",{className:"text-sm font-medium text-[var(--text-primary)] group-hover:text-ui-accent truncate",children:l.label})]}):i.jsx("span",{"aria-hidden":"true"})]})}const _8=(e,t)=>
1862`doc-feedback:${e}:${t}`;function txe({slug:e,lang:t}){const{t:r}=We(),[n,s]=v.useState("idle"),[a,o]=v.useState(""),[l,u]=v.useState(!1),c=v.useRef(!1);v.useEffect(()=>{o(""),u(!1),c.current=!1;try{s(localStorage.getItem(_8(t,e))?"done":"idle")}catch{s("idle")}},[e,t]);const d=async(m,f)=>{if(!c.current){c.current=!0,u(!0);try{await Ko.submitFeedback({slug:e,lang:t,helpful:m,comment:(f==null?void 0:f.trim())||void 0});try{localStorage.setItem(_8(t,e),m?"up":"down")}catch{}s("done")}catch{Qe.error(r("cms.feedbackError")),c.current=!1,u(!1)}}},h=m=>{c.current||(m?d(!0):s("comment"))};return n==="done"?i.jsxs("div",{className:"mt-10 pt-6 border-t border-[var(--border-default)] flex items-center gap-2 text-sm text-[var(--text-secondary)]",children:[i.jsx(Fr,{className:"w-4 h-4 text-emerald-500"}),r("cms.feedbackThanks")]}):i.jsx("div",{className:"mt-10 pt-6 border-t border-[var(--border-default)]",children:n==="idle"?i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("span",{className:"text-sm text-[var(--text-secondary)]",children:r("cms.feedbackPrompt")}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>h(!0),disabled:l,"aria-label":r("cms.feedbackYes"),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm border border-[var(--border-default)] hover:border-emerald-400 hover:text-emerald-600 transition-colors disabled:opacity-50",children:[i.jsx(xG,{className:"w-4 h-4"})," ",r("cms.feedbackYes")]}),i.jsxs("button",{type:"button",onClick:()=>h(!1),disabled:l,"aria-label":r("cms.feedbackNo"),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm border border-[var(--border-default)] hover:border-red-400 hover:text-red-600 transition-colors disabled:opacity-50",children:[i.jsx(gG,{className:"w-4 h-4"})," ",r("cms.feedbackNo")]})]})]}):i.jsxs("div",{className:"flex flex-col gap-3 max-w-xl",children:[i.jsx("label",{htmlFor:"doc-feedback-comment",className:"text-sm text-[var(--text-secondary)]",children:r("cms.feedbackCommentPrompt")}),i.jsx("textarea",{id:"doc-feedback-comment",value:a,onChange:m=>o(m.target.value),rows:3,maxLength:2e3,className:"w-full rounded-lg border border-[var(--border-default)] bg-[var(--bg-secondary)] px-3 py-2 text-sm text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-ui-accent/40",placeholder:r("cms.feedbackCommentPlaceholder")}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{type:"button",onClick:()=>void d(!1,a),disabled:l,className:"px-3.5 py-1.5 rounded-lg text-sm font-medium bg-ui-accent text-white hover:opacity-90 transition-opacity disabled:opacity-50",children:r("cms.feedbackSubmit")}),i.jsx("button",{type:"button",onClick:()=>void d(!1),disabled:l,className:"px-3 py-1.5 rounded-lg text-sm text-[var(--text-tertiary)] hover:text-[var(--text-primary)] transition-colors disabled:opacity-50",children:r("cms.feedbackSkip")})]})]})})}const rxe="https://www.uniai.ai";function nxe(e,t){return`${rxe}/${e}/docs/${t}.md`}function sxe(){return i.jsxs("div",{className:"max-w-3xl animate-pulse",children:[i.jsxs("div",{className:"flex gap-2 mb-4",children:[i.jsx("div",{className:"h-4 w-12 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-4 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-20 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-4 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-32 rounded bg-[var(--bg-tertiary)]"})]}),i.jsxs("div",{className:"mt-4 mb-10 pb-8 border-b border-[var(--border-default)]",children:[i.jsx("div",{className:"h-10 w-3/4 rounded-lg bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"mt-4 h-6 w-24 rounded-full bg-[var(--bg-tertiary)]"})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"h-7 w-1/2 rounded bg-[var(--bg-tertiary)]"}),i.jsxs("div",{className:"space-y-2.5",children:[i.jsx("div",{className:"h-4 w-full rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-11/12 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-4/5 rounded bg-[var(--bg-tertiary)]"})]}),i.jsx("div",{className:"h-7 w-2/5 rounded bg-[var(--bg-tertiary)]"}),i.jsxs("div",{className:"space-y-2.5 pl-4",children:[i.jsx("div",{className:"h-4 w-3/4 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-2/3 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-4/5 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-3/5 rounded bg-[var(--bg-tertiary)]"})]}),i.jsxs("div",{className:"rounded-xl border border-[var(--border-default)] overflow-hidden",children:[i.jsx("div",{className:"h-10 bg-[var(--bg-secondary)]"}),i.jsx("div",{className:"divide-y divide-[var(--border-default)]",children:[1,2,3,4].map(e=>i.jsxs("div",{className:"flex gap-4 p-3",children:[i.jsx("div",{className:"h-4 w-1/4 rounded bg-[var(--bg-tertiary)]"}
1862),i.jsx("div",{className:"h-4 w-2/4 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-1/6 rounded bg-[var(--bg-tertiary)]"})]},e))})]}),i.jsx("div",{className:"h-7 w-1/3 rounded bg-[var(--bg-tertiary)]"}),i.jsxs("div",{className:"space-y-2.5",children:[i.jsx("div",{className:"h-4 w-full rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-5/6 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-3/4 rounded bg-[var(--bg-tertiary)]"})]})]})]})}function axe(e,t,r,n){const s={label:n,href:`/${r}/docs`};if(!t)return[s];function a(l,u){for(const c of l){const d={label:c.label,href:c.slug?`/${r}/docs/${c.slug}`:void 0};if(c.slug===t)return[...u,{label:c.label}];const h=a(c.children,[...u,d]);if(h)return h}return null}return a(e,[s])??[s]}function A8(){var f,p,g,x,w,y;const{lang:e="zh-CN",slug:t}=Ut(),r=Er(),{t:n}=We(),s=ga({queryKey:["docsTree",e],queryFn:()=>Ko.getDocsTree(e)}),a=s.data??[],o=ga({queryKey:["doc",t,e],queryFn:()=>Ko.getDoc(t,e),enabled:!!t});v.useEffect(()=>{if(t||!s.data)return;const b=N4(s.data);b&&r(`/${e}/docs/${b}`,{replace:!0})},[t,s.data,e,r]);const l=((f=o.data)==null?void 0:f.translation)??null,u=((p=o.data)==null?void 0:p.metadata)??null,c=v.useMemo(()=>axe(a,t,e,n("cms.breadcrumbDocs")),[a,t,e,n]),d=(l==null?void 0:l.body)??"",h=!t&&s.isSuccess&&!N4(a),m=!t&&!h||o.isLoading;return i.jsxs(md,{sidebar:i.jsx(zre,{nodes:a,currentSlug:t,lang:e}),rightSidebar:d?i.jsx(ix,{content:d}):void 0,children:[i.jsx(pn,{title:((g=u==null?void 0:u.seo)==null?void 0:g.title)??(l==null?void 0:l.title)??n("seo.docsTitle"),description:((x=u==null?void 0:u.seo)==null?void 0:x.description)??(l==null?void 0:l.summary)??n("seo.docsDesc"),type:l?"article":"website",noindex:(w=u==null?void 0:u.seo)==null?void 0:w.noindex,markdownAlternate:l&&t?nxe(e,t):void 0}),l&&t&&i.jsx(wa,{data:[B3({lang:e,type:"Article",headline:l.title,description:l.summary,pathSuffix:`/docs/${t}`,image:(y=u==null?void 0:u.seo)==null?void 0:y.ogImage}),al(c.map(b=>({name:b.label,path:b.href?b.href.slice(`/${e}`.length):`/docs/${t}`})),e)]}),o.isError?i.jsxs("div",{className:"max-w-3xl rounded-xl border border-red-200 dark:border-red-900/60 bg-red-50 dark:bg-red-950/30 p-6",children:[i.jsx("p",{className:"font-medium text-[var(--text-primary)]",children:n("cms.loadError")}),i.jsx("button",{type:"button",onClick:()=>o.refetch(),className:"mt-3 px-3.5 py-1.5 rounded-lg text-sm font-medium bg-ui-accent text-white hover:opacity-90 transition-opacity",children:n("cms.retry")})]}):m?i.jsx(sxe,{}):l?i.jsxs("article",{className:"max-w-3xl",children:[i.jsx(X1e,{items:c}),i.jsxs("div",{className:"mt-4 mb-10 pb-8 border-b border-[var(--border-default)]",children:[i.jsx("h1",{className:"text-[2.25rem] font-extrabold tracking-tight leading-tight bg-gradient-to-r from-[var(--text-primary)] via-[var(--text-primary)] to-ui-accent bg-clip-text",children:l.title}),i.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3",children:[i.jsx(Oh,{content:l.body,className:"text-sm px-2.5 py-1 rounded-full bg-[var(--bg-secondary)] border border-[var(--border-default)]"}),(u==null?void 0:u.diataxis)&&i.jsx("span",{className:"text-xs px-2.5 py-1 rounded-full bg-[var(--bg-secondary)] border border-[var(--border-default)] text-[var(--text-secondary)]",children:n(`cms.diataxis.${u.diataxis}`)}),(u==null?void 0:u.badge)&&i.jsx("span",{className:"text-xs px-2.5 py-1 rounded-full bg-ui-accent/10 border border-ui-accent/20 text-ui-accent font-medium",children:n(`cms.badge.${u.badge}`)}),i.jsx(J1e,{body:l.body})]})]}),i.jsx(z5,{content:l.body}),i.jsx($5,{content:l.body}),t&&i.jsx(txe,{slug:t,lang:e}),i.jsx(exe,{tree:a,currentSlug:t,lang:e})]}):i.jsx("div",{className:"text-[var(--text-tertiary)]",children:n("cms.noContent","No content available")})]})}function N4(e){for(const t of e){if(t.slug)return t.slug;const r=N4(t.children);if(r)return r}return null}const ixe={get:"text-emerald-600 bg-emerald-500/10",post:"text-blue-600 bg-blue-500/10",put:"text-amber-600 bg-amber-500/10",delete:"text-red-600 bg-red-500/10",patch:"text-purple-600 bg-purple-500/10"};function DO({method:e}){return i.jsx("span",{className:Uo("shrink-0 px-1.5 py-0.5 rounded text-[10px] font-bold font-mono uppercase",ixe[e.toLowerCase()]??"text-gray-500 bg-gray-500/10"),children:e})}function oxe({operations:e,selectedId:t,onSelect:r}){const n=e.reduce((s,a)=>{var o;return(s[o=a.tag]??(s[o]=[])).push(a),s},{});return i.jsx("nav",{className:"space-y-6 text-sm","aria-label":"API operations",children:Object.entries(n).map(([s,a])=>i.jsxs("div",{children:[i.jsx("div",{className:"font-bold text-[var(--text-primary)] mb-2 text-xs uppercase tracking-widest",children:s}),i.jsx("ul",{className:"space-y-0.5",children:a.map(o=>i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:()=>r(o.id),"aria-current":t===o.id?"true":void 0,className:Uo("group flex items-center gap-2 w-full py-1.5 px-2 rounded-lg text-left transition-colors",t===o.id?"bg-gradient-to-r from-ui-accent/10 to-ui-accent/5 text-ui-accent font-medium":"text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-secondary)]"),children:[i.jsx(DO,{method:o.method}),i.jsx("span",{className:"truncate",children:o.summary||o.path})]})},o.id))})]},s))})}function H5(e,t){if(e!=null&&e.$ref){const r=String(e.$ref).match(/#\/components\/schemas\/(.+)$/);if(r&&t[r[1]])return t[r[1]]}return e}function Lg(e,t,r=0){const n=H5(e,t);return!n||r>6?"any":n.oneOf?n.oneOf.map(s=>Lg(s,t,r+1)).join(" | "):n.type==="array"?`${Lg(n.items??{},t,r+1)}[]`:n.type?n.type:n.properties?"object":"any"}function lxe({schema:e,schemas:t}){const r=H5(e,t),n=(r==null?void 0:r.properties)??{},s=(r==null?void 0:r.required)??[],a=Object.entries(n);return a.length?i.jsx("div",{className:"divide-y divide-[var(--border-default)]",children:a.map(([o,l])=>i.jsxs("div",{className:"py-2.5",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx("code",{className:"text-sm font-semibold text-[var(--text-primary)]",children:o}),i.jsx("span",{className:"text-xs font-mono text-ui-accent",children:Lg(l,t)}),s.includes(o)&&i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-red-500/10 text-red-500 border border-red-500/20",children:"required"})]}),l.description&&i.jsx("p",{className:"mt-1 text-sm text-[var(--text-secondary)]",children:l.description})]},o))}):null}function j8({schema:e,schemas:t,title:r}){const{t:n}=We(),s=H5(e,t);if(!s)return null;const a=s.properties&&Object.keys(s.properties).length>0;return i.jsxs("section",{className:"mb-6",children:[i.jsx("h3",{className:"text-sm font-semibold text-[var(--text-tertiary)] uppercase tracking-wider mb-2",children:r}),a?i.jsx(lxe,{schema:s,schemas:t}):i.jsx("p",{className:"text-sm text-[var(--text-tertiary)]",children:Lg(s,t)||n("cms.apiNoSchema")})]})}const cxe="https://www.uniai.ai";function uxe(e,t){if(e!=null&&e.$ref){const r=String(e.$ref).match(/#\/components\/schemas\/(.+)$/);if(r&&t[r[1]])return t[r[1]]}return e}function wp(e,t,r=0){const n=uxe(e,t);if(!n||r>4)return null;if(n.example!==void 0)return n.example;if(n.oneOf)return wp(n.oneOf[0],t,r+1);switch(n.type){case"string":return n.format==="date-time"?"2026-01-01T00:00:00Z":"string";case"integer":case"number":return 0;case"boolean":return!0;case"array":return[wp(n.items??{},t,r+1)].filter(s=>s!==null);
1862case"object":default:{if(n.properties){const s={};for(const[a,o]of Object.entries(n.properties))s[a]=wp(o,t,r+1);return s}return{}}}}function I8({code:e}){const{copy:t,copied:r}=C1();return i.jsxs("div",{className:"relative group",children:[i.jsx("pre",{className:"text-xs rounded-lg overflow-x-auto p-3 bg-[#0f172a] text-[#e2e8f0] border border-[#1e293b]",children:i.jsx("code",{children:e})}),i.jsx("button",{type:"button",onClick:()=>t(e),"aria-label":"Copy",className:"absolute top-2 right-2 p-1 rounded bg-white/10 text-white/70 hover:text-white opacity-0 group-hover:opacity-100 transition-opacity",children:r?i.jsx(Fr,{className:"w-3.5 h-3.5 text-emerald-400"}):i.jsx(b1,{className:"w-3.5 h-3.5"})})]})}function R8({operation:e,schemas:t}){var d,h,m;const{t:r}=We(),[n,s]=v.useState("curl"),a=(m=(h=(d=e.requestBody)==null?void 0:d.content)==null?void 0:h["application/json"])==null?void 0:m.schema,o=v.useMemo(()=>a?wp(a,t):null,[a,t]),l=Array.isArray(e.security)&&e.security.length>0,u=v.useMemo(()=>{const f=[`curl ${cxe}${e.path} \\`];return e.method.toUpperCase()!=="GET"&&f.push(` -X ${e.method.toUpperCase()} \\`),l&&f.push(' -H "Authorization: Bearer $UNIAI_API_KEY" \\'),o?(f.push(' -H "Content-Type: application/json" \\'),f.push(` -d '${JSON.stringify(o)}'`)):f[f.length-1]=f[f.length-1].replace(/ \\$/,""),f.join(` 1863`)},[e,l,o]),c=o?["curl","body"]:["curl"];return i.jsxs("div",{className:"text-sm",children:[i.jsx("h3",{className:"text-sm font-semibold text-[var(--text-tertiary)] uppercase tracking-wider mb-2",children:r("cms.apiRequestSample")}),i.jsx("div",{className:"flex gap-1 mb-2",children:c.map(f=>i.jsx("button",{type:"button",onClick:()=>s(f),className:`px-2.5 py-1 text-xs rounded-md transition-colors ${n===f?"bg-[var(--bg-tertiary)] text-[var(--text-primary)] font-medium":"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]"}`,children:f==="curl"?"cURL":r("cms.apiBody")},f))}),n==="curl"||!o?i.jsx(I8,{code:u}):i.jsx(I8,{code:JSON.stringify(o,null,2)})]})}function dxe(){var g,x,w,y,b,k,T,S,j;const{t:e}=We(),[t,r]=v.useState(null),[n,s]=v.useState(!1),[a,o]=v.useState("");v.useEffect(()=>{let E=!1;return fetch("/openapi.json").then(A=>{if(!A.ok)throw new Error("openapi.json not found");return A.json()}).then(A=>!E&&r(A)).catch(()=>!E&&s(!0)),()=>{E=!0}},[]);const l=v.useMemo(()=>{var A;if(!(t!=null&&t.paths))return[];const E=[];for(const[R,M]of Object.entries(t.paths))for(const[B,W]of Object.entries(M))E.push({id:`${B}-${R}`.replace(/[^\w-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),method:B,path:R,tag:((A=W.tags)==null?void 0:A[0])??"default",summary:W.summary,description:W.description,requestBody:W.requestBody,responses:W.responses,parameters:W.parameters,security:W.security});return E},[t]);v.useEffect(()=>{if(!l.length)return;const E=window.location.hash.slice(1),A=l.find(R=>R.id===E);o(A?A.id:l[0].id)},[l]);const u=v.useCallback(E=>{o(E),window.history.replaceState(null,"",`#${E}`)},[]),c=((g=t==null?void 0:t.components)==null?void 0:g.schemas)??{},d=l.find(E=>E.id===a),h=n||t&&l.length===0,m=(y=(w=(x=d==null?void 0:d.requestBody)==null?void 0:x.content)==null?void 0:w["application/json"])==null?void 0:y.schema,f=(S=(T=(k=(b=d==null?void 0:d.responses)==null?void 0:b["200"])==null?void 0:k.content)==null?void 0:T["application/json"])==null?void 0:S.schema,p=(d==null?void 0:d.parameters)??[];
1863return i.jsxs(md,{sidebar:l.length?i.jsx(oxe,{operations:l,selectedId:a,onSelect:u}):void 0,rightSidebar:d?i.jsx(R8,{operation:d,schemas:c}):void 0,children:[i.jsx(pn,{title:e("cms.apiReference"),description:(j=t==null?void 0:t.info)==null?void 0:j.description}),h?i.jsx("div",{className:"max-w-3xl text-[var(--text-tertiary)]",children:e("cms.apiEmpty")}):t?d?i.jsxs("article",{className:"max-w-3xl",children:[i.jsxs("div",{className:"flex items-center gap-3 flex-wrap mb-2",children:[i.jsx(DO,{method:d.method}),i.jsx("code",{className:"text-sm text-[var(--text-secondary)]",children:d.path})]}),i.jsx("h1",{className:"text-2xl font-bold text-[var(--text-primary)] mb-3 leading-tight",children:d.summary||d.path}),d.description&&i.jsx("p",{className:"text-[var(--text-secondary)] mb-6 leading-relaxed",children:d.description}),p.length>0&&i.jsxs("section",{className:"mb-6",children:[i.jsx("h3",{className:"text-sm font-semibold text-[var(--text-tertiary)] uppercase tracking-wider mb-2",children:e("cms.apiParams")}),i.jsx("div",{className:"divide-y divide-[var(--border-default)]",children:p.map(E=>{var A;return i.jsxs("div",{className:"py-2.5",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx("code",{className:"text-sm font-semibold text-[var(--text-primary)]",children:E.name}),i.jsx("span",{className:"text-xs font-mono text-ui-accent",children:((A=E.schema)==null?void 0:A.type)??"string"}),i.jsx("span",{className:"text-[10px] text-[var(--text-tertiary)]",children:E.in}),E.required&&i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-red-500/10 text-red-500 border border-red-500/20",children:"required"})]}),E.description&&i.jsx("p",{className:"mt-1 text-sm text-[var(--text-secondary)]",children:E.description})]},E.name)})})]}),m&&i.jsx(j8,{schema:m,schemas:c,title:e("cms.apiRequestBody")}),f&&i.jsx(j8,{schema:f,schemas:c,title:e("cms.apiResponse")}),i.jsx("div",{className:"xl:hidden mt-8 pt-6 border-t border-[var(--border-default)]",children:i.jsx(R8,{operation:d,schemas:c})})]}):null:i.jsxs("div",{className:"max-w-3xl animate-pulse space-y-4",children:[i.jsx("div",{className:"h-8 w-1/3 bg-[var(--bg-tertiary)] rounded-lg"}),i.jsx("div",{className:"h-4 w-2/3 bg-[var(--bg-tertiary)] rounded"}),i.jsx("div",{className:"h-40 w-full bg-[var(--bg-tertiary)] rounded-xl"})]})]})}function MO({page:e,total:t,limit:r,onPageChange:n}){const{t:s}=We(),a=Math.max(1,Math.ceil(t/r));if(a<=1)return null;const o=new Set;o.add(1),o.add(a);for(let c=Math.max(1,e-1);c<=Math.min(a,e+1);c++)o.add(c);const l=Array.from(o).sort((c,d)=>c-d),u=[];for(let c=0;c<l.length;c++)c>0&&l[c]-l[c-1]>1&&u.push(-1),u.push(l[c]);return i.jsxs("nav",{className:"flex items-center justify-center gap-1 mt-8","aria-label":"Pagination",children:[i.jsxs("button",{onClick:()=>n(e-1),disabled:e<=1,className:"inline-flex items-center gap-1 px-3 py-1.5 rounded text-sm text-muted-foreground hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[i.jsx(x1,{className:"w-4 h-4"}),s("cms.prevPage")]}),u.map((c,d)=>c===-1?i.jsx("span",{className:"px-2 text-muted-foreground",children:"..."},`ellipsis-${d}`):i.jsx("button",{onClick:()=>n(c),className:Uo("min-w-[32px] h-8 rounded text-sm transition-colors",c===e?"bg-primary text-primary-foreground font-medium":"text-muted-foreground hover:bg-muted"),children:c},c)),i.jsxs("button",{onClick:()=>n(e+1),disabled:e>=a,className:"inline-flex items-center gap-1 px-3 py-1.5 rounded text-sm text-muted-foreground hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[s("cms.nextPage"),i.jsx(Gs,{className:"w-4 h-4"})]})]})}function hxe(){return i.jsxs("div",{className:"animate-pulse",children:[i.jsx("div",{className:"h-3 w-40 rounded bg-[var(--bg-tertiary)] mb-6"}),i.jsx("div",{className:"h-14 w-full rounded bg-[var(--bg-tertiary)] mb-3"}),i.jsx("div",{className:"h-14 w-3/4 rounded bg-[var(--bg-tertiary)] mb-8"}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("div",{className:"h-5 w-full rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-5 w-5/6 rounded bg-[var(--bg-tertiary)]"})]}),i.jsx("div",{className:"h-3 w-24 rounded bg-[var(--bg-tertiary)] mt-6"})]})}function mxe(){var w,y,b;const{lang:e="zh-CN"}
1863=Ut(),{t}=We(),r=k=>{const T=new Date(k);return e==="zh-CN"?t("blog.dateFormat",{year:T.getFullYear(),month:T.getMonth()+1,day:T.getDate()}):T.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}).toUpperCase()},[n,s]=v.useState([]),[a,o]=v.useState(1),[l,u]=v.useState(0),[c,d]=v.useState(10),[h,m]=v.useState(!0),f=v.useCallback(k=>{m(!0),Ko.getBlogList(e,k).then(T=>{s(T.items||[]);const S=T.pagination;u((S==null?void 0:S.total)??T.total??0),o((S==null?void 0:S.page)??T.page??1),((S==null?void 0:S.limit)??T.limit)&&d((S==null?void 0:S.limit)??T.limit??10)}).finally(()=>m(!1))},[e]);v.useEffect(()=>{o(1),f(1)},[e,f]);const p=k=>{f(k),window.scrollTo({top:0,behavior:"smooth"})},g=n[0],x=n.slice(1);return i.jsxs(md,{children:[i.jsx(pn,{title:t("seo.blogTitle"),description:t("seo.blogDesc")}),i.jsxs("div",{className:"max-w-5xl mx-auto flex gap-12",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[h?i.jsx(hxe,{}):n.length===0?i.jsx("div",{className:"text-center py-24",children:i.jsx("p",{className:"text-[var(--text-tertiary)] text-lg",children:t("cms.noContent")})}):i.jsxs(i.Fragment,{children:[g&&i.jsxs(Ke,{to:`/${e}/blog/${g.slug}`,className:"group block mb-20",children:[i.jsxs("p",{className:"text-sm font-semibold tracking-wider uppercase text-ui-accent mb-5",children:[t("blog.latest")," â ",r(g.publishedAt)]}),i.jsx("h1",{className:"text-4xl md:text-[3.5rem] md:leading-[1.1] font-extrabold tracking-tight text-[var(--text-primary)] group-hover:text-ui-accent transition-colors",children:((w=g.translation)==null?void 0:w.title)??g.slug}),((y=g.translation)==null?void 0:y.summary)&&i.jsx("p",{className:"mt-6 text-xl md:text-2xl leading-relaxed text-[var(--text-secondary)]",children:g.translation.summary}),i.jsx("div",{className:"mt-6",children:((b=g.translation)==null?void 0:b.body)&&i.jsx(Oh,{content:g.translation.body,className:"text-sm uppercase tracking-wider text-[var(--text-tertiary)]"})})]}),x.length>0&&i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[i.jsx("h2",{className:"text-xs font-bold tracking-widest uppercase text-[var(--text-tertiary)] shrink-0",children:t("blog.morePosts")}),i.jsx("div",{className:"flex-1 h-px bg-[var(--border-default)]"})]}),i.jsx("div",{className:"space-y-10",children:x.map(k=>{var T,S,j;return i.jsxs(Ke,{to:`/${e}/blog/${k.slug}`,className:"group block",children:[i.jsx("h3",{className:"text-2xl md:text-3xl font-bold tracking-tight text-[var(--text-primary)] group-hover:text-ui-accent transition-colors leading-tight",children:((T=k.translation)==null?void 0:T.title)??k.slug}),((S=k.translation)==null?void 0:S.summary)&&i.jsx("p",{className:"mt-3 text-lg leading-relaxed text-[var(--text-secondary)] line-clamp-3",children:k.translation.summary}),i.jsxs("div",{className:"mt-3 flex items-center gap-2 text-sm text-[var(--text-tertiary)]",children:[i.jsx("span",{className:"uppercase tracking-wider",children:r(k.publishedAt)}),((j=k.translation)==null?void 0:j.body)&&i.jsxs(i.Fragment,{children:[i.jsx("span",{children:"·"}),i.jsx(Oh,{content:k.translation.body,className:"text-sm"})]})]})]},k.id)})})]})]}),i.jsx(MO,{page:a,total:l,limit:c,onPageChange:p})]}),i.jsx("aside",{className:"w-64 shrink-0 hidden lg:block",children:i.jsxs("div",{className:"sticky top-20",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[i.jsx("h2",{className:"text-xs font-bold tracking-widest uppercase text-[var(--text-tertiary)] shrink-0",children:"ABOUT"}),i.jsx("div",{className:"flex-1 h-px bg-[var(--border-default)]"})]}),i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("img",{src:"/logos/uniai-64.png",alt:"UniAI",className:"w-12 h-12 rounded-xl"}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-bold text-[var(--text-primary)]",children:"UniAI Blog"}),i.jsx("p",{className:"text-xs text-[var(--text-tertiary)]",children:t("blog.aboutTagline")})]})]}),i.jsx("p",{className:"text-sm text-[var(--text-secondary)] leading-relaxed mb-6",children:t("blog.aboutDescription")}),i.jsxs("div",{className:"border-t border-[var(--border-default)] pt-5",children:[i.jsx("p",{className:"text-xs text-[var(--text-tertiary)] mb-3",children:t("blog.getInTouch")}),i.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-2 text-sm text-ui-accent hover:underline",children:[i.jsx(dd,{className:"w-4 h-4"}),"[email protected]"]})]}),i.jsx("div",{className:"border-t border-[var(--border-default)] pt-5 mt-5",children:i.jsx(Ke,{to:`/${e}/register`,className:"block w-full text-center px-4 py-2.5 rounded-xl bg-[var(--text-primary)] text-[var(--bg-primary)] text-sm font-semibold hover:opacity-90 transition-opacity",children:t("blog.signUpFree")})})]})})]})]})}const fxe={产å:"bg-indigo-100 text-indigo-700 dark:bg-indigo-900/40 dark:text-indigo-300",å
¬å:"bg-pink-100 text-pink-700 dark:bg-pink-900/40 dark:text-pink-300",æç¨:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-300",å¾å:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",ç»å¸:"bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300",è§é¢:"bg-purple-100 text-purple-700 dark:bg-purple-900/40 dark:text-purple-300"};function pxe(e){return fxe[e]||"bg-[var(--bg-tertiary)] text-[var(--text-secondary)]"}function gxe(){return i.jsxs("div",{className:"max-w-3xl mx-auto animate-pulse",children:[i.jsx("div",{className:"h-4 w-20 rounded bg-[var(--bg-tertiary)] mb-6"}),i.jsxs("div",{className:"mb-10 pb-8 border-b border-[var(--border-default)]",children:[i.jsxs("div",{className:"flex gap-2 mb-4",children:[i.jsx("div",{className:"h-5 w-12 rounded-full bg-[var(--bg-tertiary)]"}
1863),i.jsx("div",{className:"h-5 w-14 rounded-full bg-[var(--bg-tertiary)]"})]}),i.jsx("div",{className:"h-10 w-3/4 rounded-lg bg-[var(--bg-tertiary)]"}),i.jsxs("div",{className:"mt-4 flex gap-3",children:[i.jsx("div",{className:"h-6 w-24 rounded-full bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-6 w-32 rounded-full bg-[var(--bg-tertiary)]"})]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"h-4 w-full rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-11/12 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-4/5 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-7 w-1/3 rounded bg-[var(--bg-tertiary)] mt-6"}),i.jsx("div",{className:"h-4 w-full rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-5/6 rounded bg-[var(--bg-tertiary)]"})]})]})}function xxe(){var c,d,h,m,f,p;const{lang:e="zh-CN",slug:t}=Ut(),{t:r}=We(),n=g=>{const x=new Date(g);return e==="zh-CN"?r("blog.dateFormat",{year:x.getFullYear(),month:x.getMonth()+1,day:x.getDate()}):x.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})},[s,a]=v.useState(null),[o,l]=v.useState(!0);v.useEffect(()=>{t&&(l(!0),Ko.getBlogPost(t,e).then(g=>a(g)).finally(()=>l(!1)))},[t,e]);const u=((c=s==null?void 0:s.translation)==null?void 0:c.body)??"";return i.jsxs(md,{rightSidebar:u?i.jsx(ix,{content:u}):void 0,children:[i.jsx(pn,{title:((d=s==null?void 0:s.translation)==null?void 0:d.title)??"",description:((h=s==null?void 0:s.translation)==null?void 0:h.summary)??((m=s==null?void 0:s.translation)==null?void 0:m.title),type:"article"}),(s==null?void 0:s.translation)&&t&&i.jsx(wa,{data:[B3({lang:e,type:"BlogPosting",headline:s.translation.title,description:s.translation.summary,datePublished:s.publishedAt,pathSuffix:`/blog/${t}`,image:(f=s.metadata)==null?void 0:f.coverImage}),al([{name:r("seo.blogTitle"),path:"/blog"},{name:s.translation.title,path:`/blog/${t}`}],e)]}),o?i.jsx(gxe,{}):s!=null&&s.translation?i.jsxs("article",{className:"max-w-3xl mx-auto",children:[i.jsxs(Ke,{to:`/${e}/blog`,className:"inline-flex items-center gap-1.5 text-sm text-ui-accent hover:underline mb-6",children:[i.jsx(g1,{className:"w-4 h-4"}),r("cms.backToList")]}),i.jsxs("div",{className:"mb-10 pb-8 border-b border-[var(--border-default)]",children:[((p=s.metadata)==null?void 0:p.tags)&&s.metadata.tags.length>0&&i.jsx("div",{className:"flex gap-2 flex-wrap mb-4",children:s.metadata.tags.map(g=>i.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-0.5 text-xs font-medium rounded-full ${pxe(g)}`,children:[i.jsx(pG,{className:"w-3 h-3"}),g]},g))}),i.jsx("h1",{className:"text-[2rem] font-extrabold tracking-tight text-[var(--text-primary)] leading-tight",children:s.translation.title}),s.translation.summary&&i.jsx("p",{className:"mt-3 text-lg text-[var(--text-secondary)] leading-relaxed",children:s.translation.summary}),i.jsxs("div",{className:"mt-5 flex items-center gap-3 flex-wrap",children:[i.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm text-[var(--text-tertiary)] px-2.5 py-1 rounded-full bg-[var(--bg-secondary)] border border-[var(--border-default)]",children:[i.jsx(xh,{className:"w-3.5 h-3.5"}),n(s.publishedAt)]}),i.jsx(Oh,{content:s.translation.body,className:"text-sm px-2.5 py-1 rounded-full bg-[var(--bg-secondary)] border border-[var(--border-default)]"})]})]}),i.jsx(z5,{content:s.translation.body}),i.jsx($5,{content:s.translation.body})]}):i.jsx("div",{className:"text-center py-16",children:i.jsx("p",{className:"text-[var(--text-tertiary)]",children:r("cms.noContent")})})]})}function bxe(){return i.jsx("div",{className:"space-y-4 animate-pulse",children:[1,2,3,4].map(e=>i.jsxs("div",{className:"rounded-xl border border-[var(--border-default)] p-5",children:[i.jsx("div",{className:"h-5 w-2/3 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"mt-3 h-4 w-full rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"mt-2 h-4 w-4/5 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"mt-3 h-3 w-24 rounded bg-[var(--bg-tertiary)]"})]},e))})}function yxe(e,t){const r=new Date(e);return t==="zh-CN"?`${r.getFullYear()} å¹´ ${r.getMonth()+1} æ ${r.getDate()} æ¥`:r.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function vxe(){const{lang:e="zh-CN"}
1863=Ut(),{t}=We(),[r,n]=v.useState([]),[s,a]=v.useState(1),[o,l]=v.useState(0),[u,c]=v.useState(10),[d,h]=v.useState(!0),m=v.useCallback(p=>{h(!0),Ko.getAnnouncementList(e,p).then(g=>{n(g.items||[]);const x=g.pagination;l((x==null?void 0:x.total)??g.total??0),a((x==null?void 0:x.page)??g.page??1),((x==null?void 0:x.limit)??g.limit)&&c((x==null?void 0:x.limit)??g.limit??10)}).finally(()=>h(!1))},[e]);v.useEffect(()=>{a(1),m(1)},[e,m]);const f=p=>{m(p),window.scrollTo({top:0,behavior:"smooth"})};return i.jsxs(md,{children:[i.jsx(pn,{title:t("seo.announcementsTitle"),description:t("seo.announcementsDesc")}),i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsxs("div",{className:"mb-10",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-xl bg-ui-accent/10",children:i.jsx(u2,{className:"w-5 h-5 text-ui-accent"})}),i.jsx("h1",{className:"text-[2rem] font-extrabold tracking-tight text-[var(--text-primary)]",children:t("cms.announcements","å
¬å")})]}),i.jsx("p",{className:"text-[var(--text-secondary)] text-sm",children:e==="zh-CN"?"äºè§£ UniAI ææ°å¨æãåè½æ´æ°åéè¦éç¥":"Latest updates, feature releases, and important notices"})]}),d?i.jsx(bxe,{}):r.length===0?i.jsxs("div",{className:"text-center py-16",children:[i.jsx(u2,{className:"w-12 h-12 text-[var(--text-tertiary)] mx-auto mb-4"}),i.jsx("p",{className:"text-[var(--text-tertiary)]",children:t("cms.noContent")})]}):i.jsx("div",{className:"space-y-4",children:r.map(p=>{var x,w,y;const g=((x=p.metadata)==null?void 0:x.announcementType)==="major";return i.jsxs(Ke,{to:`/${e}/announcements/${p.slug}`,className:`group block rounded-xl p-5 transition-all cursor-pointer ${g?"relative overflow-hidden border-0 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white shadow-lg shadow-indigo-500/20 hover:shadow-xl hover:shadow-indigo-500/30":"border border-[var(--border-default)] hover:border-ui-accent/30 hover:shadow-md hover:shadow-ui-accent/5"}`,children:[g&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"absolute top-0 right-0 w-48 h-48 bg-white/10 rounded-full -translate-y-1/2 translate-x-1/3"}),i.jsx("div",{className:"absolute bottom-0 left-0 w-32 h-32 bg-white/10 rounded-full translate-y-1/3 -translate-x-1/4"})]}),i.jsxs("div",{className:"relative flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[g&&i.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full bg-white/20 text-white text-xs font-semibold mb-3 backdrop-blur-sm",children:[i.jsx(T9,{className:"w-3 h-3"}),e==="zh-CN"?"éè¦å
Œ":"Major"]}),i.jsx("h2",{className:`text-lg font-bold flex items-center gap-2 ${g?"text-white":"text-[var(--text-primary)] group-hover:text-ui-accent"} transition-colors`,children:((w=p.translation)==null?void 0:w.title)??p.slug}),((y=p.translation)==null?void 0:y.summary)&&i.jsx("p",{className:`mt-2 text-sm line-clamp-2 ${g?"text-white/80":"text-[var(--text-secondary)]"}`,children:p.translation.summary}),i.jsxs("div",{className:`mt-3 flex items-center gap-1.5 text-xs ${g?"text-white/70":"text-[var(--text-tertiary)]"}`,children:[i.jsx(xh,{className:"w-3.5 h-3.5"}),yxe(p.publishedAt,e)]})]}),i.jsx(Gs,{className:`w-5 h-5 shrink-0 mt-1 transition-colors ${g?"text-white/60 group-hover:text-white":"text-[var(--text-tertiary)] group-hover:text-ui-accent"}`})]})]},p.id)})}),i.jsx(MO,{page:s,total:o,limit:u,onPageChange:f})]})]})}const D8=["#6366f1","#a78bfa","#ec4899","#f59e0b","#10b981","#3b82f6","#f43f5e","#8b5cf6"],M8=["square","circle","strip"];function wxe({active:e}){const t=v.useRef(null),r=v.useRef([]),n=v.useRef(0),s=v.useCallback(()=>{const o=[];for(let l=0;l<120;l++)o.push({id:l,x:Math.random()*window.innerWidth,y:-(Math.random()*300+50),color:D8[Math.floor(Math.random()*D8.length)],shape:M8[Math.floor(Math.random()*M8.length)],size:Math.random()*8+4,rotation:Math.random()*360,rotationSpeed:(Math.random()-.5)*8,speedX:(Math.random()-.5)*4,speedY:Math.random()*3+2,opacity:1});r.current=o},[]);return v.useEffect(()=>{if(!e)return;const a=t.current;if(!a)return;const o=a.getContext("2d");if(!o)return;a.width=window.innerWidth,a.height=window.innerHeight,s();const l=()=>{o.clearRect(0,0,a.width,a.height);let c=!1;for(const d of r.current)d.opacity<=0||(c=!0,d.x+=d.speedX,d.y+=d.speedY,d.speedY+=.05,d.speedX*=.99,d.rotation+=d.rotationSpeed,d.y>a.height*.7&&(d.opacity-=.02),o.save(),o.translate(d.x,d.y),o.rotate(d.rotation*Math.PI/180),o.globalAlpha=Math.max(0,d.opacity),o.fillStyle=d.color,d.shape==="square"?o.fillRect(-d.size/2,-d.size/2,d.size,d.size):d.shape==="circle"?(o.beginPath(),o.arc(0,0,d.size/2,0,Math.PI*2),o.fill()):o.fillRect(-d.size/2,-1,d.size,3),o.restore(
1863));c&&(n.current=requestAnimationFrame(l))};n.current=requestAnimationFrame(l);const u=()=>{a.width=window.innerWidth,a.height=window.innerHeight};return window.addEventListener("resize",u),()=>{cancelAnimationFrame(n.current),window.removeEventListener("resize",u)}},[e,s]),e?i.jsx("canvas",{ref:t,className:"fixed inset-0 z-50 pointer-events-none",style:{width:"100vw",height:"100vh"}}):null}function Exe(){return i.jsxs("div",{className:"max-w-3xl mx-auto animate-pulse",children:[i.jsx("div",{className:"h-4 w-20 rounded bg-[var(--bg-tertiary)] mb-6"}),i.jsx("div",{className:"rounded-2xl overflow-hidden mb-10",children:i.jsx("div",{className:"h-48 bg-gradient-to-br from-indigo-100 to-purple-100 dark:from-indigo-900/30 dark:to-purple-900/30"})}),i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"h-4 w-full rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-11/12 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-4/5 rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-7 w-1/3 rounded bg-[var(--bg-tertiary)] mt-6"}),i.jsx("div",{className:"h-4 w-full rounded bg-[var(--bg-tertiary)]"}),i.jsx("div",{className:"h-4 w-5/6 rounded bg-[var(--bg-tertiary)]"})]})]})}function kxe(e,t){const r=new Date(e);return t==="zh-CN"?`${r.getFullYear()} å¹´ ${r.getMonth()+1} æ ${r.getDate()} æ¥`:r.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function Nxe({title:e,summary:t,publishedAt:r,lang:n,readingBody:s,isMajor:a}){return i.jsxs("div",{className:"relative rounded-2xl overflow-hidden mb-10",children:[i.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-indigo-500 via-purple-500 to-pink-500"}),i.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-white/10 rounded-full -translate-y-1/2 translate-x-1/3"}),i.jsx("div",{className:"absolute bottom-0 left-0 w-48 h-48 bg-white/10 rounded-full translate-y-1/3 -translate-x-1/4"}),i.jsx("div",{className:"absolute top-1/2 left-1/2 w-32 h-32 bg-white/5 rounded-full -translate-x-1/2 -translate-y-1/2"}),i.jsxs("div",{className:"relative px-8 py-10 md:px-12 md:py-14",children:[a&&i.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-white/20 text-white text-xs font-semibold mb-4 backdrop-blur-sm",children:[i.jsx(T9,{className:"w-3.5 h-3.5"}),n==="zh-CN"?"éè¦å
Œ":"Major Announcement"]}),i.jsx("h1",{className:"text-3xl md:text-4xl font-extrabold text-white tracking-tight leading-tight",children:e}),t&&i.jsx("p",{className:"mt-4 text-white/80 text-lg max-w-2xl leading-relaxed",children:t}),i.jsxs("div",{className:"mt-6 flex items-center gap-3 flex-wrap",children:[i.jsx(Oh,{content:s,className:"text-sm px-3 py-1.5 rounded-full bg-white/20 text-white backdrop-blur-sm"}),r&&i.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm text-white/90 px-3 py-1.5 rounded-full bg-white/20 backdrop-blur-sm",children:[i.jsx(xh,{className:"w-3.5 h-3.5"}),kxe(r,n)]})]})]})]})}function Sxe(){var h,m,f,p,g;const{lang:e="zh-CN",slug:t}=Ut(),{t:r}=We(),[n,s]=v.useState(null),[a,o]=v.useState(!0),[l,u]=v.useState(!1);v.useEffect(()=>{t&&(o(!0),Ko.getAnnouncement(t,e).then(x=>{var w;s(x),((w=x.metadata)==null?void 0:w.announcementType)==="major"&&(u(!0),setTimeout(()=>u(!1),4e3))}).finally(()=>o(!1)))},[t,e]);const c=((h=n==null?void 0:n.translation)==null?void 0:h.body)??"",d=((m=n==null?void 0:n.metadata)==null?void 0:m.announcementType)==="major";return i.jsxs(md,{rightSidebar:c?i.jsx(ix,{content:c}):void 0,children:[i.jsx(wxe,{active:l}),i.jsx(pn,{title:((f=n==null?void 0:n.translation)==null?void 0:f.title)??"",description:((p=n==null?void 0:n.translation)==null?void 0:p.summary)??((g=n==null?void 0:n.translation)==null?void 0:g.title),type:"article"}),(n==null?void 0:n.translation)&&t&&i.jsx(wa,{data:[B3({lang:e,type:d?"NewsArticle":"Article",headline:n.translation.title,description:n.translation.summary,datePublished:n.publishedAt,pathSuffix:`/announcements/${t}`}),al([{name:r("seo.announcementsTitle"),path:"/announcements"},{name:n.translation.title,path:`/announcements/${t}`}],e)]}
1863),a?i.jsx(Exe,{}):n!=null&&n.translation?i.jsxs("article",{className:"max-w-3xl mx-auto",children:[i.jsxs(Ke,{to:`/${e}/announcements`,className:"inline-flex items-center gap-1.5 text-sm text-white/70 hover:text-white mb-4 transition-colors",style:{color:"var(--ui-accent)"},children:[i.jsx(g1,{className:"w-4 h-4"}),r("cms.backToList")]}),i.jsx(Nxe,{title:n.translation.title,summary:n.translation.summary,publishedAt:n.publishedAt,lang:e,readingBody:n.translation.body,isMajor:d}),i.jsx(z5,{content:n.translation.body}),i.jsx($5,{content:n.translation.body}),i.jsxs("div",{className:"mt-12 rounded-2xl border border-[var(--border-default)] bg-gradient-to-br from-indigo-50 to-purple-50 dark:from-indigo-950/30 dark:to-purple-950/30 p-8 text-center",children:[i.jsx(A9,{className:"w-10 h-10 text-ui-accent mx-auto mb-3"}),i.jsx("h3",{className:"text-xl font-bold text-[var(--text-primary)] mb-2",children:e==="zh-CN"?"ç«å³ä½éª UniAI":"Try UniAI Now"}),i.jsx("p",{className:"text-sm text-[var(--text-secondary)] mb-5",children:e==="zh-CN"?"注åå³é 1,000 积åï¼å¼å¯ä½ ç AI åä½ä¹æ
":"Get 1,000 free credits on registration and start your AI journey"}),i.jsxs(Ke,{to:`/${e}/register`,className:"inline-flex items-center gap-2 px-6 py-2.5 rounded-xl bg-gradient-to-r from-indigo-500 to-purple-500 text-white font-semibold text-sm hover:opacity-90 transition-opacity shadow-lg shadow-indigo-500/25",children:[i.jsx(wn,{className:"w-4 h-4"}),e==="zh-CN"?"å
费注å":"Sign Up Free"]})]})]}):i.jsx("div",{className:"text-center py-16",children:i.jsx("p",{className:"text-[var(--text-tertiary)]",children:r("cms.noContent")})})]})}const Txe=v.lazy(()=>Je(()=>import("./Layout-D0sK9dmB.js"),__vite__mapDeps([2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35])).then(e=>({default:e.Layout}))),O8=v.lazy(()=>Je(()=>import("./ChatPage--Go5rJOr.js"),__vite__mapDeps([36,3,24,25,26,27,28,29,30,31,32,33,34,35])).then(e=>({default:e.ChatPage}))),L8=v.lazy(()=>Je(()=>import("./WritingPage-2Rf942AK.js"),__vite__mapDeps([37,38,39,11,12,40,19,41,4,42,43,44,18,45,46,24,25,26,27,28,29,30,31,32,33,34,35]))),Cxe=v.lazy(()=>Je(()=>import("./WritingLayout-BDo7juV9.js"),__vite__mapDeps([47,39,10,24,25,26,27,28,29,30,31,32,33,34,35]))),_xe=v.lazy(()=>Je(()=>import("./TemplatesPage-4PnAzRpc.js"),__vite__mapDeps([48,43,10,23,24,25,26,27,28,29,30,31,32,33,34,35]))),Axe=v.lazy(()=>Je(()=>import("./TranslationPage-CXzZQhNV.js"),__vite__mapDeps([49,43,10,50,24,25,26,27,28,29,30,31,32,33,34,35]))),jxe=v.lazy(()=>Je(()=>import("./SearchPage-CNfKcAuo.js"),__vite__mapDeps([51,43,10,24,25,26,27,28,29,30,31,32,33,34,35]))),Ixe=v.lazy(()=>Je(()=>import("./ToolsPage-BIgQIZVz.js"),__vite__mapDeps([52,43,10,41,53,24,25,26,27,28,29,30,31,32,33,34,35]))),Rxe=v.lazy(()=>Je(()=>import("./BillingPage-Dg0Cg9zP.js"),__vite__mapDeps([54,43,55,22,24,25,26,27,28,29,30,31,32,33,34,35]))),Dxe=v.lazy(()=>Je(()=>import("./SummaryPage-BpwIoflA.js"),__vite__mapDeps([56,10,38,57,14,24,25,26,27,28,29,30,31,32,33,34,35]))),Mxe=v.lazy(()=>Je(()=>import("./ReplyPage-D--ewUBz.js"),__vite__mapDeps([58,10,38,57,24,25,26,27,28,29,30,31,32,33,34,35]))),Oxe=v.lazy(()=>Je(()=>import("./GrammarPage-C7KWTD4T.js"),__vite__mapDeps([59,10,38,57,24,25,26,27,28,29,30,31,32,33,34,35]))),Lxe=v.lazy(()=>Je(()=>import("./TextTranslatePage-DT_54Bfs.js"),__vite__mapDeps([60,10,38,61,57,50,24,25,26,27,28,29,30,31,32,33,34,35]))),Pxe=v.lazy(()=>Je(()=>import("./DocumentTranslatePage--jx6Zr2t.js"),__vite__mapDeps([62,61,38,63,46,50,42,24,25,26,27,28,29,30,31,32,33,34,35]))),Fxe=v.lazy(()=>Je(()=>import("./SubtitleTranslatePage-FMjBJ2zR.js"),__vite__mapDeps([64,61,38,46,50,24,25,26,27,28,29,30,31,32,33,34,35]))),Bxe=v.lazy(()=>Je(()=>import("./TranslationHistoryDetailPage-4D7Ljq3E.js"),__vite__mapDeps([65,50,63,20,24,25,26,27,28,29,30,31,32,33,34,35]))),Uxe=v.lazy(()=>Je(()=>import("./ImageEditPage-DPThs_XY.js"),__vite__mapDeps([66,67,13,68,24,25,26,27,28,29,30,31,32,33,34,35]))),$xe=v.lazy(()=>Je(()=>import("./ImageOCRPage-DiBvXULO.js"),__vite__mapDeps([69,67,24,25,26,27,28,29,30,31,32,33,34,35]))),zxe=v.lazy(()=>Je(()=>import("./ImageAnalysisPage-C8ElPQzs.js"),__vite__mapDeps([70,67,24,25,26,27,28,29,30,31,32,33,34,35]))),Hxe=v.lazy(()=>Je(()=>import("./ImageRemoveBgPage-CoAEGJBw.js"),__vite__mapDeps([71,67,24,25,26,27,28,29,30,31,32,33,34,35]))),qxe=v.lazy(()=>Je(()=>import("./ImageUpscalePage-8eA5q8dE.js"),__vite__mapDeps([72,67,24,25,26,27,28,29,30,31,32,33,34,35]))),Wxe=v.lazy(()=>Je(()=>import("./ImageRestorePage-DXlVFEPB.js"),__vite__mapDeps([73,67,24,25,26,27,28,29,30,31,32,33,34,35]))),Vxe=v.lazy(()=>Je(()=>import("./ImageTranslatePage-4rOBgS8P.js"),__vite__mapDeps([74,10,67,50,24,25,26,27,28,29,30,31,32,33,34,35]))),Gxe=v.lazy(()=>Je(()=>import("./ImageEditorPage-CGRydluy.js"),__vite__mapDeps([75,68,10,76,46,18,11,77,44,21,19,24,25,26,27,28,29,30,31,32,33,34,35]))),Kxe=v.lazy(()=>Je(()=>import("./TTSPage-D611PCbx.js"),__vite__mapDeps([78,43,55,10,79,24,25,26,27,28,29,30,31,32,33,34,35]))),Yxe=v.lazy(()=>Je(()=>import("./TTSHistoryPage-DOdna4T8.js"),__vite__mapDeps([80,43,55,81,24,25,26,27,28,29,30,31,32,33,34,35]))),Qxe=v.lazy(()=>Je(()=>import("./STTPage-Bajnp1ST.js"),__vite__mapDeps([82,55,24,25,26,27,28,29,30,31,32,33,34,35]))),Xxe=v.lazy(()=>Je(()=>import("./STTHistoryPage-CsVfxbtz.js"),__vite__mapDeps([83,43,55,10,15,81,24,25,26,27,28,29,30,31,32,33,34,35]))),Zxe=v.lazy(()=>Je(()=>import("./PodcastPage-Dx3tVVCt.js"),__vite__mapDeps([84,43,55,79,46,85,24,25,26,27,28,29,30,31,32,33,34,35]))),Jxe=v.lazy(()=>Je(()=>import("./PodcastHistoryPage-znbHWIQJ.js"),__vite__mapDeps([86,43,55,81,85,24,25,26,27,28,29,30,31,32,33,34,35]))),ebe=v.lazy(()=>Je(()=>
1863import("./VoiceClonePage-De-k5dYI.js"),__vite__mapDeps([87,43,55,10,79,24,25,26,27,28,29,30,31,32,33,34,35]))),tbe=v.lazy(()=>Je(()=>import("./VoiceCloneHistoryPage-DK9c4HrF.js"),__vite__mapDeps([88,43,55,81,24,25,26,27,28,29,30,31,32,33,34,35]))),rbe=v.lazy(()=>Je(()=>import("./MusicGeneratePage-DgFjBLxG.js"),__vite__mapDeps([89,43,55,24,25,26,27,28,29,30,31,32,33,34,35]))),nbe=v.lazy(()=>Je(()=>import("./MusicHistoryPage-K6ltgxlh.js"),__vite__mapDeps([90,43,55,81,24,25,26,27,28,29,30,31,32,33,34,35]))),sbe=v.lazy(()=>Je(()=>import("./CreatePage-BSMFehld.js"),__vite__mapDeps([91,92,93,94,24,25,26,27,28,29,30,31,32,33,34,35]))),abe=v.lazy(()=>Je(()=>import("./VideoQuickPage-rYkKw5RA.js"),__vite__mapDeps([95,96,55,97,24,25,26,27,28,29,30,31,32,33,34,35]))),ibe=v.lazy(()=>Je(()=>import("./VideoStoryPage-CbCgEyS5.js"),__vite__mapDeps([98,96,55,97,24,25,26,27,28,29,30,31,32,33,34,35]))),obe=v.lazy(()=>Je(()=>import("./VideoMusicMVPage-D2OCIj4x.js"),__vite__mapDeps([99,96,55,97,24,25,26,27,28,29,30,31,32,33,34,35]))),lbe=v.lazy(()=>Je(()=>import("./VideoImageAnimPage-DKvzJ0wO.js"),__vite__mapDeps([100,96,55,97,24,25,26,27,28,29,30,31,32,33,34,35]))),P8=v.lazy(()=>Je(()=>import("./VideoAgentWorkspacePage-ZKOQQf0T.js"),__vite__mapDeps([101,97,5,24,25,26,27,28,29,30,31,32,33,34,35]))),cbe=v.lazy(()=>Je(()=>import("./PipelineHomePage-CCKRDnxm.js"),__vite__mapDeps([102,103,55,24,25,26,27,28,29,30,31,32,33,34,35]))),F8=v.lazy(()=>Je(()=>import("./PipelineWorkspacePage-BDtuj-cH.js").then(e=>e.b),__vite__mapDeps([104,105,103,9,53,45,16,7,106,18,0,1,41]))),ube=v.lazy(()=>Je(()=>import("./ResearchAgentPage-CJIRH7lo.js"),__vite__mapDeps([107,55,24,25,26,27,28,29,30,31,32,33,34,35]))),dbe=v.lazy(()=>Je(()=>import("./MarketingAgentPage-CbYik5XR.js"),__vite__mapDeps([108,55,10,24,25,26,27,28,29,30,31,32,33,34,35]))),hbe=v.lazy(()=>Je(()=>import("./DataAnalysisPage-CVZX88Mh.js"),__vite__mapDeps([109,55,41,24,25,26,27,28,29,30,31,32,33,34,35]))),mbe=v.lazy(()=>Je(()=>import("./DocumentPage-BPrPFnh_.js"),__vite__mapDeps([110,111,40,24,25,26,27,28,29,30,31,32,33,34,35]))),fbe=v.lazy(()=>Je(()=>import("./ProfilePage-DqICj7ky.js"),__vite__mapDeps([112,43,8,9,16,24,25,26,27,28,29,30,31,32,33,34,35]))),pbe=v.lazy(()=>Je(()=>import("./TransferPage-C--WEQHS.js"),__vite__mapDeps([113,43,55,46,24,25,26,27,28,29,30,31,32,33,34,35]))),gbe=v.lazy(()=>Je(()=>import("./ReferralPage-TzdFzaMX.js"),__vite__mapDeps([114,43,5,24,25,26,27,28,29,30,31,32,33,34,35]))),xbe=v.lazy(()=>Je(()=>import("./FeedbackPage-NhE_VP-b.js"),__vite__mapDeps([115,55,10,116,15,24,25,26,27,28,29,30,31,32,33,34,35]))),bbe=v.lazy(()=>Je(()=>import("./FeedbackDetailPage-Cv5ZystT.js"),__vite__mapDeps([117,43,116,24,25,26,27,28,29,30,31,32,33,34,35]))),ybe=v.lazy(()=>Je(()=>import("./AssetsHomePage-DMmheimz.js"),__vite__mapDeps([118,119,111,120,24,25,26,27,28,29,30,31,32,33,34,35]))),vbe=v.lazy(()=>Je(()=>import("./ImagesGalleryPage-DTF7Ygus.js"),__vite__mapDeps([121,43,10,119,122,93,42,111,123,24,25,26,27,28,29,30,31,32,33,34,35]))),wbe=v.lazy(()=>Je(()=>import("./VideosGalleryPage-Dcd17YN1.js"),__vite__mapDeps([124,43,10,119,122,93,42,111,123,24,25,26,27,28,29,30,31,32,33,34,35]))),Ebe=v.lazy(()=>Je(()=>import("./AudioFilesPage-XP9ts--7.js"),__vite__mapDeps([125,43,10,119,122,93,42,111,24,25,26,27,28,29,30,31,32,33,34,35]))),kbe=v.lazy(()=>Je(()=>import("./TranslationHistoryPage-DVANvqay.js"),__vite__mapDeps([126,43,119,10,24,25,26,27,28,29,30,31,32,33,34,35]))),Nbe=v.lazy(()=>Je(()=>import("./RecycleBinPage-jijiRjpx.js"),__vite__mapDeps([127,43,119,122,93,42,111,123,24,25,26,27,28,29,30,31,32,33,34,35]))),B8=v.lazy(()=>Je(()=>import("./ArtWorkspacePage-D56PFZ2P.js"),__vite__mapDeps([128,105,129,17,79,43,76,8,9,130,131,77,41,18,67,7,6,12,11,5,132,92,93,94,46,120,24,25,26,27,28,29,30,31,32,33,34,35]))),Sbe=v.lazy(()=>Je(()=>import("./ArtProjectsPage-BMzVdYbb.js"),__vite__mapDeps([133,24,25,26,27,28,29,30,31,32,33,34,35]))),Tbe=v.lazy(()=>Je(()=>import("./TvWorksListPage-CsTKq0m2.js"),__vite__mapDeps([134,135,24,25,26,27,28,29,30,31,32,33,34,35]))),Cbe=v.lazy(()=>Je(()=>
1863import("./TvWorkDetailPage-Djv4yaAc.js"),__vite__mapDeps([136,135,129,17,79,43,76,8,9,5,24,25,26,27,28,29,30,31,32,33,34,35]))),_be=v.lazy(()=>Je(()=>import("./TvUserPage-CRG4iReP.js"),__vite__mapDeps([137,24,25,26,27,28,29,30,31,32,33,34,35]))),Abe=v.lazy(()=>Je(()=>import("./TemplatePreviewPage-Dn7Q1HbW.js"),__vite__mapDeps([138,129,17,79,43,76,8,9,135,24,25,26,27,28,29,30,31,32,33,34,35]))),jbe=v.lazy(()=>Je(()=>import("./SharePreviewPage-BwjZ9Qut.js"),__vite__mapDeps([139,129,17,79,43,76,8,9,135,24,25,26,27,28,29,30,31,32,33,34,35]))),Ibe=v.lazy(()=>Je(()=>import("./SharedGroupView-Dx89k1rt.js"),__vite__mapDeps([140,94,10,24,25,26,27,28,29,30,31,32,33,34,35]))),Rbe=v.lazy(()=>Je(()=>import("./TeamList-60pt0o9U.js"),__vite__mapDeps([141,131,24,25,26,27,28,29,30,31,32,33,34,35]))),Dbe=v.lazy(()=>Je(()=>import("./TeamSettings-DO--p9Uv.js"),__vite__mapDeps([142,14,131,10,24,25,26,27,28,29,30,31,32,33,34,35]))),Mbe=v.lazy(()=>Je(()=>import("./TestAIPage-Chc3RTG_.js"),__vite__mapDeps([143,10,24,25,26,27,28,29,30,31,32,33,34,35])));function Obe(){return i.jsx("div",{className:"min-h-screen flex items-center justify-center",children:i.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-[var(--border-default)] border-t-transparent animate-spin"})})}function Lbe({children:e}){const{lang:t}=Ut(),{i18n:r}=We(),n=Xn(),s=Er();return v.useEffect(()=>{if(t&&t!==r.language)if(Nn.some(o=>o.code===t))r.changeLanguage(t);else{const o=`/${ws}${n.pathname.replace(/^\/[^/]+/,"")}`;s({pathname:o,search:n.search},{replace:!0})}},[t,r,n.pathname,s]),i.jsx(i.Fragment,{children:e})}function Gr({children:e}){const t=ut(a=>a.isAuthenticated),{lang:r}=Ut(),n=r||ws,s=Xn();if(!t){const a=encodeURIComponent(s.pathname+s.search);return i.jsx(Bn,{to:`/${n}/login?redirect=${a}`,replace:!0})}return i.jsx(i.Fragment,{children:e})}function Pbe(){return OK(),null}function Fbe(){return v.useEffect(()=>FK(),[]),null}function Bbe(){const{token:e}=Ut(),{i18n:t}=We(),r=t.language||ws;return i.jsx(Bn,{to:`/${r}/share/${e}`,replace:!0})}function Ube(){const{token:e}=Ut(),{i18n:t}=We(),r=t.language||ws;return i.jsx(Bn,{to:`/${r}/teams/join/${e}`,replace:!0})}function $be(){const{token:e}=Ut(),t=Er(),{i18n:r}=We(),n=r.language||ws;return v.useEffect(()=>{e&&Je(async()=>{const{teamApi:s}=await Promise.resolve().then(()=>UK);return{teamApi:s}},void 0).then(({teamApi:s})=>{s.joinViaLink(e).then(a=>{t(`/${n}/app/settings/teams/${a.teamId}`,{replace:!0})}).catch(()=>{t(`/${n}/app/settings/teams`,{replace:!0})})})},[e,t,n]),i.jsx("div",{className:"flex items-center justify-center h-screen",children:"Joining team..."})}function Cy({to:e}){const[t]=Gh(),r=t.toString();return i.jsx(Bn,{to:`${e}${r?`?${r}`:""}`,replace:!0})}function zbe(){return ut(t=>t.isAuthenticated)?i.jsx(zK,{}):null}function U8(){const{i18n:e}=We(),t=e.language||ws;return i.jsx(Bn,{to:`/${t}`,replace:!0})}function Hbe(){return i.jsx(Lbe,{children:i.jsx(v.Suspense,{fallback:i.jsx(Obe,{}),children:i.jsxs(U7,{children:[i.jsx(Te,{path:"login",element:i.jsx(VK,{})}),i.jsx(Te,{path:"register",element:i.jsx(GK,{})}),i.jsx(Te,{path:"forgot-password",element:i.jsx(KK,{})}),i.jsx(Te,{path:"auth/callback",element:i.jsx(YK,{})}),i.jsx(Te,{path:"desktop-auth",element:i.jsx(QK,{})}),i.jsxs(Te,{element:i.jsx(ab,{}),children:[i.jsx(Te,{index:!0,element:i.jsx(XZ,{})}),i.jsx(Te,{path:"pricing",element:i.jsx(eJ,{})}),i.jsx(Te,{path:"download",element:i.jsx(nJ,{})}),i.jsx(Te,{path:"translate/document",element:i.jsx(a0,{appPath:"translate/document",children:i.jsx(cee,{})})}),i.jsx(Te,{path:"translate/subtitle",element:i.jsx(a0,{appPath:"translate/subtitle",children:i.jsx(uee,{})})}),i.jsx(Te,{path:"image/remove-bg",element:i.jsx(a0,{appPath:"image/remove-bg",children:i.jsx(fee,{})})}),i.jsx(Te,{path:"image/upscale",element:i.jsx(a0,{appPath:"image/upscale",children:i.jsx(xee,{})})}),i.jsx(Te,{path:"audio/stt",element:i.jsx(a0,{appPath:"audio/stt",children:i.jsx(wee,{})})})]}),i.jsxs(Te,{element:i.jsx(ab,{hideFooter:!0}),children:[i.jsx(Te,{path:"app/design",element:i.jsx(LJ,{})}),i.jsx(Te,{path:"app/design/projects",element:i.jsx(Sbe,{})})]}),i.jsxs(Te,{element:i.jsx(ab,{hideFooter:!0}),children:[i.jsx(Te,{path:"app/design/tv",element:i.jsx(Tbe,{})}),i.jsx(Te,{path:"app/design/tv/user/:userId",element:i.jsx(_be,{})})]}),i.jsx(Te,{path:"app/design/tv/:workId",element:i.jsx(Cbe,{})}),i.jsx(Te,{path:"app/design/templates/:templateId/preview",element:i.jsx(Abe,{})}),i.jsx(Te,{path:"share/writing/:token",element:i.jsx(iee,{})}),i.jsx(Te,{path:"docs",element:i.jsx(A8,{})}),i.jsx(Te,{path:"docs/:slug",element:i.jsx(A8,{})}),i.jsx(Te,{path:"blog",element:i.jsx(mxe,{})}),i.jsx(Te,{path:"blog/:slug",element:i.jsx(xxe,{})}),i.jsx(Te,{path:"announcements",element:i.jsx(vxe,{})}),i.jsx(Te,{path:"announcements/:slug",element:i.jsx(Sxe,{})}),i.jsx(Te,{path:"api-reference",element:i.jsx(dxe,{})}),i.jsxs(Te,{path:"app",element:i.jsx(MK,{}),children:[i.jsx(Te,{index:!0,element:i.jsx(Bn,{to:"chat",replace:!0})}),i.jsxs(Te,{path:"chat",element:i.jsx(Txe,{}),children:[i.jsx(Te,{index:!0,element:i.jsx(O8,{})}),i.jsx(Te,{path:":sessionId",element:i.jsx(O8,{})})]}),i.jsxs(Te,{path:"writing",element:i.jsx(Cxe,{}),children:[i.jsx(Te,{index:!0,element:i.jsx(L8,{})}),i.jsx(Te,{path:":draftId",element:i.jsx(L8,{})})]}),i.jsx(Te,{path:"summary",element:i.jsx(Dxe,{})}),i.jsx(Te,{path:"reply",element:i.jsx(Mxe,{})}),i.jsx(Te,{path:"grammar",element:i.jsx(Oxe,{})}),i.jsx(Te,{path:"translate/text",element:i.jsx(Lxe,{})}),i.jsx(Te,{path:"translate/document",element:i.jsx(Pxe,{})}),i.jsx(Te,{path:"translate/document/history/:id",element:i.jsx(Bxe,{})}),i.jsx(Te,{path:"translate/subtitle",element:i.jsx(Fxe,{})}),i.jsx(Te,{path:"create",element:i.jsx(sbe,{})}),i.jsx(Te,{path:"image",element:i.jsx(Bn,{to:"create?type=image",replace:!0})}),i.jsx(Te,{path:"image/generate",element:i.jsx(Bn,{to:"../create?type=image",replace:!0})}),i.jsx(Te,{path:"image/edit",element:i.jsx(Uxe,{})}),i.jsx(Te,{path:"image/ocr",element:i.jsx($xe,{})}),i.jsx(Te,{path:"image/analysis",element:i.jsx(zxe,{})}),i.jsx(Te,{path:"image/remove-bg",element:i.jsx(Hxe,{})}),i.jsx(Te,{path:"image/upscale",element:i.jsx(qxe,{})}),i.jsx(Te,{path:"image/restore",element:i.jsx(Wxe,{})}),i.jsx(Te,{path:"image/translate",element:i.jsx(Vxe,{})}),i.jsx(Te,{path:"image/editor",element:i.jsx(Gxe,{})}),i.jsx(Te,{path:"audio/tts",element:i.jsx(Kxe,{})}),i.jsx(Te,{path:"audio/tts/history",element:i.jsx(Yxe,{})}),i.jsx(Te,{path:"audio/stt",element:i.jsx(Qxe,{})}),i.jsx(Te,{path:"audio/stt/history",element:i.jsx(Xxe,{})}),i.jsx(Te,{path:"audio/podcast",element:i.jsx(Zxe,{})}),i.jsx(Te,{path:"audio/podcast/history",element:i.jsx(Jxe,{})}),i.jsx(Te,{path:"audio/clone",element:i.jsx(ebe,{})}),i.jsx(Te,{path:"audio/clone/history",element:i.jsx(tbe,{})}),i.jsx(Te,{path:"audio/music",element:i.jsx(rbe,{})}),i.jsx(Te,{path:"audio/music/history",element:i.jsx(nbe,{})}),i.jsx(Te,{path:"video",element:i.jsx(Bn,{to:"../create?type=video",replace:!0})}),i.jsx(Te,{path:"video/quick",element:i.jsx(abe,{})}),i.jsx(Te,{path:"video/story",element:i.jsx(ibe,{})}),i.jsx(Te,{path:"video/music-mv",element:i.jsx(obe,{})}),i.jsx(Te,{path:"video/image-anim",element:i.jsx(lbe,{})}),i.jsx(Te,{path:"pipeline",element:i.jsx(cbe,{})}),i.jsx(Te,{path:"pipeline/:category",element:i.jsx(F8,{})}),i.jsx(Te,{path:"pipeline/:category/:projectId",element:i.jsx(F8,{})}),i.jsx(Te,{path:"agents/research",element:i.jsx(ube,{})}),i.jsx(Te,{path:"agents/marketing",element:i.jsx(dbe,{})}),i.jsx(Te,{path:"agents/data",element:i.jsx(hbe,{})}),i.jsx(Te,{path:"document",element:i.jsx(mbe,{})}),i.jsx(Te,{path:"templates",element:i.jsx(_xe,{})}),i.jsx(Te,{path:"translation",element:i.jsx(Axe,{})}),i.jsx(Te,{path:"search",element:i.jsx(jxe,{})}),i.jsx(Te,{path:"tools",element:i.jsx(Ixe,{})}),i.jsx(Te,{path:"settings/teams",element:i.jsx(Gr,{children:i.jsx(Rbe,{})})}),i.jsx(Te,{path:"settings/teams/:teamId",element:i.jsx(Gr,{children:i.jsx(Dbe,{})})}),i.jsx(Te,{path:"profile",element:i.jsx(Gr,{children:i.jsx(fbe,{})})}),i.jsx(Te,{path:"assets",element:i.jsx(Gr,{children:i.jsx(ybe,{})})}),i.jsx(Te,{path:"assets/images",element:i.jsx(Gr,{children:i.jsx(vbe,{})})}),i.jsx(Te,{path:"assets/videos",element:i.jsx(Gr,{children:i.jsx(wbe,{})})}),i.jsx(Te,{path:"assets/audio",element:i.jsx(Gr,{children:i.jsx(Ebe,{})})}),i.jsx(Te,{path:"assets/translations",element:i.jsx(Gr,{children:i.jsx(kbe,{})})}),i.jsx(Te,{path:"assets/recycle-bin",element:i.jsx(Gr,{children:i.jsx(Nbe,{})})}),i.jsx(Te,{path:"referral",element:i.jsx(Gr,{children:i.jsx(gbe,{})})}),i.jsx(Te,{path:"billing",element:i.jsx(Gr,{children:i.jsx(Rxe,{})})}),i.jsx(Te,{path:"transfer",element:i.jsx(Gr,{children:i.jsx(pbe,{})})}),i.jsx(Te,{path:"feedback",element:i.jsx(Gr,{children:i.jsx(xbe,{})})}),i.jsx(Te,{path:"feedback/:id",element:i.jsx(Gr,{children:i.jsx(bbe,{})})}),i.jsx(Te,{path:"test-ai",element:i.jsx(Mbe,{})})]}),i.jsx(Te,{path:"app/design/:projectId",element:i.jsx(B8,{})}),i.jsx(Te,{path:"app/image/generate/:projectId",element:i.jsx(B8,{})}),i.jsx(Te,{path:"teams/join/:token",element:i.jsx(Gr,{children:i.jsx($be,{})})}),i.jsx(Te,{path:"share/:token",element:i.jsx(Gr,{children:i.jsx(jbe,{})})}),i.jsx(Te,{path:"app/art/shared/:projectId/group/:groupElementId",element:i.jsx(Gr,{children:i.jsx(Ibe,{})})}),i.jsx(Te,{path:"app/video-agent/new",element:i.jsxs(Gr,{children:[i.jsx(P8,{})," "]})}),i.jsx(Te,{path:"app/video-agent/:projectId",element:i.jsxs(Gr,{children:[i.jsx(P8,{})," "]})}),i.jsx(Te,{path:"chat",element:i.jsx(Bn,{to:"app/chat",replace:!0})}),i.jsx(Te,{path:"chat/:conversationId",element:i.jsx(Bn,{to:"app/chat",replace:!0})}),i.jsx(Te,{path:"writing",element:i.jsx(Bn,{to:"app/writing",replace:!0})}),i.jsx(Te,{path:"image",element:i.jsx(Bn,{to:"app/image",replace:!0})}),i.jsx(Te,{path:"*",element:i.jsx(Bn,{to:"",replace:!0})})]})})})}function qbe(){return i.jsx(Kq,{children:i.jsxs(KW,{children:[i.jsx(Pbe,{}),i.jsx(Fbe,{}),i.jsx(qK,{}),i.jsx(uA,{position:"top-center",containerStyle:{zIndex:999999},toastOptions:{duration:3e3,style:{background:"var(--bg-primary)",color:"var(--text-primary)",border:"1px solid var(--border-default)",maxWidth:"min(90vw, 480px)",wordBreak:"break-word",overflowWrap:"anywhere"}}
1863}),i.jsxs(WU,{children:[i.jsx(zbe,{}),i.jsxs(U7,{children:[i.jsx(Te,{path:"/",element:i.jsx(U8,{})}),i.jsx(Te,{path:"/:lang/*",element:i.jsx(Hbe,{})}),i.jsx(Te,{path:"/share/:token",element:i.jsx(Bbe,{})}),i.jsx(Te,{path:"/teams/join/:token",element:i.jsx(Ube,{})}),i.jsx(Te,{path:"/cli-auth",element:i.jsx(XK,{})}),i.jsx(Te,{path:"/login",element:i.jsx(Cy,{to:`/${ws}/login`})}),i.jsx(Te,{path:"/register",element:i.jsx(Cy,{to:`/${ws}/register`})}),i.jsx(Te,{path:"/chat/*",element:i.jsx(Cy,{to:`/${ws}/chat`})}),i.jsx(Te,{path:"*",element:i.jsx(U8,{})})]})]})]})})}const $8="uniai:chunk-reload-at";window.addEventListener("vite:preloadError",()=>{try{const e=Number(sessionStorage.getItem($8)||"0");if(Date.now()-e<6e4)return;sessionStorage.setItem($8,String(Date.now()))}catch{return}window.location.reload()});Ai&&window.addEventListener("error",e=>{const t=e.target;if(!(t instanceof HTMLImageElement)&&!(t instanceof HTMLVideoElement)&&!(t instanceof HTMLAudioElement))return;const r=t.src;!r||!t.crossOrigin||t.dataset.corsRetriedSrc===r||(t.dataset.corsRetriedSrc=r,t.removeAttribute("crossorigin"),t instanceof HTMLImageElement?(t.src="",t.src=r):t.load())},!0);kp.createRoot(document.getElementById("root")).render(i.jsx(or.StrictMode,{children:i.jsx(zB,{children:i.jsx(A7,{children:i.jsx(tB,{client:j7,children:i.jsx(qbe,{})})})})}));export{zl as $,K9 as A,Yu as B,Fr as C,ag as D,No as E,Qr as F,Tn as G,vG as H,Ss as I,Ku as J,FV as K,kn as L,w9 as M,VV as N,d9 as O,GV as P,ZV as Q,pG as R,yh as S,tm as T,MV as U,rm as V,eb as W,cr as X,lp as Y,yu as Z,Je as _,fe as a,Y7 as a$,xh as a0,f9 as a1,m9 as a2,Qm as a3,poe as a4,Cce as a5,Lye as a6,D9 as a7,h9 as a8,em as a9,zv as aA,b0 as aB,Aye as aC,jye as aD,Oye as aE,kY as aF,NY as aG,u3 as aH,Eh as aI,wY as aJ,a3 as aK,Gw as aL,Gu as aM,EY as aN,up as aO,P9 as aP,kh as aQ,xfe as aR,Tde as aS,xu as aT,IY as aU,Ut as aV,Er as aW,Gh as aX,NG as aY,RY as aZ,or as a_,AV as aa,Rt as ab,qV as ac,p1 as ad,u9 as ae,wn as af,UV as ag,hG as ah,dG as ai,y9 as aj,O9 as ak,see as al,Cye as am,oi as an,ut as ao,_ye as ap,ng as aq,fr as ar,JV as as,vV as at,aG as au,rb as av,Iye as aw,Rye as ax,Dye as ay,Mye as az,We as b,$5 as b$,jz as b0,fn as b1,IF as b2,Hr as b3,Kme as b4,Gt as b5,N9 as b6,LV as b7,BV as b8,$A as b9,KV as bA,ya as bB,u2 as bC,b9 as bD,Yw as bE,Sq as bF,b2 as bG,Bye as bH,Tq as bI,Cq as bJ,_q as bK,Qw as bL,Ke as bM,lo as bN,_c as bO,p9 as bP,$ye as bQ,jq as bR,Aq as bS,I9 as bT,E9 as bU,sg as bV,d1 as bW,PT as bX,R9 as bY,Uye as bZ,g1 as b_,Ti as ba,Fye as bb,Zw as bc,mG as bd,Wo as be,ys as bf,Qme as bg,eme as bh,Nw as bi,aK as bj,ga as bk,bh as bl,tG as bm,Bi as bn,pve as bo,gve as bp,SI as bq,Ha as br,xve as bs,bG as bt,w2 as bu,C9 as bv,Ep as bw,Z9 as bx,wV as by,sG as bz,sye as c,tj as c$,Rj as c0,CQ as c1,Xw as c2,c3,TQ as c4,Nq as c5,wu as c6,nG as c7,CV as c8,r3 as c9,ns as cA,f7 as cB,Jl as cC,Dq as cD,Dw as cE,YX as cF,xY as cG,eZ as cH,gi as cI,pZ as cJ,O0 as cK,E1 as cL,fZ as cM,Oj as cN,bY as cO,GQ as cP,rI as cQ,_2 as cR,IZ as cS,RZ as cT,jZ as cU,DZ as cV,Ij as cW,e3 as cX,gZ as cY,xZ as cZ,Dj as c_,kV as ca,Ts as cb,Jw as cc,U as cd,c9 as ce,xa as cf,Xn as cg,gh as ch,Vye as ci,UY as cj,og as ck,y1 as cl,Rq as cm,Iq as cn,Lq as co,Wye as cp,Tt as cq,Mq as cr,DV as cs,qye as ct,EV as cu,Vh as cv,Ev as cw,ch as cx,XF as cy,un as cz,i3 as d,v9 as d$,rj as d0,nI as d1,MZ as d2,DQ as d3,G9 as d4,bZ as d5,hve as d6,Pq as d7,v1 as d8,vq as d9,M9 as dA,Uk as dB,dd as dC,oG as dD,cG as dE,HV as dF,ma as dG,gq as dH,c2 as dI,Eq as dJ,h1 as dK,Oq as dL,Fq as dM,k9 as dN,IV as dO,kQ as dP,yj as dQ,fK as dR,CL as dS,Xye as dT,$n as dU,eve as dV,tve as dW,jQ as dX,dI as dY,_3 as dZ,u7 as d_,wq as da,NV as db,Vu as dc,Jh as dd,rG as de,Zx as df,iG as dg,pV as dh,lG as di,n3 as dj,RV as dk,Ok as dl,Lk as dm,GF as dn,w6 as dp,iye as dq,aye as dr,hB as ds,g9 as dt,kq as du,tc as dv,pj as dw,sK as dx,pq as dy,lg as dz,it as e,b3 as e$,yV as e0,kJ as e1,Jx as e2,OV as e3,_j as e4,uK as e5,Pye as e6,SJ as e7,zye as e8,GY as e9,Ai as eA,Hk as eB,PK as eC,Gye as eD,ive as eE,mZ as eF,jj as eG,bQ as eH,VQ as eI,ove as eJ,gQ as eK,Kd as eL,xQ as eM,sve as eN,mN as eO,oa as eP,hZ as eQ,aZ as eR,cZ as eS,oI as eT,fve as eU,pn as eV,_J as eW,IJ as eX,RJ as eY,DN as eZ,RN as e_,Ym as ea,ave as eb,S9 as ec,zY as ed,Yye as ee,$Y as ef,Jye as eg,Kye as eh,nve as ei,rve as ej,nc as ek,MY as el,OY as em,Tw as en,XY as eo,Hye as ep,Zye as eq,Qye as er,k1 as es,kj as et,o3 as eu,OZ as ev,Pi as ew,ON as ex,dZ as ey,vQ as ez,bl as f,y3 as f0,x3 as f1,lj as f2,ij as f3,oj as f4,h2 as f5,j9 as f6,sj as f7,cj as f8,aj as f9,Sye as fa,lve as fb,mve as fc,ec as g,x1 as h,Gs as i,i as j,b1 as k,zV as l,$V as m,QV as n,yG as o,w1 as p,t3 as q,v as r,d2 as s,C1 as t,$t as u,SV as v,dn as w,ig as x,Si as y,Qe as z};
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.