1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-C86RL-h9.js","assets/purify.es-ChwZkWde.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-B6xuSHsQ.js","assets/rolldown-runtime-hePW80VL.js","assets/chunk-DU6HZSFF-CvExvDXt.js","assets/chunk-75Z2AOVW-Cc-rNtBV.js","assets/dist-v5Q1xZ2K.js","assets/chunk-PWAF6VOD-D5J1NPiJ.js","assets/chunk-GMAD6QVW-BFiDnDpl.js","assets/chunk-P2QGCYS3-BCJ3eltt.js","assets/chunk-4HAMMTFA-VU86Ia6y.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-GVQU2GXP-ieWfNbG_.js","assets/chunk-OSK3NFVY-CUVpuR2F.js","assets/line-CdhyXwNq.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js","assets/graphlib-DS17s2tU.js","assets/chunk-L3NEJ4N5-RO3ISYNH.js","assets/code-block-IT6T5CEO-8GVWVVT4.js","assets/katex-DEcVZfaU.css","assets/jspdf.es.min-CNIizAmF.js"])))=>i.map(i=>d[i]); 2import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function r(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,o=[],s=``,c=e.split(`/`);for(c[0]||c.shift();i=c.shift();)n=i[0],n===`*`?(o.push(n),s+=i[1]===`?`?`(?:/(.*))?`:`/(.*)`):n===`:`?(r=i.indexOf(`?`,1),a=i.indexOf(`.`,1),o.push(i.substring(1,~r?r:~a?a:i.length)),s+=~r&&!~a?`(?:/([^/]+?))?`:`/([^/]+?)`,~a&&(s+=(~r?`?`:``)+`\\`+i.substring(a))):s+=`/`+i;return{keys:o,pattern:RegExp(`^`+s+(t?`(?=$|/)`:`/?$`),`i`)}}var i=n((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.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`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function D(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?D(``+e.key):t.toString(36)}function re(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+ne(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(te,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+ne(s,l);c+=re(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+ne(s,l++),c+=re(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function ie(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ae(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var oe={current:null},se={transition:null},ce={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:se,ReactCurrentOwner:C};function le(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:ie,forEach:function(e,t,n){ie(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ie(e,function(){t++}),t},toArray:function(e){return ie(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INT
2ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ce,e.act=le,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ae}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=se.transition;se.transition={};try{e()}finally{se.transition=t}},e.unstable_act=le,e.useCallback=function(e,t){return oe.current.useCallback(e,t)},e.useContext=function(e){return oe.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return oe.current.useDeferredValue(e)},e.useEffect=function(e,t){return oe.current.useEffect(e,t)},e.useId=function(){return oe.current.useId()},e.useImperativeHandle=function(e,t,n){return oe.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return oe.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return oe.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return oe.current.useMemo(e,t)},e.useReducer=function(e,t,n){return oe.current.useReducer(e,t,n)},e.useRef=function(e){return oe.current.useRef(e)},e.useState=function(e){return oe.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return oe.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return oe.current.useTransition()},e.version=`18.3.1`})),a=n(((e,t)=>{t.exports=i()})),o=n((e=>{var t=a();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),a=r[0].inst,l=r[1];return s(function(){a.value=n,a.getSnapshot=t,u(a)&&l({inst:a})},[e,n,t]),o(function(){return u(a)&&l({inst:a}),e(function(){u(a)&&l({inst:a})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),s=n(((e,t)=>{t.exports=o()})),c=t(a(),1),l=s(),u=c.useInsertionEffect,d=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?c.useLayoutEffect:c.useEffect,f=u||d,p=e=>{let t=c.useRef([e,(...e)=>t[0](...e)]).current;return f(()=>{t[0]=e}),t[1]},m=`popstate`,h=`pushState`,g=`replaceState`,_=[m,h,g,`hashchange`],v=e=>{for(let t of _)addEventListener(t,e);return()=>{for(let t of _)removeEventListener(t,e)}},y=(e,t)=>(0,l.useSyncExternalStore)(v,e,t),b=()=>location.search,x=({ssrSearch:e}={})=>y(b,e==null?b:()=>e),S=()=>location.pathname,C=({ssrPath:e}={})=>y(S,e==null?S:()=>e),w=(e,{replace:t=!1,state:n=null}={})=>history[t?g:h](n,``,e),T=(e={})=>[C(e),w],E=Symbol.for(`wouter_v3`);if(typeof history<`u`&&window[E]===void 0){for(let e of[h,g]){let t=history[e];history[e]=function(){let n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,E,{value:!0})}var ee=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?`~`+t:t.slice(e.length)||`/`,D=(e=``)=>e===`/`?``:e,te=(e,t)=>
2e[0]===`~`?e.slice(1):D(t)+e,ne=(e=``,t)=>ee(re(D(e)),re(t)),re=e=>{try{return decodeURI(e)}catch{return e}},ie={hook:T,searchHook:x,parser:r,base:``,ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,n)=>e(t,n)},ae=(0,c.createContext)(ie),oe=()=>(0,c.useContext)(ae),se={},ce=(0,c.createContext)(se),le=()=>(0,c.useContext)(ce),ue=e=>{let[t,n]=e.hook(e);return[ne(e.base,t),p((t,r)=>e.aroundNav(n,te(t,e.base),r))]},de=()=>ue(oe()),fe=(e,t,n,r)=>{let{pattern:i,keys:a}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||`*`,r),o=i.exec(n)||[],[s,...c]=o;return s===void 0?[!1,null]:[!0,(()=>{let e=a===!1?o.groups:Object.fromEntries(a.map((e,t)=>[e,c[t]])),t={...c};return e&&Object.assign(t,e),t})(),...r?[s]:[]]},pe=({children:e,...t})=>{let n=oe(),r=t.hook?ie:n,i=r,[a,o=t.ssrSearch??``]=t.ssrPath?.split(`?`)??[];a&&(t.ssrSearch=o,t.ssrPath=a),t.hrefs=t.hrefs??t.hook?.hrefs,t.searchHook=t.searchHook??t.hook?.searchHook;let s=(0,c.useRef)({}),l=s.current,u=l;for(let e in r){let n=e===`base`?r[e]+(t[e]??``):t[e]??r[e];l===u&&n!==u[e]&&(s.current=u={...u}),u[e]=n,(n!==r[e]||n!==i[e])&&(i=u)}return(0,c.createElement)(ae.Provider,{value:i,children:e})},me=({children:e,component:t},n)=>t?(0,c.createElement)(t,{params:n}):typeof e==`function`?e(n):e,he=e=>{let t=(0,c.useRef)(se),n=t.current;return t.current=Object.keys(e).length!==Object.keys(n).length||Object.entries(e).some(([e,t])=>t!==n[e])?e:n},ge=({path:e,nest:t,match:n,...r})=>{let i=oe(),[a]=ue(i),[o,s,l]=n??fe(i.parser,e,a,t),u=he({...le(),...s});if(!o)return null;let d=l?(0,c.createElement)(pe,{base:l},me(r,u)):me(r,u);return(0,c.createElement)(ce.Provider,{value:u,children:d})},_e=(0,c.forwardRef)((e,t)=>{let n=oe(),[r,i]=ue(n),{to:a=``,href:o=a,onClick:s,asChild:l,children:u,className:d,replace:f,state:m,transition:h,...g}=e,_=p(t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||t.button!==0||(s?.(t),t.defaultPrevented||(t.preventDefault(),i(o,e)))}),v=n.hrefs(o[0]===`~`?o.slice(1):n.base+o,n);return l&&(0,c.isValidElement)(u)?(0,c.cloneElement)(u,{onClick:_,href:v}):(0,c.createElement)(`a`,{...g,onClick:_,href:v,className:d?.call?d(r===o):d,children:u,ref:t})}),ve=e=>Array.isArray(e)?e.flatMap(e=>ve(e&&e.type===c.Fragment?e.props.children:e)):[e],ye=({children:e,location:t})=>{let n=oe(),[r]=ue(n);for(let i of ve(e)){let e=0;if((0,c.isValidElement)(i)&&(e=fe(n.parser,i.props.path,t||r,i.props.nest))[0])return(0,c.cloneElement)(i,{match:e})}return null},be=e=>{let{to:t,href:n=t}=e,r=oe(),[,i]=ue(r),a=p(()=>i(t||n,e)),{ssrContext:o}=r;return d(()=>{a()},[]),o&&(o.redirectTo=t),null},xe=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(){}},Se=new class extends xe{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Ce={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},we=new class{#e=Ce;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Te(e){setTimeout(e,0)}var Ee=typeof window>`u`||`Deno`in globalThis;function De(){}function Oe(e,t){return typeof e==`function`?e(t):e}function ke(e){return typeof e==`number`&&e>=0&&e!==1/0}function Ae(e,t){return Math.max(e+(t||0)-Date.now(),0)}function je(e,t){return typeof e==`function`?e(t):e}function Me(e,t){return typeof e==`function`?e(t):e}function Ne(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Fe(o,t.options))return!1}else if(!Le(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Pe(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Ie(t.options.mutationKey)!==Ie(a))return!1}else if(!Le(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Fe(e,t){return(t?.queryKeyHashFn||Ie)(e)}function Ie(e){return JSON.stringify(e,(e,t)=>He(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Le(e,t){if(e===t)return!0;
2if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!Le(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Le(e[r],t[r]))return!1;return!0}return!1}var Re=Object.prototype.hasOwnProperty;function ze(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Ve(e)&&Ve(t);if(!r&&!(He(e)&&He(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Re.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ze(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Be(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Ve(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function He(e){if(!Ue(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Ue(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Ue(e){return Object.prototype.toString.call(e)===`[object Object]`}function We(e){return new Promise(t=>{we.setTimeout(t,e)})}function Ge(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ze(e,t)}function Ke(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function qe(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Je=Symbol();function Ye(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Je?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Xe(e,t){return typeof e==`function`?e(...t):!!e}function Ze(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Qe=(()=>{let e=()=>Ee;return{isServer(){return e()},setIsServer(t){e=t}}})();function $e(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var et=Te;function tt(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=et,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var nt=tt(),rt=new class extends xe{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function it(e){return Math.min(1e3*2**e,3e4)}function at(e){return(e??`online`)!==`online`||rt.isOnline()}var ot=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function st(e){let t=!1,n=0,r,i=$e(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new ot(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Se.isFocused()&&(e.networkMode===`always`||rt.isOnline())&&e.canRun(),u=()=>at(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Qe.isServer()?0:3),o=e.retryDelay??it,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),We(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var ct=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ke(this.gcTime)&&(this.#e=we.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qe.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(we.clearTimeout(this.#e),this.#e=void 0)}};function lt(e){return{onFetch:(t,n)=>
2{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Ze(e,()=>t.signal,()=>n=!0)},u=Ye(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?qe:Ke;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?dt:ut,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:ut(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function ut(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function dt(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ft=class extends ct{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ht(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ht
2(this.options);e.data!==void 0&&(this.setState(mt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Ge(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(De).catch(De):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Me(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Je||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>je(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Ae(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ye(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?lt(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=st({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ot&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ot){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...pt(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...mt(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;
2return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),nt.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function pt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:at(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function mt(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ht(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var gt=class extends xe{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=$e(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),vt(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yt(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yt(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Me(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Be(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&bt(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Me(this.options.enabled,this.#t)!==Me(t.enabled,this.#t)||je(this.options.staleTime,this.#t)!==je(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Me(this.options.enabled,this.#t)!==Me(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return St(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(De)),t}#g(){this.#b();let e=je(this.options.staleTime,this.#t);if(Qe.isServer()||this.#r.isStale||!ke(e))return;let t=Ae(this.#r.dataUpdatedAt,e)+1;this.#d=we.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!Qe.isServer()&&Me(this.options.enabled,this.#t)!==!1&&ke(this.#p)&&this.#p!==0&&(this.#f=we.setInterval(()=>
2{(this.options.refetchIntervalInBackground||Se.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(we.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(we.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&vt(e,t),o=i&&bt(e,n,t,r);(a||o)&&(l={...l,...pt(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=Ge(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=Ge(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:xt(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Me(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=$e();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a()}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!Be(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){nt.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function _t(e,t){return Me(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Me(t.retryOnMount,e)!==!1)}function vt(e,t){return _t(e,t)||e.state.data!==void 0&&yt(e,t,t.refetchOnMount)}function yt(e,t,n){if(Me(t.enabled,e)!==!1&&je(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&xt(e,t)}return!1}function bt(e,t,n,r){return(e!==t||Me(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&xt(e,n)}function xt(e,t){return Me(t.enabled,e)!==!1&&e.isStaleByTime(je(t.staleTime,e))}function St(e,t){return!Be(e.getCurrentResult(),t)}var Ct=class extends ct{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||wt(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}
2optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=st({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),nt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function wt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Tt=class extends xe{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Ct({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Et(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Et(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Et(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Et(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>
2t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){nt.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Pe(t,e))}findAll(e={}){return this.getAll().filter(t=>Pe(e,t))}notify(e){nt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return nt.batch(()=>Promise.all(e.map(e=>e.continue().catch(De))))}};function Et(e){return e.options.scope?.id}var Dt=class extends xe{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Be(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Ie(t.mutationKey)!==Ie(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??wt();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){nt.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Ot=class extends xe{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Fe(r,t),a=this.get(i);return a||(a=new ft({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){nt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Ne(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Ne(e,t)):t}notify(e){nt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){nt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){nt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},kt=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ot,this.#t=e.mutationCache||new Tt,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Se.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=rt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(je(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Oe(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}
vendor: 1,338 bytes, line 2
2setQueriesData(e,t,n){return nt.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;nt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return nt.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=nt.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(De).catch(De)}invalidateQueries(e,t={}){return nt.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=nt.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(De)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(De)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(je(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(De).catch(De)}
2fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(De).catch(De)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return rt.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Ie(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Le(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Ie(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Le(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Fe(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===Je&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},At=n((e=>{var t=a(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var a,c={},l=null,u=null;for(a in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,a)&&!s.hasOwnProperty(a)&&(c[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps,t)c[a]===void 0&&(c[a]=t[a]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:o.current}}e.Fragment=r,e.jsx=c,e.jsxs=c})),jt=n(((e,t)=>{t.exports=At()})),O=jt(),Mt=c.createContext(void 0),Nt=e=>{let t=c.useContext(Mt);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Pt=({client:e,children:t})=>(c.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,O.jsx)(Mt.Provider,{value:e,children:t})),Ft=c.createContext(!1),It=()=>c.useContext(Ft);Ft.Provider;function Lt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Rt=c.createContext(Lt()),zt=()=>c.useContext(Rt),Bt=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Xe(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Vt=e=>{c.useEffect(()=>{e.clearReset()},[e])},Ht=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Xe(n,[e.error,r])),Ut=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Wt=(e,t)=>e.isLoading&&e.isFetching&&!t,Gt=(e,t)=>e?.suspense&&t.isPending,Kt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qt(e,t,n){let r=It(),i=zt(),a=Nt(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),l=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:l?`optimistic`:void 0,Ut(o),Bt(o,i,s),Vt(i);let u=!a.getQueryCache().get(o.queryHash),[d]=c.useState(()=>new t(a,o)),f=d.getOptimisticResult(o),p=!r&&l;if(c.useSyncExternalStore(c.useCallback(e=>{let t=p?d.subscribe(nt.batchCalls(e)):De;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),c.useEffect(()=>{d.setOptions(o)},[o,d]),Gt(o,f))throw Kt(o,d,i);if(Ht({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!Qe.isServer()&&Wt(f,r)&&(u?Kt(o,d,i):s?.promise)?.catch(De).finally(()=>{d.updateResult()}),o.notifyOnChangeProps?f:d.trackResult(f)}function Jt(e,t){return qt(e,gt,t)}function Yt(e,t){let n=Nt(t),[r]=c.useState(()=>new Dt(n,e));c.useEffect(()=>{r.setOptions(e)},[r,e]);let i=c.useSyncExternalStore(c.useCallback(e=>r.subscribe(nt.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=c.useCallback((e,t)=>{r.mutate(e,t).catch(De)},[r]);
2if(i.error&&Xe(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Xt=new kt({defaultOptions:{queries:{refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:0,gcTime:0,retry:!1},mutations:{retry:!1}}}),Zt=1,Qt=1e6,$t=0;function en(){return $t=($t+1)%(2**53-1),$t.toString()}var tn=new Map,nn=e=>{if(tn.has(e))return;let t=setTimeout(()=>{tn.delete(e),sn({type:`REMOVE_TOAST`,toastId:e})},Qt);tn.set(e,t)},rn=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,Zt)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?nn(n):e.toasts.forEach(e=>{nn(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},an=[],on={toasts:[]};function sn(e){on=rn(on,e),an.forEach(e=>{e(on)})}function cn({...e}){let t=en(),n=e=>sn({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>sn({type:`DISMISS_TOAST`,toastId:t});return sn({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function ln(){let[e,t]=c.useState(on);return c.useEffect(()=>(an.push(t),()=>{let e=an.indexOf(t);e>-1&&an.splice(e,1)}),[e]),{...e,toast:cn,dismiss:e=>sn({type:`DISMISS_TOAST`,toastId:e})}}var un=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m){if(n(c)!==null)m=!0,ie(x);else{var t=n(l);t!==null&&ae(b,t.startTime-e)}}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&ae(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function ee(){return!(e.unstable_now()-E<T)}function D(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?te():(S=!1,C=null)}}else S=!1}var te;if(typeof v==`function`)te=function(){v(D)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=D,te=function(){re.postMessage(null)}}else te=function(){g(D,0)};function ie(e){C=e,S||(S=!0,te())}function ae(t,n){w=g(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,ie(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,ae(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ie(x))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),dn=n(((e,t)=>{t.exports=un()})),fn=n((e=>{var t=a(),n=dn();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,o={};function s(e,t){c(e,t),c(e+`Capture`,t)}function c(e,t){for(o[e]=t,e=0;e<t.length;e++)i.add(t[e])}var l=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,u=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},p={};function m(e){return u.call(p,e)?!0:u.call(f,e)?!1:d.test(e)?p[e]=!0:(f[e]=!0,!1)}function h(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function g(e,t,n,r){if(t==null||h(e,t,n,r))return!0;
vendor: 20,759 bytes, lines 2-6
2if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var v={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){v[e]=new _(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];v[t]=new _(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){v[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){v[e]=new _(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){v[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){v[e]=new _(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){v[e]=new _(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){v[e]=new _(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){v[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var y=/[\-:]([a-z])/g;function b(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(y,b);v[t]=new _(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(y,b);v[t]=new _(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(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new _(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function x(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(g(t,n,i,r)&&(n=null),r||i===null?m(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var S=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for(`react.element`),w=Symbol.for(`react.portal`),T=Symbol.for(`react.fragment`),E=Symbol.for(`react.strict_mode`),ee=Symbol.for(`react.profiler`),D=Symbol.for(`react.provider`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.offscreen`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var ue=Object.assign,de;function fe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``}return` 3`+de+e}var pe=!1;function me(e,t){if(!e||pe)return``;pe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t){if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(` 4`),a=r.stack.split(` 5`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=` 6`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{pe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?fe(e):``}function he(e){switch(e.tag){case 5:return fe(e.type);case 16:return fe(`Lazy`);case 13:return fe(`Suspense`);case 19:return fe(`SuspenseList`);case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return``}}function ge(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 T:return`Fragment`;case w:return`Portal`;case ee:return`Profiler`;case E:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case te:return(e.displayName||`Context`)+`.Consumer`;case D:return(e._context.displayName||`Context`)+`.Provider`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?ge(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}function _e(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`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return ge(t);case 8:return t===E?`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 ve(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function ye(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function be(e){var t=ye(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xe(e){e._valueTracker||=be(e)}function Se(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=ye(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Ce(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function we(e,t){var n=t.checked;return ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Te(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=ve(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function Ee(e,t){t=t.checked,t!=null&&x(e,`checked`,t,!1)}function De(e,t){Ee(e,t);var n=ve(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?ke(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&ke(e,t.type,ve(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oe(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function ke(e,t,n){(t!==`number`||Ce(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Ae=Array.isArray;function je(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+ve(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Me(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return ue({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Ne(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(Ae(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:ve(n)}}function Pe(e,t){var n=ve(t.value),r=ve(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Fe(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ie(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 Le(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ie(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Re,ze=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Re||=document.createElement(`div`),Re.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Re.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ve={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},He=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ve).forEach(function(e){He.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ve[t]=Ve[e]})});function Ue(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ve.hasOwnProperty(e)&&Ve[e]?(``+t).trim():t+`px`}function We(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Ue(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Ge=ue({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 Ke(e,t){if(t){if(Ge[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function qe(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 Je=null;function Ye(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xe=null,Ze=null,Qe=null;function $e(e){if(e=$i(e)){if(typeof Xe!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=ta(t),Xe(e.stateNode,e.type,t))}}function et(e){Ze?Qe?Qe.push(e):Qe=[e]:Ze=e}function tt(){if(Ze){var e=Ze,t=Qe;if(Qe=Ze=null,$e(e),t)for(e=0;e<t.length;e++)$e(t[e])}}function nt(e,t){return e(t)}function rt(){}var it=!1;function at(e,t,n){if(it)return e(t,n);it=!0;try{return nt(e,t,n)}finally{it=!1,(Ze!==null||Qe!==null)&&(rt(),tt())}}function ot(e,t){var n=e.stateNode;if(n===null)return null;var i=ta(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var st=!1;if(l)try{var ct={};Object.defineProperty(ct,"passive",{get:function(){st=!0}}),window.addEventListener(`test`,ct,ct),window.removeEventListener(`test`,ct,ct)}catch{st=!1}function lt(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var ut=!1,dt=null,ft=!1,pt=null,mt={onError:function(e){ut=!0,dt=e}};function ht(e,t,n,r,i,a,o,s,c){ut=!1,dt=null,lt.apply(mt,arguments)}function gt(e,t,n,i,a,o,s,c,l){if(ht.apply(this,arguments),ut){if(ut){var u=dt;ut=!1,dt=null}else throw Error(r(198));ft||(ft=!0,pt=u)}}function _t(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function vt(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 yt(e){if(_t(e)!==e)throw Error(r(188))}function bt(e){var t=e.alternate;if(!t){if(t=_t(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return yt(a),e;if(o===i)return yt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function xt(e){return e=bt(e),e===null?null:St(e)}function St(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=St(e);if(t!==null)return t;e=e.sibling}return null}var Ct=n.unstable_scheduleCallback,wt=n.unstable_cancelCallback,Tt=n.unstable_shouldYield,Et=n.unstable_requestPaint,Dt=n.unstable_now,Ot=n.unstable_getCurrentPriorityLevel,kt=n.unstable_ImmediatePriority,At=n.unstable_UserBlockingPriority,jt=n.unstable_NormalPriority,O=n.unstable_LowPriority,Mt=n.unstable_IdlePriority,Nt=null,Pt=null;function Ft(e){if(Pt&&typeof Pt.onCommitFiberRoot==`function`)try{Pt.onCommitFiberRoot(Nt,e,void 0,(e.current.flags&128)==128)}catch{}}var It=Math.clz32?Math.clz32:zt,Lt=Math.log,Rt=Math.LN2;function zt(e){return e>>>=0,e===0?32:31-(Lt(e)/Rt|0)|0}var Bt=64,Vt=4194304;function Ht(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 Ut(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Ht(a))):r=Ht(s)}else o=n&~i,o===0?a!==0&&(r=Ht(a)):r=Ht(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-It(t),i=1<<n,r|=e[n],t&=~i;return r}function Wt(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 Gt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-It(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Wt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Kt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function qt(){var e=Bt;return Bt<<=1,!(Bt&4194240)&&(Bt=64),e}function Jt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Yt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-It(t),e[t]=n}function Xt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-It(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Zt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-It(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Qt=0;function $t(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var en,tn,nn,rn,an,on=!1,sn=[],cn=null,ln=null,un=null,fn=new Map,pn=new Map,mn=[],hn=`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 gn(e,t){switch(e){case`focusin`:case`focusout`:cn=null;break;case`dragenter`:case`dragleave`:ln=null;break;case`mouseover`:case`mouseout`:un=null;break;case`pointerover`:case`pointerout`:fn.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:pn.delete(t.pointerId)}}function _n(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=$i(t),t!==null&&tn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function k(e,t,n,r,i){switch(t){case`focusin`:return cn=_n(cn,e,t,n,r,i),!0;
vendor: 2,832 bytes, line 6
6case`dragenter`:return ln=_n(ln,e,t,n,r,i),!0;case`mouseover`:return un=_n(un,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return fn.set(a,_n(fn.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,pn.set(a,_n(pn.get(a)||null,e,t,n,r,i)),!0}return!1}function vn(e){var t=Qi(e.target);if(t!==null){var n=_t(t);if(n!==null){if(t=n.tag,t===13){if(t=vt(n),t!==null){e.blockedOn=t,an(e.priority,function(){nn(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=An(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Je=r,n.target.dispatchEvent(r),Je=null}else return t=$i(n),t!==null&&tn(t),e.blockedOn=n,!1;t.shift()}return!0}function bn(e,t,n){yn(e)&&n.delete(t)}function xn(){on=!1,cn!==null&&yn(cn)&&(cn=null),ln!==null&&yn(ln)&&(ln=null),un!==null&&yn(un)&&(un=null),fn.forEach(bn),pn.forEach(bn)}function Sn(e,t){e.blockedOn===t&&(e.blockedOn=null,on||(on=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,xn)))}function Cn(e){function t(t){return Sn(t,e)}if(0<sn.length){Sn(sn[0],e);for(var n=1;n<sn.length;n++){var r=sn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(cn!==null&&Sn(cn,e),ln!==null&&Sn(ln,e),un!==null&&Sn(un,e),fn.forEach(t),pn.forEach(t),n=0;n<mn.length;n++)r=mn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<mn.length&&(n=mn[0],n.blockedOn===null);)vn(n),n.blockedOn===null&&mn.shift()}var wn=S.ReactCurrentBatchConfig,Tn=!0;function En(e,t,n,r){var i=Qt,a=wn.transition;wn.transition=null;try{Qt=1,On(e,t,n,r)}finally{Qt=i,wn.transition=a}}function Dn(e,t,n,r){var i=Qt,a=wn.transition;wn.transition=null;try{Qt=4,On(e,t,n,r)}finally{Qt=i,wn.transition=a}}function On(e,t,n,r){if(Tn){var i=An(e,t,n,r);if(i===null)wi(e,t,r,kn,n),gn(e,r);else if(k(i,e,t,n,r))r.stopPropagation();else if(gn(e,r),t&4&&-1<hn.indexOf(e)){for(;i!==null;){var a=$i(i);if(a!==null&&en(a),a=An(e,t,n,r),a===null&&wi(e,t,r,kn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wi(e,t,r,null,n)}}var kn=null;function An(e,t,n,r){if(kn=null,e=Ye(r),e=Qi(e),e!==null){if(t=_t(e),t===null)e=null;else if(n=t.tag,n===13){if(e=vt(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}return kn=e,null}function jn(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`
vendor: 5,043 bytes, line 6
6: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(Ot()){case kt:return 1;case At:return 4;case jt:case O:return 16;case Mt:return 536870912;default:return 16}default:return 16}}var Mn=null,Nn=null,Pn=null;function Fn(){if(Pn)return Pn;var e,t=Nn,n=t.length,r,i=`value`in Mn?Mn.value:Mn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Pn=i.slice(e,1<r?1-r:void 0)}function In(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 Ln(){return!0}function Rn(){return!1}function zn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Ln:Rn,this.isPropagationStopped=Rn,this}return ue(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Ln)},persist:function(){},isPersistent:Ln}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vn=zn(Bn),Hn=ue({},Bn,{view:0,detail:0}),Un=zn(Hn),Wn,Gn,Kn,qn=ue({},Hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,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!==Kn&&(Kn&&e.type===`mousemove`?(Wn=e.screenX-Kn.screenX,Gn=e.screenY-Kn.screenY):Gn=Wn=0,Kn=e),Wn)},movementY:function(e){return`movementY`in e?e.movementY:Gn}}),Jn=zn(qn),Yn=zn(ue({},qn,{dataTransfer:0})),Xn=zn(ue({},Hn,{relatedTarget:0})),Zn=zn(ue({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Qn=zn(ue({},Bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),$n=zn(ue({},Bn,{data:0})),er={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},tr={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`},nr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function rr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nr[e])?!!t[e]:!1}function ir(){return rr}var ar=zn(ue({},Hn,{key:function(e){if(e.key){var t=er[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=In(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?tr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type===`keypress`?In(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?In(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),or=zn(ue({},qn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),sr=zn(ue({},Hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir})),cr=zn(ue({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),lr=zn(ue({},qn,{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}
vendor: 22,554 bytes, lines 6-7
6)),ur=[9,13,27,32],dr=l&&`CompositionEvent`in window,fr=null;l&&`documentMode`in document&&(fr=document.documentMode);var pr=l&&`TextEvent`in window&&!fr,mr=l&&(!dr||fr&&8<fr&&11>=fr),hr=` `,gr=!1;function _r(e,t){switch(e){case`keyup`:return ur.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function vr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var yr=!1;function br(e,t){switch(e){case`compositionend`:return vr(t);case`keypress`:return t.which===32?(gr=!0,hr):null;case`textInput`:return e=t.data,e===hr&&gr?null:e;default:return null}}function xr(e,t){if(yr)return e===`compositionend`||!dr&&_r(e,t)?(e=Fn(),Pn=Nn=Mn=null,yr=!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 mr&&t.locale!==`ko`?null:t.data;default:return null}}var Sr={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 Cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Sr[e.type]:t===`textarea`}function wr(e,t,n,r){et(r),t=Ei(t,`onChange`),0<t.length&&(n=new Vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Tr=null,Er=null;function Dr(e){vi(e,0)}function Or(e){if(Se(ea(e)))return e}function kr(e,t){if(e===`change`)return t}var Ar=!1;if(l){var jr;if(l){var Mr=`oninput`in document;if(!Mr){var Nr=document.createElement(`div`);Nr.setAttribute(`oninput`,`return;`),Mr=typeof Nr.oninput==`function`}jr=Mr}else jr=!1;Ar=jr&&(!document.documentMode||9<document.documentMode)}function Pr(){Tr&&(Tr.detachEvent(`onpropertychange`,Fr),Er=Tr=null)}function Fr(e){if(e.propertyName===`value`&&Or(Er)){var t=[];wr(t,Er,e,Ye(e)),at(Dr,t)}}function Ir(e,t,n){e===`focusin`?(Pr(),Tr=t,Er=n,Tr.attachEvent(`onpropertychange`,Fr)):e===`focusout`&&Pr()}function Lr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Or(Er)}function Rr(e,t){if(e===`click`)return Or(t)}function zr(e,t){if(e===`input`||e===`change`)return Or(t)}function Br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Vr=typeof Object.is==`function`?Object.is:Br;function Hr(e,t){if(Vr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!u.call(t,i)||!Vr(e[i],t[i]))return!1}return!0}function Ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wr(e,t){var n=Ur(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Ur(n)}}function Gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kr(){for(var e=window,t=Ce();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ce(e.document)}return t}function qr(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 Jr(e){var t=Kr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Gr(n.ownerDocument.documentElement,n)){if(r!==null&&qr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Wr(n,a);var o=Wr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Yr=l&&`documentMode`in document&&11>=document.documentMode,Xr=null,Zr=null,Qr=null,$r=!1;function ei(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$r||Xr==null||Xr!==Ce(r)||(r=Xr,`selectionStart`in r&&qr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Qr&&Hr(Qr,r)||(Qr=r,r=Ei(Zr,`onSelect`),0<r.length&&(t=new Vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Xr)))}function ti(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ni={animationend:ti(`Animation`,`AnimationEnd`),animationiteration:ti(`Animation`,`AnimationIteration`),animationstart:ti(`Animation`,`AnimationStart`),transitionend:ti(`Transition`,`TransitionEnd`)},ri={},ii={};l&&(ii=document.createElement(`div`).style,`AnimationEvent`in window||(delete ni.animationend.animation,delete ni.animationiteration.animation,delete ni.animationstart.animation),`TransitionEvent`in window||delete ni.transitionend.transition);function ai(e){if(ri[e])return ri[e];if(!ni[e])return e;var t=ni[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ii)return ri[e]=t[n];return e}var oi=ai(`animationend`),si=ai(`animationiteration`),ci=ai(`animationstart`),li=ai(`transitionend`),ui=new Map,di=`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 fi(e,t){ui.set(e,t),s(t,[e])}for(var pi=0;pi<di.length;pi++){var mi=di[pi];fi(mi.toLowerCase(),`on`+(mi[0].toUpperCase()+mi.slice(1)))}fi(oi,`onAnimationEnd`),fi(si,`onAnimationIteration`),fi(ci,`onAnimationStart`),fi(`dblclick`,`onDoubleClick`),fi(`focusin`,`onFocus`),fi(`focusout`,`onBlur`),fi(li,`onTransitionEnd`),c(`onMouseEnter`,[`mouseout`,`mouseover`]),c(`onMouseLeave`,[`mouseout`,`mouseover`]),c(`onPointerEnter`,[`pointerout`,`pointerover`]),c(`onPointerLeave`,[`pointerout`,`pointerover`]),s(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),s(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),s(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),s(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),s(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),s(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var hi=`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(` `),gi=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(hi));function _i(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,gt(r,t,void 0,e),e.currentTarget=null}function vi(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;_i(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;_i(i,s,l),a=c}}}if(ft)throw e=pt,ft=!1,pt=null,e}function yi(e,t){var n=t[Yi];n===void 0&&(n=t[Yi]=new Set);var r=e+`__bubble`;n.has(r)||(Ci(t,e,2,!1),n.add(r))}function bi(e,t,n){var r=0;t&&(r|=4),Ci(n,e,r,t)}var xi=`_reactListening`+Math.random().toString(36).slice(2);function Si(e){if(!e[xi]){e[xi]=!0,i.forEach(function(t){t!==`selectionchange`&&(gi.has(t)||bi(t,!1,e),bi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xi]||(t[xi]=!0,bi(`selectionchange`,!1,t))}}function Ci(e,t,n,r){switch(jn(t)){case 1:var i=En;break;case 4:i=Dn;break;default:i=On}n=i.bind(null,t,n,e),i=void 0,!st||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Qi(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}at(function(){var r=a,i=Ye(n),o=[];a:{var s=ui.get(e);if(s!==void 0){var c=Vn,l=e;switch(e){case`keypress`:if(In(n)===0)break a;case`keydown`:case`keyup`:c=ar;break;case`focusin`:l=`focus`,c=Xn;break;case`focusout`:l=`blur`,c=Xn;break;case`beforeblur`:case`afterblur`:c=Xn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=sr;break;case oi:case si:case ci:c=Zn;break;case li:c=cr;break;case`scroll`:c=Un;break;case`wheel`:c=lr;break;case`copy`:case`cut`:case`paste`:c=Qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=or}var u=!!(t&4),d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=ot(p,f),h!=null&&u.push(Ti(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Je&&(l=n.relatedTarget||n.fromElement)&&(Qi(l)||l[Ji]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Qi(l):null,l!==null&&(d=_t(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Jn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=or,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:ea(c),m=l==null?s:ea(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Qi(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=Di(m))p++;for(m=0,h=f;h;h=Di(h))m++;for(;0<p-m;)u=Di(u),p--;for(;0<m-p;)f=Di(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=Di(u),f=Di(f)}u=null}else u=null;c!==null&&Oi(o,s,c,u,!1),l!==null&&d!==null&&Oi(o,d,l,u,!0)}}a:{if(s=r?ea(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=kr;else if(Cr(s)){if(Ar)g=zr;else{g=Lr;var _=Ir}}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Rr);if(g&&=g(e,r)){wr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&ke(s,`number`,s.value)}switch(_=r?ea(r):window,e){case`focusin`:(Cr(_)||_.contentEditable===`true`)&&(Xr=_,Zr=r,Qr=null);break;case`focusout`:Qr=Zr=Xr=null;break;case`mousedown`:$r=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:$r=!1,ei(o,n,i);break;case`selectionchange`:if(Yr)break;case`keydown`:case`keyup`:ei(o,n,i)}var v;if(dr)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else yr?_r(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(mr&&n.locale!==`ko`&&(yr||y!==`onCompositionStart`?y===`onCompositionEnd`&&yr&&(v=Fn()):(Mn=i,Nn=`value`in Mn?Mn.value:Mn.textContent,yr=!0)),_=Ei(r,y),0<_.length&&(y=new $n(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=vr(n),v!==null&&(y.data=v)))),(v=pr?br(e,n):xr(e,n))&&(r=Ei(r,`onBeforeInput`),0<r.length&&(i=new $n(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}vi(o,t)})}function Ti(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ei(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=ot(e,n),a!=null&&r.unshift(Ti(e,a,i)),a=ot(e,t),a!=null&&r.push(Ti(e,a,i))),e=e.return}return r}function Di(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Oi(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=ot(n,a),c!=null&&o.unshift(Ti(n,c,s))):i||(c=ot(n,a),c!=null&&o.push(Ti(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ki=/\r\n?/g,Ai=/\u0000|\uFFFD/g;function ji(e){return(typeof e==`string`?e:``+e).replace(ki,` 7`).replace(Ai,``)}function Mi(e,t,n){if(t=ji(t),ji(e)!==t&&n)throw Error(r(425))}function Ni(){}var Pi=null,Fi=null;function Ii(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 Li=typeof setTimeout==`function`?setTimeout:void 0,Ri=typeof clearTimeout==`function`?clearTimeout:void 0,zi=typeof Promise==`function`?Promise:void 0,Bi=typeof queueMicrotask==`function`?queueMicrotask:zi===void 0?Li:function(e){return zi.resolve(null).then(e).catch(Vi)};function Vi(e){setTimeout(function(){throw e})}function Hi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),Cn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++}n=i}while(n);Cn(t)}function Ui(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Wi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Gi=Math.random().toString(36).slice(2),Ki=`__reactFiber$`+Gi,qi=`__reactProps$`+Gi,Ji=`__reactContainer$`+Gi,Yi=`__reactEvents$`+Gi,Xi=`__reactListeners$`+Gi,Zi=`__reactHandles$`+Gi;function Qi(e){var t=e[Ki];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ji]||n[Ki]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Wi(e);e!==null;){if(n=e[Ki])return n;e=Wi(e)}return t}e=n,n=e.parentNode}return null}function $i(e){return e=e[Ki]||e[Ji],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ea(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function ta(e){return e[qi]||null}var na=[],ra=-1;function ia(e){return{current:e}}function aa(e){0>ra||(e.current=na[ra],na[ra]=null,ra--)}function oa(e,t){ra++,na[ra]=e.current,e.current=t}var sa={},ca=ia(sa),la=ia(!1),ua=sa;function A(e,t){var n=e.type.contextTypes;if(!n)return sa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function da(e){return e=e.childContextTypes,e!=null}function fa(){aa(la),aa(ca)}function pa(e,t,n){if(ca.current!==sa)throw Error(r(168));oa(ca,t),oa(la,n)}function ma(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,_e(e)||`Unknown`,a));return ue({},n,i)}function ha(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sa,ua=ca.current,oa(ca,e),oa(la,la.current),!0}function ga(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=ma(e,t,ua),i.__reactInternalMemoizedMergedChildContext=e,aa(la),aa(ca),oa(ca,e)):aa(la),oa(la,n)}var _a=null,va=!1,ya=!1;function ba(e){_a===null?_a=[e]:_a.push(e)}function xa(e){va=!0,ba(e)}function Sa(){if(!ya&&_a!==null){ya=!0;var e=0,t=Qt;try{var n=_a;for(Qt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}_a=null,va=!1}catch(t){throw _a!==null&&(_a=_a.slice(e+1)),Ct(kt,Sa),t}finally{Qt=t,ya=!1}}return null}var Ca=[],wa=0,Ta=null,Ea=0,Da=[],Oa=0,ka=null,Aa=1,ja=``;function Ma(e,t){Ca[wa++]=Ea,Ca[wa++]=Ta,Ta=e,Ea=t}function Na(e,t,n){Da[Oa++]=Aa,Da[Oa++]=ja,Da[Oa++]=ka,ka=e;var r=Aa;e=ja;var i=32-It(r)-1;r&=~(1<<i),n+=1;var a=32-It(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Aa=1<<32-It(t)+i|n<<i|r,ja=a+e}else Aa=1<<a|n<<i|r,ja=e}function Pa(e){e.return!==null&&(Ma(e,1),Na(e,1,0))}function Fa(e){for(;e===Ta;)Ta=Ca[--wa],Ca[wa]=null,Ea=Ca[--wa],Ca[wa]=null;for(;e===ka;)ka=Da[--Oa],Da[Oa]=null,ja=Da[--Oa],Da[Oa]=null,Aa=Da[--Oa],Da[Oa]=null}var Ia=null,La=null,Ra=!1,za=null;function Ba(e,t){var n=mu(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Va(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null&&(e.stateNode=t,Ia=e,La=Ui(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t!==null&&(e.stateNode=t,Ia=e,La=null,!0);case 13:return t=t.nodeType===8?t:null,t!==null&&(n=ka===null?null:{id:Aa,overflow:ja},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=mu(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ia=e,La=null,!0);default:return!1}}function Ha(e){return!!(e.mode&1)&&!(e.flags&128)}function Ua(e){if(Ra){var t=La;if(t){var n=t;if(!Va(e,t)){if(Ha(e))throw Error(r(418));t=Ui(n.nextSibling);var i=Ia;t&&Va(e,t)?Ba(i,n):(e.flags=e.flags&-4097|2,Ra=!1,Ia=e)}}else{if(Ha(e))throw Error(r(418));e.flags=e.flags&-4097|2,Ra=!1,Ia=e}}}function Wa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ia=e}function Ga(e){if(e!==Ia)return!1;if(!Ra)return Wa(e),Ra=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ii(e.type,e.memoizedProps)),t&&=La){if(Ha(e))throw Ka(),Error(r(418));for(;t;)Ba(e,t),t=Ui(t.nextSibling)}if(Wa(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){La=Ui(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}La=null}}else La=Ia?Ui(e.stateNode.nextSibling):null;return!0}function Ka(){for(var e=La;e;)e=Ui(e.nextSibling)}function qa(){La=Ia=null,Ra=!1}function Ja(e){za===null?za=[e]:za.push(e)}var Ya=S.ReactCurrentBatchConfig;function Xa(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Za(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Qa(e){var t=e._init;return t(e._payload)}function $a(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=_u(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=xu(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===T?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===oe&&Qa(i)===t.type)?(r=a(t,n.props),r.ref=Xa(e,t,n),r.return=e,r):(r=vu(n.type,n.key,n.props,null,e.mode,r),r.ref=Xa(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Su(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=yu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=xu(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case C:return n=vu(t.type,t.key,t.props,null,e.mode,n),n.ref=Xa(e,null,t),n.return=e,n;case w:return t=Su(t,e.mode,n),t.return=e,t;case oe:var r=t._init;return f(e,r(t._payload),n)}if(Ae(t)||le(t))return t=yu(t,e.mode,n,null),t.return=e,t;Za(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case C:return n.key===i?l(e,t,n,r):null;case w:return n.key===i?u(e,t,n,r):null;case oe:return i=n._init,p(e,t,i(n._payload),r)}if(Ae(n)||le(n))return i===null?d(e,t,n,r,null):null;
vendor: 4,803 bytes, line 7
7Za(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case C:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case w:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case oe:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Ae(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);Za(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Ra&&Ma(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ra&&Ma(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Ra&&Ma(r,h),l}function g(a,s,c,l){var u=le(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ra&&Ma(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ra&&Ma(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ra&&Ma(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===T&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case C:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===T){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===oe&&Qa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Xa(e,l,i),r.return=e,e=r;break a}n(e,l);break}t(e,l),l=l.sibling}i.type===T?(r=yu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=vu(i.type,i.key,i.props,null,e.mode,o),o.ref=Xa(e,r,i),o.return=e,e=o)}return s(e);case w:a:{for(l=i.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}n(e,r);break}t(e,r),r=r.sibling}r=Su(i,e.mode,o),r.return=e,e=r}return s(e);case oe:return l=i._init,_(e,r,l(i._payload),o)}if(Ae(i))return h(e,r,i,o);if(le(i))return g(e,r,i,o);Za(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=xu(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var eo=$a(!0),to=$a(!1),no=ia(null),ro=null,io=null,ao=null;function oo(){ao=io=ro=null}function so(e){var t=no.current;aa(no),e._currentValue=t}function co(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function lo(e,t){ro=e,ao=io=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&($s=!0),e.firstContext=null)}function uo(e){var t=e._currentValue;if(ao!==e){if(e={context:e,memoizedValue:t,next:null},io===null){if(ro===null)throw Error(r(308));io=e,ro.dependencies={lanes:0,firstContext:e}}else io=io.next=e}return t}var fo=null;function po(e){fo===null?fo=[e]:fo.push(e)}function mo(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,po(t)):(n.next=i.next,i.next=n),t.interleaved=n,ho(e,r)}function ho(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var go=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vo(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 yo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,cl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ho(e,n)}return i=r.interleaved,i===null?(t.next=t,po(r)):(t.next=i.next,i.next=t),r.interleaved=t,ho(e,n)}
vendor: 10,254 bytes, line 7
7function xo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zt(e,n)}}function So(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Co(e,t,n,r){var i=e.updateQueue;go=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=ue({},d,f);break a;case 2:go=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);gl|=o,e.lanes=o,e.memoizedState=d}}function wo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var To={},Eo=ia(To),Do=ia(To),Oo=ia(To);function ko(e){if(e===To)throw Error(r(174));return e}function Ao(e,t){switch(oa(Oo,t),oa(Do,e),oa(Eo,To),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Le(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Le(t,e)}aa(Eo),oa(Eo,t)}function jo(){aa(Eo),aa(Do),aa(Oo)}function Mo(e){ko(Oo.current);var t=ko(Eo.current),n=Le(t,e.type);t!==n&&(oa(Do,e),oa(Eo,n))}function No(e){Do.current===e&&(aa(Eo),aa(Do))}var Po=ia(0);function Fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Io=[];function Lo(){for(var e=0;e<Io.length;e++)Io[e]._workInProgressVersionPrimary=null;Io.length=0}var Ro=S.ReactCurrentDispatcher,zo=S.ReactCurrentBatchConfig,Bo=0,Vo=null,Ho=null,Uo=null,Wo=!1,Go=!1,Ko=0,qo=0;function Jo(){throw Error(r(321))}function Yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Vr(e[n],t[n]))return!1;return!0}function Xo(e,t,n,i,a,o){if(Bo=o,Vo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ro.current=e===null||e.memoizedState===null?Ns:Ps,e=n(i,a),Go){o=0;do{if(Go=!1,Ko=0,25<=o)throw Error(r(301));o+=1,Uo=Ho=null,t.updateQueue=null,Ro.current=Fs,e=n(i,a)}while(Go)}if(Ro.current=Ms,t=Ho!==null&&Ho.next!==null,Bo=0,Uo=Ho=Vo=null,Wo=!1,t)throw Error(r(300));return e}function Zo(){var e=Ko!==0;return Ko=0,e}function Qo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Uo===null?Vo.memoizedState=Uo=e:Uo=Uo.next=e,Uo}function $o(){if(Ho===null){var e=Vo.alternate;e=e===null?null:e.memoizedState}else e=Ho.next;var t=Uo===null?Vo.memoizedState:Uo.next;if(t!==null)Uo=t,Ho=e;else{if(e===null)throw Error(r(310));Ho=e,e={memoizedState:Ho.memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},Uo===null?Vo.memoizedState=Uo=e:Uo=Uo.next=e}return Uo}function es(e,t){return typeof t==`function`?t(e):t}function ts(e){var t=$o(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Ho,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Bo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,Vo.lanes|=d,gl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Vr(i,t.memoizedState)||($s=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,Vo.lanes|=o,gl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ns(e){var t=$o(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Vr(o,t.memoizedState)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function rs(){}function is(e,t){var n=Vo,i=$o(),a=t(),o=!Vr(i.memoizedState,a);if(o&&(i.memoizedState=a,$s=!0),i=i.queue,gs(ss.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Uo!==null&&Uo.memoizedState.tag&1){if(n.flags|=2048,ds(9,os.bind(null,n,i,a,t),void 0,null),ll===null)throw Error(r(349));Bo&30||as(n,t,a)}return a}function as(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Vo.updateQueue,t===null?(t={lastEffect:null,stores:null},Vo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function os(e,t,n,r){t.value=n,t.getSnapshot=r,cs(t)&&ls(e)}function ss(e,t,n){return n(function(){cs(t)&&ls(e)})}function cs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vr(e,n)}catch{return!0}}function ls(e){var t=ho(e,1);t!==null&&Il(t,e,1,-1)}function us(e){var t=Qo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:e},t.queue=e,e=e.dispatch=Os.bind(null,Vo,e),[t.memoizedState,e]}function ds(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Vo.updateQueue,t===null?(t={lastEffect:null,stores:null},Vo.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function fs(){return $o().memoizedState}function ps(e,t,n,r){var i=Qo();Vo.flags|=e,i.memoizedState=ds(1|t,n,void 0,r===void 0?null:r)}function ms(e,t,n,r){var i=$o();r=r===void 0?null:r;var a=void 0;if(Ho!==null){var o=Ho.memoizedState;if(a=o.destroy,r!==null&&Yo(r,o.deps)){i.memoizedState=ds(t,n,a,r);return}}Vo.flags|=e,i.memoizedState=ds(1|t,n,a,r)}function hs(e,t){return ps(8390656,8,e,t)}function gs(e,t){return ms(2048,8,e,t)}function _s(e,t){return ms(4,2,e,t)}function vs(e,t){return ms(4,4,e,t)}function ys(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 bs(e,t,n){return n=n==null?null:n.concat([e]),ms(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=$o();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=$o();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Yo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ws(e,t,n){return Bo&21?(Vr(n,t)||(n=qt(),Vo.lanes|=n,gl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,$s=!0),e.memoizedState=n)}function Ts(e,t){var n=Qt;Qt=n!==0&&4>n?n:4,e(!0);var r=zo.transition;zo.transition={};try{e(!1),t()}finally{Qt=n,zo.transition=r}}function Es(){return $o().memoizedState}function Ds(e,t,n){var r=Fl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ks(e))As(t,n);else if(n=mo(e,t,n,r),n!==null){var i=Pl();Il(n,e,r,i),js(n,t,r)}}function Os(e,t,n){var r=Fl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ks(e))As(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Vr(s,o)){var c=t.interleaved;c===null?(i.next=i,po(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=mo(e,t,i,r),n!==null&&(i=Pl(),Il(n,e,r,i),js(n,t,r))}}function ks(e){var t=e.alternate;return e===Vo||t!==null&&t===Vo}function As(e,t){Go=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zt(e,n)}}var Ms={readContext:uo,useCallback:Jo,useContext:Jo,useEffect:Jo,useImperativeHandle:Jo,useInsertionEffect:Jo,useLayoutEffect:Jo,useMemo:Jo,useReducer:Jo,useRef:Jo,useState:Jo,useDebugValue:Jo,useDeferredValue:Jo,useTransition:Jo,useMutableSource:Jo,useSyncExternalStore:Jo,useId:Jo,unstable_isNewReconciler:!1},Ns={readContext:uo,useCallback:function(e,t){return Qo().memoizedState=[e,t===void 0?null:t],e},useContext:uo,useEffect:hs,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),ps(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return ps(4,2,e,t)},useMemo:function(e,t){var n=Qo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Qo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ds.bind(null,Vo,e),[r.memoizedState,e]}
vendor: 4,584 bytes, lines 7-9
7,useRef:function(e){var t=Qo();return e={current:e},t.memoizedState=e},useState:us,useDebugValue:xs,useDeferredValue:function(e){return Qo().memoizedState=e},useTransition:function(){var e=us(!1),t=e[0];return e=Ts.bind(null,e[1]),Qo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Vo,a=Qo();if(Ra){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),ll===null)throw Error(r(349));Bo&30||as(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,hs(ss.bind(null,i,o,e),[e]),i.flags|=2048,ds(9,os.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Qo(),t=ll.identifierPrefix;if(Ra){var n=ja,r=Aa;n=(r&~(1<<32-It(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Ko++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=qo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Ps={readContext:uo,useCallback:Ss,useContext:uo,useEffect:gs,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:ts,useRef:fs,useState:function(){return ts(es)},useDebugValue:xs,useDeferredValue:function(e){return ws($o(),Ho.memoizedState,e)},useTransition:function(){return[ts(es)[0],$o().memoizedState]},useMutableSource:rs,useSyncExternalStore:is,useId:Es,unstable_isNewReconciler:!1},Fs={readContext:uo,useCallback:Ss,useContext:uo,useEffect:gs,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:ns,useRef:fs,useState:function(){return ns(es)},useDebugValue:xs,useDeferredValue:function(e){var t=$o();return Ho===null?t.memoizedState=e:ws(t,Ho.memoizedState,e)},useTransition:function(){return[ns(es)[0],$o().memoizedState]},useMutableSource:rs,useSyncExternalStore:is,useId:Es,unstable_isNewReconciler:!1};function Is(e,t){if(e&&e.defaultProps){for(var n in t=ue({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ls(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ue({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rs={isMounted:function(e){return(e=e._reactInternals)?_t(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pl(),i=Fl(e),a=yo(r,i);a.payload=t,n!=null&&(a.callback=n),t=bo(e,a,i),t!==null&&(Il(t,e,i,r),xo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pl(),i=Fl(e),a=yo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=bo(e,a,i),t!==null&&(Il(t,e,i,r),xo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pl(),r=Fl(e),i=yo(n,r);i.tag=2,t!=null&&(i.callback=t),t=bo(e,i,r),t!==null&&(Il(t,e,r,n),xo(t,e,r))}};function zs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Hr(n,r)||!Hr(i,a):!0}function Bs(e,t,n){var r=!1,i=sa,a=t.contextType;return typeof a==`object`&&a?a=uo(a):(i=da(t)?ua:ca.current,r=t.contextTypes,a=(r=r!=null)?A(e,i):sa),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Rs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Vs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Rs.enqueueReplaceState(t,t.state,null)}function Hs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},_o(e);var a=t.contextType;typeof a==`object`&&a?i.context=uo(a):(a=da(t)?ua:ca.current,i.context=A(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(Ls(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&Rs.enqueueReplaceState(i,i.state,null),Co(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Us(e,t){try{var n=``,r=t;do n+=he(r),r=r.return;while(r);var i=n}catch(e){i=` 8Error generating stack: `+e.message+` 9`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ws(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Gs(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ks=typeof WeakMap==`function`?WeakMap:Map;
vendor: 54,860 bytes, line 9
9function qs(e,t,n){n=yo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){wl||(wl=!0,Tl=r),Gs(e,t)},n}function Js(e,t,n){n=yo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Gs(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Gs(e,t),typeof r!=`function`&&(El===null?El=new Set([this]):El.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Ys(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ks;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=su.bind(null,e,t,n),t.then(e,e))}function Xs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Zs(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yo(-1,1),t.tag=2,bo(n,t,1))),n.lanes|=1),e)}var Qs=S.ReactCurrentOwner,$s=!1;function ec(e,t,n,r){t.child=e===null?to(t,null,n,r):eo(t,e.child,n,r)}function tc(e,t,n,r,i){n=n.render;var a=t.ref;return lo(t,i),r=Xo(e,t,n,r,a,i),n=Zo(),e!==null&&!$s?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,bc(e,t,i)):(Ra&&n&&Pa(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!hu(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=vu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Hr:n,n(o,r)&&e.ref===t.ref)return bc(e,t,i)}return t.flags|=1,e=_u(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Hr(a,r)&&e.ref===t.ref){if($s=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&($s=!0);else return t.lanes=e.lanes,bc(e,t,i)}}return oc(e,t,n,r,i)}function ic(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`){if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oa(pl,fl),fl|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oa(pl,fl),fl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,oa(pl,fl),fl|=r}}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),oa(pl,fl),fl|=r;return ec(e,t,i,n),t.child}function ac(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function oc(e,t,n,r,i){var a=da(n)?ua:ca.current;return a=A(t,a),lo(t,i),n=Xo(e,t,n,r,a,i),r=Zo(),e!==null&&!$s?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,bc(e,t,i)):(Ra&&r&&Pa(t),t.flags|=1,ec(e,t,n,i),t.child)}function sc(e,t,n,r,i){if(da(n)){var a=!0;ha(t)}else a=!1;if(lo(t,i),t.stateNode===null)yc(e,t),Bs(t,n,r),Hs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=uo(l):(l=da(n)?ua:ca.current,l=A(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Vs(t,o,r,l),go=!1;var f=t.memoizedState;o.state=f,Co(t,r,o,i),c=t.memoizedState,s!==r||f!==c||la.current||go?(typeof u==`function`&&(Ls(t,n,u,r),c=t.memoizedState),(s=go||zs(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,vo(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Is(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=uo(c):(c=da(n)?ua:ca.current,c=A(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Vs(t,o,r,c),go=!1,f=t.memoizedState,o.state=f,Co(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||la.current||go?(typeof p==`function`&&(Ls(t,n,p,r),m=t.memoizedState),(l=go||zs(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return cc(e,t,n,r,a,i)}function cc(e,t,n,r,i,a){ac(e,t);var o=!!(t.flags&128);if(!r&&!o)return i&&ga(t,n,!1),bc(e,t,a);r=t.stateNode,Qs.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=eo(t,e.child,null,a),t.child=eo(t,null,s,a)):ec(e,t,s,a),t.memoizedState=r.state,i&&ga(t,n,!0),t.child}function j(e){var t=e.stateNode;t.pendingContext?pa(e,t.pendingContext,t.pendingContext!==t.context):t.context&&pa(e,t.context,!1),Ao(e,t.containerInfo)}function lc(e,t,n,r,i){return qa(),Ja(i),t.flags|=256,ec(e,t,n,r),t.child}var uc={dehydrated:null,treeContext:null,retryLane:0};function dc(e){return{baseLanes:e,cachePool:null,transitions:null}}function fc(e,t,n){var r=t.pendingProps,i=Po.current,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(i&2)),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),oa(Po,i&1),e===null)return Ua(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.lanes=t.mode&1?e.data===`$!`?8:1073741824:1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=bu(o,r,0,null),e=yu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=dc(n),t.memoizedState=uc,e):pc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return hc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=_u(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=yu(a,o,n,null),a.flags|=2):a=_u(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?dc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=uc,r}return a=e.child,e=a.sibling,r=_u(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function pc(e,t){return t=bu({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function mc(e,t,n,r){return r!==null&&Ja(r),eo(t,e.child,null,n),e=pc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Ws(Error(r(422))),mc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=bu({mode:`visible`,children:i.children},a,0,null),o=yu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&eo(t,e.child,null,s),t.child.memoizedState=dc(s),t.memoizedState=uc,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return mc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Ws(o,i,void 0),mc(e,t,s,i)}if(c=(s&e.childLanes)!==0,$s||c){if(i=ll,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,ho(e,a),Il(i,e,a,-1))}return Xl(),i=Ws(Error(r(421))),mc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=lu.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,La=Ui(a.nextSibling),Ia=t,Ra=!0,za=null,e!==null&&(Da[Oa++]=Aa,Da[Oa++]=ja,Da[Oa++]=ka,Aa=e.id,ja=e.overflow,ka=t),t=pc(t,i.children),t.flags|=4096,t)}function gc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),co(e.return,t,n)}function _c(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function vc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(ec(e,t,r.children,n),r=Po.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gc(e,n,t);else if(e.tag===19)gc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oa(Po,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),_c(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}_c(t,!0,n,null,a);break;case`together`:_c(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function yc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function bc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),gl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=_u(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_u(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xc(e,t,n){switch(t.tag){case 3:j(t),qa();break;case 5:Mo(t);break;case 1:da(t.type)&&ha(t);break;case 4:Ao(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;oa(no,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(oa(Po,Po.current&1),e=bc(e,t,n),e===null?null:e.sibling):fc(e,t,n):(oa(Po,Po.current&1),t.flags|=128,null);oa(Po,Po.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return vc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oa(Po,Po.current),r)break;return null;case 22:case 23:return t.lanes=0,ic(e,t,n)}return bc(e,t,n)}var Sc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Cc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ko(Eo.current);var a=null;switch(n){case`input`:i=we(e,i),r=we(e,r),a=[];break;case`select`:i=ue({},i,{value:void 0}),r=ue({},r,{value:void 0}),a=[];break;case`textarea`:i=Me(e,i),r=Me(e,r),a=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Ni)}Ke(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null){if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(o.hasOwnProperty(u)?a||=[]:(a||=[]).push(u,null))}for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null)){if(u===`style`){if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(a||=[],a.push(u,n)),n=l}else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(a||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(a||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(o.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&yi(`scroll`,e),a||c===l||(a=[])):(a||=[]).push(u,l))}}n&&(a||=[]).push(`style`,n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},wc=function(e,t,n,r){n!==r&&(t.flags|=4)};function Tc(e,t){if(!Ra)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ec(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Dc(e,t,n){var i=t.pendingProps;switch(Fa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ec(t),null;case 1:return da(t.type)&&fa(),Ec(t),null;case 3:return i=t.stateNode,jo(),aa(la),aa(ca),Lo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ga(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,za!==null&&(Bl(za),za=null))),Ec(t),null;case 5:No(t);var a=ko(Oo.current);if(n=t.type,e!==null&&t.stateNode!=null)Cc(e,t,n,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Ec(t),null}if(e=ko(Eo.current),Ga(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Ki]=t,i[qi]=s,e=!!(t.mode&1),n){case`dialog`:yi(`cancel`,i),yi(`close`,i);break;case`iframe`:case`object`:case`embed`:yi(`load`,i);break;case`video`:case`audio`:for(a=0;a<hi.length;a++)yi(hi[a],i);break;case`source`:yi(`error`,i);break;case`img`:case`image`:case`link`:yi(`error`,i),yi(`load`,i);break;case`details`:yi(`toggle`,i);break;case`input`:Te(i,s),yi(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},yi(`invalid`,i);break;case`textarea`:Ne(i,s),yi(`invalid`,i)}for(var c in Ke(n,s),a=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Mi(i.textContent,l,e),a=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Mi(i.textContent,l,e),a=[`children`,``+l]):o.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&yi(`scroll`,i)}switch(n){case`input`:xe(i),Oe(i,s,!0);break;case`textarea`:xe(i),Fe(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Ni)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=a.nodeType===9?a:a.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ie(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Ki]=t,e[qi]=i,Sc(e,t,!1,!1),t.stateNode=e;a:{switch(c=qe(n,i),n){case`dialog`:yi(`cancel`,e),yi(`close`,e),a=i;break;case`iframe`:case`object`:case`embed`:yi(`load`,e),a=i;break;case`video`:case`audio`:for(a=0;a<hi.length;a++)yi(hi[a],e);a=i;break;case`source`:yi(`error`,e),a=i;break;case`img`:case`image`:case`link`:yi(`error`,e),yi(`load`,e),a=i;break;case`details`:yi(`toggle`,e),a=i;break;case`input`:Te(e,i),a=we(e,i),yi(`invalid`,e);break;case`option`:a=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},a=ue({},i,{value:void 0}),yi(`invalid`,e);break;case`textarea`:Ne(e,i),a=Me(e,i),yi(`invalid`,e);break;default:a=i}for(s in Ke(n,a),l=a,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?We(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&ze(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Be(e,u):typeof u==`number`&&Be(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(o.hasOwnProperty(s)?u!=null&&s===`onScroll`&&yi(`scroll`,e):u!=null&&x(e,s,u,c))}switch(n){case`input`:xe(e),Oe(e,i,!1);break;case`textarea`:xe(e),Fe(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+ve(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&je(e,!!i.multiple,i.defaultValue,!0):je(e,!!i.multiple,s,!1);break;default:typeof a.onClick==`function`&&(e.onclick=Ni)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ec(t),null;case 6:if(e&&t.stateNode!=null)wc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=ko(Oo.current),ko(Eo.current),Ga(t)){if(i=t.stateNode,n=t.memoizedProps,i[Ki]=t,(s=i.nodeValue!==n)&&(e=Ia,e!==null))switch(e.tag){case 3:Mi(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Mi(i.nodeValue,n,!!(e.mode&1))}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Ki]=t,t.stateNode=i}return Ec(t),null;case 13:if(aa(Po),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ra&&La!==null&&t.mode&1&&!(t.flags&128))Ka(),qa(),t.flags|=98560,s=!1;else if(s=Ga(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Ki]=t}else qa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ec(t),s=!1}else za!==null&&(Bl(za),za=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||Po.current&1?ml===0&&(ml=3):Xl())),t.updateQueue!==null&&(t.flags|=4),Ec(t),null);case 4:return jo(),e===null&&Si(t.stateNode.containerInfo),Ec(t),null;case 10:return so(t.type._context),Ec(t),null;case 17:return da(t.type)&&fa(),Ec(t),null;case 19:if(aa(Po),s=t.memoizedState,s===null)return Ec(t),null;if(i=!!(t.flags&128),c=s.rendering,c===null){if(i)Tc(s,!1);else{if(ml!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Fo(e),c!==null){for(t.flags|=128,Tc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oa(Po,Po.current&1|2),t.child}e=e.sibling}s.tail!==null&&Dt()>Sl&&(t.flags|=128,i=!0,Tc(s,!1),t.lanes=4194304)}}else{if(!i){if(e=Fo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Ra)return Ec(t),null}else 2*Dt()-s.renderingStartTime>Sl&&n!==1073741824&&(t.flags|=128,i=!0,Tc(s,!1),t.lanes=4194304)}s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(Ec(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Dt(),t.sibling=null,n=Po.current,oa(Po,i?n&1|2:n&1),t);case 22:case 23:return Kl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?fl&1073741824&&(Ec(t),t.subtreeFlags&6&&(t.flags|=8192)):Ec(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function Oc(e,t){switch(Fa(t),t.tag){case 1:return da(t.type)&&fa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jo(),aa(la),aa(ca),Lo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return No(t),null;case 13:if(aa(Po),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));qa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return aa(Po),null;case 4:return jo(),null;case 10:return so(t.type._context),null;case 22:case 23:return Kl(),null;case 24:return null;default:return null}}var kc=!1,Ac=!1,jc=typeof WeakSet==`function`?WeakSet:Set,Mc=null;function Nc(e,t){var n=e.ref;if(n!==null){if(typeof n==`function`)try{n(null)}catch(n){ou(e,t,n)}else n.current=null}}function Pc(e,t,n){try{n()}catch(n){ou(e,t,n)}}var Fc=!1;function Ic(e,t){if(Pi=Tn,e=Kr(),qr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Fi={focusedElem:e,selectionRange:n},Tn=!1,Mc=t;Mc!==null;)if(t=Mc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Mc=e;else for(;Mc!==null;){t=Mc;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Is(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){ou(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,Mc=e;break}Mc=t.return}return h=Fc,Fc=!1,h}function Lc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Pc(t,n,a)}i=i.next}while(i!==r)}}function Rc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function zc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Bc(e){var t=e.alternate;t!==null&&(e.alternate=null,Bc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ki],delete t[qi],delete t[Yi],delete t[Xi],delete t[Zi])),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 Vc(e){return e.tag===5||e.tag===3||e.tag===4}function Hc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Vc(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 a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ni));else if(r!==4&&(e=e.child,e!==null))for(Uc(e,t,n),e=e.sibling;e!==null;)Uc(e,t,n),e=e.sibling}function Wc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wc(e,t,n),e=e.sibling;e!==null;)Wc(e,t,n),e=e.sibling}var Gc=null,Kc=!1;function qc(e,t,n){for(n=n.child;n!==null;)Jc(e,t,n),n=n.sibling}function Jc(e,t,n){if(Pt&&typeof Pt.onCommitFiberUnmount==`function`)try{Pt.onCommitFiberUnmount(Nt,n)}catch{}switch(n.tag){case 5:Ac||Nc(n,t);case 6:var r=Gc,i=Kc;Gc=null,qc(e,t,n),Gc=r,Kc=i,Gc!==null&&(Kc?(e=Gc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Gc.removeChild(n.stateNode));break;case 18:Gc!==null&&(Kc?(e=Gc,n=n.stateNode,e.nodeType===8?Hi(e.parentNode,n):e.nodeType===1&&Hi(e,n),Cn(e)):Hi(Gc,n.stateNode));break;case 4:r=Gc,i=Kc,Gc=n.stateNode.containerInfo,Kc=!0,qc(e,t,n),Gc=r,Kc=i;break;case 0:case 11:case 14:case 15:if(!Ac&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Pc(n,t,o),i=i.next}while(i!==r)}qc(e,t,n);break;case 1:if(!Ac&&(Nc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){ou(n,t,e)}qc(e,t,n);break;case 21:qc(e,t,n);break;case 22:n.mode&1?(Ac=(r=Ac)||n.memoizedState!==null,qc(e,t,n),Ac=r):qc(e,t,n);break;default:qc(e,t,n)}}function Yc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jc),t.forEach(function(t){var r=uu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Xc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Gc=c.stateNode,Kc=!1;break a;case 3:Gc=c.stateNode.containerInfo,Kc=!0;break a;case 4:Gc=c.stateNode.containerInfo,Kc=!0;break a}c=c.return}if(Gc===null)throw Error(r(160));Jc(o,s,a),Gc=null,Kc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){ou(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zc(t,e),t=t.sibling}function Zc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Xc(t,e),Qc(e),i&4){try{Lc(3,e,e.return),Rc(3,e)}catch(t){ou(e,e.return,t)}try{Lc(5,e,e.return)}catch(t){ou(e,e.return,t)}}break;case 1:Xc(t,e),Qc(e),i&512&&n!==null&&Nc(n,n.return);break;case 5:if(Xc(t,e),Qc(e),i&512&&n!==null&&Nc(n,n.return),e.flags&32){var a=e.stateNode;try{Be(a,``)}catch(t){ou(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&Ee(a,o),qe(c,s);var u=qe(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?We(a,f):d===`dangerouslySetInnerHTML`?ze(a,f):d===`children`?Be(a,f):x(a,d,f,u)}switch(c){case`input`:De(a,o);break;case`textarea`:Pe(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?je(a,!!o.multiple,o.multiple?[]:``,!1):je(a,!!o.multiple,o.defaultValue,!0)):je(a,!!o.multiple,m,!1)}a[qi]=o}catch(t){ou(e,e.return,t)}}break;case 6:if(Xc(t,e),Qc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){ou(e,e.return,t)}}break;case 3:if(Xc(t,e),Qc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Cn(t.containerInfo)}catch(t){ou(e,e.return,t)}break;case 4:Xc(t,e),Qc(e);break;case 13:Xc(t,e),Qc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(xl=Dt())),i&4&&Yc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ac=(u=Ac)||d,Xc(t,e),Ac=u):Xc(t,e),Qc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Mc=e,d=e.child;d!==null;){for(f=Mc=d;Mc!==null;){switch(p=Mc,m=p.child,p.tag){case 0:case 11:case 14:case 15:Lc(4,p,p.return);break;case 1:Nc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){ou(i,n,e)}}break;case 5:Nc(p,p.return);break;case 22:if(p.memoizedState!==null){nl(f);continue}}m===null?nl(f):(m.return=p,Mc=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Ue(`display`,s))}catch(t){ou(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){ou(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Xc(t,e),Qc(e),i&4&&Yc(e);break;case 21:break;default:Xc(t,e),Qc(e)}}function Qc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Vc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Be(a,``),i.flags&=-33),Wc(e,Hc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Uc(e,Hc(e),o);break;default:throw Error(r(161))}}catch(t){ou(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $c(e,t,n){Mc=e,el(e,t,n)}function el(e,t,n){for(var r=!!(e.mode&1);Mc!==null;){var i=Mc,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||kc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Ac;s=kc;var l=Ac;if(kc=o,(Ac=c)&&!l)for(Mc=i;Mc!==null;)o=Mc,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?rl(i):(c.return=o,Mc=c);for(;a!==null;)Mc=a,el(a,t,n),a=a.sibling;Mc=i,kc=s,Ac=l}tl(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,Mc=a):tl(e,t,n)}}function tl(e){for(;Mc!==null;){var t=Mc;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ac||Rc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Ac){if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Is(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}}var o=t.updateQueue;o!==null&&wo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}wo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Cn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Ac||t.flags&512&&zc(t)}catch(e){ou(t,t.return,e)}}if(t===e){Mc=null;break}if(n=t.sibling,n!==null){n.return=t.return,Mc=n;break}Mc=t.return}}function nl(e){for(;Mc!==null;){var t=Mc;if(t===e){Mc=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Mc=n;break}Mc=t.return}}function rl(e){for(;Mc!==null;){var t=Mc;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Rc(4,t)}catch(e){ou(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){ou(t,i,e)}}var a=t.return;try{zc(t)}catch(e){ou(t,a,e)}break;case 5:var o=t.return;try{zc(t)}catch(e){ou(t,o,e)}}}catch(e){ou(t,t.return,e)}if(t===e){Mc=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Mc=s;break}Mc=t.return}}var il=Math.ceil,al=S.ReactCurrentDispatcher,ol=S.ReactCurrentOwner,sl=S.ReactCurrentBatchConfig,cl=0,ll=null,ul=null,dl=0,fl=0,pl=ia(0),ml=0,hl=null,gl=0,_l=0,vl=0,yl=null,bl=null,xl=0,Sl=1/0,Cl=null,wl=!1,Tl=null,El=null,Dl=!1,Ol=null,kl=0,Al=0,jl=null,Ml=-1,Nl=0;function Pl(){return cl&6?Dt():Ml===-1?Ml=Dt():Ml}function Fl(e){return e.mode&1?cl&2&&dl!==0?dl&-dl:Ya.transition===null?(e=Qt,e===0?(e=window.event,e=e===void 0?16:jn(e.type),e):e):(Nl===0&&(Nl=qt()),Nl):1}function Il(e,t,n,i){if(50<Al)throw Al=0,jl=null,Error(r(185));Yt(e,n,i),(!(cl&2)||e!==ll)&&(e===ll&&(!(cl&2)&&(_l|=n),ml===4&&Hl(e,dl)),Ll(e,i),n===1&&cl===0&&!(t.mode&1)&&(Sl=Dt()+500,va&&Sa()))}function Ll(e,t){var n=e.callbackNode;Gt(e,t);var r=Ut(e,e===ll?dl:0);if(r===0)n!==null&&wt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&wt(n),t===1)e.tag===0?xa(Ul.bind(null,e)):ba(Ul.bind(null,e)),Bi(function(){!(cl&6)&&Sa()}),n=null;else{switch($t(r)){case 1:n=kt;break;case 4:n=At;break;case 16:n=jt;break;case 536870912:n=Mt;break;default:n=jt}n=fu(n,Rl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Rl(e,t){if(Ml=-1,Nl=0,cl&6)throw Error(r(327));var n=e.callbackNode;if(iu()&&e.callbackNode!==n)return null;var i=Ut(e,e===ll?dl:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Zl(e,i);else{t=i;var a=cl;cl|=2;var o=Yl();(ll!==e||dl!==t)&&(Cl=null,Sl=Dt()+500,ql(e,t));do try{$l();break}catch(t){Jl(e,t)}while(1);oo(),al.current=o,cl=a,ul===null?(ll=null,dl=0,t=ml):t=0}if(t!==0){if(t===2&&(a=Kt(e),a!==0&&(i=a,t=zl(e,a))),t===1)throw n=hl,ql(e,0),Hl(e,i),Ll(e,Dt()),n;if(t===6)Hl(e,i);else{if(a=e.current.alternate,!(i&30)&&!Vl(a)&&(t=Zl(e,i),t===2&&(o=Kt(e),o!==0&&(i=o,t=zl(e,o))),t===1))throw n=hl,ql(e,0),Hl(e,i),Ll(e,Dt()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:nu(e,bl,Cl);break;case 3:if(Hl(e,i),(i&130023424)===i&&(t=xl+500-Dt(),10<t)){if(Ut(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Pl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Li(nu.bind(null,e,bl,Cl),t);break}nu(e,bl,Cl);break;case 4:if(Hl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-It(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=Dt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*il(i/1960))-i,10<i){e.timeoutHandle=Li(nu.bind(null,e,bl,Cl),i);break}nu(e,bl,Cl);break;case 5:nu(e,bl,Cl);break;default:throw Error(r(329))}}}return Ll(e,Dt()),e.callbackNode===n?Rl.bind(null,e):null}function zl(e,t){var n=yl;return e.current.memoizedState.isDehydrated&&(ql(e,t).flags|=256),e=Zl(e,t),e!==2&&(t=bl,bl=n,t!==null&&Bl(t)),e}function Bl(e){bl===null?bl=e:bl.push.apply(bl,e)}function Vl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Vr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Hl(e,t){for(t&=~vl,t&=~_l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-It(t),r=1<<n;e[n]=-1,t&=~r}}function Ul(e){if(cl&6)throw Error(r(327));iu();var t=Ut(e,0);if(!(t&1))return Ll(e,Dt()),null;var n=Zl(e,t);if(e.tag!==0&&n===2){var i=Kt(e);i!==0&&(t=i,n=zl(e,i))}if(n===1)throw n=hl,ql(e,0),Hl(e,t),Ll(e,Dt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,nu(e,bl,Cl),Ll(e,Dt()),null}function Wl(e,t){var n=cl;cl|=1;try{return e(t)}finally{cl=n,cl===0&&(Sl=Dt()+500,va&&Sa())}}function Gl(e){Ol!==null&&Ol.tag===0&&!(cl&6)&&iu();var t=cl;cl|=1;var n=sl.transition,r=Qt;try{if(sl.transition=null,Qt=1,e)return e()}finally{Qt=r,sl.transition=n,cl=t,!(cl&6)&&Sa()}}function Kl(){fl=pl.current,aa(pl)}function ql(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ri(n)),ul!==null)for(n=ul.return;n!==null;){var r=n;switch(Fa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&fa();break;case 3:jo(),aa(la),aa(ca),Lo();break;case 5:No(r);break;case 4:jo();break;case 13:aa(Po);break;case 19:aa(Po);break;case 10:so(r.type._context);break;case 22:case 23:Kl()}n=n.return}if(ll=e,ul=e=_u(e.current,null),dl=fl=t,ml=0,hl=null,vl=_l=gl=0,bl=yl=null,fo!==null){for(t=0;t<fo.length;t++)if(n=fo[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}fo=null}return e}function Jl(e,t){do{var n=ul;try{if(oo(),Ro.current=Ms,Wo){for(var i=Vo.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Wo=!1}if(Bo=0,Uo=Ho=Vo=null,Go=!1,Ko=0,ol.current=null,n===null||n.return===null){ml=1,hl=t,ul=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=dl,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Xs(s);if(m!==null){m.flags&=-257,Zs(m,s,c,o,t),m.mode&1&&Ys(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}if(!(t&1)){Ys(o,u,t),Xl();break a}l=Error(r(426))}else if(Ra&&c.mode&1){var _=Xs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Zs(_,s,c,o,t),Ja(Us(l,c));break a}}o=l=Us(l,c),ml!==4&&(ml=2),yl===null?yl=[o]:yl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=qs(o,l,t);So(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(El===null||!El.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Js(o,c,t);So(o,x);break a}}o=o.return}while(o!==null)}tu(n)}catch(e){t=e,ul===n&&n!==null&&(ul=n=n.return);continue}break}while(1)}function Yl(){var e=al.current;return al.current=Ms,e===null?Ms:e}function Xl(){(ml===0||ml===3||ml===2)&&(ml=4),ll===null||!(gl&268435455)&&!(_l&268435455)||Hl(ll,dl)}function Zl(e,t){var n=cl;cl|=2;var i=Yl();(ll!==e||dl!==t)&&(Cl=null,ql(e,t));do try{Ql();break}catch(t){Jl(e,t)}while(1);if(oo(),cl=n,al.current=i,ul!==null)throw Error(r(261));return ll=null,dl=0,ml}function Ql(){for(;ul!==null;)eu(ul)}function $l(){for(;ul!==null&&!Tt();)eu(ul)}function eu(e){var t=du(e.alternate,e,fl);e.memoizedProps=e.pendingProps,t===null?tu(e):ul=t,ol.current=null}function tu(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Oc(n,t),n!==null){n.flags&=32767,ul=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ml=6,ul=null;return}}else if(n=Dc(n,t,fl),n!==null){ul=n;return}if(t=t.sibling,t!==null){ul=t;return}ul=t=e}while(t!==null);ml===0&&(ml=5)}function nu(e,t,n){var r=Qt,i=sl.transition;try{sl.transition=null,Qt=1,ru(e,t,n,r)}finally{sl.transition=i,Qt=r}return null}function ru(e,t,n,i){do iu();while(Ol!==null);if(cl&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Xt(e,o),e===ll&&(ul=ll=null,dl=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Dl||(Dl=!0,fu(jt,function(){return iu(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=sl.transition,sl.transition=null;var s=Qt;Qt=1;var c=cl;cl|=4,ol.current=null,Ic(e,n),Zc(n,e),Jr(Fi),Tn=!!Pi,Fi=Pi=null,e.current=n,$c(n,e,a),Et(),cl=c,Qt=s,sl.transition=o}else e.current=n;if(Dl&&(Dl=!1,Ol=e,kl=a),o=e.pendingLanes,o===0&&(El=null),Ft(n.stateNode,i),Ll(e,Dt()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(wl)throw wl=!1,e=Tl,Tl=null,e;return kl&1&&e.tag!==0&&iu(),o=e.pendingLanes,o&1?e===jl?Al++:(Al=0,jl=e):Al=0,Sa(),null}function iu(){if(Ol!==null){var e=$t(kl),t=sl.transition,n=Qt;try{if(sl.transition=null,Qt=16>e?16:e,Ol===null)var i=!1;else{if(e=Ol,Ol=null,kl=0,cl&6)throw Error(r(331));var a=cl;for(cl|=4,Mc=e.current;Mc!==null;){var o=Mc,s=o.child;if(Mc.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(Mc=u;Mc!==null;){var d=Mc;switch(d.tag){case 0:case 11:case 15:Lc(8,d,o)}var f=d.child;if(f!==null)f.return=d,Mc=f;else for(;Mc!==null;){d=Mc;var p=d.sibling,m=d.return;if(Bc(d),d===u){Mc=null;break}if(p!==null){p.return=m,Mc=p;break}Mc=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}Mc=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Mc=s;else b:for(;Mc!==null;){if(o=Mc,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Lc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,Mc=v;break b}Mc=o.return}}var y=e.current;for(Mc=y;Mc!==null;){s=Mc;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,Mc=b;else b:for(s=y;Mc!==null;){if(c=Mc,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Rc(9,c)}}catch(e){ou(c,c.return,e)}if(c===s){Mc=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,Mc=x;break b}Mc=c.return}}if(cl=a,Sa(),Pt&&typeof Pt.onPostCommitFiberRoot==`function`)try{Pt.onPostCommitFiberRoot(Nt,e)}catch{}i=!0}return i}finally{Qt=n,sl.transition=t}}return!1}function au(e,t,n){t=Us(n,t),t=qs(e,t,1),e=bo(e,t,1),t=Pl(),e!==null&&(Yt(e,1,t),Ll(e,t))}function ou(e,t,n){if(e.tag===3)au(e,e,n);else for(;t!==null;){if(t.tag===3){au(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(El===null||!El.has(r))){e=Us(n,e),e=Js(t,e,1),t=bo(t,e,1),e=Pl(),t!==null&&(Yt(t,1,e),Ll(t,e));break}}t=t.return}}function su(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Pl(),e.pingedLanes|=e.suspendedLanes&n,ll===e&&(dl&n)===n&&(ml===4||ml===3&&(dl&130023424)===dl&&500>Dt()-xl?ql(e,0):vl|=n),Ll(e,t)}function cu(e,t){t===0&&(e.mode&1?(t=Vt,Vt<<=1,!(Vt&130023424)&&(Vt=4194304)):t=1);var n=Pl();e=ho(e,t),e!==null&&(Yt(e,t,n),Ll(e,n))}function lu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cu(e,n)}function uu(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),cu(e,n)}var du=function(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps||la.current)$s=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return $s=!1,xc(e,t,n);$s=!!(e.flags&131072)}}else $s=!1,Ra&&t.flags&1048576&&Na(t,Ea,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;yc(e,t),e=t.pendingProps;var a=A(t,ca.current);lo(t,n),a=Xo(null,t,i,e,a,n);var o=Zo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,da(i)?(o=!0,ha(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,_o(t),a.updater=Rs,t.stateNode=a,a._reactInternals=t,Hs(t,i,e,n),t=cc(null,t,i,!0,o,n)):(t.tag=0,Ra&&o&&Pa(t),ec(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(yc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=gu(i),e=Is(i,e),a){case 0:t=oc(null,t,i,e,n);break a;case 1:t=sc(null,t,i,e,n);break a;case 11:t=tc(null,t,i,e,n);break a;case 14:t=nc(null,t,i,Is(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Is(i,a),oc(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Is(i,a),sc(e,t,i,a,n);case 3:a:{if(j(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,vo(e,t),Co(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Us(Error(r(423)),t),t=lc(e,t,i,n,a);break a}if(i!==a){a=Us(Error(r(424)),t),t=lc(e,t,i,n,a);break a}for(La=Ui(t.stateNode.containerInfo.firstChild),Ia=t,Ra=!0,za=null,n=to(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(qa(),i===a){t=bc(e,t,n);break a}ec(e,t,i,n)}t=t.child}return t;case 5:return Mo(t),e===null&&Ua(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ii(i,a)?s=null:o!==null&&Ii(i,o)&&(t.flags|=32),ac(e,t),ec(e,t,s,n),t.child;case 6:return e===null&&Ua(t),null;case 13:return fc(e,t,n);case 4:return Ao(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=eo(t,null,i,n):ec(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Is(i,a),tc(e,t,i,a,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,oa(no,i._currentValue),i._currentValue=s,o!==null){if(Vr(o.value,s)){if(o.children===a.children&&!la.current){t=bc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=yo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),co(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),co(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}}ec(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,lo(t,n),a=uo(a),i=i(a),t.flags|=1,ec(e,t,i,n),t.child;case 14:return i=t.type,a=Is(i,t.pendingProps),a=Is(i.type,a),nc(e,t,i,a,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Is(i,a),yc(e,t),t.tag=1,da(i)?(e=!0,ha(t)):e=!1,lo(t,n),Bs(t,i,a),Hs(t,i,a,n),cc(null,t,i,!0,e,n);case 19:return vc(e,t,n);case 22:return ic(e,t,n)}throw Error(r(156,t.tag))};function fu(e,t){return Ct(e,t)}function pu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mu(e,t,n,r){return new pu(e,t,n,r)}function hu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gu(e){if(typeof e==`function`)return+!!hu(e);if(e!=null){if(e=e.$$typeof,e===ne)return 11;if(e===ae)return 14}return 2}function _u(e,t){var n=e.alternate;return n===null?(n=mu(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)hu(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case T:return yu(n.children,a,o,t);case E:s=8,a|=8;break;case ee:return e=mu(12,n,t,a|2),e.elementType=ee,e.lanes=o,e;case re:return e=mu(13,n,t,a),e.elementType=re,e.lanes=o,e;case ie:return e=mu(19,n,t,a),e.elementType=ie,e.lanes=o,e;case se:return bu(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case D:s=10;break a;case te:s=9;break a;case ne:s=11;break a;case ae:s=14;break a;case oe:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=mu(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function yu(e,t,n,r){return e=mu(7,e,r,t),e.lanes=n,e}function bu(e,t,n,r){return e=mu(22,e,r,t),e.elementType=se,e.lanes=n,e.stateNode={isHidden:!1},e}function xu(e,t,n){return e=mu(6,e,null,t),e.lanes=n,e}function Su(e,t,n){return t=mu(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Cu(e,t,n,r,i){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=Jt(0),this.expirationTimes=Jt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function wu(e,t,n,r,i,a,o,s,c){return e=new Cu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=mu(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},_o(a),e}function Tu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function Eu(e){if(!e)return sa;e=e._reactInternals;a:{if(_t(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(da(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(da(n))return ma(e,n,t)}return t}function Du(e,t,n,r,i,a,o,s,c){return e=wu(n,r,!0,e,i,a,o,s,c),e.context=Eu(null),n=e.current,r=Pl(),i=Fl(n),a=yo(r,i),a.callback=t??null,bo(n,a,i),e.current.lanes=i,Yt(e,i,r),Ll(e,r),e}function Ou(e,t,n,r){var i=t.current,a=Pl(),o=Fl(i);return n=Eu(n),t.context===null?t.context=n:t.pendingContext=n,t=yo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=bo(i,t,o),e!==null&&(Il(e,i,o,a),xo(e,i,o)),o}function ku(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 Au(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ju(e,t){Au(e,t),(e=e.alternate)&&Au(e,t)}function Mu(){return null}var Nu=typeof reportError==`function`?reportError:function(e){console.error(e)};function Pu(e){this._internalRoot=e}Fu.prototype.render=Pu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));Ou(e,t,null,null)},Fu.prototype.unmount=Pu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gl(function(){Ou(null,e,null,null)}),t[Ji]=null}};function Fu(e){this._internalRoot=e}Fu.prototype.unstable_scheduleHydration=function(e){if(e){var t=rn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mn.length&&t!==0&&t<mn[n].priority;n++);mn.splice(n,0,e),n===0&&vn(e)}};function Iu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Lu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function Ru(){}function zu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=ku(o);a.call(e)}}var o=Du(t,r,e,0,null,!1,!1,``,Ru);return e._reactRootContainer=o,e[Ji]=o.current,Si(e.nodeType===8?e.parentNode:e),Gl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=ku(c);s.call(e)}}var c=wu(e,0,!1,null,null,!1,!1,``,Ru);return e._reactRootContainer=c,e[Ji]=c.current,Si(e.nodeType===8?e.parentNode:e),Gl(function(){Ou(t,c,n,r)}),c}function Bu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=ku(o);s.call(e)}}Ou(t,o,e,i)}else o=zu(n,t,e,i,r);return ku(o)}en=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ht(t.pendingLanes);n!==0&&(Zt(t,n|1),Ll(t,Dt()),!(cl&6)&&(Sl=Dt()+500,Sa()))}break;case 13:Gl(function(){var t=ho(e,1);t!==null&&Il(t,e,1,Pl())}),ju(e,1)}},tn=function(e){if(e.tag===13){var t=ho(e,134217728);t!==null&&Il(t,e,134217728,Pl()),ju(e,134217728)}},nn=function(e){if(e.tag===13){var t=Fl(e),n=ho(e,t);n!==null&&Il(n,e,t,Pl()),ju(e,t)}},rn=function(){return Qt},an=function(e,t){var n=Qt;try{return Qt=e,t()}finally{Qt=n}},Xe=function(e,t,n){switch(t){case`input`:if(De(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=ta(i);if(!a)throw Error(r(90));Se(i),De(i,a)}}}break;case`textarea`:Pe(e,n);break;case`select`:t=n.value,t!=null&&je(e,!!n.multiple,t,!1)}},nt=Wl,rt=Gl;var Vu={usingClientEntryPoint:!1,Events:[$i,ea,ta,et,tt,Wl]},Hu={findFiberByHostInstance:Qi,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Uu={bundleType:Hu.bundleType,version:Hu.version,rendererPackageName:Hu.rendererPackageName,rendererConfig:Hu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xt(e),e===null?null:e.stateNode},findFiberByHostInstance:Hu.findFiberByHostInstance||Mu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};
9if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wu.isDisabled&&Wu.supportsFiber)try{Nt=Wu.inject(Uu),Pt=Wu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Iu(t))throw Error(r(200));return Tu(e,t,null,n)},e.createRoot=function(e,t){if(!Iu(e))throw Error(r(299));var n=!1,i=``,a=Nu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=wu(e,1,!1,null,null,n,!1,i,a),e[Ji]=t.current,Si(e.nodeType===8?e.parentNode:e),new Pu(t)},e.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(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=xt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Gl(e)},e.hydrate=function(e,t,n){if(!Lu(t))throw Error(r(200));return Bu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Iu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=Nu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Du(t,null,e,1,n??null,a,!1,o,s),e[Ji]=t.current,Si(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Fu(t)},e.render=function(e,t,n){if(!Lu(t))throw Error(r(200));return Bu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Lu(e))throw Error(r(40));return e._reactRootContainer?(Gl(function(){Bu(null,null,e,!1,function(){e._reactRootContainer=null,e[Ji]=null})}),!0):!1},e.unstable_batchedUpdates=Wl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Lu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Bu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),pn=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=fn()})),mn=t(pn(),1),hn=Object.defineProperty,gn=(e,t)=>hn(e,`name`,{value:t,configurable:!0}),_n=!!(typeof window<`u`&&window.document&&window.document.createElement);function k(e,t,{checkForDefaultPrevented:n=!0}={}){return gn(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}gn(k,`composeEventHandlers`);function vn(e){if(!_n)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}gn(vn,`getOwnerWindow`);function yn(e){if(!_n)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}gn(yn,`getOwnerDocument`);function bn(e,t=!1){let{activeElement:n}=yn(e);if(!n?.nodeName)return null;if(xn(n)&&n.contentDocument)return bn(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=yn(n).getElementById(e);if(t)return t}}return n}gn(bn,`getActiveElement`);function xn(e){return e.tagName===`IFRAME`}gn(xn,`isFrame`);var Sn=Object.defineProperty,Cn=(e,t)=>Sn(e,`name`,{value:t,configurable:!0});function wn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Cn(wn,`setRef`);function Tn(...e){return t=>{let n=!1,r=e.map(e=>{let r=wn(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():wn(e[t],null)}}}}Cn(Tn,`composeRefs`);function En(...e){return c.useCallback(Tn(...e),e)}Cn(En,`useComposedRefs`);var Dn=Object.defineProperty,On=(e,t)=>Dn(e,`name`,{value:t,configurable:!0});function kn(e,t){let n=c.createContext(t);n.displayName=e+`Context`;let r=On(e=>{let{children:t,...r}=e,i=c.useMemo(()=>r,Object.values(r));return(0,O.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=c.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return On(i,`useContext`),[r,i]}On(kn,`createContext`);function An(e,t=[]){let n=[];function r(t,r){let i=c.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=On(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,l=c.useMemo(()=>o,Object.values(o));return(0,O.jsx)(s.Provider,{value:l,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:l=!1}=s,u=o?.[e]?.[a]||i,d=c.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return On(s,`useContext`),[o,s]}On(r,`createContext`);let i=On(()=>{let t=n.map(e=>c.createContext(e));return On(function(n){let r=n?.[e]||t;return c.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,jn(i,...t)]}On(An,`createContextScope`);function jn(...e){let t=e[0];if(e.length===1)return t;let n=On(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return On(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}On(jn,`composeContextScopes`);var Mn=Object.defineProperty,Nn=(e,t)=>Mn(e,`name`,{value:t,configurable:!0});
9function Pn(e){let t=c.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Un(r)&&typeof qn==`function`&&(r=qn(r._payload)),c.Children.forEach(r,e=>{if(Vn(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Un(n)&&typeof qn==`function`&&(n=qn(n._payload)),a=Rn(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=c.cloneElement(a,void 0,s):!o&&c.Children.count(r)===1&&c.isValidElement(r)&&(a=r);let l=a?Bn(a):void 0,u=En(n,l);if(!a){if(r||r===0)throw Error(o?Kn(e):Gn(e));return r}let d=zn(i,a.props??{});return a.type!==c.Fragment&&(d.ref=n?u:l),c.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}Nn(Pn,`createSlot`);var Fn=Pn(`Slot`),In=Symbol.for(`radix.slottable`);function Ln(e){let t=Nn(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=In,t}Nn(Ln,`createSlottable`);var Rn=Nn((e,t)=>{if(`child`in e.props){let t=e.props.child;return c.isValidElement(t)?c.cloneElement(t,void 0,e.props.children(t.props.children)):null}return c.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function zn(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}Nn(zn,`mergeProps`);function Bn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Nn(Bn,`getElementRef`);function Vn(e){return c.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===In}Nn(Vn,`isSlottable`);var Hn=Symbol.for(`react.lazy`);function Un(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Hn&&`_payload`in e&&Wn(e._payload)}Nn(Un,`isLazyComponent`);function Wn(e){return typeof e==`object`&&!!e&&`then`in e}Nn(Wn,`isPromiseLike`);var Gn=Nn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Kn=Nn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),qn=c.use,Jn=Object.defineProperty,Yn=(e,t)=>Jn(e,`name`,{value:t,configurable:!0});function Xn(e){let t=e+`CollectionProvider`,[n,r]=An(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Yn(e=>{let{scope:t,children:n}=e,r=c.useRef(null),a=c.useRef(new Map).current;return(0,O.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,l=Pn(s),u=c.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=En(t,a(s,n).collectionRef);return(0,O.jsx)(l,{ref:i,children:r})});u.displayName=s;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=Pn(d),m=c.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=c.useRef(null),s=En(t,o),l=a(d,n);return c.useEffect(()=>(l.itemMap.set(o,{ref:o,...i}),()=>void l.itemMap.delete(o))),(0,O.jsx)(p,{[f]:``,ref:s,children:r})});m.displayName=d;function h(t){let n=a(e+`CollectionConsumer`,t);return c.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Yn(h,`useCollection`),[{Provider:o,Slot:u,ItemSlot:m},h,r]}Yn(Xn,`createCollection`);var Zn=new WeakMap,Qn=class e extends Map{static{Yn(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Zn.set(this,!0)}set(e,t){return Zn.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=tr(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=$n(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=$n(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return $n(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}
9}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function $n(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=er(e,t);return n===-1?void 0:e[n]}Yn($n,`at`);function er(e,t){let n=e.length,r=tr(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Yn(er,`toSafeIndex`);function tr(e){return e!==e||e===0?0:Math.trunc(e)}Yn(tr,`toSafeInteger`);function nr(e){let t=e+`CollectionProvider`,[n,r]=An(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Qn,setItemMap:Yn(()=>void 0,`setItemMap`)}),o=Yn(({state:e,...t})=>e?(0,O.jsx)(l,{...t,state:e}):(0,O.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=Yn(e=>{let t=g();return(0,O.jsx)(l,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let l=Yn(e=>{let{scope:t,children:n,state:r}=e,a=c.useRef(null),[o,s]=c.useState(null),l=En(a,s),[u,d]=r;return c.useEffect(()=>{if(!o)return;let e=or(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,O.jsx)(i,{scope:t,itemMap:u,setItemMap:d,collectionRef:l,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);l.displayName=t+`Impl`;let u=e+`CollectionSlot`,d=Pn(u),f=c.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=En(t,a(u,n).collectionRef);return(0,O.jsx)(d,{ref:i,children:r})});f.displayName=u;let p=e+`CollectionItemSlot`,m=Pn(p),h=c.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=c.useRef(null),[s,l]=c.useState(null),u=En(t,o,l),{setItemMap:d}=a(p,n),f=c.useRef(i);rr(f.current,i)||(f.current=i);let h=f.current;return c.useEffect(()=>{let e=h;return d(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(ar):(t.set(s,{...e,element:s}),t.toSorted(ar)):t),()=>{d(e=>!s||!e.has(s)?e:(e.delete(s),new Qn(e)))}},[s,h,d]),(0,O.jsx)(m,{"data-radix-collection-item":``,ref:u,children:r})});h.displayName=p;function g(){return c.useState(new Qn)}Yn(g,`useInitCollection`);function _(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return Yn(_,`useCollection`),[{Provider:o,Slot:f,ItemSlot:h},{createCollectionScope:r,useCollection:_,useInitCollection:g}]}Yn(nr,`createCollection`);function rr(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Yn(rr,`shallowEqual`);function ir(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Yn(ir,`isElementPreceding`);function ar(e,t){return!e[1].element||!t[1].element?0:ir(e[1].element,t[1].element)?-1:1}Yn(ar,`sortByDocumentPosition`);function or(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Yn(or,`getChildListObserver`);var sr=Object.defineProperty,cr=(e,t)=>sr(e,`name`,{value:t,configurable:!0}),lr=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>
9{let n=Pn(`Primitive.${t}`),r=c.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,O.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ur(e,t){e&&mn.flushSync(()=>e.dispatchEvent(t))}cr(ur,`dispatchDiscreteCustomEvent`);var dr=Object.defineProperty,fr=(e,t)=>dr(e,`name`,{value:t,configurable:!0});function pr(e){let t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}fr(pr,`useCallbackRef`);var mr=Object.defineProperty,hr=(e,t)=>mr(e,`name`,{value:t,configurable:!0}),gr=`dismissableLayer.update`,_r=`dismissableLayer.pointerDownOutside`,vr=`dismissableLayer.focusOutside`,yr,br=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),xr=c.forwardRef(hr(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...u}=e,d=c.useContext(br),[f,p]=c.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=c.useState({}),g=En(t,p),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,b=f?_.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=c.useRef(!1),w=Tr(e=>{a?.(e),s?.(e),e.defaultPrevented||l?.()},{ownerDocument:m,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:c.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...d.branches].some(t=>t.contains(e));return S&&!t},[d.branches,S])}),T=Er(e=>{if(r&&C.current)return;let t=e.target;[...d.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||l?.())},m),E=f?b===_.length-1:!1,ee=pr(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return c.useEffect(()=>{if(E)return m.addEventListener(`keydown`,ee,{capture:!0}),()=>m.removeEventListener(`keydown`,ee,{capture:!0})},[m,E,ee]),c.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(yr=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Dr(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=yr))}},[f,m,n,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Dr())},[f,d]),c.useEffect(()=>{let e=hr(()=>h({}),`handleUpdate`);return document.addEventListener(gr,e),()=>document.removeEventListener(gr,e)},[]),(0,O.jsx)(lr.div,{...u,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:k(e.onFocusCapture,T.onFocusCapture),onBlurCapture:k(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:k(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`)),Sr=c.forwardRef(hr(function(e,t){let n=c.useContext(br),r=c.useRef(null),i=En(t,r);return c.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,O.jsx)(lr.div,{...e,ref:i})},`DismissableLayerBranch`));function Cr(){let e=c.useContext(br),[t,n]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}hr(Cr,`useDismissableLayerSurface`);var wr=hr(()=>!0,`IS_TRUE`);function Tr(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=wr}=t,s=pr(e),l=c.useRef(!1),u=c.useRef(!1),d=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}hr(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}hr(t,`isOutsideInteractionIntercepted`);function c(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}hr(c,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}hr(p,`handleInteractionBubble`);let m=hr(a=>{if(a.target&&!l.current){let c=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||Or(_r,s,p,{discrete:!0})};if(hr(c,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(
9),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?c():(n.removeEventListener(`click`,f.current),f.current=c,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,c,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,c,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:hr(()=>l.current=!0,`onPointerDownCapture`)}}hr(Tr,`usePointerDownOutside`);function Er(e,t=globalThis?.document){let n=pr(e),r=c.useRef(!1);return c.useEffect(()=>{let e=hr(e=>{e.target&&!r.current&&Or(vr,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:hr(()=>r.current=!0,`onFocusCapture`),onBlurCapture:hr(()=>r.current=!1,`onBlurCapture`)}}hr(Er,`useFocusOutside`);function Dr(){let e=new CustomEvent(gr);document.dispatchEvent(e)}hr(Dr,`dispatchUpdate`);function Or(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ur(i,a):i.dispatchEvent(a)}hr(Or,`handleAndDispatchCustomEvent`);var kr=xr,Ar=Sr,jr=globalThis?.document?c.useLayoutEffect:()=>{},Mr=Object.defineProperty,Nr=c.forwardRef(((e,t)=>Mr(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=c.useState(!1);jr(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?mn.createPortal((0,O.jsx)(lr.div,{...r,ref:t}),o):null},`Portal`)),Pr=Object.defineProperty,Fr=(e,t)=>Pr(e,`name`,{value:t,configurable:!0});function Ir(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}Fr(Ir,`useStateMachine`);var Lr=Fr(e=>{let{present:t,children:n}=e,r=Rr(t),i=typeof n==`function`?n({present:r.isPresent}):c.Children.only(n),a=Br(r.ref,Hr(i));return typeof n==`function`||r.isPresent?c.cloneElement(i,{ref:a}):null},`Presence`);function Rr(e){let[t,n]=c.useState(),r=c.useRef(null),i=c.useRef(e),a=c.useRef(`none`),o=c.useRef(void 0),[s,l]=Ir(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return c.useEffect(()=>{s===`mounted`?(a.current=o.current??Vr(r.current),o.current=void 0):a.current=`none`},[s]),jr(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Vr(t);e?(o.current=s,l(`MOUNT`)):s===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),jr(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Fr(a=>{let o=Vr(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Fr(e=>{e.target===t&&(a.current=Vr(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:c.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Vr(t)}else r.current=null;n(e)},[])}}Fr(Rr,`usePresence`);function zr(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Fr(zr,`setRef`);function Br(...e){let t=c.useRef(e);return t.current=e,c.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=zr(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():zr(n[e],null)}}},[])}Fr(Br,`useStableComposedRefs`);function Vr(e){return e?.animationName||`none`}Fr(Vr,`getAnimationName`);function Hr(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Fr(Hr,`getElementRef`);var Ur=Object.defineProperty,Wr=(e,t)=>Ur(e,`name`,{value:t,configurable:!0}),Gr=c.useEffectEvent,Kr=c.useInsertionEffect;function qr(e){if(typeof Gr==`function`)return Gr(e);let t=c.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Kr==`function`?Kr(()=>{t.current=e}):jr(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}Wr(qr,`useEffectEvent`);var Jr=Object.defineProperty,Yr=(e,t)=>Jr(e,`name`,{value:t,configurable:!0}),Xr=c.useInsertionEffect||jr;function Zr({prop:e,defaultProp:t,onChange:n=Yr(()=>{},`onChange`),caller:r}){let[i,a,o]=Qr({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,c.useCallback(t=>{if(s){let n=$r(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Yr(Zr,`useControllableState`);function Qr({defaultProp:e,onChange:t}){let[n,r]=c.useState(e),i=c.useRef(n),a=c.useRef(t);return Xr(()=>{a.current=t},[t]),c.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Yr(Qr,`useUncontrolledState`);function $r(e){return typeof e==`function`}Yr($r,`isFunction`);var ei=Symbol(`RADIX:SYNC_STATE`);function ti(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,l=i!==void 0,u=qr(o),d=[{...n,state:a}];r&&d.push(r);let[f,p]=c.useReducer((t,n)=>{if(n.type===ei)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=c.useRef(m);c.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=c.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return c.useEffect(()=>{l&&!Object.is(i,f.state)&&p({type:ei,state:i})},[i,f.state,l]),[g,p]}Yr(ti,`useControllableStateReducer`);var ni=Object.defineProperty,ri=(e,t)=>ni(e,`name`,{value:t,configurable:!0}),ii=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),ai=c.forwardRef(ri(function(e,t){return(0,O.jsx)(lr.span,{...e,ref:t,style:{...ii,...e.style}})},`VisuallyHidden`)),oi=ai,si=Object.defineProperty,ci=(e,t)=>si(e,`name`,{value:t,configurable:!0}),li=`ToastProvider`,[ui,di,fi]=Xn(`Toast`),[pi,mi]=An(`Toast`,[fi]),[hi,gi]=pi(li),_i=ci(e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,announcerContainer:o,children:s}=e,[l,u]=c.useState(null),[d,f]=c.useState(0),p=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${li}\`. Expected non-empty \`string\`.`),(0,O.jsx)(ui.Provider,{scope:t,children:(0,O.jsx)(hi,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:d,viewport:l,onViewportChange:u,onToastAdd:c.useCallback(()=>f(e=>e+1),[]),onToastRemove:c.useCallback(()=>f(e=>e-1),[]),isClosePausedRef:p,announcerContainer:o,children:s})})},`ToastProvider`),vi=`ToastViewport`,yi=[`F8`],bi=`toast.viewportPause`,xi=`toast.viewportResume`,Si=c.forwardRef(ci(function(e,t){let{__scopeToast:n,hotkey:r=yi,label:i=`Notifications ({hotkey})`,...a}=e,o=gi(vi,n),s=di(n),l=c.useRef(null),u=c.useRef(null),d=c.useRef(null),f=c.useRef(null),p=En(t,f,o.onViewportChange),m=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),h=o.toastCount>0;c.useEffect(()=>{let e=ci(e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&f.current?.focus()},`handleKeyDown`);
9return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),c.useEffect(()=>{let e=l.current,t=f.current;if(h&&e&&t){let n=ci(()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(bi);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},`handlePause`),r=ci(()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(xi);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},`handleResume`),i=ci(t=>{e.contains(t.relatedTarget)||r()},`handleFocusOutResume`),a=ci(()=>{e.contains(document.activeElement)||r()},`handlePointerLeaveResume`);return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[h,o.isClosePausedRef]);let g=c.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...qi(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return c.useEffect(()=>{let e=f.current;if(e){let t=ci(t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){u.current?.focus();return}let i=g({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Ji(i.slice(a+1))?t.preventDefault():r?u.current?.focus():d.current?.focus()}},`handleKeyDown`);return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,g]),(0,O.jsxs)(Ar,{ref:l,role:`region`,"aria-label":i.replace(`{hotkey}`,m),tabIndex:-1,style:{pointerEvents:h?void 0:`none`},children:[h&&(0,O.jsx)(wi,{ref:u,onFocusFromOutsideViewport:()=>{Ji(g({tabbingDirection:`forwards`}))}}),(0,O.jsx)(ui.Slot,{scope:n,children:(0,O.jsx)(lr.ol,{tabIndex:-1,...a,ref:p})}),h&&(0,O.jsx)(wi,{ref:d,onFocusFromOutsideViewport:()=>{Ji(g({tabbingDirection:`backwards`}))}})]})},`ToastViewport`)),Ci=`ToastFocusProxy`,wi=c.forwardRef(ci(function(e,t){let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=gi(Ci,n);return(0,O.jsx)(ai,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})},`ToastFocusProxy`)),Ti=`Toast`,Ei=`toast.swipeStart`,Di=`toast.swipeMove`,Oi=`toast.swipeCancel`,ki=`toast.swipeEnd`,Ai=c.forwardRef(ci(function(e,t){let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=Zr({prop:r,defaultProp:i??!0,onChange:a,caller:Ti});return(0,O.jsx)(Lr,{present:n||s,children:(0,O.jsx)(Ni,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:pr(e.onPause),onResume:pr(e.onResume),onSwipeStart:k(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:k(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:k(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:k(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})},`Toast`)),[ji,Mi]=pi(Ti,{onClose(){}}),Ni=c.forwardRef(ci(function(e,t){let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:m,...h}=e,g=gi(Ti,n),_=di(n),[v,y]=c.useState(null),b=En(t,y),x=c.useRef(null),S=c.useRef(null),C=i||g.duration,w=c.useRef(0),T=c.useRef(C),E=c.useRef(0),{onToastAdd:ee,onToastRemove:D}=g,te=pr(()=>{v?.contains(document.activeElement)&&g.viewport?.focus(),o()}),ne=c.useCallback(e=>
9{e&&e!==1/0&&(window.clearTimeout(E.current),w.current=new Date().getTime(),E.current=window.setTimeout(te,e))},[te]);c.useEffect(()=>{let e=g.viewport;if(e){let t=ci(()=>{ne(T.current),u?.()},`handleResume`),n=ci(()=>{let e=new Date().getTime()-w.current;T.current-=e,window.clearTimeout(E.current),l?.()},`handlePause`);return e.addEventListener(bi,n),e.addEventListener(xi,t),()=>{e.removeEventListener(bi,n),e.removeEventListener(xi,t)}}},[g.viewport,C,l,u,ne]),c.useEffect(()=>{a&&!g.isClosePausedRef.current&&ne(C)},[a,C,g.isClosePausedRef,ne]),c.useEffect(()=>()=>{window.clearTimeout(E.current)},[]),c.useEffect(()=>(ee(),()=>D()),[ee,D]);let re=c.useMemo(()=>v?Hi(v):null,[v]);return g.viewport?(0,O.jsxs)(O.Fragment,{children:[re&&(0,O.jsx)(Pi,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:re}),(0,O.jsx)(ji,{scope:n,onClose:te,children:mn.createPortal((0,O.jsx)(ui.ItemSlot,{scope:n,children:(0,O.jsx)(kr,{asChild:!0,onEscapeKeyDown:k(s,e=>{_().some(t=>t.ref.current?.contains(e.target))||te()}),children:(0,O.jsx)(lr.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":g.swipeDirection,...h,ref:b,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:k(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||te())}),onPointerDown:k(e.onPointerDown,e=>{e.button===0&&(x.current={x:e.clientX,y:e.clientY})}),onPointerMove:k(e.onPointerMove,e=>{if(!x.current)return;let t=e.clientX-x.current.x,n=e.clientY-x.current.y,r=!!S.current,i=[`left`,`right`].includes(g.swipeDirection),a=[`left`,`up`].includes(g.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},u={originalEvent:e,delta:l};r?(S.current=l,Ui(Di,f,u,{discrete:!1})):Wi(l,g.swipeDirection,c)?(S.current=l,Ui(Ei,d,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(x.current=null)}),onPointerUp:k(e.onPointerUp,e=>{let t=S.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),S.current=null,x.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};Wi(t,g.swipeDirection,g.swipeThreshold)?Ui(ki,m,r,{discrete:!0}):Ui(Oi,p,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null},`ToastImpl`)),Pi=ci(e=>{let{__scopeToast:t,children:n,...r}=e,i=gi(Ti,t),[a,o]=c.useState(!1),[s,l]=c.useState(!1);return Gi(()=>o(!0)),c.useEffect(()=>{let e=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,O.jsx)(Nr,{asChild:!0,container:i.announcerContainer||void 0,children:(0,O.jsx)(ai,{...r,children:a&&(0,O.jsxs)(O.Fragment,{children:[i.label,` `,n]})})})},`ToastAnnounce`),Fi=c.forwardRef(ci(function(e,t){let{__scopeToast:n,...r}=e;return(0,O.jsx)(lr.div,{...r,ref:t})},`ToastTitle`)),Ii=c.forwardRef(ci(function(e,t){let{__scopeToast:n,...r}=e;return(0,O.jsx)(lr.div,{...r,ref:t})},`ToastDescription`)),Li=`ToastAction`,Ri=c.forwardRef(ci(function(e,t){let{altText:n,...r}=e;return n.trim()?(0,O.jsx)(Vi,{altText:n,asChild:!0,children:(0,O.jsx)(Bi,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Li}\`. Expected non-empty \`string\`.`),null)},`ToastAction`)),zi=`ToastClose`,Bi=c.forwardRef(ci(function(e,t){let{__scopeToast:n,...r}=e,i=Mi(zi,n);return(0,O.jsx)(Vi,{asChild:!0,children:(0,O.jsx)(lr.button,{type:`button`,...r,ref:t,onClick:k(e.onClick,i.onClose)})})},`ToastClose`)),Vi=c.forwardRef(ci(function(e,t){let{__scopeToast:n,altText:r,...i}=e;return(0,O.jsx)(lr.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})},`ToastAnnounceExclude`));function Hi(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Ki(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n){if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Hi(e))}}}),t}ci(Hi,`getAnnounceTextContent`);function Ui(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ur(i,a):i.dispatchEvent(a)}ci(Ui,`handleAndDispatchCustomEvent`);var Wi=ci((e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n},`isDeltaInDirection`);function Gi(e=()=>{}){let t=pr(e);jr(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}ci(Gi,`useNextFrame`);
9function Ki(e){return e.nodeType===e.ELEMENT_NODE}ci(Ki,`isHTMLElement`);function qi(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ci(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}ci(qi,`getTabbableCandidates`);function Ji(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}ci(Ji,`focusFirst`);var Yi=_i,Xi=Si,Zi=Ai,Qi=Fi,$i=Ii,ea=Ri,ta=Bi;function na(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=na(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ra(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=na(e))&&(r&&(r+=` `),r+=t);return r}var ia=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,aa=ra,oa=(e,t)=>n=>{if(t?.variants==null)return aa(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=ia(t)||ia(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return aa(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},sa=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ca=(...e)=>e.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(` `),la={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`},ua=(0,c.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},l)=>(0,c.createElement)(`svg`,{ref:l,...la,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ca(`lucide`,i),...s},[...o.map(([e,t])=>(0,c.createElement)(e,t)),...Array.isArray(a)?a:[a]])),A=(e,t)=>{let n=(0,c.forwardRef)(({className:n,...r},i)=>(0,c.createElement)(ua,{ref:i,iconNode:t,className:ca(`lucide-${sa(e)}`,n),...r}));return n.displayName=`${e}`,n},da=A(`Activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),fa=A(`ArrowDown`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),pa=A(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),ma=A(`ArrowUpDown`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),ha=A(`ArrowUp`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),ga=A(`AudioWaveform`,[[`path`,{d:`M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2`,key:`57tc96`}]]),_a=A(`Award`,[[`path`,{d:`m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526`,key:`1yiouv`}],[`circle`,{cx:`12`,cy:`8`,r:`6`,key:`1vp47v`}]]),va=A(`BadgeCheck`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ya=A(`Bell`,[[`path`,{d:`M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9`,key:`1qo2s2`}],[`path`,{d:`M10.3 21a1.94 1.94 0 0 0 3.4 0`,key:`qgo35s`}]]),ba=A(`BookOpen`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),xa=A(`Book`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,ke
9y:`k3hazp`}]]),Sa=A(`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`}]]),Ca=A(`Briefcase`,[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]),wa=A(`Calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),Ta=A(`ChartColumn`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Ea=A(`ChartPie`,[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`,key:`pzmjnu`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`,key:`k2fpak`}]]),Da=A(`CheckCheck`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),Oa=A(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ka=A(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Aa=A(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ja=A(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ma=A(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Na=A(`ChevronsUpDown`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Pa=A(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Fa=A(`CircleCheckBig`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Ia=A(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),La=A(`CircleX`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Ra=A(`Circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),za=A(`Clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),Ba=A(`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`}]]),Va=A(`CornerDownLeft`,[[`polyline`,{points:`9 10 4 15 9 20`,key:`r3jprv`}],[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}]]),Ha=A(`Database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Ua=A(`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`}]]),Wa=A(`EllipsisVertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),Ga=A(`Ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Ka=A(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),qa=A(`EyeOff`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ja=A(`Eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Ya=A(`FileAudio`,[[`path`,{d:`M17.5 22h.5a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3`,key:`rslqgf`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M2 19a2 2 0 1 1 4 0v1a2 2 0 1 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 1 1-4 0v-1a2 2 0 1 1 4 0`,key:`9f7x3i`}]]),Xa=A(`FileChartColumnIncreasing`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M12 18v-4`,key:`q1q25u`}],[`path`,{d:`M16 18v-6`,key:`15y0np`}]]),Za=A(`FileCode2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m5 12-3 3 3 3`,key:`oke12k`}],[`path`,{d:`m9 18 3-3-3-3`,key:`112psh`}]]),Qa=A(`FileCode`,[[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z`,key:`1mlx9k`}]]),$a=A(`FileDown`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`m9 15 3 3 3-3`,key:`1npd3o`}]]),eo=A(`FileSpreadsheet`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),to=A(`FileText`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),no=A(`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`}]]),ro=A(`Gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),io=A(`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`}]]),ao=A(`GripVertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),oo=A(`HardDrive`,[[`line`,{x1:`22`,x2:`2`,y1:`12`,y2:`12`,key:`1y58io`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}],[`line`,{x1:`6`,x2:`6.01`,y1:`16`,y2:`16`,key:`sgf278`}],[`line`,{x1:`10`,x2:`10.01`,y1:`16`,y2:`16`,key:`1l4acy`}]]),so=A(`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`}]]),co=A(`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`}]]),lo=A(`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`}]]),uo=A(`Info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),fo=A(`Key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),po=A(`Laptop`,[[`path`,{d:`M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16`,key:`tarvll`}]]),mo=A(`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`}]]),ho=A(`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`}]]),go=A(`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`}]]),_o=A(`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`}]]),vo=A(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),yo=A(`Loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),bo=A(`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`}]]),xo=A(`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`}
9]]),So=A(`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`}]]),Co=A(`MapPin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),wo=A(`MessageCircle`,[[`path`,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,key:`vv11sd`}]]),To=A(`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`}]]),Eo=A(`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`}]]),Do=A(`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`}]]),Oo=A(`Moon`,[[`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,key:`a7tn18`}]]),ko=A(`Palette`,[[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z`,key:`12rzf8`}]]),Ao=A(`PanelLeft`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),jo=A(`PanelsTopLeft`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M9 21V9`,key:`1oto5p`}]]),Mo=A(`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`}]]),No=A(`Pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Po=A(`Pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Fo=A(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),Io=A(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Lo=A(`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`}]]),Ro=A(`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`}]]),zo=A(`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`}]]),Bo=A(`Rss`,[[`path`,{d:`M4 11a9 9 0 0 1 9 9`,key:`pv89mb`}],[`path`,{d:`M4 4a16 16 0 0 1 16 16`,key:`k0647b`}],[`circle`,{cx:`5`,cy:`19`,r:`1`,key:`bfqh0e`}]]),Vo=A(`Save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Ho=A(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),Uo=A(`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`}]]),Wo=A(`Share2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),Go=A(`ShieldAlert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Ko=A(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),qo=A(`Shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Jo=A(`Smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Yo=A(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}
9],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),Xo=A(`SquareCheckBig`,[[`path`,{d:`M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5`,key:`1uzm8b`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Zo=A(`Square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Qo=A(`StickyNote`,[[`path`,{d:`M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z`,key:`qazsjp`}],[`path`,{d:`M15 3v4a2 2 0 0 0 2 2h4`,key:`40519r`}]]),$o=A(`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`}]]),es=A(`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`}]]),ts=A(`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`}]]),ns=A(`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`}]]),rs=A(`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`}]]),is=A(`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`}]]),as=A(`Trophy`,[[`path`,{d:`M6 9H4.5a2.5 2.5 0 0 1 0-5H6`,key:`17hqa7`}],[`path`,{d:`M18 9h1.5a2.5 2.5 0 0 0 0-5H18`,key:`lmptdp`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22`,key:`1nw9bq`}],[`path`,{d:`M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22`,key:`1np0yb`}],[`path`,{d:`M18 2H6v7a6 6 0 0 0 12 0V2Z`,key:`u46fv3`}]]),os=A(`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`}]]),ss=A(`UserCheck`,[[`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`}],[`polyline`,{points:`16 11 18 13 22 9`,key:`1pwet4`}]]),cs=A(`UserMinus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),ls=A(`UserPlus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),us=A(`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`}]]),ds=A(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),fs=A(`Zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),ps=`-`,ms=e=>{let t=vs(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(ps);return n[0]===``&&n.length!==1&&n.shift(),hs(n,t)||_s(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},hs=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),i=r?hs(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(ps);return t.validators.find(({validator:e})=>e(a))?.classGroupId},gs=/^\[(.+)\]$/,_s=e=>{if(gs.test(e)){let t=gs.exec(e)[1],n=t?.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},vs=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};
vendor: 15,655 bytes, line 9
9return Ss(Object.entries(e.classGroups),n).forEach(([e,n])=>{ys(n,r,e,t)}),r},ys=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:bs(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(xs(e)){ys(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{ys(i,bs(t,e),n,r)})})},bs=(e,t)=>{let n=e;return t.split(ps).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},xs=e=>e.isThemeGetter,Ss=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Cs=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},ws=`!`,Ts=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(ws);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},Es=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},Ds=e=>({cache:Cs(e.cacheSize),parseClassName:Ts(e),...ms(e)}),Os=/\s+/,ks=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Os),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?` `+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=Es(c).join(`:`),h=l?m+ws:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function As(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=js(t))&&(r&&(r+=` `),r+=n);return r}var js=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=js(e[r]))&&(n&&(n+=` `),n+=t);return n};function Ms(e,...t){let n,r,i,a=o;function o(o){return n=Ds(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=ks(e,n);return i(e,a),a}return function(){return a(As.apply(null,arguments))}}var Ns=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},Ps=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fs=/^\d+\/\d+$/,Is=new Set([`px`,`full`,`screen`]),Ls=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rs=/\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$/,zs=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Bs=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vs=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hs=e=>Ws(e)||Is.has(e)||Fs.test(e),Us=e=>rc(e,`length`,ic),Ws=e=>!!e&&!Number.isNaN(Number(e)),Gs=e=>rc(e,`number`,Ws),Ks=e=>!!e&&Number.isInteger(Number(e)),qs=e=>e.endsWith(`%`)&&Ws(e.slice(0,-1)),Js=e=>Ps.test(e),Ys=e=>Ls.test(e),Xs=new Set([`length`,`size`,`percentage`]),Zs=e=>rc(e,Xs,ac),Qs=e=>rc(e,`position`,ac),$s=new Set([`image`,`url`]),ec=e=>rc(e,$s,sc),tc=e=>rc(e,``,oc),nc=()=>!0,rc=(e,t,n)=>{let r=Ps.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},ic=e=>Rs.test(e)&&!zs.test(e),ac=()=>!1,oc=e=>Bs.test(e),sc=e=>Vs.test(e),cc=Ms(()=>{let e=Ns(`colors`),t=Ns(`spacing`),n=Ns(`blur`),r=Ns(`brightness`),i=Ns(`borderColor`),a=Ns(`borderRadius`),o=Ns(`borderSpacing`),s=Ns(`borderWidth`),c=Ns(`contrast`),l=Ns(`grayscale`),u=Ns(`hueRotate`),d=Ns(`invert`),f=Ns(`gap`),p=Ns(`gradientColorStops`),m=Ns(`gradientColorStopPositions`),h=Ns(`inset`),g=Ns(`margin`),_=Ns(`opacity`),v=Ns(`padding`),y=Ns(`saturate`),b=Ns(`scale`),x=Ns(`sepia`),S=Ns(`skew`),C=Ns(`space`),w=Ns(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],ee=()=>[`auto`,Js,t],D=()=>[Js,t],te=()=>[``,Hs,Us],ne=()=>[`auto`,Ws,Js],re=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],ie=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],oe=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],se=()=>[``,`0`,Js],ce=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],le=()=>[Ws,Js];return{cacheSize:500,separator:`:`,theme:{colors:[nc],spacing:[Hs,Us],blur:[`none`,``,Ys,Js],brightness:le(),borderColor:[e],borderRadius:[`none`,``,`full`,Ys,Js],borderSpacing:D(),borderWidth:te(),contrast:le(),grayscale:se(),hueRotate:le(),invert:se(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[qs,Us],inset:ee(),margin:ee(),opacity:le(),padding:D(),saturate:le(),scale:le(),sepia:se(),skew:le(),space:D(),translate:D()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,Js]}],container:[`container`],columns:[{columns:[Ys]}],"break-after":[{"break-after":ce()}],"break-before":[{"break-before":ce()}],"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:[...re(),Js]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,Ks,Js]}],basis:[{basis:ee()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,Js]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:[`first`,`last`,`none`,Ks,Js]}],"grid-cols":[{"grid-cols":[nc]}],"col-start-end":[{col:[`auto`,{span:[`full`,Ks,Js]},Js]}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":[nc]}],"row-start-end":[{row:[`auto`,{span:[Ks,Js]},Js]}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,Js]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,Js]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...oe()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...oe(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...oe(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,Js,t]}],"min-w":[{"min-w":[Js,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[Js,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[Ys]},Ys]}],h:[{h:[Js,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[Js,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[Js,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[Js,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,Ys,Us]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,Gs]}],"font-family":[{font:[nc]}],"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`,Js]}],"line-clamp":[{"line-clamp":[`none`,Ws,Gs]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,Hs,Js]}],"list-image":[{"list-image":[`none`,Js]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,Js]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ie(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,Hs,Us]}],"underline-offset":[{"underline-offset":[`auto`,Hs,Js]}],"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:D()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Js]}],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`,Js]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...re(),Qs]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,Zs]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ec]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[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:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...ie(),`hidden`]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:ie()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[``,...ie()]}],"outline-offset":[{"outline-offset":[Hs,Js]}],"outline-w":[{outline:[Hs,Us]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:te()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Hs,Us]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,Ys,tc]}],"shadow-color":[{shadow:[nc]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...ae(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":ae()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,Ys,Js]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"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`,Js]}],duration:[{duration:le()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,Js]}],delay:[{delay:le()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,Js]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Ks,Js]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"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`,Js]}],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
9-in`,`zoom-out`,Js]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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`]}],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`,Js]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[Hs,Us,Gs]}],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`]}}});function j(...e){return cc(ra(e))}function lc(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var uc=Yi,dc=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(Xi,{ref:n,className:j(`fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]`,e),...t}));dc.displayName=Xi.displayName;var fc=oa(`group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full`,{variants:{variant:{default:`border bg-background text-foreground`,destructive:`destructive group border-destructive bg-destructive text-destructive-foreground`}},defaultVariants:{variant:`default`}}),pc=c.forwardRef(({className:e,variant:t,...n},r)=>(0,O.jsx)(Zi,{ref:r,className:j(fc({variant:t}),e),...n}));pc.displayName=Zi.displayName;var mc=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(ea,{ref:n,className:j(`inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive`,e),...t}));mc.displayName=ea.displayName;var hc=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(ta,{ref:n,className:j(`absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 11,809 bytes, line 9
9/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600`,e),"toast-close":``,...t,children:(0,O.jsx)(ds,{className:`h-4 w-4`})}));hc.displayName=ta.displayName;var gc=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(Qi,{ref:n,className:j(`text-sm font-semibold`,e),...t}));gc.displayName=Qi.displayName;var _c=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)($i,{ref:n,className:j(`text-sm opacity-90`,e),...t}));_c.displayName=$i.displayName;function vc(){let{toasts:e}=ln();return(0,O.jsxs)(uc,{children:[e.map(function({id:e,title:t,description:n,action:r,...i}){return(0,O.jsxs)(pc,{...i,children:[(0,O.jsxs)(`div`,{className:`grid gap-1`,children:[t&&(0,O.jsx)(gc,{children:t}),n&&(0,O.jsx)(_c,{children:n})]}),r,(0,O.jsx)(hc,{})]},e)}),(0,O.jsx)(dc,{})]})}var yc=Object.defineProperty,bc=(e,t)=>yc(e,`name`,{value:t,configurable:!0}),xc=c.useId||(()=>void 0),Sc=0;function Cc(e){let[t,n]=c.useState(xc());return jr(()=>{e||n(e=>e??String(Sc++))},[e]),e||(t?`radix-${t}`:``)}bc(Cc,`useId`);var wc=[`top`,`right`,`bottom`,`left`],Tc=Math.min,Ec=Math.max,Dc=Math.round,Oc=Math.floor,kc=e=>({x:e,y:e}),Ac={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function jc(e,t,n){return Ec(e,Tc(t,n))}function Mc(e,t){return typeof e==`function`?e(t):e}function Nc(e){return e.split(`-`)[0]}function Pc(e){return e.split(`-`)[1]}function Fc(e){return e===`x`?`y`:`x`}function Ic(e){return e===`y`?`height`:`width`}function Lc(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Rc(e){return Fc(Lc(e))}function zc(e,t,n){n===void 0&&(n=!1);let r=Pc(e),i=Rc(e),a=Ic(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Jc(o)),[o,Jc(o)]}function Bc(e){let t=Jc(e);return[Vc(e),t,Vc(t)]}function Vc(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Hc=[`left`,`right`],Uc=[`right`,`left`],Wc=[`top`,`bottom`],Gc=[`bottom`,`top`];function Kc(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Uc:Hc:t?Hc:Uc;case`left`:case`right`:return t?Wc:Gc;default:return[]}}function qc(e,t,n,r){let i=Pc(e),a=Kc(Nc(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Vc)))),a}function Jc(e){let t=Nc(e);return Ac[t]+e.slice(t.length)}function Yc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xc(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Yc(e)}function Zc(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Qc(e,t,n){let{reference:r,floating:i}=e,a=Lc(t),o=Rc(t),s=Ic(o),c=Nc(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Pc(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}async function $c(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Mc(t,e),p=Xc(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Zc(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Zc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var el=50,tl=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:$c},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Qc(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<el&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Qc(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},nl=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Mc(e,t)||{};if(l==null)return{};let d=Xc(u),f={x:n,y:r},p=Rc(i),m=Ic(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Tc(d[_],T),ee=Tc(d[v],T),D=E,te=C-h[m]-ee,ne=C/2-h[m]/2+w,re=jc(D,ne,te),ie=!c.arrow&&Pc(i)!=null&&ne!==re&&a.reference[m]/2-(ne<D?E:ee)-h[m]/2<0,ae=ie?ne<D?ne-D:ne-te:0;return{[p]:f[p]+ae,data:{[p]:re,centerOffset:ne-re-ae,...ie&&{alignmentOffset:ae}},reset:ie}}}),rl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Mc(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Nc(r),_=Lc(o),v=Nc(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Jc(o)]:Bc(o)),x=p!==`none`;!d&&x&&b.push(...qc(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=zc(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Lc(t)||T.every(e=>Lc(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Lc(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function il(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function al(e){return wc.some(t=>e[t]>=0)}var ol=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Mc(e,t);switch(i){case`referenceHidden`:{let e=il(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:al(e)}}}case`escaped`:{let e=il(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:al(e)}}}default:return{}}}}},sl=new Set([`left`,`top`]);async function cl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Nc(n),s=Pc(n),c=Lc(n)===`y`,l=sl.has(o)?-1:1,u=a&&c?-1:1,d=Mc(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ll=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await cl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ul=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Mc(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Lc(Nc(i)),p=Fc(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=jc(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=jc(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},dl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Mc(e,t),u={x:n,y:r},d=Lc(i),f=Fc(d),p=u[f],m=u[d],h=Mc(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=sl.has(Nc(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},fl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Mc(e,t),u=await o.detectOverflow(t,l),d=Nc(i),f=Pc(i),p=Lc(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Tc(h-u[g],v),x=Tc(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Ec(u.left,0),t=Ec(u.right,0),n=Ec(u.top,0),r=Ec(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Ec(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Ec(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function pl(){return typeof window<`u`}function ml(e){return _l(e)?(e.nodeName||``).toLowerCase():`#document`}function hl(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gl(e){return((_l(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function _l(e){return pl()?e instanceof Node||e instanceof hl(e).Node:!1}function vl(e){return pl()?e instanceof Element||e instanceof hl(e).Element:!1}function yl(e){return pl()?e instanceof HTMLElement||e instanceof hl(e).HTMLElement:!1}function bl(e){return!pl()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof hl(e).ShadowRoot}function xl(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ml(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Sl(e){return/^(table|td|th)$/.test(ml(e))}function Cl(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var wl=/transform|translate|scale|rotate|perspective|filter/,Tl=/paint|layout|strict|content/,El=e=>!!e&&e!==`none`,Dl;function Ol(e){let t=vl(e)?Ml(e):e;
vendor: 7,452 bytes, line 9
9return El(t.transform)||El(t.translate)||El(t.scale)||El(t.rotate)||El(t.perspective)||!Al()&&(El(t.backdropFilter)||El(t.filter))||wl.test(t.willChange||``)||Tl.test(t.contain||``)}function kl(e){let t=Pl(e);for(;yl(t)&&!jl(t);){if(Ol(t))return t;if(Cl(t))return null;t=Pl(t)}return null}function Al(){return Dl??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Dl}function jl(e){return/^(html|body|#document)$/.test(ml(e))}function Ml(e){return hl(e).getComputedStyle(e)}function Nl(e){return vl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pl(e){if(ml(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||bl(e)&&e.host||gl(e);return bl(t)?t.host:t}function Fl(e){let t=Pl(e);return jl(t)?e.ownerDocument?e.ownerDocument.body:e.body:yl(t)&&xl(t)?t:Fl(t)}function Il(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Fl(e),i=r===e.ownerDocument?.body,a=hl(r);if(i){let e=Ll(a);return t.concat(a,a.visualViewport||[],xl(r)?r:[],e&&n?Il(e):[])}return t.concat(r,Il(r,[],n))}function Ll(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rl(e){let t=Ml(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=yl(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Dc(n)!==a||Dc(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function zl(e){return vl(e)?e:e.contextElement}function Bl(e){let t=zl(e);if(!yl(t))return kc(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Rl(t),o=(a?Dc(n.width):n.width)/r,s=(a?Dc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Vl=kc(0);function Hl(e){let t=hl(e);return!Al()||!t.visualViewport?Vl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ul(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==hl(e)?!1:t}function Wl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=zl(e),o=kc(1);t&&(r?vl(r)&&(o=Bl(r)):o=Bl(e));let s=Ul(a,n,r)?Hl(a):kc(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=hl(a),t=r&&vl(r)?hl(r):r,n=e,i=Ll(n);for(;i&&r&&t!==n;){let e=Bl(i),t=i.getBoundingClientRect(),r=Ml(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=hl(i),i=Ll(n)}}return Zc({width:u,height:d,x:c,y:l})}function Gl(e,t){let n=Nl(e).scrollLeft;return t?t.left+n:Wl(gl(e)).left+n}function Kl(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Gl(e,n),y:n.top+t.scrollTop}}function ql(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=gl(r),s=t?Cl(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=kc(1),u=kc(0),d=yl(r);if((d||!d&&!a)&&((ml(r)!==`body`||xl(o))&&(c=Nl(r)),d)){let e=Wl(r);l=Bl(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Kl(o,c):kc(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Jl(e){return Array.from(e.getClientRects())}function Yl(e){let t=gl(e),n=Nl(e),r=e.ownerDocument.body,i=Ec(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ec(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Gl(e),s=-n.scrollTop;return Ml(r).direction===`rtl`&&(o+=Ec(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Xl=25;function Zl(e,t){let n=hl(e),r=gl(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Al();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Gl(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Xl&&(a-=o)}else l<=Xl&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ql(e,t){let n=Wl(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=yl(e)?Bl(e):kc(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function $l(e,t,n){let r;if(t===`viewport`)r=Zl(e,n);else if(t===`document`)r=Yl(gl(e));else if(vl(t))r=Ql(t,n);else{let n=Hl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Zc(r)}function eu(e,t){let n=Pl(e);return n===t||!vl(n)||jl(n)?!1:Ml(n).position===`fixed`||eu(n,t)}function tu(e,t){let n=t.get(e);if(n)return n;let r=Il(e,[],!1).filter(e=>vl(e)&&ml(e)!==`body`),i=null,a=Ml(e).position===`fixed`,o=a?Pl(e):e;for(;vl(o)&&!jl(o);){let t=Ml(o),n=Ol(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||xl(o)&&!n&&eu(e,o))?r=r.filter(e=>e!==o):i=t,o=Pl(o)}return t.set(e,r),r}function nu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Cl(t)?[]:tu(t,this._c):[].concat(n),r],o=$l(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=$l(t,a[e],i);s=Ec(n.top,s),c=Tc(n.right,c),l=Tc(n.bottom,l),u=Ec(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ru(e){let{width:t,height:n}=Rl(e);return{width:t,height:n}}function iu(e,t,n){let r=yl(t),i=gl(t),a=n===`fixed`,o=Wl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=kc(0);function l(){c.x=Gl(i)}if(r||!r&&!a){if((ml(t)!==`body`||xl(i))&&(s=Nl(t)),r){let e=Wl(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l()}a&&!r&&i&&l();let u=i&&!r&&!a?Kl(i,s):kc(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function au(e){return Ml(e).position===`static`}function ou(e,t){if(!yl(e)||Ml(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return gl(e)===n&&(n=n.ownerDocument.body),n}function su(e,t){let n=hl(e);if(Cl(e))return n;if(!yl(e)){let t=Pl(e);for(;t&&!jl(t);){if(vl(t)&&!au(t))return t;t=Pl(t)}return n}let r=ou(e,t);for(;r&&Sl(r)&&au(r);)r=ou(r,t);return r&&jl(r)&&au(r)&&!Ol(r)?n:r||kl(e)||n}var cu=async function(e){let t=this.getOffsetParent||su,n=this.getDimensions,r=await n(e.floating);return{reference:iu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lu(e){return Ml(e).direction===`rtl`}var uu={convertOffsetParentRelativeRectToViewportRelativeRect:ql,getDocumentElement:gl,getClippingRect:nu,getOffsetParent:su,getElementRects:cu,getClientRects:Jl,getDimensions:ru,getScale:Bl,isElement:vl,isRTL:lu};function du(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fu(e,t){let n=null,r,i=gl(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Oc(d),h=Oc(i.clientWidth-(u+f)),g=Oc(i.clientHeight-(d+p)),_=Oc(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ec(0,Tc(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!du(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function pu(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=zl(e),u=i||a?[...l?Il(l):[],...t?Il(t):[]]:[];
9u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?fu(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Wl(e):null;c&&g();function g(){let t=Wl(e);h&&!du(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var mu=ll,hu=ul,gu=rl,_u=fl,vu=ol,yu=nl,bu=dl,xu=(e,t,n)=>{let r=new Map,i={platform:uu,...n},a={...i.platform,_c:r};return tl(e,t,{...i,platform:a})},Su=typeof document<`u`?c.useLayoutEffect:function(){};function Cu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Cu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Cu(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function wu(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tu(e,t){let n=wu(e);return Math.round(t*n)/n}function Eu(e){let t=c.useRef(e);return Su(()=>{t.current=e}),t}function Du(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=c.useState(r);Cu(p,r)||m(r);let[h,g]=c.useState(null),[_,v]=c.useState(null),y=c.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=c.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=c.useRef(null),w=c.useRef(null),T=c.useRef(d),E=l!=null,ee=Eu(l),D=Eu(i),te=Eu(u),ne=c.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};D.current&&(e.platform=D.current),xu(C.current,w.current,e).then(e=>{let t={...e,isPositioned:te.current!==!1};re.current&&!Cu(T.current,t)&&(T.current=t,mn.flushSync(()=>{f(t)}))})},[p,t,n,D,te]);Su(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let re=c.useRef(!1);Su(()=>(re.current=!0,()=>{re.current=!1}),[]),Su(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(ee.current)return ee.current(x,S,ne);ne()}},[x,S,ne,ee,E]);let ie=c.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),ae=c.useMemo(()=>({reference:x,floating:S}),[x,S]),oe=c.useMemo(()=>{let e={position:n,left:0,top:0};if(!ae.floating)return e;let t=Tu(ae.floating,d.x),r=Tu(ae.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...wu(ae.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ae.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:ne,refs:ie,elements:ae,floatingStyles:oe}),[d,ne,ie,ae,oe])}var Ou=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:yu({element:r.current,padding:i}).fn(n):r?yu({element:r,padding:i}).fn(n):{}}}},ku=(e,t)=>{let n=mu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Au=(e,t)=>{let n=hu(e);return{name:n.name,fn:n.fn,options:[e,t]}},ju=(e,t)=>({fn:bu(e).fn,options:[e,t]}),Mu=(e,t)=>{let n=gu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nu=(e,t)=>{let n=_u(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pu=(e,t)=>{let n=vu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fu=(e,t)=>{let n=Ou(e);return{name:n.name,fn:n.fn,options:[e,t]}},Iu=Object.defineProperty,Lu=(e,t)=>Iu(e,`name`,{value:t,configurable:!0});function Ru(e){let[t,n]=c.useState(void 0);return jr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}Lu(Ru,`useSize`);var zu=Object.defineProperty,Bu=(e,t)=>zu(e,`name`,{value:t,configurable:!0}),Vu=`Popper`,[Hu,Uu]=An(Vu),[Wu,Gu]=Hu(Vu),Ku=Bu(e=>{let{__scopePopper:t,children:n}=e,[r,i]=c.useState(null),[a,o]=c.useState(void 0);return(0,O.jsx)(Wu,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),qu=`PopperAnchor`,Ju=c.forwardRef(Bu(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Gu(qu,n),o=c.useRef(null),s=a.onAnchorChange,l=En(t,c.useCallback(e=>{o.current=e,e&&s(e)},[s])),u=c.useRef(null);c.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&s(u.current)});let d=a.placementState&&ed(a.placementState),f=d?.[0],p=d?.[1];return r?null:(0,O.jsx)(lr.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...i,ref:l})},`PopperAnchor`)),Yu=`PopperContent`,[Xu,eee]=Hu(Yu),Zu=c.forwardRef(Bu(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l
9=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f=`partial`,hideWhenDetached:p=!1,updatePositionStrategy:m=`optimized`,onPlaced:h,...g}=e,_=Gu(Yu,n),[v,y]=c.useState(null),b=En(t,y),[x,S]=c.useState(null),C=Ru(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),ee=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],te=D.length>0,ne={padding:ee,boundary:D.filter(Qu),altBoundary:te},{refs:re,floatingStyles:ie,placement:ae,isPositioned:oe,middlewareData:se}=Du({strategy:`fixed`,placement:E,whileElementsMounted:Bu((...e)=>pu(...e,{animationFrame:m===`always`}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[ku({mainAxis:i+T,alignmentAxis:o}),l&&Au({mainAxis:!0,crossAxis:!1,limiter:f===`partial`?ju():void 0,...ne}),l&&Mu({...ne}),Nu({...ne,apply:Bu(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&Fu({element:x,padding:s}),$u({arrowWidth:w,arrowHeight:T}),p&&Pu({strategy:`referenceHidden`,...ne,boundary:te?ne.boundary:void 0})]}),ce=_.setPlacementState;jr(()=>(ce(ae),()=>{ce(void 0)}),[ae,ce]);let[le,ue]=ed(ae),de=pr(h);jr(()=>{oe&&de?.()},[oe,de]);let fe=se.arrow?.x,pe=se.arrow?.y,me=se.arrow?.centerOffset!==0,[he,ge]=c.useState();return jr(()=>{v&&ge(window.getComputedStyle(v).zIndex)},[v]),(0,O.jsx)(`div`,{ref:re.setFloating,"data-radix-popper-content-wrapper":``,style:{...ie,transform:oe?ie.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:he,"--radix-popper-transform-origin":[se.transformOrigin?.x,se.transformOrigin?.y].join(` `),...se.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,O.jsx)(Xu,{scope:n,placedSide:le,placedAlign:ue,onArrowChange:S,arrowX:fe,arrowY:pe,shouldHideArrow:me,children:(0,O.jsx)(lr.div,{"data-side":le,"data-align":ue,...g,ref:b,style:{...g.style,animation:oe?g.style?.animation:`none`}})})})},`PopperContent`));function Qu(e){return e!==null}Bu(Qu,`isNotNull`);var $u=Bu(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=ed(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function ed(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Bu(ed,`getSideAndAlignFromPlacement`);var td=Ku,nd=Ju,rd=Zu,id=Object.defineProperty,ad=(e,t)=>id(e,`name`,{value:t,configurable:!0}),[od,tee]=An(`Tooltip`,[Uu]),sd=Uu(),cd=`TooltipProvider`,ld=700,ud=`tooltip.open`,[dd,fd]=od(cd),pd=ad(e=>{let{__scopeTooltip:t,delayDuration:n=ld,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=c.useRef(!0),s=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{let e=l.current;return()=>window.clearTimeout(e)},[]),(0,O.jsx)(dd,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:c.useCallback(()=>{r<=0||(window.clearTimeout(l.current),o.current=!1)},[r]),onClose:c.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:c.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),md=`Tooltip`,[hd,gd]=od(md),_d=ad(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,l=fd(md,e.__scopeTooltip),u=sd(t),[d,f]=c.useState(null),[p,m]=c.useState(void 0),h=Cc(),g=c.useRef(0),_=o??l.disableHoverableContent,v=s??l.delayDuration,y=c.useRef(!1),[b,x]=Zr({prop:r,defaultProp:i??!1,onChange:ad(e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(ud))):l.onClose(),a?.(e)},`onChange`),caller:md}
9),S=c.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),C=c.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),w=c.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=c.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},v)},[v,x]);c.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]);let E=p??h;return(0,O.jsx)(td,{...u,children:(0,O.jsx)(hd,{scope:t,contentId:E,setContentId:m,open:b,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?T():C()},[l.isOpenDelayedRef,T,C]),onTriggerLeave:c.useCallback(()=>{_?w():(window.clearTimeout(g.current),g.current=0)},[w,_]),onOpen:C,onClose:w,disableHoverableContent:_,children:n})})},`Tooltip`),vd=`TooltipTrigger`,yd=c.forwardRef(ad(function(e,t){let{__scopeTooltip:n,...r}=e,i=gd(vd,n),a=fd(vd,n),o=sd(n),s=En(t,c.useRef(null),i.onTriggerChange),l=c.useRef(!1),u=c.useRef(!1),d=c.useCallback(()=>l.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,O.jsx)(nd,{asChild:!0,...o,children:(0,O.jsx)(lr.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:k(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:k(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:k(e.onPointerDown,()=>{i.open&&i.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:k(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:k(e.onBlur,i.onClose),onClick:k(e.onClick,i.onClose)})})},`TooltipTrigger`)),bd=`TooltipPortal`,[xd,Sd]=od(bd,{forceMount:void 0}),nee=ad(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=gd(bd,t);return(0,O.jsx)(xd,{scope:t,forceMount:n,children:(0,O.jsx)(Lr,{present:n||a.open,children:(0,O.jsx)(Nr,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),Cd=`TooltipContent`,ree=c.forwardRef(ad(function(e,t){let n=Sd(Cd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=gd(Cd,e.__scopeTooltip);return(0,O.jsx)(Lr,{present:r||o.open,children:o.disableHoverableContent?(0,O.jsx)(Ed,{side:i,...a,ref:t}):(0,O.jsx)(wd,{side:i,...a,ref:t})})},`TooltipContent`)),wd=c.forwardRef(ad(function(e,t){let n=gd(Cd,e.__scopeTooltip),r=fd(Cd,e.__scopeTooltip),i=c.useRef(null),a=En(t,i),[o,s]=c.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,p=c.useCallback(()=>{s(null),f(!1)},[f]),m=c.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Od(r,Dd(r,n.getBoundingClientRect())),a=kd(t.getBoundingClientRect()),o=jd([...i,...a]);s(o),f(!0)},[f]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&d){let e=ad(e=>m(e,d),`handleTriggerLeave`),t=ad(e=>m(e,l),`handleContentLeave`);return l.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{l.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[l,d,m,p]),c.useEffect(()=>{if(o){let e=ad(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||d?.contains(t),i=!Ad(n,o);r?p():i&&(p(),u())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,d,o,u,p]),(0,O.jsx)(Ed,{...e,ref:a})},`TooltipContentHoverable`)),Td=Ln(`TooltipContent`),Ed=c.forwardRef(ad(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...l}=e,u=gd(Cd,n),d=sd(n),{onClose:f}=u;c.useEffect(()=>(document.addEventListener(ud,f),()=>document.removeEventListener(ud,f)),[f]),c.useEffect(()=>{if(u.trigger){let e=ad(e=>{e.target instanceof Node&&e.target.contains(u.trigger)&&f()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]);let{setContentId:p}=u;return jr(()=>(p(a),()=>{p(void 0)}),[a,p]),(0,O.jsx)(xr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,O.jsxs)(rd,{"data-state":u.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:u.contentId,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,O.jsx)(Td,{children:r}),i?(0,O.jsx)(oi,{id:u.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function Dd(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}ad(Dd,`getExitSideFromRect`);function Od(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}ad(Od,`getPaddedExitPoints`);function kd(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}ad(kd,`getPointsFromRect`);function Ad(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}ad(Ad,`isPointInPolygon`);
9function jd(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Md(t)}ad(jd,`getHull`);function Md(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}ad(Md,`getHullPresorted`);var Nd=pd,Pd=_d,Fd=yd,Id=nee,Ld=ree,Rd=Nd,zd=Pd,Bd=Fd,Vd=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,O.jsx)(Id,{children:(0,O.jsx)(Ld,{ref:r,sideOffset:t,className:j(`z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]`,e),...n})}));Vd.displayName=Ld.displayName;var Hd={log:(...e)=>{},info:(...e)=>{},warn:(...e)=>{},error:(...e)=>{},debug:(...e)=>{}},Ud={error:(...e)=>{console.error(...e)},warn:(...e)=>{console.warn(...e)},info:(...e)=>{console.log(...e)}},Wd=`dive-embeds`,Gd=864e5;function Kd(){try{let e=localStorage.getItem(Wd);if(!e)return{};let t=JSON.parse(e);return t&&typeof t==`object`?t:{}}catch{return{}}}function qd(e){let t=Kd(),n=Date.now(),r={};for(let i of e){let e=t[i];e&&e.expiresAt>n&&(r[i]=e.url)}return r}function Jd(e){try{let t=Kd(),n=Date.now()+Gd;for(let[r,i]of Object.entries(e))t[r]={url:i,expiresAt:n};localStorage.setItem(Wd,JSON.stringify(t))}catch{}}function Yd(){try{localStorage.removeItem(Wd)}catch{}}var Xd=(0,c.createContext)(void 0);function iee({children:e}){let[t,n]=(0,c.useState)(null),[r,i]=(0,c.useState)(!0);(0,c.useEffect)(()=>{(async()=>{try{let e=await fetch(`/api/auth/user`,{credentials:`include`});e.ok&&n(await e.json())}catch(e){console.error(`Error during auth init:`,e)}finally{i(!1)}})()},[]);let a=(0,c.useCallback)(()=>{Hd.log(`=== Frontend: Initiating OIDC Login ===`),Yd();let e=sessionStorage.getItem(`redirectAfterLogin`),t=e?`/api/auth/login?returnUrl=${encodeURIComponent(e)}`:`/api/auth/login`;Hd.log(`Redirecting to:`,t),e&&sessionStorage.removeItem(`redirectAfterLogin`),window.location.href=t},[]),o=(0,c.useCallback)(async(e,t)=>{Hd.log(`=== Frontend: Password Grant Login ===`),Hd.log(`Username:`,e),Hd.log(`Endpoint:`,`/api/auth/rewardstation`);try{let r=await fetch(`/api/auth/rewardstation`,{method:`POST`,headers:{"Content-Type":`application/json`},credentials:`include`,body:JSON.stringify({username:e,password:t})});Hd.log(`Response Status:`,r.status,r.statusText);let i=await r.json();return Hd.log(`Response Data:`,i),r.ok&&i.success?(Hd.log(`Login successful, user data:`,i.user),Yd(),n(i.user),{success:!0}):(Hd.error(`Login failed:`,i.message||i.error),{success:!1,error:i.message||i.error||`Authentication failed`})}catch(e){return console.error(`Network error during password login:`,e),{success:!1,error:`Network error. Please try again.`}}},[]),s=(0,c.useCallback)(async()=>{Hd.log(`=== Frontend: Logout ===`),Yd();try{let e=await fetch(`/api/auth/logout`,{method:`POST`,credentials:`include`});if(Hd.log(`Logout response status:`,e.status),e.ok){let t=await e.json();Hd.log(`Logout response data:`,t),Hd.log(`Redirecting to:`,t.logoutUrl||`/`),window.location.href=t.logoutUrl||`/`}}catch(e){console.error(`Logout error:`,e),window.location.href=`/`}},[]);return(0,O.jsx)(Xd.Provider,{value:{user:t,isAuthenticated:!!t,loading:r,login:a,loginWithPassword:o,logout:s},children:e})}function Zd(){let e=(0,c.useContext)(Xd);if(!e)throw Error(`useAuth must be used within an AuthProvider`);return e}function Qd(e){try{return localStorage.getItem(e)}catch{return null}}function $d(e,t){try{localStorage.setItem(e,t)}catch{}}var ef=(0,c.createContext)(void 0);function tf({children:e}){let[t,n]=(0,c.useState)(()=>typeof window<`u`?Qd(`maslow-theme`)||(window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`):`dark`);return(0,c.useEffect)(()=>{let e=document.documentElement;t===`dark`?e.classList.add(`dark`):e.classList.remove(`dark`),$d(`maslow-theme`,t)},[t]),(0,O.jsx)(ef.Provider,{value:{theme:t,toggleTheme:()=>{n(e=>e===`light`?`dark`:`light`)},setTheme:e=>{n(e)}},children:e})}function nf(){let e=(0,c.useContext)(ef);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}var rf=`maslow-cookie-consent`,af={production:`GTM-PLX276BL`,qa:`GTM-NP7NWKL7`};function of(){if(typeof window>`u`)return af.qa;let e=window.location.hostname;return e===`maslowinsights.ai`||e===`www.maslowinsights.ai`?af.production:af.qa}var sf=(0,c.createContext)(void 0),cf=!1;function lf(){if(cf)return;cf=!0,window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":new Date().getTime(),event:`gtm.js`});let e=document.createElement(`script`);e.async=!0,e.src=`https://www.googletagmanager.com/gtm.js?id=${of()}`;let t=document.getElementsByTagName(`script`)[0];t?.parentNode?t.parentNode.insertBefore(e,t):document.head.appendChild(e)}function uf({children:e}){let[t,n]=(0,c.useState)(()=>
9{if(typeof window<`u`){let e=Qd(rf);if(e===`accepted`)return`accepted`;if(e===`rejected`)return`rejected`}return null});return(0,c.useEffect)(()=>{t===`accepted`&&lf()},[t]),(0,O.jsx)(sf.Provider,{value:{consent:t,accept:()=>{n(`accepted`),$d(rf,`accepted`)},reject:()=>{n(`rejected`),$d(rf,`rejected`)}},children:e})}function df(){let e=(0,c.useContext)(sf);if(e===void 0)throw Error(`useCookieConsent must be used within a CookieConsentProvider`);return e}var ff=oa(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90`,outline:`border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),M=c.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,O.jsx)(r?Fn:`button`,{className:j(ff({variant:t,size:n,className:e})),ref:a,...i}));M.displayName=`Button`;function pf(e=globalThis.window){return e!==void 0&&e.self!==e.top}function mf(){let{consent:e,accept:t,reject:n}=df();return e!==null||pf()?null:(0,O.jsx)(`div`,{className:`fixed bottom-0 left-0 right-0 z-50 border-t bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80`,children:(0,O.jsxs)(`div`,{className:`container max-w-6xl mx-auto px-6 py-4 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4`,children:[(0,O.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`We use analytics cookies to understand how you use Maslow Insights and improve the experience.`,` `]}),(0,O.jsxs)(`div`,{className:`flex gap-2 shrink-0`,children:[(0,O.jsx)(M,{variant:`outline`,size:`sm`,onClick:n,children:`Reject`}),(0,O.jsx)(M,{size:`sm`,onClick:t,children:`Accept`})]})]})})}var hf=class extends Error{status;constructor(e,t){super(t),this.status=e,this.name=`ApiError`}};function gf(){let e=document.cookie.split(`;`);for(let t of e){let e=t.trim(),n=e.indexOf(`=`);if(n===-1)continue;let r=e.slice(0,n).trim(),i=e.slice(n+1);if(r===`__Host-maslow.csrf`)return i}return null}async function _f(e){if(!e.ok){let t=await e.text()||e.statusText;if(e.status===401){if(window.location.pathname!==`/login`){let e=window.location.pathname+window.location.search;sessionStorage.setItem(`redirectAfterLogin`,e),window.location.href=`/login?session_expired=true`}throw new hf(e.status,`Session expired`)}throw new hf(e.status,`${e.status}: ${t}`)}}async function vf(e,t,n){Hd.info(`[API Request] ${e} ${t}`,n?{data:n}:void 0);let r=performance.now();try{let i={},a=n instanceof FormData;n&&!a&&(i[`Content-Type`]=`application/json`);let o=e.toUpperCase();if(o!==`GET`&&o!==`HEAD`&&o!==`OPTIONS`){let n=gf();if(!n)throw new hf(0,`CSRF token unavailable for ${e} ${t}. Try refreshing the page.`);i[`x-csrf-token`]=n}let s={method:e,headers:i,credentials:`include`};a?s.body=n:n&&(s.body=JSON.stringify(n));let c=await fetch(t,s),l=Math.round(performance.now()-r);return c.ok?Hd.info(`[API Response] ${e} ${t} - ${c.status} (${l}ms)`):Hd.error(`[API Error] ${e} ${t} - ${c.status} (${l}ms)`),await _f(c),c}catch(n){let i=Math.round(performance.now()-r);throw Hd.error(`[API Exception] ${e} ${t} - Failed (${i}ms)`,n),n}}async function yf(e,t,n){let r=await vf(e,t,n?.data);if(r.status===204||r.headers.get(`content-length`)===`0`)return;let i=r.headers.get(`content-type`);if(i&&i.includes(`application/json`))return r.json()}async function bf(e,t,n){return vf(e,t,n?.data)}var xf=`activeWorkspaceId`,Sf=`selectedWorkspaceIds`,Cf=(0,c.createContext)(void 0);function wf({children:e}){let{isAuthenticated:t}=Zd(),[n,r]=(0,c.useState)(!0),[i,a]=(0,c.useState)([]),[o,s]=(0,c.useState)(!1),[l,u]=(0,c.useState)([]),[d,f]=(0,c.useState)(()=>Qd(xf)),p=(0,c.useCallback)(async()=>{try{let e=await yf(`GET`,`/api/workspaces`),t=Array.isArray(e.workspaces)?e.workspaces:[];return a(t),s(e.isSuperAdmin||!1),t}catch(e){return console.error(`Error fetching workspaces:`,e),[]}},[]);(0,c.useEffect)(()=>{t&&(async()=>{let e=await p(),t=Qd(xf),n=t&&e.some(e=>e.id===t),i=e[0];i&&!n&&(f(i.id),$d(xf,i.id)),r(!1)})()},[t,p]);let m=(0,c.useCallback)(e=>{f(e),$d(xf,e),window.location.href=`/dashboard`},[]),h=(0,c.useCallback)(e=>{u(e);let t=e.map(e=>e.id);$d(Sf,JSON.stringify(t))},[]),g=(0,c.useCallback)(e=>{u(t=>{let n=t.some(t=>t.id===e.id)?t.filter(t=>t.id!==e.id):[...t,e],r=n.map(e=>e.id);return $d(Sf,JSON.stringify(r)),n})},[]);return(0,O.jsx)(Cf.Provider,{value:{loading:n,workspaces:i,isSuperAdmin:o,selectedWorkspaces:l,activeWorkspaceId:d||``,setActiveWorkspaceId:m,setSelectedWorkspaces:h,toggleWorksp
9aceSelection:g},children:e})}function Tf(){let e=(0,c.useContext)(Cf);if(!e)throw Error(`useWorkspace must be used within a WorkspaceProvider`);return e}function Ef(e,t){let n=e!==null;return Jt({queryKey:t?.queryKey??(e?[e]:[`disabled`]),queryFn:e?()=>yf(`GET`,e):()=>Promise.reject(Error(`Query disabled`)),enabled:n,staleTime:t?.cache?.staleTime??0,gcTime:t?.cache?.gcTime??0,refetchOnWindowFocus:t?.cache?.refetchOnWindowFocus??!1,refetchOnMount:t?.cache?.refetchOnMount??!0,...t?.queryOptions})}function Df(e,t){let n=Nt();return Yt({...t?.mutationOptions,mutationFn:t=>yf(`POST`,typeof e==`function`?e(t):e,{data:t}),onSuccess:(e,r,i,a)=>{t?.invalidate&&t.invalidate.forEach(e=>{n.invalidateQueries({queryKey:[e]})}),t?.refetch&&t.refetch.forEach(e=>{n.refetchQueries({queryKey:[e]})}),t?.mutationOptions?.onSuccess?.(e,r,i,a)}})}function Of(e,t){let n=Nt();return Yt({...t?.mutationOptions,mutationFn:t=>yf(`PATCH`,typeof e==`function`?e(t):e,{data:t}),onSuccess:(e,r,i,a)=>{t?.invalidate&&t.invalidate.forEach(e=>{n.invalidateQueries({queryKey:[e]})}),t?.refetch&&t.refetch.forEach(e=>{n.refetchQueries({queryKey:[e]})}),t?.mutationOptions?.onSuccess?.(e,r,i,a)}})}function kf(e,t){let n=Nt();return Yt({...t?.mutationOptions,mutationFn:t=>yf(`DELETE`,typeof e==`function`?e(t):e,t===void 0?void 0:{data:t}),onSuccess:(e,r,i,a)=>{t?.invalidate&&t.invalidate.forEach(e=>{n.invalidateQueries({queryKey:[e]})}),t?.refetch&&t.refetch.forEach(e=>{n.refetchQueries({queryKey:[e]})}),t?.mutationOptions?.onSuccess?.(e,r,i,a)}})}var Af=`maslow_super-admin`,jf=`maslow_workspace-admin`,Mf=`maslow_xcel-admin`;function Nf(e){return e?e.split(/[|,]/).map(e=>e.trim()).filter(e=>e.length>0):[]}var Pf={[Af]:{label:`maslow admin`,className:`bg-red-500/10 text-red-600 dark:text-red-400`},[jf]:{label:`workspace admin`,className:`bg-amber-500/10 text-amber-600 dark:text-amber-400`},[Mf]:{label:`xceleration team`,className:`bg-emerald-500/10 text-emerald-600 dark:text-emerald-400`}};function Ff(e){return Pf[e]??{label:e,className:`bg-muted text-muted-foreground`}}function If(e,t){return Nf(e).includes(t)}function Lf(e){return If(e,Af)}var Rf=(0,c.createContext)(void 0);function aee({children:e}){let{user:t,isAuthenticated:n}=Zd(),{toast:r}=ln(),[i,a]=(0,c.useState)([]),[o,s]=(0,c.useState)([]),[l,u]=(0,c.useState)([]),[d,f]=(0,c.useState)(!0),p=(0,c.useRef)(0),m=If(t?.roles,Mf);Hd.debug(`[ClientContext] Render - User info:`,{isAuthenticated:n,isXcelAdmin:m,hasUser:!!t});let h=(0,c.useCallback)(async()=>{try{return(await yf(`GET`,`/api/client-selections`)).tenantIds??[]}catch(e){return Ud.error(`[ClientContext] Error fetching selections:`,e),[]}},[]),g=(0,c.useCallback)(async()=>{if(!m)return[];try{return((await yf(`GET`,`/api/rewardstation/clients`)).tenants??[]).map(e=>({tenantId:String(e.tenantId),name:e.name}))}catch(e){return Ud.error(`[ClientContext] Error fetching available tenants:`,e),[]}},[m]),{data:_,isLoading:v,error:y}=Ef(n&&!m?`/api/client-selections/allowed`:null,{queryKey:[`/api/client-selections/allowed`,t?.id],cache:{staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1}});(0,c.useEffect)(()=>{y&&Ud.error(`[ClientContext] Error fetching allowed tenants:`,y)},[y]),(0,c.useEffect)(()=>{if(!n||!m){a([]),s([]),u([]),n||f(!1);return}let e=!1;return(async()=>{f(!0);let t=await h();if(e)return;let n=await g();if(e)return;a(n);let r=n.filter(e=>t.includes(e.tenantId));s(r),u(r.map(e=>e.tenantId)),f(!1)})(),()=>{e=!0}},[n,m,t,h,g]),(0,c.useEffect)(()=>{if(!n||m){a([]),s([]),u([]),n||f(!1);return}if(v){a([]),s([]),u([]),f(!0);return}let e=!1;return(async()=>{f(!0);let t=await h();if(e)return;let n=_?.tenants??[],r=new Map(n.map(e=>[e.tenantId,e])),i=t.flatMap(e=>{let t=r.get(e);return t?[{tenantId:e,name:t.label}]:[]});u(i.map(e=>e.tenantId)),s(i),f(!1)})(),()=>{e=!0}},[n,m,t,h,_,v]);let b=(0,c.useCallback)(async e=>{if(e.length===0){r({title:`At least one client must remain selected`,description:`Use Reset to return to the default client.`,variant:`destructive`});return}let t=e.map(e=>e.tenantId),n=o,i=l,a=++p.current;s(e),u(t);try{await yf(`PUT`,`/api/client-selections`,{data:{tenantIds:t}})}catch(e){p.current===a&&(s(n),u(i)),Ud.error(`[ClientContext] Error updating selections:`,e),r({title:`Failed to update client selection`,description:e instanceof Error?e.message:`An error occurred. Please try again.`,variant:`destructive`})}},[o,l,r]),x=(0,c.useCallback)(async e=>
9{let t=o.some(t=>t.tenantId===e.tenantId),n=t?o.filter(t=>t.tenantId!==e.tenantId):[...o,e];if(n.length===0){r({title:`At least one client must remain selected`,description:`Use Reset to return to the default client.`,variant:`destructive`});return}let i=o,a=l,c=++p.current;s(n),u(n.map(e=>e.tenantId));try{t?await yf(`DELETE`,`/api/client-selections/${e.tenantId}`):await yf(`POST`,`/api/client-selections`,{data:{tenantId:e.tenantId}})}catch(e){p.current===c&&(s(i),u(a)),Ud.error(`[ClientContext] Error toggling selection:`,e),r({title:`Failed to update client selection`,description:e instanceof Error?e.message:`An error occurred. Please try again.`,variant:`destructive`})}},[o,l,r]),S=(0,c.useCallback)(async()=>{await b(i)},[i,b]),C=(0,c.useCallback)(async()=>{try{let e=await yf(`GET`,`/api/client-selections/default`),t={tenantId:String(e.tenantId),name:e.tenantName};await b([t])}catch(e){Ud.error(`[ClientContext] Error fetching default tenant:`,e),r({title:`Failed to reset selection`,description:`Could not resolve the default client. Please try again.`,variant:`destructive`})}},[b,r]);return(0,O.jsx)(Rf.Provider,{value:{activeTenantIds:l,availableTenants:i,selectedTenants:o,setSelectedTenants:b,toggleTenantSelection:x,selectAllTenants:S,resetToDefaultTenant:C,loading:d,isXcelAdmin:m},children:e})}function oee(){let e=(0,c.useContext)(Rf);if(e===void 0)throw Error(`useClient must be used within a ClientProvider`);return e}function zf({children:e}){let[t,n]=de(),{loading:r}=Tf(),{isAuthenticated:i,loading:a}=Zd();return(0,c.useEffect)(()=>{if(!a&&!i){t&&t!==`/login`&&sessionStorage.setItem(`redirectAfterLogin`,t),n(`/login`);return}},[i,a,n,t]),a||r?(0,O.jsxs)(`div`,{className:`min-h-screen flex flex-col items-center justify-center`,children:[(0,O.jsx)(`img`,{src:`/maslow.svg`,alt:`Logo`,width:50,height:50}),(0,O.jsx)(`p`,{className:`animate-pulse`,children:`Loading...`})]}):(0,O.jsx)(O.Fragment,{children:e})}var Bf=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,className:j(`shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm`,e),...t}));Bf.displayName=`Card`;var Vf=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,className:j(`flex flex-col space-y-1.5 p-6`,e),...t}));Vf.displayName=`CardHeader`;var Hf=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,className:j(`text-2xl font-semibold leading-none tracking-tight`,e),...t}));Hf.displayName=`CardTitle`;var Uf=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,className:j(`text-sm text-muted-foreground`,e),...t}));Uf.displayName=`CardDescription`;var Wf=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,className:j(`p-6 pt-0`,e),...t}));Wf.displayName=`CardContent`;var Gf=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,className:j(`flex items-center p-6 pt-0`,e),...t}));Gf.displayName=`CardFooter`;var Kf=oa(`whitespace-nowrap inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 hover-elevate`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground`,secondary:`border-transparent bg-secondary text-secondary-foreground`,destructive:`border-transparent bg-destructive text-destructive-foreground`,outline:`border [border-color:var(--badge-outline)] shadow-xs`}},defaultVariants:{variant:`default`}});function qf({className:e,variant:t,...n}){return(0,O.jsx)(`div`,{className:j(Kf({variant:t}),e),...n})}var Jf=1024;function Yf(){let[e,t]=c.useState(void 0);return c.useEffect(()=>{let e=window.matchMedia(`(max-width: 1023px)`),n=()=>{t(window.innerWidth<Jf)};return e.addEventListener(`change`,n),t(window.innerWidth<Jf),()=>e.removeEventListener(`change`,n)},[]),!!e}var Xf=c.forwardRef(({className:e,type:t,...n},r)=>(0,O.jsx)(`input`,{type:t,className:j(`flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:r,...n}));Xf.displayName=`Input`;var Zf=Object.defineProperty,Qf=(e,t)=>
9Zf(e,`name`,{value:t,configurable:!0}),$f=`horizontal`,ep=[`horizontal`,`vertical`],tp=c.forwardRef(Qf(function(e,t){let{decorative:n,orientation:r=$f,...i}=e,a=np(r)?r:$f,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,O.jsx)(lr.div,{"data-orientation":a,...o,...i,ref:t})},`Separator`));function np(e){return ep.includes(e)}Qf(np,`isValidOrientation`);var rp=tp,ip=c.forwardRef(({className:e,orientation:t=`horizontal`,decorative:n=!0,...r},i)=>(0,O.jsx)(rp,{ref:i,decorative:n,orientation:t,className:j(`shrink-0 bg-border`,t===`horizontal`?`h-[1px] w-full`:`h-full w-[1px]`,e),...r}));ip.displayName=rp.displayName;var ap=Object.defineProperty,op=(e,t)=>ap(e,`name`,{value:t,configurable:!0}),sp=`focusScope.autoFocusOnMount`,cp=`focusScope.autoFocusOnUnmount`,lp={bubbles:!1,cancelable:!0},up=c.forwardRef(op(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=c.useState(null),u=pr(i),d=pr(a),f=c.useRef(null),p=En(t,l),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let e=function(e){if(m.paused||!s)return;let t=e.target;s.contains(t)?f.current=t:_p(f.current,{select:!0})},t=function(e){if(m.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||_p(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&_p(s)};op(e,`handleFocusIn`),op(t,`handleFocusOut`),op(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,m.paused]),c.useEffect(()=>{if(s){vp.add(m);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(sp,lp);s.addEventListener(sp,u),s.dispatchEvent(t),t.defaultPrevented||(dp(xp(pp(s)),{select:!0}),document.activeElement===e&&_p(s))}return()=>{s.removeEventListener(sp,u),setTimeout(()=>{let t=new CustomEvent(cp,lp);s.addEventListener(cp,d),s.dispatchEvent(t),t.defaultPrevented||_p(e??document.body,{select:!0}),s.removeEventListener(cp,d),vp.remove(m)},0)}}},[s,u,d,m]);let h=c.useCallback(e=>{if(!n&&!r||m.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=fp(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&_p(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&_p(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,m.paused]);return(0,O.jsx)(lr.div,{tabIndex:-1,...o,ref:p,onKeyDown:h})},`FocusScope`));function dp(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(_p(r,{select:t}),document.activeElement!==n)return}op(dp,`focusFirst`);function fp(e){let t=pp(e);return[mp(t,e),mp(t.reverse(),e)]}op(fp,`getTabbableEdges`);function pp(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:op(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}op(pp,`getTabbableCandidates`);function mp(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):hp(r,{upTo:t})))return r}op(mp,`findVisible`);function hp(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}op(hp,`isHidden`);function gp(e){return e instanceof HTMLInputElement&&`select`in e}op(gp,`isSelectableInput`);function _p(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gp(e)&&t&&e.select()}}op(_p,`focus`);var vp=yp();function yp(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=bp(e,t),e.unshift(t)},remove(t){e=bp(e,t),e[0]?.resume()}}}op(yp,`createFocusScopesStack`);function bp(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}op(bp,`arrayRemove`);function xp(e){return e.filter(e=>e.tagName!==`A`)}op(xp,`removeLinks`);var Sp=Object.defineProperty,Cp=(e,t)=>Sp(e,`name`,{value:t,configurable:!0}),wp=0,Tp=null;function Ep(e){return Dp(),e.children}Cp(Ep,`FocusGuards`);function Dp(){c.useEffect(()=>{Tp||={start:Op(),end:Op()};let{start:e,end:t}=Tp;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),wp++,()=>{wp===1&&(Tp?.start.remove(),Tp?.end.remove(),Tp=null),wp=Math.max(0,wp-1)}},[])}Cp(Dp,`useFocusGuards`);function Op(){let 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}Cp(Op,`createFocusGuard`);var kp=function(){return kp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kp.apply(this,arguments)};function Ap(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}
vendor: 8,998 bytes, lines 9-49
9function jp(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Mp=`right-scroll-bar-position`,Np=`width-before-scroll-bar`,see=`with-scroll-bars-hidden`,cee=`--removed-body-scroll-bar-size`;function Pp(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function lee(e,t){var n=(0,c.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var uee=typeof window<`u`?c.useLayoutEffect:c.useEffect,Fp=new WeakMap;function dee(e,t){var n=lee(t||null,function(t){return e.forEach(function(e){return Pp(e,t)})});return uee(function(){var t=Fp.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Pp(e,null)}),i.forEach(function(e){r.has(e)||Pp(e,a)})}Fp.set(n,e)},[e]),n}function fee(e){return e}function pee(e,t){t===void 0&&(t=fee);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function mee(e){e===void 0&&(e={});var t=pee(null);return t.options=kp({async:!0,ssr:!1},e),t}var Ip=function(e){var t=e.sideCar,n=Ap(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return c.createElement(r,kp({},n))};Ip.isSideCarExport=!0;function hee(e,t){return e.useMedium(t),Ip}var Lp=mee(),Rp=function(){},zp=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Rp,onWheelCapture:Rp,onTouchMoveCapture:Rp}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Ap(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=dee([n,t]),w=kp(kp({},x),i);return c.createElement(c.Fragment,null,d&&c.createElement(S,{sideCar:Lp,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?c.cloneElement(c.Children.only(s),kp(kp({},w),{ref:C})):c.createElement(y,kp({},w,{className:l,ref:C}),s))});zp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},zp.classNames={fullWidth:Np,zeroRight:Mp};var gee=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function _ee(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=gee();return t&&e.setAttribute(`nonce`,t),e}function vee(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yee(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Bp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_ee())&&(vee(t,n),yee(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Vp=function(){var e=Bp();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Hp=function(){var e=Vp();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Up={left:0,top:0,right:0,gap:0},Wp=function(e){return parseInt(e||``,10)||0},Gp=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Wp(n),Wp(r),Wp(i)]},Kp=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Up;var t=Gp(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},qp=Hp(),Jp=`data-scroll-locked`,Yp=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` 10 .${see} { 11 overflow: hidden ${r}; 12 padding-right: ${s}px ${r}; 13 } 14 body[${Jp}] { 15 overflow: hidden ${r}; 16 overscroll-behavior: contain; 17 ${[t&&`position: relative ${r};`,n===`margin`&&` 18 padding-left: ${i}px; 19 padding-top: ${a}px; 20 padding-right: ${o}px; 21 margin-left:0; 22 margin-top:0; 23 margin-right: ${s}px ${r}; 24 `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} 25 } 26 27 .${Mp} { 28 right: ${s}px ${r}; 29 } 30 31 .${Np} { 32 margin-right: ${s}px ${r}; 33 } 34 35 .${Mp} .${Mp} { 36 right: 0 ${r}; 37 } 38 39 .${Np} .${Np} { 40 margin-right: 0 ${r}; 41 } 42 43 body[${Jp}] { 44 ${cee}: ${s}px; 45 } 46`},Xp=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Zp=function(){c.useEffect(function(){return document.body.setAttribute(Jp,(Xp()+1).toString()),function(){var e=Xp()-1;e<=0?document.body.removeAttribute(Jp):document.body.setAttribute(Jp,e.toString())}},[])},Qp=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Zp();var a=c.useMemo(function(){return Kp(i)},[i]);return c.createElement(qp,{styles:Yp(a,!t,i,n?``:`!important`)})},$p=!1;if(typeof window<`u`)try{var em=Object.defineProperty({},"passive",{get:function(){return $p=!0,!0}});window.addEventListener(`test`,em,em),window.removeEventListener(`test`,em,em)}catch{$p=!1}var tm=$p?{passive:!1}:!1,nm=function(e){return e.tagName===`TEXTAREA`},rm=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!nm(e)&&n[t]===`visible`)},im=function(e){return rm(e,`overflowY`)},am=function(e){return rm(e,`overflowX`)},om=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),lm(e,r)){var i=um(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},sm=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},cm=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},lm=function(e,t){return e===`v`?im(t):am(t)},um=function(e,t){return e===`v`?sm(t):cm(t)},dm=function(e,t){return e===`h`&&t===`rtl`?-1:1},fm=function(e,t,n,r,i){var a=dm(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=um(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&lm(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},pm=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mm=function(e){return[e.deltaX,e.deltaY]},hm=function(e){return e&&`current`in e?e.current:e},gm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_m=function(e){return` 47 .block-interactivity-${e} {pointer-events: none;} 48 .allow-interactivity-${e} {pointer-events: all;} 49`},vm=0,ym=[];function bm(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),i=c.useState(vm++)[0],a=c.useState(Hp)[0],o=c.useRef(e);c.useEffect(function(){o.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=jp([e.lockRef.current],(e.shards||[]).map(hm),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=pm(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=om(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=om(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return fm(h,t,e,h===`h`?s:c,!0)},[]),l=c.useCallback(function(e){var n=e;if(ym.length&&ym[ym.length-1]===a){var r=`deltaY`in n?mm(n):pm(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&gm(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}
49if(!i){var c=(o.current.shards||[]).map(hm).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:xm(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=pm(e),r.current=void 0},[]),f=c.useCallback(function(t){u(t.type,mm(t),t.target,s(t,e.lockRef.current))},[]),p=c.useCallback(function(t){u(t.type,pm(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return ym.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,tm),document.addEventListener(`touchmove`,l,tm),document.addEventListener(`touchstart`,d,tm),function(){ym=ym.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,tm),document.removeEventListener(`touchmove`,l,tm),document.removeEventListener(`touchstart`,d,tm)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:_m(i)}):null,m?c.createElement(Qp,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Sm=hee(Lp,bm),Cm=c.forwardRef(function(e,t){return c.createElement(zp,kp({},e,{ref:t,sideCar:Sm}))});Cm.classNames=zp.classNames;var wm=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Tm=new WeakMap,Em=new WeakMap,Dm={},Om=0,km=function(e){return e&&(e.host||km(e.parentNode))},Am=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=km(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},jm=function(e,t,n,r){var i=Am(t,Array.isArray(e)?e:[e]);Dm[n]||(Dm[n]=new WeakMap);var a=Dm[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Tm.get(e)||0)+1,l=(a.get(e)||0)+1;Tm.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Em.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Om++,function(){o.forEach(function(e){var t=Tm.get(e)-1,i=a.get(e)-1;Tm.set(e,t),a.set(e,i),t||(Em.has(e)||e.removeAttribute(r),Em.delete(e)),i||e.removeAttribute(n)}),Om--,Om||(Tm=new WeakMap,Tm=new WeakMap,Em=new WeakMap,Dm={})}},Mm=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||wm(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),jm(r,i,n,`aria-hidden`)):function(){return null}},Nm=Object.defineProperty,Pm=(e,t)=>Nm(e,`name`,{value:t,configurable:!0}),Fm=`Dialog`,[Im,Lm]=An(Fm),[Rm,zm]=Im(Fm),Bm=Pm(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=c.useRef(null),l=c.useRef(null),[u,d]=Zr({prop:r,defaultProp:i??!1,onChange:a,caller:Fm}),[f,p]=c.useState(0),[m,h]=c.useState(0);return(0,O.jsx)(Rm,{scope:t,triggerRef:s,contentRef:l,contentId:Cc(),titleId:Cc(),descriptionId:Cc(),titlePresent:f>0,descriptionPresent:m>0,setTitleCount:p,setDescriptionCount:h,open:u,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})},`Dialog`),Vm=`DialogTrigger`,Hm=c.forwardRef(Pm(function(e,t){let{__scopeDialog:n,...r}=e,i=zm(Vm,n),a=En(t,i.triggerRef);return(0,O.jsx)(lr.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":ch(i.open),...r,ref:a,onClick:k(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),Um=`DialogPortal`,[Wm,Gm]=Im(Um,{forceMount:void 0}),Km=Pm(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=zm(Um,t);return(0,O.jsx)(Wm,{scope:t,forceMount:n,children:c.Children.map(r,e=>(0,O.jsx)(Lr,{present:n||a.open,children:(0,O.jsx)(Nr,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),qm=`DialogOverlay`,Jm=c.forwardRef(Pm(function(e,t){let n=Gm(qm,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=zm(qm,e.__scopeDialog);return a.modal?(0,O.jsx)(Lr,{present:r||a.open,children:(0,O.jsx)(Xm,{...i,ref:t})}):null},`DialogOverlay`)),Ym=Pn(`DialogOverlay.RemoveScroll`),Xm=c.forwardRef(Pm(function(e,t){let{__scopeDialog:n,...r}=e,i=zm(qm,n),a=En(t,Cr());return(0,O.jsx)(Cm,{as:Ym,allowPinchZoom:!0,shards:[i.contentRef],children:(0,O.jsx)(lr.div,{"data-state":ch(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Zm=`DialogContent`,Qm=c.forwardRef(Pm(function(e,t){let n=Gm(Zm,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=zm(Zm,e.__scopeDialog);return(0,O.jsx)(Lr,{present:r||a.open,children:a.modal?(0,O.jsx)($m,{...i,ref:t}):(0,O.jsx)(eh,{...i,ref:t})})},`DialogContent`)),$m=c.forwardRef(Pm(function(e,t){let n=zm(Zm,e.__scopeDialog),r=c.useRef(null),i=En(t,n.contentRef,r);return c.useEffect(()=>{let e=r.current;if(e)return Mm(e)},[]),(0,O.jsx)(th,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:k(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:k(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:k(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),eh=c.forwardRef(Pm(function(e,t){let n=zm(Zm,e.__scopeDialog),r=c.useRef(!1),i=c.useRef(!1);return(0,O.jsx)(th,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),th=c.forwardRef(Pm(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=zm(Zm,n);return Dp(),(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(up,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,O.jsx)(xr,{role:`dialog`,id:s.
49contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":ch(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),nh=`DialogTitle`,rh=c.forwardRef(Pm(function(e,t){let{__scopeDialog:n,...r}=e,i=zm(nh,n),{setTitleCount:a}=i;return jr(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,O.jsx)(lr.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),ih=`DialogDescription`,ah=c.forwardRef(Pm(function(e,t){let{__scopeDialog:n,...r}=e,i=zm(ih,n),{setDescriptionCount:a}=i;return jr(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,O.jsx)(lr.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),oh=`DialogClose`,sh=c.forwardRef(Pm(function(e,t){let{__scopeDialog:n,...r}=e,i=zm(oh,n);return(0,O.jsx)(lr.button,{type:`button`,...r,ref:t,onClick:k(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function ch(e){return e?`open`:`closed`}Pm(ch,`getState`);var lh=Bm,uh=Km,dh=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(Jm,{className:j(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));dh.displayName=Jm.displayName;var fh=oa(`fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out`,{variants:{side:{top:`inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,bottom:`inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,left:`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,right:`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`}},defaultVariants:{side:`right`}}),ph=c.forwardRef(({side:e=`right`,className:t,children:n,...r},i)=>(0,O.jsxs)(uh,{children:[(0,O.jsx)(dh,{}),(0,O.jsxs)(Qm,{ref:i,className:j(fh({side:e}),t),...r,children:[(0,O.jsxs)(sh,{className:`absolute right-4 top-4 roun
49ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,O.jsx)(ds,{className:`h-4 w-4`}),(0,O.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),n]})]}));ph.displayName=Qm.displayName;var mh=({className:e,...t})=>(0,O.jsx)(`div`,{className:j(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});mh.displayName=`SheetHeader`;var hh=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(rh,{ref:n,className:j(`text-lg font-semibold text-foreground`,e),...t}));hh.displayName=rh.displayName;var gh=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(ah,{ref:n,className:j(`text-sm text-muted-foreground`,e),...t}));gh.displayName=ah.displayName;function _h({className:e,...t}){return(0,O.jsx)(`div`,{className:j(`animate-pulse rounded-md bg-primary/10`,e),...t})}var vh=`sidebar_state`,yh=604800,bh=`16rem`,bee=`18rem`,xee=`3rem`,See=`b`,xh=c.createContext(null);function Sh(){let e=c.useContext(xh);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}var Ch=c.forwardRef(({defaultOpen:e=!1,open:t,onOpenChange:n,className:r,style:i,children:a,...o},s)=>{let l=Yf(),[u,d]=c.useState(!1),[f,p]=c.useState(e),m=t??f,h=c.useCallback(e=>{let t=typeof e==`function`?e(m):e;n?n(t):p(t),document.cookie=`${vh}=${t}; path=/; max-age=${yh}`},[n,m]),g=c.useCallback(()=>l?d(e=>!e):h(e=>!e),[l,h,d]);c.useEffect(()=>{let e=e=>{e.key===See&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),g())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g]);let _=m?`expanded`:`collapsed`,v=c.useMemo(()=>({state:_,open:m,setOpen:h,isMobile:l,openMobile:u,setOpenMobile:d,toggleSidebar:g}),[_,m,h,l,u,d,g]);return(0,O.jsx)(xh.Provider,{value:v,children:(0,O.jsx)(Rd,{delayDuration:0,children:(0,O.jsx)(`div`,{style:{"--sidebar-width":bh,"--sidebar-width-icon":xee,...i},className:j(`group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar`,r),ref:s,...o,children:a})})})});Ch.displayName=`SidebarProvider`;var wh=c.forwardRef(({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a},o)=>{let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=Sh();return n===`none`?(0,O.jsx)(`div`,{className:j(`flex h-full w-[--sidebar-width] flex-col bg-background text-sidebar-foreground`,r),ref:o,...a,children:i}):s?(0,O.jsx)(lh,{open:l,onOpenChange:u,...a,children:(0,O.jsxs)(ph,{"data-sidebar":`sidebar`,"data-mobile":`true`,className:`w-[--sidebar-width] bg-background p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":bee},side:e,children:[(0,O.jsxs)(mh,{className:`sr-only`,children:[(0,O.jsx)(hh,{children:`Sidebar`}),(0,O.jsx)(gh,{children:`Displays the mobile sidebar.`})]}),(0,O.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,O.jsxs)(`div`,{ref:o,className:`group peer hidden text-sidebar-foreground lg:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,children:[(0,O.jsx)(`div`,{className:j(`relative w-[--sidebar-width] transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]`:`group-data-[collapsible=icon]:w-[--sidebar-width-icon]`)}),(0,O.jsx)(`div`,{className:j(`fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear lg:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]`:`group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,O.jsx)(`div`,{"data-sidebar":`sidebar`,className:`flex h-full w-full flex-col bg-background group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow`,children:i})})]})});wh.displayName=`Sidebar`;var Th=c.forwardRef(({className:e,onClick:t,...n},r)=>{let{toggleSidebar:i}=Sh();return(0,O.jsxs)(M,{ref:r,"data-sidebar":`trigger`,variant:`ghost`,size:`icon`,className:j(`h-7 w-7`,e),onClick:e=>{t?.(e),i()},...n,children:[(0,O.jsx)(Ao,{}),(0,O.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})});Th.displayName=`SidebarTrigger`;var Eh=c.forwardRef(({className:e,...t},n)=>{let{toggleSidebar:r}=Sh();return(0,O.jsx)(`button`,{ref:n,"data-sidebar":`rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:r,title:`Toggle Sidebar`,className:j(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex`,`[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...t})});Eh.displayName=`SidebarRail`;var Dh=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`main`,{ref:n,className:j(`relative flex w-full flex-1 flex-col bg-accent/30`,`lg:peer-data-[variant=inset]:m-2 lg:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 lg:peer-data-[variant=inset]:ml-0 lg:peer-data-[variant=inset]:rounded-xl lg:peer-data-[variant=inset]:shadow`,e),...t}));Dh.displayName=`SidebarInset`;var Cee=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(Xf,{ref:n,"data-sidebar":`input`,className:j(`h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring`,e),...t}));Cee.displayName=`SidebarInput`;var Oh=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,"data-sidebar":`header`,className:j(`flex flex-col gap-2 p-2`,e),...t}));Oh.displayName=`SidebarHeader`;var kh=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,"data-sidebar":`footer`,className:j(`flex flex-col gap-2 p-2`,e),...t}));kh.displayName=`SidebarFooter`;var wee=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(ip,{ref:n,"data-sidebar":`separator`,className:j(`mx-2 w-auto bg-sidebar-border`,e),...t}));wee.displayName=`SidebarSeparator`;var Ah=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,"data-sidebar":`content`,className:j(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t}));Ah.displayName=`SidebarContent`;var jh=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,"data-sidebar":`group`,className:j(`relative flex w-full min-w-0 flex-col p-2`,e),...t}));jh.displayName=`SidebarGroup`;var Mh=c.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,O.jsx)(t?Fn:`div`,{ref:r,"data-sidebar":`group-label`,className:j(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground
49/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...n}));Mh.displayName=`SidebarGroupLabel`;var Tee=c.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,O.jsx)(t?Fn:`button`,{ref:r,"data-sidebar":`group-action`,className:j(`absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 after:lg:hidden`,`group-data-[collapsible=icon]:hidden`,e),...n}));Tee.displayName=`SidebarGroupAction`;var Eee=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,"data-sidebar":`group-content`,className:j(`w-full text-sm`,e),...t}));Eee.displayName=`SidebarGroupContent`;var Nh=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`ul`,{ref:n,"data-sidebar":`menu`,className:j(`flex w-full min-w-0 flex-col gap-1`,e),...t}));Nh.displayName=`SidebarMenu`;var Ph=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`li`,{ref:n,"data-sidebar":`menu-item`,className:j(`group/menu-item relative`,e),...t}));Ph.displayName=`SidebarMenuItem`;var Dee=oa(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:!p-0`}},defaultVariants:{variant:`default`,size:`default`}}),Fh=c.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o},s)=>{let c=e?Fn:`button`,{isMobile:l,state:u}=Sh(),d=(0,O.jsx)(c,{ref:s,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:j(Dee({variant:n,size:r}),a),...o});return i?(typeof i==`string`&&(i={children:i}),(0,O.jsxs)(zd,{children:[(0,O.jsx)(Bd,{asChild:!0,children:d}),(0,O.jsx)(Vd,{side:`right`,align:`center`,hidden:u!==`collapsed`||l,...i})]})):d});Fh.displayName=`SidebarMenuButton`;var Oee=c.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},i)=>(0,O.jsx)(t?Fn:`button`,{ref:i,"data-sidebar":`menu-action`,className:j(`absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 after:lg:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,n&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground lg:opacity-0`,e),...r}));Oee.displayName=`SidebarMenuAction`;var kee=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,"data-sidebar":`menu-badge`,className:j(`pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground`,`peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,e),...t}));kee.displayName=`SidebarMenuBadge`;var Aee=c.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{let i=c.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,O.jsxs)(`div`,{ref:r,"data-sidebar":`menu-skeleton`,className:j(`flex h-8 items-center gap-2 rounded-md px-2`,e),...n,children:[t&&(0,O.jsx)(_h,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),(0,O.jsx)(_h,{className:`h-4 max-w-[--skeleton-width] flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})});Aee.displayName=`SidebarMenuSkeleton`;var jee=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`ul`,{ref:n,"data-sidebar":`menu-sub`,className:j(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,e),...t}));jee.displayName=`SidebarMenuSub`;var Mee=c.forwardRef(({...e},t)=>(0,O.jsx)(`li`,{ref:t,...e}));Mee.displayName=`SidebarMenuSubItem`;var Nee=c.forwardRef(({asChild:e=!1,size:t=`md`,isActive:n,className:r,...i},a)=>(0,O.jsx)(e?Fn:`a`,{ref:a,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:j(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground`,`data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,`group-data-[collapsible=icon]:hidden`,r),...i}));Nee.displayName=`SidebarMenuSubButton`;var Pee=()=>{let{open:e}=Sh();return(0,O.jsxs)(_e,{href:`/dashboard`,className:`flex items-center gap-2 cursor-pointer`,children:[(0,O.jsx)(`img`,{src:`/maslow.svg`,alt:`Logo`,width:40,height:40}),(0,O.jsxs)(`div`,{className:j(`flex flex-col`,e?``:`hidden`),children:[(0,O.jsx)(`p`,{className:`font-semibold m-0`,children:`Maslow`}),(0,O.jsx)(`p`,{className:`text-sm m-0 -mt-1 text-muted-foreground`,children:`Insights AI`})]})]})},Fee=()=>(0,O.jsxs)(_e,{href:`/dashboard`,className:`flex items-center gap-2 cursor-pointer`,children:[(0,O.jsx)(`img`,{src:`/maslow.svg`,alt:`Logo`,width:40,height:40}),(0,O.jsxs)(`div`,{className:j(`flex flex-col`),children:[(0,O.jsx)(`p`,{className:`font-semibold m-0`,children:`Maslow`}),(0,O.jsx)(`p`,{className:`text-sm m-0 -mt-1 text-muted-foreground`,children:`Insights AI`})]})]}),Ih=({newTab:e=!1})=>{let t=`flex items-center gap-2 hover:opacity-80 transition-opacity`,n=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`img`,{src:`/maslow.svg`,alt:`Maslow Insights`,width:36,height:36}),(0,O.jsxs)(`span`,{className:`text-xl font-semibold text-foreground`,children:[`Maslow Insights`,(0,O.jsx)(`sup`,{className:`text-xs font-normal`,children:`â¢`})]})]});return e?(0,O.jsx)(`a`,{href:`/`,target:`_blank`,rel:`noopener noreferrer`,className:t,children:n}):(0,O.jsx)(_e,{href:`/`,className:t,children:n})};function Iee(){return(0,O.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,O.jsx)(`header`,{className:`border-b sticky top-0 bg-background z-50`,children:(0,O.jsxs)(`nav`,{className:`container max-w-6xl mx-auto px-6 py-4 flex justify-between items-center`,children:[(0,O.jsx)(Ih,{}),(0,O.jsxs)(`div`,{className:`flex gap-3`,children:[(0,O.jsx)(_e,{href:`/industry-insights`,asChild:!0,children:(0,O.jsx)(M,{variant:`outline`,size:`sm`,className:`hidden sm:flex`,children:`Industry Insights`})}),(0,O.jsx)(M,{asChild:!0,size:`sm`,children:(0,O.jsx)(`a`,{href:`https://meetings.hubspot.com/bforrestal/maslow-insights-intro-virtual-demo`,target:`_blank`,rel:`noopener noreferrer`,children:`Book a Demo`})}),(0,O.jsx)(_e,{href:`/login`,asChild:!0,children:(0,O.jsx)(M,{variant:`ghost`,size:`sm`,children:`Login`})})]})]})}),(0,O.jsxs)(`main`,{className:`container max-w-6xl mx-auto px-6`,children:[(0,O.jsxs)(`section`,{className:`py-16 text-center`,children:[(0,O.jsx)(`h1`,{className:`text-4xl md:text-5xl font-bold tracking-tight mb-4`,children:`AI-Powered Recognition Insights`}),(0,O.jsx)(`p`,{className:`text-lg text-muted-foreground max-w-2xl mx-auto mb-2`,children:`Maslow Insights is an AI-powered recognition intelligence tool built by Xceleration.`}),(0,O.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-3`,children:[(0,O.jsx)(M,{asChild:!0,size:`lg`,children:(0,O.jsx)(`a`,{href:`https://meetings.hubspot.com/bforrestal/maslow-insights-intro-virtual-demo`,target:`_blank`,rel:`noopener noreferrer`,children:`Book a Demo`})}),(0,O.jsx)(_e,{href:`/industry-insights`,asChild:!0,children:(0,O.jsx)(M,{variant:`outline`,size:`lg`,children:`Explore Industry Insights`})})]})]}),(0,O.jsx)(`section`,{className:`pb-16`,children:(0,O.jsxs)(`div`,{className:`grid md:grid-cols-2 gap-8 max-w-5xl mx-auto items-start`,children:[(0,O.jsxs)(Bf,{className:`group hover:shadow-md transition-all duration-200 hover:-translate-y-1`,children:[(0,O.jsxs)(Vf,{children:[(0,O.jsx)(`div`,{className:`w-12 h-12 rounded-lg bg-secondary flex items-center justify-center mb-4`,children:(0,O.jsx)(io,{className:`w-6 h-6 text-foreground`})}),(0,O.jsx)(qf,{variant:`outline`,className:`w-fit mb-2`,children:`Public Access`}),(0,O.jsx)(Hf,{className:`text-2xl`,children:`Industry Insights`}),(0,O.jsx)(Uf,{children:`Explore general recognition trends and best practices without signing in.`})]}),(0,O.jsxs)(Wf,{className:`space-y-4`,children:[(0,O.jsxs)(`ul`,{className:`space-y-2 text-sm`,children:[(0,O.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`span`,{className:`text-foreground font-semibold mt-0.5`,children:`â`}),(0,O.jsx)(`span`,{children:`Industry benchmarks and trends`})]}),(0,O.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`span`,{className:`text-foreground font-semibold mt-0.5`,children:`â`}),(0,O.jsx)(`span`,{children:`Recognition best practices`})]}),(0,O.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`span`,{className:`text-foreground font-semibold mt-0.5`,children:`â`}),(0,O.jsx)(`span`,{children:`General analytics and reports`})]}),(0,O.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`span`,{className:`text-foreground font-semibold mt-0.5`,children:`â`}),(0,O.jsx)(`span`,{children:`AI-powered insights`})]}),(0,O.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`span`,{className:`text-foreground font-semibold mt-0.5`,children:`â`}),(0,O.jsx)(`span`,{children:`No login required`})]})]}),(0,O.jsx)(_e,{href:`/industry-insights`,asChild:!0,children:(0,O.jsx)(M,{className:`w-full`,size:`lg`,children:`Explore Industry Insights`})})]})]}),(0,O.jsxs)(Bf,{className:`group hover:shadow-md transition-all duration-200 hover:-translate-y-1`,children:[(0,O.jsxs)(Vf,{children:[(0,O.jsx)(`div`,{className:`w-12 h-12 rounded-lg bg-secondary flex items-center justify-center mb-4`,children:(0,O.jsx)(bo,{className:`w-6 h-6 text-foreground`})}),(0,O.jsx)(qf,{variant:`outline`,className:`w-fit mb-2`,children:`Requires L
49ogin`}),(0,O.jsx)(Hf,{className:`text-2xl`,children:`Personal Insights`}),(0,O.jsx)(Uf,{children:`Personal Insights is built for users of RewardStation, Xceleration's employee recognition platform.`})]}),(0,O.jsxs)(Wf,{className:`space-y-4`,children:[(0,O.jsxs)(`ul`,{className:`space-y-2 text-sm`,children:[(0,O.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`span`,{className:`text-foreground font-semibold mt-0.5`,children:`â`}),(0,O.jsx)(`span`,{children:`Your organization's data`})]}),(0,O.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`span`,{className:`text-foreground font-semibold mt-0.5`,children:`â`}),(0,O.jsx)(`span`,{children:`Custom reports and analytics`})]}),(0,O.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`span`,{className:`text-foreground font-semibold mt-0.5`,children:`â`}),(0,O.jsx)(`span`,{children:`RewardStation integration`})]}),(0,O.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`span`,{className:`text-foreground font-semibold mt-0.5`,children:`â`}),(0,O.jsx)(`span`,{children:`Team collaboration features`})]}),(0,O.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,O.jsx)(`span`,{className:`text-foreground font-semibold mt-0.5`,children:`â`}),(0,O.jsx)(`span`,{children:`Advanced AI analysis`})]})]}),(0,O.jsx)(_e,{href:`/login`,asChild:!0,children:(0,O.jsx)(M,{className:`w-full`,size:`lg`,children:`Login to Continue`})}),(0,O.jsxs)(`p`,{className:`text-sm text-muted-foreground text-center`,children:[`Already using RewardStation?`,` `,(0,O.jsxs)(`span`,{className:`block min-[508px]:inline min-[768px]:block min-[998px]:inline`,children:[(0,O.jsx)(_e,{href:`/login`,className:`underline hover:text-muted-foreground`,children:`Log in`}),` `,`or`,` `,(0,O.jsx)(`a`,{href:`https://meetings.hubspot.com/bforrestal/maslow-insights-intro-virtual-demo`,target:`_blank`,rel:`noopener noreferrer`,className:`underline hover:text-muted-foreground`,children:`book a demo`}),`.`]})]}),(0,O.jsxs)(`p`,{className:`text-sm text-muted-foreground text-center`,children:[`Not a RewardStation user yet?`,` `,(0,O.jsxs)(`span`,{className:`block min-[508px]:inline min-[768px]:block min-[998px]:inline`,children:[(0,O.jsx)(`a`,{href:`https://xceleration.com/rewardstation-enterprise/`,className:`underline hover:text-muted-foreground`,children:`Learn more about the platform`}),`.`]})]})]})]})]})}),(0,O.jsxs)(`section`,{className:`py-16 border-t`,children:[(0,O.jsx)(`h2`,{className:`text-3xl font-bold text-center mb-12`,children:`Powerful Features`}),(0,O.jsxs)(`div`,{className:`grid md:grid-cols-2 lg:grid-cols-4 gap-8`,children:[(0,O.jsxs)(`div`,{className:`text-center space-y-3`,children:[(0,O.jsx)(`div`,{className:`w-16 h-16 mx-auto rounded-lg bg-secondary flex items-center justify-center`,children:(0,O.jsx)(Yo,{className:`w-8 h-8 text-foreground`})}),(0,O.jsx)(`h3`,{className:`font-semibold`,children:`AI-Powered Analysis`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Advanced machine learning algorithms analyze recognition patterns`})]}),(0,O.jsxs)(`div`,{className:`text-center space-y-3`,children:[(0,O.jsx)(`div`,{className:`w-16 h-16 mx-auto rounded-lg bg-secondary flex items-center justify-center`,children:(0,O.jsx)(Ta,{className:`w-8 h-8 text-foreground`})}),(0,O.jsx)(`h3`,{className:`font-semibold`,children:`Real-Time Dashboards`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Interactive visualizations of your recognition data`})]}),(0,O.jsxs)(`div`,{className:`text-center space-y-3`,children:[(0,O.jsx)(`div`,{className:`w-16 h-16 mx-auto rounded-lg bg-secondary flex items-center justify-center`,children:(0,O.jsx)(ho,{className:`w-8 h-8 text-foreground`})}),(0,O.jsx)(`h3`,{className:`font-semibold`,children:`Actionable Insights`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Get specific recommendations to improve your programs`})]}),(0,O.jsxs)(`div`,{className:`text-center space-y-3`,children:[(0,O.jsx)(`div`,{className:`w-16 h-16 mx-auto rounded-lg bg-secondary flex items-center justify-center`,children:(0,O.jsx)(ns,{className:`w-8 h-8 text-foreground`})}),(0,O.jsx)(`h3`,{className:`font-semibold`,children:`Trend Detection`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Identify patterns and trends before they become issues`})]})]})]})]})]})}var Lee=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,Lh=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Lee[n[e]&63];return t},Rh=(function(e){if(e==null)return Bh;if(typeof e==`function`)return zh(e);if(typeof e==`object`)return Array.isArray(e)?Ree(e):zee(e);if(typeof e==`string`)return Bee(e);throw Error(`Expected function, string, or object as test`)});function Ree(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Rh(e[n]);return zh(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function zee(e){let t=e;return zh(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Bee(e){return zh(t);function t(t){return t&&t.type===e}}function zh(e){return t;
vendor: 8,747 bytes, line 49
49function t(t,n,r){return!!(Vh(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Bh(){return!0}function Vh(e){return typeof e==`object`&&!!e&&`type`in e}function Hh(e){return e}var Uh=[],Wh=`skip`;function Gh(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Rh(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Hh(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Uh,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Kh(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Kh(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Uh:[e]}function qh(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Gh(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Jh={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function Yh({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=Jh.indicator,imageBlockPolicy:c=Jh.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=ag(e,t,n,r,i,a,o,s,c);tg(l),qh(l,u)}}function Xh(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function Zh(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var Qh=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),$h=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function eg(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=Xh(e,n);if(!o||$h.has(o.protocol)||!(Qh.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=Zh(e);return o&&t.some(e=>{let t=Xh(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function tg(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)tg(t)}}var ng=Symbol(`node-seen`);function rg(e,t,n){return t===Jh.remove?{type:`remove`}:t===Jh.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function ig(e,t,n){if(t===Jh.remove)return{type:`remove`};if(t===Jh.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var ag=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[ng])return!0;if(u.tagName===`a`){let n=eg(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[ng]=!0,qh(u,l),f&&typeof d==`number`){let e=rg(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[Wh,d];f.children[d]=e.element}return Wh}return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=eg(u.properties.src,n,e,r,!0,i);if(t===null){if(u[ng]=!0,qh(u,l),f&&typeof d==`number`){let e=ig(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[Wh,d];f.children[d]=e.element}return Wh}return u.properties.src=t,!0}return!0};return l},og=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};og.prototype.normal={},og.prototype.property={},og.prototype.space=void 0;function sg(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new og(n,r,t)}function cg(e){return e.toLowerCase()}var lg=class{constructor(e,t){this.attribute=t,this.property=e}};lg.prototype.attribute=``,lg.prototype.booleanish=!1,lg.prototype.boolean=!1,lg.prototype.commaOrSpaceSeparated=!1,lg.prototype.commaSeparated=!1,lg.prototype.defined=!1,lg.prototype.mustUseProperty=!1,lg.prototype.number=!1,lg.prototype.overloadedBoolean=!1,lg.prototype.property=``,lg.prototype.spaceSeparated=!1,lg.prototype.space=void 0;var ug=e({boolean:()=>fg,booleanish:()=>pg,commaOrSpaceSeparated:()=>_g,commaSeparated:()=>gg,number:()=>N,overloadedBoolean:()=>mg,spaceSeparated:()=>hg}),dg=0,fg=vg(),pg=vg(),mg=vg(),N=vg(),hg=vg(),gg=vg(),_g=vg();function vg(){return 2**++dg}var yg=Object.keys(ug),bg=class extends lg{constructor(e,t,n,r){let i=-1;if(super(e,t),xg(this,`space`,r),typeof n==`number`)for(;++i<yg.length;){let e=yg[i];xg(this,yg[i],(n&ug[e])===ug[e])}}};bg.prototype.defined=!0;function xg(e,t,n){n&&(e[t]=n)}function Sg(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new bg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[cg(r)]=r,n[cg(a.attribute)]=r}return new og(t,n,e.space)}var Cg=Sg({properties:{ariaActiveDescendant:null,ariaAtomic:pg,ariaAutoComplete:null,ariaBusy:pg,ariaChecked:pg,ariaColCount:N,ariaColIndex:N,ariaColSpan:N,ariaControls:hg,ariaCurrent:null,ariaDescribedBy:hg,ariaDetails:null,ariaDisabled:pg,ariaDropEffect:hg,ariaErrorMessage:null,ariaExpanded:pg,ariaFlowTo:hg,ariaGrabbed:pg,ariaHasPopup:null,ariaHidden:pg,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:hg,ariaLevel:N,ariaLive:null,ariaModal:pg,ariaMultiLine:pg,ariaMultiSelectable:pg,ariaOrientation:null,ariaOwns:hg,ariaPlaceholder:null,ariaPosInSet:N,ariaPressed:pg,ariaReadOnly:pg,ariaRelevant:null,ariaRequired:pg,ariaRoleDescription:hg,ariaRowCount:N,ariaRowIndex:N,ariaRowSpan:N,ariaSelected:pg,ariaSetSize:N,ariaSort:null,ariaValueMax:N,ariaValueMin:N,ariaValueNow:N,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function wg(e,t){return t in e?e[t]:t}function Tg(e,t){return wg(e,t.toLowerCase())}var Eg=Sg({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:gg,acceptCharset:hg,accessKey:hg,action:null,allow:null,allowFullScreen:fg,allowPaymentRequest:fg,allowUserMedia:fg,alpha:fg,alt:null,as:null,async:fg,autoCapitalize:null,autoComplete:hg,autoFocus:fg,autoPlay:fg,blocking:hg,capture:null,charSet:null,checked:fg,cite:null,className:hg,closedBy:null,colorSpace:null,cols:N,colSpan:N,command:null,commandFor:null,content:null,contentEditable:pg,controls:fg,controlsList:hg,coords:N|gg,crossOrigin:null,data:null,dateTime:null,decoding:null,default:fg,defer:fg,dir:null,dirName:null,disabled:fg,download:mg,draggable:pg,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:fg,formTarget:null,headers:hg,height:N,hidden:mg,high:N,href:null,hrefLang:null,htmlFor:hg,httpEquiv:hg,id:null,imageSizes:null,imageSrcSet:null,inert:fg,inputMode:null,integrity:null,is:null,isMap:fg,itemId:null,itemProp:hg,itemRef:hg,itemScope:fg,itemType:hg,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:fg,low:N,manifest:null,max:null,maxLength:N,media:null,method:null,min:null,minLength:N,multiple:fg,muted:fg,name:null,nonce:null,noModule:fg,noValidate:fg,onAbort:null,onAfterPrint:null,onAuxCl
49ick: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:fg,optimum:N,pattern:null,ping:hg,placeholder:null,playsInline:fg,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:fg,referrerPolicy:null,rel:hg,required:fg,reversed:fg,rows:N,rowSpan:N,sandbox:hg,scope:null,scoped:fg,seamless:fg,selected:fg,shadowRootClonable:fg,shadowRootCustomElementRegistry:fg,shadowRootDelegatesFocus:fg,shadowRootMode:null,shadowRootSerializable:fg,shape:null,size:N,sizes:null,slot:null,span:N,spellCheck:pg,src:null,srcDoc:null,srcLang:null,srcSet:null,start:N,step:null,style:null,tabIndex:N,target:null,title:null,translate:null,type:null,typeMustMatch:fg,useMap:null,value:pg,width:N,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:hg,axis:null,background:null,bgColor:null,border:N,borderColor:null,bottomMargin:N,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:fg,declare:fg,event:null,face:null,frame:null,frameBorder:null,hSpace:N,leftMargin:N,link:null,longDesc:null,lowSrc:null,marginHeight:N,marginWidth:N,noResize:fg,noHref:fg,noShade:fg,noWrap:fg,object:null,profile:null,prompt:null,rev:null,rightMargin:N,rules:null,scheme:null,scrolling:pg,standby:null,summary:null,text:null,topMargin:N,valueType:null,version:null,vAlign:null,vLink:null,vSpace:N,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:fg,disablePictureInPicture:fg,disableRemotePlayback:fg,exportParts:gg,part:hg,prefix:null,property:null,results:N,security:null,unselectable:null},space:`html`,transform:Tg}),Dg=Sg({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`,maskType:`mask-type`,navDown:`nav-down`,n
49avDownLeft:`nav-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:_g,accentHeight:N,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:N,amplitude:N,arabicForm:null,ascent:N,attributeName:null,attributeType:null,azimuth:N,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:N,by:null,calcMode:null,capHeight:N,className:hg,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:N,diffuseConstant:N,direction:null,display:null,dur:null,divisor:N,dominantBaseline:null,download:fg,dx:null,dy:null,edgeMode:null,editable:null,elevation:N,enableBackground:null,end:null,event:null,exponent:N,externalResourcesRequired:null,fill:null,fillOpacity:N,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:gg,g2:gg,glyphName:gg,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:N,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:N,horizOriginX:N,horizOriginY:N,id:null,ideographic:N,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:N,k:N,k1:N,k2:N,k3:N,k4:N,kernelMatrix:_g,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:N,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:N,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: 3,685 bytes, line 49
49Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:N,overlineThickness:N,paintOrder:null,panose1:null,path:null,pathLength:N,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:hg,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:N,pointsAtY:N,pointsAtZ:N,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_g,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_g,rev:_g,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_g,requiredFeatures:_g,requiredFonts:_g,requiredFormats:_g,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:N,specularExponent:N,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:N,strikethroughThickness:N,string:null,stroke:null,strokeDashArray:_g,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:N,strokeOpacity:N,strokeWidth:null,style:null,surfaceScale:N,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_g,tabIndex:N,tableValues:null,target:null,targetX:N,targetY:N,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_g,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:N,underlineThickness:N,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:N,values:null,vAlphabetic:N,vMathematical:N,vectorEffect:null,vHanging:N,vIdeographic:N,version:null,vertAdvY:N,vertOriginX:N,vertOriginY:N,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:N,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:wg}),Og=Sg({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()}}),kg=Sg({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Tg}),Ag=Sg({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),jg={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`},Mg=/[A-Z]/g,Ng=/-[a-z]/g,Pg=/^data[-\w.:]+$/i;function Fg(e,t){let n=cg(t),r=t,i=lg;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Pg.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ng,Lg);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ng.test(e)){let n=e.replace(Mg,Ig);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=bg}return new i(r,t)}function Ig(e){return`-`+e.toLowerCase()}function Lg(e){return e.charAt(1).toUpperCase()}var Rg=sg([Cg,Eg,Og,kg,Ag],`html`),zg=sg([Cg,Dg,Og,kg,Ag],`svg`);function Bg(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();
vendor: 5,225 bytes, line 49
49(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Vg(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Hg=/[#.]/g;function Ug(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Hg.lastIndex=i;let e=Hg.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Wg(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Gg(e){return e.join(` `).trim()}function Kg(e,t,n){let r=n?Qg(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Ug(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,qg(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Jg(e,o.properties,t,n)}for(let e of a)Yg(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function qg(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Jg(e,t,n,r){let i=Fg(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Wg(r):i.commaSeparated?Bg(r):i.commaOrSpaceSeparated?Wg(Bg(r).join(` `)):Xg(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Zg(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Xg(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Yg(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(let n of t)Yg(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Yg(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}}function Xg(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||cg(n)===cg(t)))return!0}return n}function Zg(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Qg(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var $g=`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`.split(`.`),e_=Kg(Rg,`div`),t_=Kg(zg,`g`,$g),n_={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 r_(e,t){return i_(e,t||{})||{type:`root`,children:[]}}function i_(e,t){let n=a_(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function a_(e,t){switch(e.nodeType){case 1:return u_(e,t);case 3:return c_(e);case 8:return l_(e);case 9:return o_(e,t);case 10:return s_();case 11:return o_(e,t);default:return}}function o_(e,t){return{type:`root`,children:d_(e,t)}}function s_(){return{type:`doctype`}}function c_(e){return{type:`text`,value:e.nodeValue||``}}function l_(e){return{type:`comment`,value:e.nodeValue||``}}function u_(e,t){let n=e.namespaceURI,r=n===n_.svg?t_:e_,i=n===n_.html?e.tagName.toLowerCase():e.tagName,a=n===n_.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++c<o.length;)s[o[c]]=e.getAttribute(o[c])||``;return r(i,s,d_(a,t))}function d_(e,t){let n=e.childNodes,r=[],i=-1;for(;++i<n.length;){let e=i_(n[i],t);e!==void 0&&r.push(e)}return r}var f_=new DOMParser;function p_(e,t){return r_(t?.fragment?m_(e):f_.parseFromString(e,`text/html`))}function m_(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var h_=(function(e,t,n){let r=Rh(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),g_=(function(e){if(e==null)return b_;if(typeof e==`string`)return v_(e);if(typeof e==`object`)return __(e);if(typeof e==`function`)return y_(e);throw Error("Expected function, string, or array as `test`")});function __(e){let t=[],n=-1;for(;++n<e.length;)t[n]=g_(e[n]);return y_(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function v_(e){return y_(t);function t(t){return t.tagName===e}}function y_(e){return t;
49function t(t,n,r){return!!(x_(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function b_(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function x_(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var S_=/\n/g,C_=/[\t ]+/g,w_=g_(`br`),T_=g_(R_),E_=g_(`p`),D_=g_(`tr`),O_=g_([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,L_,z_]),k_=g_(`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`.split(`.`));function A_(e,t){let n=t||{},r=`children`in e?e.children:[],i=k_(e),a=I_(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...N_(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...j_(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?w_(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(` 50`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function j_(e,t,n){return e.type===`element`?M_(e,t,n):e.type===`text`?n.whitespace===`normal`?N_(e,n):P_(e):[]}function M_(e,t,n){let r=I_(e,n),i=e.children||[],a=-1,o=[];if(O_(e))return o;let s,c;for(w_(e)||D_(e)&&h_(t,e,D_)?c=` 51`:E_(e)?(s=2,c=2):k_(e)&&(s=1,c=1);++a<i.length;)o=o.concat(j_(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?w_(i[a+1]):c}));return T_(e)&&h_(t,e,T_)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function N_(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){S_.lastIndex=a;let e=S_.exec(n),i=e&&`index`in e?e.index:n.length;r.push(F_(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a!==0||t.breakBefore,i!==n.length||t.breakAfter)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function P_(e){return[String(e.value)]}function F_(e,t,n){let r=[],i=0,a;for(;i<e.length;){C_.lastIndex=i;let n=C_.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function I_(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`}}return t.whitespace}function L_(e){return!!(e.properties||{}).hidden}function R_(e){return e.tagName===`td`||e.tagName===`th`}function z_(e){return e.tagName===`dialog`&&!(e.properties||{}).open}var B_=e({ParseError:()=>V_,SETTINGS_SCHEMA:()=>Z_,__defineFunction:()=>Cb,__defineMacro:()=>U,__defineSymbol:()=>P,__domTree:()=>WC,__parse:()=>zC,__renderToDomTree:()=>VC,__renderToHTMLTree:()=>HC,__setFontMetrics:()=>ry,default:()=>GC,render:()=>LC,renderToString:()=>RC,version:()=>UC}),V_=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`â¦`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`â¦`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},H_=/([A-Z])/g,U_=e=>e.replace(H_,`-$1`).toLowerCase(),W_={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},G_=/[&><"']/g,K_=e=>String(e).replace(G_,e=>W_[e]),q_=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?q_(e.body[0]):e:e.type===`font`?q_(e.body):e,J_=new Set([`mathord`,`textord`,`atom`]),Y_=e=>J_.has(q_(e).type),X_=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`},Z_={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)=>
vendor: 4,663 bytes, line 51
51(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 Q_(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function $_(e){return e.default===void 0?Q_(Array.isArray(e.type)?e.type[0]:e.type):e.default}function ev(e,t,n,r){var i=n[t];e[t]=i===void 0?$_(r):r.processor?r.processor(i):i}var tv=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(Z_)){var n=Z_[t];n&&ev(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),r&&r!==`ignore`){if(r===!0||r===`error`)throw new V_(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=X_(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},nv=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return dv[fv[this.id]]}sub(){return dv[pv[this.id]]}fracNum(){return dv[mv[this.id]]}fracDen(){return dv[hv[this.id]]}cramp(){return dv[gv[this.id]]}text(){return dv[_v[this.id]]}isTight(){return this.size>=2}},rv=0,iv=1,av=2,ov=3,sv=4,cv=5,lv=6,uv=7,dv=[new nv(rv,0,!1),new nv(iv,0,!0),new nv(av,1,!1),new nv(ov,1,!0),new nv(sv,2,!1),new nv(cv,2,!0),new nv(lv,3,!1),new nv(uv,3,!0)],fv=[sv,cv,sv,cv,lv,uv,lv,uv],pv=[cv,cv,cv,cv,uv,uv,uv,uv],mv=[av,ov,sv,cv,lv,uv,lv,uv],hv=[ov,ov,cv,cv,uv,uv,uv,uv],gv=[iv,iv,ov,ov,cv,cv,uv,uv],_v=[rv,iv,av,ov,av,ov,av,ov],vv={DISPLAY:dv[rv],TEXT:dv[av],SCRIPT:dv[sv],SCRIPTSCRIPT:dv[lv]},yv=[{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 bv(e){for(var t=0;t<yv.length;t++)for(var n=yv[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var xv=[];
vendor: 7,448 bytes, lines 51-142
51yv.forEach(e=>e.blocks.forEach(e=>xv.push(...e)));function Sv(e){for(var t=0;t<xv.length;t+=2)if(e>=xv[t]&&e<=xv[t+1])return!0;return!1}var Cv=e=>e+` `+e,wv=80,Tv=function(e,t){return`M95,`+(622+e+t)+` 52c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 53c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 54c44.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 55s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 56c69,-144,104.5,-217.7,106.5,-221 57l`+e/2.075+` -`+e+` 58c5.3,-9.3,12,-14,20,-14 59H400000v`+(40+e)+`H845.2724 60s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 61c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z 62M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Ev=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119 63c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 64c340,-704.7,510.7,-1060.3,512,-1067 65l`+e/2.084+` -`+e+` 66c4.7,-7.3,11,-11,19,-11 67H40000v`+(40+e)+`H1012.3 68s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 69c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 70s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 71c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z 72M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Dv=function(e,t){return`M983 `+(10+e+t)+` 73l`+e/3.13+` -`+e+` 74c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` 75H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 76s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 77c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 78c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 79c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 80c53.7,-170.3,84.5,-266.8,92.5,-289.5z 81M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Ov=function(e,t){return`M424,`+(2398+e+t)+` 82c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 83c0,-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 84s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 85s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 86l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000 87v`+(40+e)+`H1014.6 88s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 89c-2,6,-10,9,-24,9 90c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+` 91h400000v`+(40+e)+`h-400000z`},kv=function(e,t){return`M473,`+(2713+e+t)+` 92c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+` 93c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 94s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 95c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 96c0,-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 97s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 98606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},Av=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},jv=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+` 99H742v`+r+`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 100h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 101c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 102219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},Mv=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=Tv(t,wv);break;case`sqrtSize1`:r=Ev(t,wv);break;case`sqrtSize2`:r=Dv(t,wv);break;case`sqrtSize3`:r=Ov(t,wv);break;case`sqrtSize4`:r=kv(t,wv);break;case`sqrtTall`:r=jv(t,wv,n)}return r},Nv=function(e,t){switch(e){case`â`:return Cv(`M291 0 H417 V`+t+` H291z`);case`â£`:return Cv(`M145 0 H188 V`+t+` H145z`);case`â¥`:return Cv(`M145 0 H188 V`+t+` H145z`)+Cv(`M367 0 H410 V`+t+` H367z`);case`â`:return Cv(`M457 0 H583 V`+t+` H457z`);case`â¢`:return Cv(`M319 0 H403 V`+t+` H319z`);case`â¥`:return Cv(`M263 0 H347 V`+t+` H263z`);case`âª`:return Cv(`M384 0 H504 V`+t+` H384z`);case`â`:return Cv(`M312 0 H355 V`+t+` H312z`);case`â`:return Cv(`M257 0 H300 V`+t+` H257z`)+Cv(`M478 0 H521 V`+t+` H478z`);default:return``}},Pv={doubleleftarrow:`M262 157 103l10-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 104 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 105 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 106c2 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 107 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 108-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 109-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z 110m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l 111-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 112 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 113-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 114-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 115-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 116c-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 117-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 118 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 119-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 120c-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 121 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 122 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 123 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 124-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 125 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 126 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 127 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 128-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 129H435C64 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 130 435 0h399565z`,leftgroupunder:`M400000 262 131H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 132 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 133-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 134-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 135-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 136 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 137-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 138-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z 139m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 140 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 141 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 142-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
14211s5.3 5.3 12 143 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 144-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 145v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 146-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 147-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 148 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Cv(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:Cv(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:Cv(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:Cv(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 149-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 150c28.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 151 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Cv(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334 152c-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 153-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 154 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 155 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 156c100.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 157 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 158 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 159-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 160-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z 161m368.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 16260.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 163-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z 164m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 165c0 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 166-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z 167m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 16885.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 169-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z 170m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 171c0 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 172-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 173 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 174 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 175-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 176-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 177 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l 178-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 179s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 180c124.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 181 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 182-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 183 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 184 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 185-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 186-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 187 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 188-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 189 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 190m0 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 191 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
192-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 193-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 194 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 195 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 196-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z 197m0-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 198 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 199-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 200 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Cv(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:Cv(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:Cv(`M399995 440 h-120 V150 H0 v-120 H399995z`)
vendor: 6,574 bytes, lines 200-273
200,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 201 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 202-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 203-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 204 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 205-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 206-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 207-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 208 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 209c-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 210 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 211 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 212-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 213 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 214-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 215 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 216 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 217-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 218-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 219 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 220c1 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 221 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 222-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 223 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 224 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 225 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 226-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 227 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 228 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 229 -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 2303.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 23110.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 232-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 233-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 234H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 235c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 236c-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 237-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 238-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 239-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, 240-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, 241-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, 242-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, 243-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 244c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 245c-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 246s-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 247121.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 248s2.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 249c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z 250M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 251-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 25213.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 253-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 254-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 255-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 256151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 257c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 258c2,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 259c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 260c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z 261M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 262c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, 263-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 264c-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 265M0 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 266c1.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, 2671c0,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, 268-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z 269M93 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 270c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, 271-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 272c-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 273M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},
vendor: 9,322 bytes, lines 273-301
273Fv=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84 274H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z 275M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 276c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 277c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 278c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 279c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z 280M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 281c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 282c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z 283MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z 284MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z 285M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z 286M347 1759 V0 h-84 V1759 v`+t+` 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 287c-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, 288-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 289949.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 290c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, 291-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 292l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, 293-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, 29463,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 295c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` 296c-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 297c-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 298c0,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 299c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 300l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, 301-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function Iv(e){return`toText`in e}var Lv=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(Iv(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},Rv={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},zv={ex:!0,em:!0,mu:!0},Bv=function(e){return typeof e!=`string`&&(e=e.unit),e in Rv||e in zv||e===`ex`},Vv=function(e,t){var n;if(e.unit in Rv)n=Rv[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new V_(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},Hv=function(e){return+e.toFixed(4)+`em`},Uv=function(e){return e.filter(e=>e).join(` `)},Wv=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=U_(n)+`:`+r+`;`)}return t},Gv=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},Kv=function(e){var t=document.createElement(e);t.className=Uv(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},Vee=/[\s"'>/=\x00-\x1f]/,qv=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+K_(Uv(this.classes))+`"`);var n=Wv(this.style);n&&(t+=` style="`+K_(n)+`"`);for(var r of Object.keys(this.attributes)){if(Vee.test(r))throw new V_(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+K_(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},Jv=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Gv.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Kv.call(this,`span`)}toMarkup(){return qv.call(this,`span`)}},Yv=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Gv.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Kv.call(this,`a`)}toMarkup(){return qv.call(this,`a`)}},Hee=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+K_(this.src)+`"`+(` alt="`+K_(this.alt)+`"`),t=Wv(this.style);return t&&(e+=` style="`+K_(t)+`"`),e+=`'/>`,e}},Uee={î:`ıÌ`,ï:`ıÌ`,Ã:`ıÌ`,ì:`ıÌ`},Xv=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=bv(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïÃì]/.test(this.text)&&(this.text=Uee[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=Hv(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Uv(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=K_(Uv(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+Hv(this.italic)+`;`),n+=Wv(this.style),n&&(e=!0,t+=` style="`+K_(n)+`"`);var r=K_(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},Zv=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+K_(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},Qv=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,Pv[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+K_(this.alternate)+`"/>`:`<path d="`+K_(Pv[this.pathName])+`"/>`}},$v=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+K_(this.attributes[t])+`"`;return e+=`/>`,e}};function Wee(e){if(e instanceof Xv)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Gee(e){if(e instanceof Jv)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var Kee=e=>e instanceof Jv||e instanceof Yv||e instanceof Lv,ey
vendor: 20,502 bytes, line 301
301={"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],
vendor: 37,127 bytes, line 301
301116:[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: 6,290 bytes, line 301
301ty={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]},ny={Ã
:`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 ry(e,t){ey[e]=t}function iy(e,t,n){if(!ey[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=ey[t][r];if(!i&&e[0]in ny&&(r=ny[e[0]].charCodeAt(0),i=ey[t][r]),!i&&n===`text`&&Sv(r)&&(i=ey[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var ay={};function qee(e){var t=e>=5?0:e>=3?1:2;if(!ay[t]){var n=ay[t]={cssEmPerMu:ty.quad[t]/18};for(var r in ty)ty.hasOwnProperty(r)&&(n[r]=ty[r][t])}return ay[t]}var oy={math:{},text:{}};function P(e,t,n,r,i,a){oy[e][i]={font:t,group:n,replace:r},a&&r&&(oy[e][r]=oy[e][i])}var F=`math`,I=`text`,L=`main`,R=`ams`,sy=`accent-token`,cy=`bin`,ly=`close`,uy=`inner`,dy=`mathord`,fy=`op-token`,py=`open`,my=`punct`,z=`rel`,hy=`spacing`,B=`textord`;P(F,L,z,`â¡`,`\\equiv`,!0),P(F,L,z,`âº`,`\\prec`,!0),P(F,L,z,`â»`,`\\succ`,!0),P(F,L,z,`â¼`,`\\sim`,!0),P(F,L,z,`â¥`,`\\perp`),P(F,L,z,`⪯`,`\\preceq`,!0),P(F,L,z,`⪰`,`\\succeq`,!0),P(F,L,z,`â`,`\\simeq`,!0),P(F,L,z,`â£`,`\\mid`,!0),P(F,L,z,`âª`,`\\ll`,!0),P(F,L,z,`â«`,`\\gg`,!0),P(F,L,z,`â`,`\\asymp`,!0),P(F,L,z,`â¥`,`\\parallel`),P(F,L,z,`â`,`\\bowtie`,!0),P(F,L,z,`â£`,`\\smile`,!0),P(F,L,z,`â`,`\\sqsubseteq`,!0),P(F,L,z,`â`,`\\sqsupseteq`,!0),P(F,L,z,`â`,`\\doteq`,!0),P(F,L,z,`â¢`,`\\frown`,!0),P(F,L,z,`â`,`\\ni`,!0),P(F,L,z,`â`,`\\propto`,!0),P(F,L,z,`â¢`,`\\vdash`,!0),P(F,L,z,`â£`,`\\dashv`,!0),P(F,L,z,`â`,`\\owns`),P(F,L,my,`.`,`\\ldotp`),P(F,L,my,`â
`,`\\cdotp`),P(F,L,my,`â
`,`·`),P(I,L,B,`â
`,`·`),P(F,L,B,`#`,`\\#`),P(I,L,B,`#`,`\\#`),P(F,L,B,`&`,`\\&`),P(I,L,B,`&`,`\\&`),P(F,L,B,`âµ`,`\\aleph`,!0),P(F,L,B,`â`,`\\forall`,!0),P(F,L,B,`â`,`\\hbar`,!0),P(F,L,B,`â`,`\\exists`,!0),P(F,L,B,`â`,`\\nabla`,!0),P(F,L,B,`â`,`\\flat`,!0),P(F,L,B,`â`,`\\ell`,!0),P(F,L,B,`â®`,`\\natural`,!0),P(F,L,B,`â£`,`\\clubsuit`,!0),P(F,L,B,`â`,`\\wp`,!0),P(F,L,B,`â¯`,`\\sharp`,!0),P(F,L,B,`â¢`,`\\diamondsuit`,!0),P(F,L,B,`â`,`\\Re`,!0),P(F,L,B,`â¡`,`\\heartsuit`,!0),P(F,L,B,`â`,`\\Im`,!0),P(F,L,B,`â `,`\\spadesuit`,!0),P(F,L,B,`§`,`\\S`,!0),P(I,L,B,`§`,`\\S`),P(F,L,B,`¶`,`\\P`,!0),P(I,L,B,`¶`,`\\P`),P(F,L,B,`â `,`\\dag`),P(I,L,B,`â `,`\\dag`),P(I,L,B,`â `,`\\textdagger`),P(F,L,B,`â¡`,`\\ddag`),P(I,L,B,`â¡`,`\\ddag`),P(I,L,B,`â¡`,`\\textdaggerdbl`),P(F,L,ly,`â±`,`\\rmoustache`,!0),P(F,L,py,`â°`,`\\lmoustache`,!0),P(F,L,ly,`â¯`,`\\rgroup`,!0),P(F,L,py,`â®`,`\\lgroup`,!0),P(F,L,cy,`â`,`\\mp`,!0),P(F,L,cy,`â`,`\\ominus`,!0),P(F,L,cy,`â`,`\\uplus`,!0),P(F,L,cy,`â`,`\\sqcap`,!0),P(F,L,cy,`â`,`\\ast`),P(F,L,cy,`â`,`\\sqcup`,!0),P(F,L,cy,`â¯`,`\\bigcirc`,!0),P(F,L,cy,`â`,`\\bullet`,!0),P(F,L,cy,`â¡`,`\\ddagger`),P(F,L,cy,`â`,`\\wr`,!0),P(F,L,cy,`⨿`,`\\amalg`),P(F,L,cy,`&`,`\\And`),P(F,L,z,`âµ`,`\\longleftarrow`,!0),P(F,L,z,`â`,`\\Leftarrow`,!0),P(F,L,z,`â¸`,`\\Longleftarrow`,!0),P(F,L,z,`â¶`,`\\longrightarrow`,!0),P(F,L,z,`â`,`\\Rightarrow`,!0),P(F,L,z,`â¹`,`\\Longrightarrow`,!0),P(F,L,z,`â`,`\\leftrightarrow`,!0),P(F,L,z,`â·`,`\\longleftrightarrow`,!0),P(F,L,z,`â`,`\\Leftrightarrow`,!0),P(F,L,z,`âº`,`\\Longleftrightarrow`,!0),P(F,L,z,`â¦`,`\\mapsto`,!0),P(F,L,z,`â¼`,`\\longmapsto`,!0),P(F,L,z,`â`,`\\nearrow`,!0),P(F,L,z,`â©`,`\\hookleftarrow`,!0),P(F,L,z,`âª`,`\\hookrightarrow`,!0),P(F,L,z,`â`,`\\searrow`,!0),P(F,L,z,`â¼`,`\\leftharpoonup`,!0),P(F,L,z,`â`,`\\rightharpoonup`,!0),P(F,L,z,`â`,`\\swarrow`,!0),P(F,L,z,`â½`,`\\leftharpoondown`,!0),P(F,L,z,`â`,`\\rightharpoondown`,!0),P(F,L,z,`â`,`\\nwarrow`,!0),P(F,L,z,`â`,`\\rightleftharpoons`,!0),P(F,R,z,`â®`,`\\nless`,!0),P(F,R,z,`î`,`\\@nleqslant`),P(F,R,z,`î`,`\\@nleqq`),P(F,R,z,`âª`,`\\lneq`,!0),P(F,R,z,`â¨`,`\\lneqq`,!0),P(F,R,z,`î`,`\\@lvertneqq`),P(F,R,z,`â¦`,`\\lnsim`,!0),P(F,R,z,`âª`,`\\lnapprox`,!0),P(F,R,z,`â`,`\\nprec`,!0),P(F,R,z,`â `,`\\npreceq`,!0),P(F,R,z,`â¨`,`\\precnsim`,!0),P(F,R,z,`⪹`,`\\precnapprox`,!0),P(F,R,z,`â`,`\\nsim`,!0),P(F,R,z,`î`,`\\@nshortmid`),P(F,R,z,`â¤`,`\\nmid`,!0),P(F,R,z,`â¬`,`\\nvdash`,!0),P(F,R,z,`â`,`\\nvDash`,!0),P(F,R,z,`âª`,`\\ntriangleleft`),P(F,R,z,`â¬`,`\\ntrianglelefteq`,!0),P(F,R,z,`â`,`\\subsetneq`,!0),P(F,R,z,`î`,`\\@varsubsetneq`),P(F,R,z,`â«`,`\\subsetneqq`,!0),P(F,R,z,`î`,`\\@varsubsetneqq`),P(F,R,z,`â¯`,`\\ngtr`,!0),P(F,R,z,`î`,`\\@ngeqslant`),P(F,R,z,`î`,`\\@ngeqq`),P(F,R,z,`âª`,`\\gneq`,!0),P(F,R,z,`â©`,`\\gneqq`,!0),P(F,R,z,`î`,`\\@gvertneqq`),P(F,R,z,`â§`,`\\gnsim`,!0),P(F,R,z,`âª`,`\\gnapprox`,!0),P(F,R,z,`â`,`\\nsucc`,!0),P(F,R,z,`â¡`,`\\nsucceq`,!0),P(F,R,z,`â©`,`\\succnsim`,!0),P(F,R,z,`⪺`,`\\succnapprox`,!0),P(F,R,z,`â`,`\\ncong`,!0),P(F,R,z,`î`,`\\@nshortparallel`),P(F,R,z,`â¦`,`\\nparallel`,!0),P(F,R,z,`â¯`,`\\nVDash`,!0),P(F,R,z,`â«`,`\\ntriangleright`),P(F,R,z,`â`,`\\ntrianglerighteq`,!0),P(F,R,z,`î`,`\\@nsupseteqq`),P(F,R,z,`â`,`\\supsetneq`,!0),P(F,R,z,`î`,`\\@varsupsetneq`),P(F,R,z,`â«`,`\\supsetneqq`,!0),P(F,R,z,`î`,`\\@varsupsetneqq`),P(F,R,z,`â®`,`\\nVdash`,!0),P(F,R,z,`âª
301µ`,`\\precneqq`,!0),P(F,R,z,`⪶`,`\\succneqq`,!0),P(F,R,z,`î`,`\\@nsubseteqq`),P(F,R,cy,`â´`,`\\unlhd`),P(F,R,cy,`âµ`,`\\unrhd`),P(F,R,z,`â`,`\\nleftarrow`,!0),P(F,R,z,`â`,`\\nrightarrow`,!0),P(F,R,z,`â`,`\\nLeftarrow`,!0),P(F,R,z,`â`,`\\nRightarrow`,!0),P(F,R,z,`â®`,`\\nleftrightarrow`,!0),P(F,R,z,`â`,`\\nLeftrightarrow`,!0),P(F,R,z,`â³`,`\\vartriangle`),P(F,R,B,`â`,`\\hslash`),P(F,R,B,`â½`,`\\triangledown`),P(F,R,B,`â`,`\\lozenge`),P(F,R,B,`â`,`\\circledS`),P(F,R,B,`®`,`\\circledR`),P(I,R,B,`®`,`\\circledR`),P(F,R,B,`â¡`,`\\measuredangle`,!0),P(F,R,B,`â`,`\\nexists`),P(F,R,B,`â§`,`\\mho`),P(F,R,B,`â²`,`\\Finv`,!0),P(F,R,B,`â
`,`\\Game`,!0),P(F,R,B,`âµ`,`\\backprime`),P(F,R,B,`â²`,`\\blacktriangle`),P(F,R,B,`â¼`,`\\blacktriangledown`),P(F,R,B,`â `,`\\blacksquare`),P(F,R,B,`â§«`,`\\blacklozenge`),P(F,R,B,`â
`,`\\bigstar`),P(F,R,B,`â¢`,`\\sphericalangle`,!0),P(F,R,B,`â`,`\\complement`,!0),P(F,R,B,`ð`,`\\eth`,!0),P(I,L,B,`ð`,`ð`),P(F,R,B,`â±`,`\\diagup`),P(F,R,B,`â²`,`\\diagdown`),P(F,R,B,`â¡`,`\\square`),P(F,R,B,`â¡`,`\\Box`),P(F,R,B,`â`,`\\Diamond`),P(F,R,B,`Â¥`,`\\yen`,!0),P(I,R,B,`Â¥`,`\\yen`,!0),P(F,R,B,`â`,`\\checkmark`,!0),P(I,R,B,`â`,`\\checkmark`),P(F,R,B,`â¶`,`\\beth`,!0),P(F,R,B,`â¸`,`\\daleth`,!0),P(F,R,B,`â·`,`\\gimel`,!0),P(F,R,B,`Ï`,`\\digamma`,!0),P(F,R,B,`ϰ`,`\\varkappa`),P(F,R,py,`â`,`\\@ulcorner`,!0),P(F,R,ly,`â`,`\\@urcorner`,!0),P(F,R,py,`â`,`\\@llcorner`,!0),P(F,R,ly,`â`,`\\@lrcorner`,!0),P(F,R,z,`â¦`,`\\leqq`,!0),P(F,R,z,`⩽`,`\\leqslant`,!0),P(F,R,z,`âª`,`\\eqslantless`,!0),P(F,R,z,`â²`,`\\lesssim`,!0),P(F,R,z,`âª
`,`\\lessapprox`,!0),P(F,R,z,`â`,`\\approxeq`,!0),P(F,R,cy,`â`,`\\lessdot`),P(F,R,z,`â`,`\\lll`,!0),P(F,R,z,`â¶`,`\\lessgtr`,!0),P(F,R,z,`â`,`\\lesseqgtr`,!0),P(F,R,z,`âª`,`\\lesseqqgtr`,!0),P(F,R,z,`â`,`\\doteqdot`),P(F,R,z,`â`,`\\risingdotseq`,!0),P(F,R,z,`â`,`\\fallingdotseq`,!0),P(F,R,z,`â½`,`\\backsim`,!0),P(F,R,z,`â`,`\\backsimeq`,!0),P(F,R,z,`â«
`,`\\subseteqq`,!0),P(F,R,z,`â`,`\\Subset`,!0),P(F,R,z,`â`,`\\sqsubset`,!0),P(F,R,z,`â¼`,`\\preccurlyeq`,!0),P(F,R,z,`â`,`\\curlyeqprec`,!0),P(F,R,z,`â¾`,`\\precsim`,!0),P(F,R,z,`⪷`,`\\precapprox`,!0),P(F,R,z,`â²`,`\\vartriangleleft`),P(F,R,z,`â´`,`\\trianglelefteq`),P(F,R,z,`â¨`,`\\vDash`,!0),P(F,R,z,`âª`,`\\Vvdash`,!0),P(F,R,z,`â£`,`\\smallsmile`),P(F,R,z,`â¢`,`\\smallfrown`),P(F,R,z,`â`,`\\bumpeq`,!0),P(F,R,z,`â`,`\\Bumpeq`,!0),P(F,R,z,`â§`,`\\geqq`,!0),P(F,R,z,`⩾`,`\\geqslant`,!0),P(F,R,z,`âª`,`\\eqslantgtr`,!0),P(F,R,z,`â³`,`\\gtrsim`,!0),P(F,R,z,`âª`,`\\gtrapprox`,!0),P(F,R,cy,`â`,`\\gtrdot`),P(F,R,z,`â`,`\\ggg`,!0),P(F,R,z,`â·`,`\\gtrless`,!0),P(F,R,z,`â`,`\\gtreqless`,!0),P(F,R,z,`âª`,`\\gtreqqless`,!0),P(F,R,z,`â`,`\\eqcirc`,!0),P(F,R,z,`â`,`\\circeq`,!0),P(F,R,z,`â`,`\\triangleq`,!0),P(F,R,z,`â¼`,`\\thicksim`),P(F,R,z,`â`,`\\thickapprox`),P(F,R,z,`â«`,`\\supseteqq`,!0),P(F,R,z,`â`,`\\Supset`,!0),P(F,R,z,`â`,`\\sqsupset`,!0),P(F,R,z,`â½`,`\\succcurlyeq`,!0),P(F,R,z,`â`,`\\curlyeqsucc`,!0),P(F,R,z,`â¿`,`\\succsim`,!0),P(F,R,z,`⪸`,`\\succapprox`,!0),P(F,R,z,`â³`,`\\vartriangleright`),P(F,R,z,`âµ`,`\\trianglerighteq`),P(F,R,z,`â©`,`\\Vdash`,!0),P(F,R,z,`â£`,`\\shortmid`),P(F,R,z,`â¥`,`\\shortparallel`),P(F,R,z,`â¬`,`\\between`,!0),P(F,R,z,`â`,`\\pitchfork`,!0),P(F,R,z,`â`,`\\varpropto`),P(F,R,z,`â`,`\\blacktriangleleft`),P(F,R,z,`â´`,`\\therefore`,!0),P(F,R,z,`â`,`\\backepsilon`),P(F,R,z,`â¶`,`\\blacktriangleright`),P(F,R,z,`âµ`,`\\because`,!0),P(F,R,z,`â`,`\\llless`),P(F,R,z,`â`,`\\gggtr`),P(F,R,cy,`â²`,`\\lhd`),P(F,R,cy,`â³`,`\\rhd`),P(F,R,z,`â`,`\\eqsim`,!0),P(F,L,z,`â`,`\\Join`),P(F,R,z,`â`,`\\Doteq`,!0),P(F,R,cy,`â`,`\\dotplus`,!0),P(F,R,cy,`â`,`\\smallsetminus`),P(F,R,cy,`â`,`\\Cap`,!0),P(F,R,cy,`â`,`\\Cup`,!0),P(F,R,cy,`â©`,`\\doublebarwedge`,!0),P(F,R,cy,`â`,`\\boxminus`,!0),P(F,R,cy,`â`,`\\boxplus`,!0),P(F,R,cy,`â`,`\\divideontimes`,!0),P(F,R,cy,`â`,`\\ltimes`,!0),P(F,R,cy,`â`,`\\rtimes`,!0),P(F,R,cy,`â`,`\\leftthreetimes`,!0),P(F,R,cy,`â`,`\\rightthreetimes`,!0),P(F,R,cy,`â`,`\\curlywedge`,!0),P(F,R,cy,`â`,`\\curlyvee`,!0),P(F,R,cy,`â`,`\\cir
301cleddash`,!0),P(F,R,cy,`â`,`\\circledast`,!0),P(F,R,cy,`â
`,`\\centerdot`),P(F,R,cy,`âº`,`\\intercal`,!0),P(F,R,cy,`â`,`\\doublecap`),P(F,R,cy,`â`,`\\doublecup`),P(F,R,cy,`â `,`\\boxtimes`,!0),P(F,R,z,`â¢`,`\\dashrightarrow`,!0),P(F,R,z,`â `,`\\dashleftarrow`,!0),P(F,R,z,`â`,`\\leftleftarrows`,!0),P(F,R,z,`â`,`\\leftrightarrows`,!0),P(F,R,z,`â`,`\\Lleftarrow`,!0),P(F,R,z,`â`,`\\twoheadleftarrow`,!0),P(F,R,z,`â¢`,`\\leftarrowtail`,!0),P(F,R,z,`â«`,`\\looparrowleft`,!0),P(F,R,z,`â`,`\\leftrightharpoons`,!0),P(F,R,z,`â¶`,`\\curvearrowleft`,!0),P(F,R,z,`âº`,`\\circlearrowleft`,!0),P(F,R,z,`â°`,`\\Lsh`,!0),P(F,R,z,`â`,`\\upuparrows`,!0),P(F,R,z,`â¿`,`\\upharpoonleft`,!0),P(F,R,z,`â`,`\\downharpoonleft`,!0),P(F,L,z,`â¶`,`\\origof`,!0),P(F,L,z,`â·`,`\\imageof`,!0),P(F,R,z,`â¸`,`\\multimap`,!0),P(F,R,z,`â`,`\\leftrightsquigarrow`,!0),P(F,R,z,`â`,`\\rightrightarrows`,!0),P(F,R,z,`â`,`\\rightleftarrows`,!0),P(F,R,z,`â `,`\\twoheadrightarrow`,!0),P(F,R,z,`â£`,`\\rightarrowtail`,!0),P(F,R,z,`â¬`,`\\looparrowright`,!0),P(F,R,z,`â·`,`\\curvearrowright`,!0),P(F,R,z,`â»`,`\\circlearrowright`,!0),P(F,R,z,`â±`,`\\Rsh`,!0),P(F,R,z,`â`,`\\downdownarrows`,!0),P(F,R,z,`â¾`,`\\upharpoonright`,!0),P(F,R,z,`â`,`\\downharpoonright`,!0),P(F,R,z,`â`,`\\rightsquigarrow`,!0),P(F,R,z,`â`,`\\leadsto`),P(F,R,z,`â`,`\\Rrightarrow`,!0),P(F,R,z,`â¾`,`\\restriction`),P(F,L,B,`â`,"`"),P(F,L,B,`$`,`\\$`),P(I,L,B,`$`,`\\$`),P(I,L,B,`$`,`\\textdollar`),P(F,L,B,`%`,`\\%`),P(I,L,B,`%`,`\\%`),P(F,L,B,`_`,`\\_`),P(I,L,B,`_`,`\\_`),P(I,L,B,`_`,`\\textunderscore`),P(F,L,B,`â `,`\\angle`,!0),P(F,L,B,`â`,`\\infty`,!0),P(F,L,B,`â²`,`\\prime`),P(F,L,B,`â³`,`\\triangle`),P(F,L,B,`Î`,`\\Gamma`,!0),P(F,L,B,`Î`,`\\Delta`,!0),P(F,L,B,`Î`,`\\Theta`,!0),P(F,L,B,`Î`,`\\Lambda`,!0),P(F,L,B,`Î`,`\\Xi`,!0),P(F,L,B,`Î `,`\\Pi`,!0),P(F,L,B,`Σ`,`\\Sigma`,!0),P(F,L,B,`Î¥`,`\\Upsilon`,!0),P(F,L,B,`Φ`,`\\Phi`,!0),P(F,L,B,`Ψ`,`\\Psi`,!0),P(F,L,B,`Ω`,`\\Omega`,!0),P(F,L,B,`A`,`Î`),P(F,L,B,`B`,`Î`),P(F,L,B,`E`,`Î`),P(F,L,B,`Z`,`Î`),P(F,L,B,`H`,`Î`),P(F,L,B,`I`,`Î`),P(F,L,B,`K`,`Î`),P(F,L,B,`M`,`Î`),P(F,L,B,`N`,`Î`),P(F,L,B,`O`,`Î`),P(F,L,B,`P`,`Ρ`),P(F,L,B,`T`,`Τ`),P(F,L,B,`X`,`Χ`),P(F,L,B,`¬`,`\\neg`,!0),P(F,L,B,`¬`,`\\lnot`),P(F,L,B,`â¤`,`\\top`),P(F,L,B,`â¥`,`\\bot`),P(F,L,B,`â
`,`\\emptyset`),P(F,R,B,`â
`,`\\varnothing`),P(F,L,dy,`α`,`\\alpha`,!0),P(F,L,dy,`β`,`\\beta`,!0),P(F,L,dy,`γ`,`\\gamma`,!0),P(F,L,dy,`δ`,`\\delta`,!0),P(F,L,dy,`ϵ`,`\\epsilon`,!0),P(F,L,dy,`ζ`,`\\zeta`,!0),P(F,L,dy,`η`,`\\eta`,!0),P(F,L,dy,`θ`,`\\theta`,!0),P(F,L,dy,`ι`,`\\iota`,!0),P(F,L,dy,`κ`,`\\kappa`,!0),P(F,L,dy,`λ`,`\\lambda`,!0),P(F,L,dy,`μ`,`\\mu`,!0),P(F,L,dy,`ν`,`\\nu`,!0),P(F,L,dy,`ξ`,`\\xi`,!0),P(F,L,dy,`ο`,`\\omicron`,!0),P(F,L,dy,`Ï`,`\\pi`,!0),P(F,L,dy,`Ï`,`\\rho`,!0),P(F,L,dy,`Ï`,`\\sigma`,!0),P(F,L,dy,`Ï`,`\\tau`,!0),P(F,L,dy,`Ï
`,`\\upsilon`,!0),P(F,L,dy,`Ï`,`\\phi`,!0),P(F,L,dy,`Ï`,`\\chi`,!0),P(F,L,dy,`Ï`,`\\psi`,!0),P(F,L,dy,`Ï`,`\\omega`,!0),P(F,L,dy,`ε`,`\\varepsilon`,!0),P(F,L,dy,`Ï`,`\\vartheta`,!0),P(F,L,dy,`Ï`,`\\varpi`,!0),P(F,L,dy,`ϱ`,`\\varrho`,!0),P(F,L,dy,`Ï`,`\\varsigma`,!0),P(F,L,dy,`Ï`,`\\varphi`,!0),P(F,L,cy,`â`,`*`,!0),P(F,L,cy,`+`,`+`),P(F,L,cy,`â`,`-`,!0),P(F,L,cy,`â
`,`\\cdot`,!0),P(F,L,cy,`â`,`\\circ`,!0),P(F,L,cy,`÷`,`\\div`,!0),P(F,L,cy,`±`,`\\pm`,!0),P(F,L,cy,`Ã`,`\\times`,!0),P(F,L,cy,`â©`,`\\cap`,!0),P(F,L,cy,`âª`,`\\cup`,!0),P(F,L,cy,`â`,`\\setminus`,!0),P(F,L,cy,`â§`,`\\land`),P(F,L,cy,`â¨`,`\\lor`),P(F,L,cy,`â§`,`\\wedge`,!0),P(F,L,cy,`â¨`,`\\vee`,!0),P(F,L,B,`â`,`\\surd`),P(F,L,py,`â¨`,`\\langle`,!0),P(F,L,py,`â£`,`\\lvert`),P(F,L,py,`â¥`,`\\lVert`),P(F,L,ly,`?`,`?`),P(F,L,ly,`!`,`!`),P(F,L,ly,`â©`,`\\rangle`,!0),P(F,L,ly,`â£`,`\\rvert`),P(F,L,ly,`â¥`,`\\rVert`),P(F,L,z,`=`,`=`),P(F,L,z,`:`,`:`),P(F,L,z,`â`,`\\approx`,!0),P(F,L,z,`â
`,`\\cong`,!0),P(F,L,z,`â¥`,`\\ge`),P(F,L,z,`â¥`,`\\geq`,!0),P(F,L,z,`â`,`\\gets`),P(F,L,z,`>`,`\\gt`,!0),P(F,L,z,`â`,`\\in`,!0),P(F,L,z,`î `,`\\@not`),P(F,L,z,`â`,`\\subset`,!0),P(F,L,z,`â`,`\\supset`,!0),P(F,L,z,`â`,`\\subseteq`,!0),P(F,L,z,`â`,`\\supseteq`,!0),P(F,R,z,`â`,`\\nsubseteq`,!0),P(F,R,z,`â`,`\\nsupseteq`,!0),P(F,L,z,`â¨`,`\\models`),P(F,L,z,`â`,`\\leftarrow`,!0),P(F,L,z,`â¤`,`\\le`),P(F,L,z,`â¤`,`\\leq`,!0),P(F,L,z,`<`,`\\lt`,!0),P(F,L,z,`â`,`\\rightarrow`,!0),P(F,L,z,`â`,`\\to`),P(F,R,z,`â±`,`\\ngeq`,!0),P(F,R,z,`â°`,`\\nleq`,!0),P(F,L,hy,`\xA0`,`\\ `),P(F,L,hy,`\xA0`,`\\space`),P(F,L,hy,`\xA0`,`\\nobreakspace`),P(I,L,hy,`\xA0`,`\\ `),P(I,L,hy,`\xA0`,` `),P(I,L,hy,`\xA0`,`\\space`),P(I,L,hy,`\xA0`,`\\nobreakspace`),P(F,L,hy,``,`\\nobreak`),P(F,L,hy,``,`\\allowbreak`),P(F,L,my,`,`,`,`),P(F,L,my,`;`,`;`),P(F,R,cy,`â¼`,`\\barwedge`,!0),P(F,R,cy,`â»`,`\\veebar`,!0),P(F,L,cy,`â`,`\\odot`,!0),P(F,L,cy,`â`,`\\oplus`,!0),P(F,L,cy,`â`,`\\otimes`,!0),P(F,L,B,`â`,`\\partial`,!0),P(F,L,cy,`â`,`\\oslash`,!0),P(F,R,cy,`â`,`\\circledcirc`,!0),P(F,R,cy,`â¡`,`\\boxdot`,!0),P(F,L,cy,`â³`,`\\bigtri
301angleup`),P(F,L,cy,`â½`,`\\bigtriangledown`),P(F,L,cy,`â `,`\\dagger`),P(F,L,cy,`â`,`\\diamond`),P(F,L,cy,`â`,`\\star`),P(F,L,cy,`â`,`\\triangleleft`),P(F,L,cy,`â¹`,`\\triangleright`),P(F,L,py,`{`,`\\{`),P(I,L,B,`{`,`\\{`),P(I,L,B,`{`,`\\textbraceleft`),P(F,L,ly,`}`,`\\}`),P(I,L,B,`}`,`\\}`),P(I,L,B,`}`,`\\textbraceright`),P(F,L,py,`{`,`\\lbrace`),P(F,L,ly,`}`,`\\rbrace`),P(F,L,py,`[`,`\\lbrack`,!0),P(I,L,B,`[`,`\\lbrack`,!0),P(F,L,ly,`]`,`\\rbrack`,!0),P(I,L,B,`]`,`\\rbrack`,!0),P(F,L,py,`(`,`\\lparen`,!0),P(F,L,ly,`)`,`\\rparen`,!0),P(I,L,B,`<`,`\\textless`,!0),P(I,L,B,`>`,`\\textgreater`,!0),P(F,L,py,`â`,`\\lfloor`,!0),P(F,L,ly,`â`,`\\rfloor`,!0),P(F,L,py,`â`,`\\lceil`,!0),P(F,L,ly,`â`,`\\rceil`,!0),P(F,L,B,`\\`,`\\backslash`),P(F,L,B,`â£`,`|`),P(F,L,B,`â£`,`\\vert`),P(I,L,B,`|`,`\\textbar`,!0),P(F,L,B,`â¥`,`\\|`),P(F,L,B,`â¥`,`\\Vert`),P(I,L,B,`â¥`,`\\textbardbl`),P(I,L,B,`~`,`\\textasciitilde`),P(I,L,B,`\\`,`\\textbackslash`),P(I,L,B,`^`,`\\textasciicircum`),P(F,L,z,`â`,`\\uparrow`,!0),P(F,L,z,`â`,`\\Uparrow`,!0),P(F,L,z,`â`,`\\downarrow`,!0),P(F,L,z,`â`,`\\Downarrow`,!0),P(F,L,z,`â`,`\\updownarrow`,!0),P(F,L,z,`â`,`\\Updownarrow`,!0),P(F,L,fy,`â`,`\\coprod`),P(F,L,fy,`â`,`\\bigvee`),P(F,L,fy,`â`,`\\bigwedge`),P(F,L,fy,`â¨`,`\\biguplus`),P(F,L,fy,`â`,`\\bigcap`),P(F,L,fy,`â`,`\\bigcup`),P(F,L,fy,`â«`,`\\int`),P(F,L,fy,`â«`,`\\intop`),P(F,L,fy,`â¬`,`\\iint`),P(F,L,fy,`â`,`\\iiint`),P(F,L,fy,`â`,`\\prod`),P(F,L,fy,`â`,`\\sum`),P(F,L,fy,`â¨`,`\\bigotimes`),P(F,L,fy,`â¨`,`\\bigoplus`),P(F,L,fy,`â¨`,`\\bigodot`),P(F,L,fy,`â®`,`\\oint`),P(F,L,fy,`â¯`,`\\oiint`),P(F,L,fy,`â°`,`\\oiiint`),P(F,L,fy,`â¨`,`\\bigsqcup`),P(F,L,fy,`â«`,`\\smallint`),P(I,L,uy,`â¦`,`\\textellipsis`),P(F,L,uy,`â¦`,`\\mathellipsis`),P(I,L,uy,`â¦`,`\\ldots`,!0),P(F,L,uy,`â¦`,`\\ldots`,!0),P(F,L,uy,`â¯`,`\\@cdots`,!0),P(F,L,uy,`â±`,`\\ddots`,!0),P(F,L,B,`â®`,`\\varvdots`),P(I,L,B,`â®`,`\\varvdots`),P(F,L,sy,`Ë`,`\\acute`),P(F,L,sy,`Ë`,`\\grave`),P(F,L,sy,`¨`,`\\ddot`),P(F,L,sy,`~`,`\\tilde`),P(F,L,sy,`Ë`,`\\bar`),P(F,L,sy,`Ë`,`\\breve`),P(F,L,sy,`Ë`,`\\check`),P(F,L,sy,`^`,`\\hat`),P(F,L,sy,`â`,`\\vec`),P(F,L,sy,`Ë`,`\\dot`),P(F,L,sy,`Ë`,`\\mathring`),P(F,L,dy,`î±`,`\\@imath`),P(F,L,dy,`î·`,`\\@jmath`),P(F,L,B,`ı`,`ı`),P(F,L,B,`È·`,`È·`),P(I,L,B,`ı`,`\\i`,!0),P(I,L,B,`È·`,`\\j`,!0),P(I,L,B,`Ã`,`\\ss`,!0),P(I,L,B,`æ`,`\\ae`,!0),P(I,L,B,`Å`,`\\oe`,!0),P(I,L,B,`ø`,`\\o`,!0),P(I,L,B,`Ã`,`\\AE`,!0),P(I,L,B,`Å`,`\\OE`,!0),P(I,L,B,`Ã`,`\\O`,!0),P(I,L,sy,`Ë`,`\\'`),P(I,L,sy,`Ë`,"\\`"),P(I,L,sy,`Ë`,`\\^`),P(I,L,sy,`Ë`,`\\~`),P(I,L,sy,`Ë`,`\\=`),P(I,L,sy,`Ë`,`\\u`),P(I,L,sy,`Ë`,`\\.`),P(I,L,sy,`¸`,`\\c`),P(I,L,sy,`Ë`,`\\r`),P(I,L,sy,`Ë`,`\\v`),P(I,L,sy,`¨`,`\\"`),P(I,L,sy,`Ë`,`\\H`),P(I,L,sy,`â¯`,`\\textcircled`);var gy={"--":!0,"---":!0,"``":!0,"''":!0};P(I,L,B,`â`,`--`,!0),P(I,L,B,`â`,`\\textendash`),P(I,L,B,`â`,`---`,!0),P(I,L,B,`â`,`\\textemdash`),P(I,L,B,`â`,"`",!0),P(I,L,B,`â`,`\\textquoteleft`),P(I,L,B,`â`,`'`,!0),P(I,L,B,`â`,`\\textquoteright`),P(I,L,B,`â`,"``",!0),P(I,L,B,`â`,`\\textquotedblleft`),P(I,L,B,`â`,`''`,!0),P(I,L,B,`â`,`\\textquotedblright`),P(F,L,B,`°`,`\\degree`,!0),P(I,L,B,`°`,`\\degree`),P(I,L,B,`°`,`\\textdegree`,!0),P(F,L,B,`£`,`\\pounds`),P(F,L,B,`£`,`\\mathsterling`,!0),P(I,L,B,`£`,`\\pounds`),P(I,L,B,`£`,`\\textsterling`,!0),P(F,R,B,`â `,`\\maltese`),P(I,R,B,`â `,`\\maltese`);for(var _y=`0123456789/@."`,vy=0;vy<_y.length;vy++){var yy=_y.charAt(vy);P(F,L,B,yy,yy)}for(var by=`0123456789!@*()-=+";:?/.,`,xy=0;xy<by.length;xy++){var Sy=by.charAt(xy);P(I,L,B,Sy,Sy)}for(var Cy=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,wy=0;wy<Cy.length;wy++){var Ty=Cy.charAt(wy);P(F,L,dy,Ty,Ty),P(I,L,B,Ty,Ty)}P(F,R,B,`C`,`â`),P(I,R,B,`C`,`â`),P(F,R,B,`H`,`â`),P(I,R,B,`H`,`â`),P(F,R,B,`N`,`â`),P(I,R,B,`N`,`â`),P(F,R,B,`P`,`â`),P(I,R,B,`P`,`â`),P(F,R,B,`Q`,`â`),P(I,R,B,`Q`,`â`),P(F,R,B,`R`,`â`),P(I,R,B,`R`,`â`),P(F,R,B,`Z`,`â¤`),P(I,R,B,`Z`,`â¤`),P(F,L,dy,`h`,`â`),P(I,L,dy,`h`,`â`);for(var Ey,Dy=0;Dy<Cy.length;Dy++){var Oy=Cy.charAt(Dy);Ey=String.fromCharCode(55349,56320+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey),Ey=String.fromCharCode(55349,56372+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey),Ey=String.fromCharCode(55349,56424+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey),Ey=String.fromCharCode(55349,56580+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey),Ey=String.fromCharCode(55349,56684+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey),Ey=String.fromCharCode(55349,56736+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey),Ey=String.fromCharCode(55349,56788+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey),Ey=String.fromCharCode(55349,56840+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey),Ey=String.fromCharCode(55349,56944+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey),Dy<26&&(Ey=String.fromCharCode(55349,56632+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey),Ey=String.fromCharCode(55349,56476+Dy),P(F,L,dy,Oy,Ey),P(I,L,B,Oy,Ey))}Ey=String.fromCharCode(55349,56668),P(F,L,dy,`k`,Ey),P(I,L,B,`k`,Ey);for(var ky=0;ky<10;ky++){var Ay=ky.toString();Ey=String.fromCharCode(55349,57294+ky),P(F,L,dy,Ay,Ey),P(I,L,B,Ay,Ey),Ey=String.fromCharCode(55349,57314+ky),P(F,L,dy,Ay,Ey),P(I,L,B,Ay,Ey),Ey=String.fromCharCode(55349,57324+ky),P(F,L,dy,Ay,Ey),P(I,L,B,Ay,Ey),Ey=String.fromCharCode(55349,57334+ky),P(F,L,dy,Ay,Ey),P(I,L,B,Ay,Ey)}for(var jy=`ÃÃþ`,My=0;My<jy.length;My++){var Ny=jy.charAt(My);P(F,L,dy,Ny,Ny),P(I,L,B,Ny,Ny)}var Py={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},Fy={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},Iy={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},Ly={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},Ry={mathClass:``,textClass:``,font:``},zy={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},By={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},Vy={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},Hy={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},Uy={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},Wy={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},Gy={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},Ky=[Py,Py,Fy,Fy,Iy,Iy,Ly,Ry,Ry,Ry,zy,zy,By,By,Vy,Vy,Hy,Hy,Uy,Uy,Wy,Wy,Ry,Ry,Gy,Gy],qy=[Py,Ry,Hy,Uy,Gy],Jy=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return Ky[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return qy[Math.floor((r-120782)/10)];if(r===120485||r===120486)return Ky[0];if(120486<r&&r<120782)return Ry;throw new V_(`Unsupported character: `+e)},Yy=function(e,t,n){if(oy[n][e]){var r=oy[n][e].replace;r&&(e=r)}return{value:e,metrics:iy(e,t,n)}},Xy=function(e,t,n,r,i){var a=Yy(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new Xv(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new Xv(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},Zy=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&Yy(e,`Main-Bold`,t).metrics?Xy(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||oy[t][e].font===`main`?Xy(e,`Main-Regular`,t,n,r):Xy(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},Qy=function(e,t,n){return n!==`textord`&&Yy(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},$y=function(e,t,n){var r=e.mode,i=e.text,a=[`mord`],{font:o,fontFamily:s,fontWeight:c,fontShape:l}=t,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=Jy(i);f=m.font,p=m[r+`Class`]}if(f)return Xy(i,f,r,t,a.concat(p));if(d){var h,g;
vendor: 15,652 bytes, line 301
301if(d===`boldsymbol`){var _=Qy(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=fb[o].fontName,g=[o]):(h=db(s,c,l),g=[s,c,l]);if(Yy(i,h,r).metrics)return Xy(i,h,r,t,a.concat(g));if(gy.hasOwnProperty(i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(Xy(i[y],h,r,t,a.concat(g)));return ob(v)}}if(n===`mathord`)return Xy(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=oy[r][i]&&oy[r][i].font;if(b===`ams`)return Xy(i,db(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return Xy(i,db(`textrm`,c,l),r,t,a.concat(c,l));var x=db(b,c,l);return Xy(i,x,r,t,a.concat(x,c,l))}throw Error(`unexpected type: `+n+` in makeOrd`)},eb=(e,t)=>{if(Uv(e.classes)!==Uv(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},tb=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Xv&&r instanceof Xv&&eb(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},nb=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},V=function(e,t,n,r){var i=new Jv(e,t,n,r);return nb(i),i},rb=(e,t,n,r)=>new Jv(e,t,n,r),ib=function(e,t,n){var r=V([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=Hv(r.height),r.maxFontSize=1,r},ab=function(e,t,n,r){var i=new Yv(e,t,n,r);return nb(i),i},ob=function(e){var t=new Lv(e);return nb(t),t},sb=function(e,t){return e instanceof Lv?V([],[e],t):e},cb=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},lb=function(e,t){for(var{children:n,depth:r}=cb(e),i=0,a=0;a<n.length;a++){var o=n[a];if(o.type===`elem`){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var c=V([`pstrut`],[]);c.style.height=Hv(i);for(var l=[],u=r,d=r,f=r,p=0;p<n.length;p++){var m=n[p];if(m.type===`kern`)f+=m.size;else{var h=m.elem,g=m.wrapperClasses||[],_=m.wrapperStyle||{},v=V(g,[c,h],void 0,_);v.style.top=Hv(-i-f-h.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),l.push(v),f+=h.height+h.depth}u=Math.min(u,f),d=Math.max(d,f)}var y=V([`vlist`],l);y.style.height=Hv(d);var b;if(u<0){var x=V([`vlist`],[V([],[])]);x.style.height=Hv(-u),b=[V([`vlist-r`],[y,V([`vlist-s`],[new Xv(`â`)])]),V([`vlist-r`],[x])]}else b=[V([`vlist-r`],[y])];var S=V([`vlist-t`],b);return b.length===2&&S.classes.push(`vlist-t2`),S.height=d,S.depth=-u,S},ub=(e,t)=>{var n=V([`mspace`],[],t),r=Vv(e,t);return n.style.marginRight=Hv(r),n},db=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},fb={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`}},pb={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},mb=function(e,t){var[n,r,i]=pb[e],a=rb([`overlay`],[new Zv([new Qv(n)],{width:Hv(r),height:Hv(i),style:`width:`+Hv(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=Hv(i),a.style.width=Hv(r),a},hb={number:3,unit:`mu`},gb={number:4,unit:`mu`},_b={number:5,unit:`mu`},vb={mord:{mop:hb,mbin:gb,mrel:_b,minner:hb},mop:{mord:hb,mop:hb,mrel:_b,minner:hb},mbin:{mord:gb,mop:gb,mopen:gb,minner:gb},mrel:{mord:_b,mop:_b,mopen:_b,minner:_b},mopen:{},mclose:{mop:hb,mbin:gb,mrel:_b,minner:hb},mpunct:{mord:hb,mop:hb,mrel:_b,mopen:hb,mclose:hb,mpunct:hb,minner:hb},minner:{mord:hb,mop:hb,mbin:gb,mrel:_b,mopen:hb,mpunct:hb,minner:hb}},yb={mord:{mop:hb},mop:{mord:hb,mop:hb},mbin:{},mrel:{},mopen:{},mclose:{mop:hb},mpunct:{},minner:{mop:hb}},bb={},xb={},Sb={};function Cb(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c<n.length;++c)bb[n[c]]=s;t&&(a&&(xb[t]=a),o&&(Sb[t]=o))}function wb(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;Cb({type:t,names:[],props:{numArgs:0},handler(){throw Error(`Should never be called.`)},htmlBuilder:n,mathmlBuilder:r})}var Tb=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},Eb=function(e){return e.type===`ordgroup`?e.body:[e]},Db=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),Ob=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),kb={display:vv.DISPLAY,text:vv.TEXT,script:vv.SCRIPT,scriptscript:vv.SCRIPTSCRIPT},Ab={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},jb=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=Lb(e[a],t);if(o instanceof Lv){var s=o.children;i.push(...s)}else i.push(o)}if(tb(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(kb[l.style]))}var u=V([r[0]||`leftmost`],[],t),d=V([r[1]||`rightmost`],[],t),f=n===`root`;return Mb(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&Ob.has(r)?t.classes[0]=`mord`:r===`mbin`&&Db.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),Mb(i,(e,t)=>{var n=Fb(t),r=Fb(e),i=n&&r?e.hasClass(`mtight`)?yb[n]?.[r]:vb[n]?.[r]:null;if(i)return ub(i,c)},{node:u},d,f),i},Mb=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=Nb(o);if(s){Mb(s.children,t,n,null,i);continue}var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`newline`)&&(n.node=V([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},Nb=function(e){return e instanceof Lv||e instanceof Yv||e instanceof Jv&&e.hasClass(`enclosing`)?e:null},Pb=function(e,t){var n=Nb(e);if(n){var r=n.children;if(r.length){if(t===`right`)return Pb(r[r.length-1],`right`);if(t===`left`)return Pb(r[0],`left`)}}return e},Fb=function(e,t){return e?(t&&(e=Pb(e,t)),Ab[e.classes[0]]||null):null},Ib=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return V(t.concat(n))},Lb=function(e,t,n){if(!e)return V();if(xb[e.type]){var r=xb[e.type](e,t);if(n&&t.size!==n.size){r=V(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new V_(`Got group of unknown type: '`+e.type+`'`)};function Rb(e,t){var n=V([`base`],e,t),r=V([`strut`]);return r.style.height=Hv(n.height+n.depth),n.depth&&(r.style.verticalAlign=Hv(-n.depth)),n.children.unshift(r),n}function zb(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=jb(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(Rb(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(Rb(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(Rb(o,t));var l;n?(l=Rb(jb(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=V([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=Hv(u.height+u.depth),u.depth&&(d.style.verticalAlign=Hv(-u.depth))}return u}function Bb(e){return new Lv(e)}var H=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Uv(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof Vb&&this.children[n+1]instanceof Vb){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof Vb;)r+=this.children[++n].toText();e.appendChild(new Vb(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=` `+t+`="`,e+=K_(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+K_(Uv(this.classes))+`"`),e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},Vb=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return K_(this.toText())}toText(){return this.text}},Hb=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?`â`:e>=.1666&&e<=.1667?`â`:e>=.2222&&e<=.2223?`â
`:e>=.2777&&e<=.2778?`â
â`:e>=-.05556&&e<=-.05555?`ââ£`:e>=-.1667&&e<=-.1666?`ââ£`:e>=-.2223&&e<=-.2222?`ââ£`:e>=-.2778&&e<=-.2777?`â
â£`:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,Hv(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+Hv(this.width)+`"/>`}toText(){return this.character?this.character:` `}},Ub=new Set([`\\imath`,`\\jmath`]),Wb=new Set([`mrow`,`mtable`]),Gb=function(e,t,n){return oy[t][e]&&oy[t][e].replace&&e.charCodeAt(0)!==55349&&!(gy.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=oy[t][e].replace),new Vb(e)},Kb=function(e){return e.length===1?e[0]:new H(`mrow`,e)},qb={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},Jb=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=qb[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(Ub.has(a))return null;if(oy[r][a]){var o=oy[r][a].replace;o&&(a=o)}var s=fb[n].fontName;return iy(a,s,r)?fb[n].variant:null};function Yb(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof Vb&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof Vb&&n.text===`,`}return!1}var Xb=function(e,t,n){if(e.length===1){var r=Qb(e[0],t);return n&&r instanceof H&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=Qb(e[o],t);if(s instanceof H&&a instanceof H){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)){a.children.push(...s.children);continue}if(s.type===`mn`&&a.type===`mn`){a.children.push(...s.children);continue}if(Yb(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&Yb(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||Yb(a))){var c=s.children[0];c instanceof H&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof Vb&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof Vb&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},Zb=function(e,t,n){return Kb(Xb(e,t,n))},Qb=function(e,t){if(!e)return new H(`mrow`);if(Sb[e.type])return Sb[e.type](e,t);throw new V_(`Got group of unknown type: '`+e.type+`'`)};function $b(e,t,n,r,i){var a=Xb(e,n),o=a.length===1&&a[0]instanceof H&&Wb.has(a[0].type)?a[0]:new H(`mrow`,a),s=new H(`annotation`,[new Vb(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new H(`math`,[new H(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),V([i?`katex`:`katex-mathml`],[c])}var ex=[[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]],tx=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],nx=function(e,t){return t.size<2?e:ex[e-1][t.size-1]},rx=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.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=tx[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,ph
vendor: 4,300 bytes, line 301
301antom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:nx(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:tx[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=nx(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=qee(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};rx.BASESIZE=6;var ix=function(e){return new rx({style:e.displayMode?vv.DISPLAY:vv.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},ax=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=V(n,[e])}return e},ox=function(e,t,n){var r=ix(n),i;return n.output===`mathml`?$b(e,t,r,n.displayMode,!0):(i=n.output===`html`?V([`katex`],[zb(e,r)]):V([`katex`],[$b(e,t,r,n.displayMode,!1),zb(e,r)]),ax(i,n))},sx=function(e,t,n){return ax(V([`katex`],[zb(e,ix(n))]),n)},cx={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":`=`},lx=function(e){var t=new H(`mo`,[new Vb(cx[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},ux={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`,`r
301ightbraceunder`],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]},dx=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),fx=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(dx.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:rb([],[new Zv([new Qv(o)],{width:`100%`,height:Hv(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=ux[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var[d,f,p]=u,m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support 302 `+h+` children.`);for(var v=0;v<h;v++){var y=new Zv([new Qv(d[v])],{width:`400em`,height:Hv(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=rb([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=Hv(m),l.push(b)}return{span:V([`stretchy`],l,t),minWidth:f,height:m}}
vendor: 20,903 bytes, line 302
302var{span:r,minWidth:i,height:a}=n();return r.height=a,r.style.height=Hv(a),i>0&&(r.style.minWidth=Hv(i)),r},px=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=V([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new $v({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new $v({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=rb([],[new Zv(c,{width:`100%`,height:Hv(o)})],i)}return a.height=o,a.style.height=Hv(o),a},mx={bin:1,close:1,inner:1,open:1,punct:1,rel:1},hx={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function gx(e){return e in mx}function _x(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function vx(e){var t=yx(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function yx(e){return e&&(e.type===`atom`||hx.hasOwnProperty(e.type))?e:null}var bx=e=>{if(e instanceof Xv)return e;if(Kee(e)&&e.children.length===1)return bx(e.children[0])},xx=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=_x(e.base,`accent`),n=r.base,e.base=n,i=Gee(Lb(e,t)),e.base=r):(r=_x(e,`accent`),n=r.base);var a=Lb(n,t.havingCrampedStyle()),o=r.isShifty&&Y_(n),s=0;o&&(s=bx(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=fx(r,t),u=lb({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+Hv(2*s)+`)`,marginLeft:Hv(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=mb(`vec`,t),f=pb.vec[1]):(d=$y({type:`textord`,mode:r.mode,text:r.label},t,`textord`),d=Wee(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=V([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=Hv(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=lb({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=V([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},Sx=(e,t)=>{var n=e.isStretchy?lx(e.label):new H(`mo`,[Gb(e.label,e.mode)]),r=new H(`mover`,[Qb(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},Cx=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));Cb({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 n=Tb(t[0]),r=!Cx.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:xx,mathmlBuilder:Sx}),Cb({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:xx,mathmlBuilder:Sx}),Cb({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=Lb(e.base,t),r=fx(e,t),i=e.label===`\\utilde`?.12:0;return V([`mord`,`accentunder`],[lb({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=lx(e.label),r=new H(`munder`,[Qb(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var wx=e=>{var t=new H(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};Cb({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,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=sb(Lb(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=sb(Lb(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=fx(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=lb({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=lb({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return V([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=lx(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=wx(Qb(e.body,t));r=e.below?new H(`munderover`,[n,wx(Qb(e.below,t)),i]):new H(`mover`,[n,i])}else e.below?r=new H(`munder`,[n,wx(Qb(e.below,t))]):(r=wx(),r=new H(`mover`,[n,r]));return r}});function Tx(e,t){var n=jb(e.body,t,!0);return V([e.mclass],n,t)}function Ex(e,t){var n,r=Xb(e.body,t);return e.mclass===`minner`?n=new H(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new H(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new H(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}Cb({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:Eb(i),isCharacterBox:Y_(i)}},htmlBuilder:Tx,mathmlBuilder:Ex});var Dx=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`};Cb({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:Dx(t[0]),body:Eb(t[1]),isCharacterBox:Y_(t[1])}}}),Cb({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:Dx(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:Eb(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:Y_(c)}},htmlBuilder:Tx,mathmlBuilder:Ex}),Cb({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:Dx(t[0]),body:Eb(t[0])}},htmlBuilder(e,t){var n=jb(e.body,t,!0),r=V([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new H(`mstyle`,Xb(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var Ox={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},kx=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),Ax=e=>e.type===`textord`&&e.text===`@`,jx=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function Mx(e,t,n){var r=Ox[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function Nx(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 n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new V_(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=kx(),c=0;c<o.length;c++)if(!Ax(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=vx(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l)){if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(jx(o[p],l)){f=!1,c=p;break}if(Ax(o[p]))throw new V_(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new V_(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new V_(`Expected one of "<>AV=|." after @`,o[c])}var m={type:`styling`,body:[Mx(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=kx()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}Cb({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=sb(Lb(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=Hv(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new H(`mrow`,[Qb(e.label,t)]);return n=new H(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new H(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),Cb({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=sb(Lb(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new H(`mrow`,[Qb(e.fragment,t)])}}),Cb({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=_x(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=_x(r[a],`textord`);i+=o.text}var s=parseInt(i),c;if(isNaN(s))throw new V_(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new V_(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}});var Px=(e,t)=>ob(jb(e.body,t.withColor(e.color),!1)),Fx=(e,t)=>{var n=new H(`mstyle`,Xb(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n};Cb({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=_x(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:Eb(i)}},htmlBuilder:Px,mathmlBuilder:Fx}),Cb({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=_x(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:Px,mathmlBuilder:Fx}),Cb({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&_x(i,`size`).value}},htmlBuilder(e,t){var n=V([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=Hv(Vv(e.size,t)))),n},mathmlBuilder(e,t){var n=new H(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,Hv(Vv(e.size,t)))),n}});var Ix={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},Lx=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new V_(`Expected a control sequence`,e);return t},Rx=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},zx=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};Cb({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Ix[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=Ix[r.text]),_x(t.parseFunction(),`internal`);throw new V_(`Invalid token after macro prefix`,r)}}),Cb({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new V_(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new V_(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new V_(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new V_(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===Ix[n]),{type:`internal`,mode:t.mode}}}),Cb({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Lx(t.gullet.popToken());return t.gullet.consumeSpaces(),zx(t,r,Rx(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),Cb({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Lx(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return zx(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var Bx=function(e,t,n){var r=iy(oy.math[e]&&oy.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},Vx=function(e,t,n,r){var i=n.havingBaseStyle(t),a=V(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},Hx=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=Hv(i),e.height-=i,e.depth+=i},Ux=function(e,t,n,r,i,a){var o=Vx(Xy(e,`Main-Regular`,i,r),t,r,a);return n&&Hx(o,r,t),o},Wx=function(e,t,n,r){return Xy(e,`Size`+t+`-Regular`,n,r)},Gx=function(e,t,n,r,i,a){var o=Wx(e,t,i,r),s=Vx(V([`delimsizing`,`size`+t],[o],r),vv.TEXT,r,a);return n&&Hx(s,r,vv.TEXT),s},Kx=function(e,t,n){return{type:`elem`,elem:V([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[V([],[Xy(e,t,n)])])}},qx=function(e,t,n){var r=ey[`Size4-Regular`][e.charCodeAt(0)]?ey[`Size4-Regular`][e.charCodeAt(0)][4]:ey[`Size1-Regular`][e.charCodeAt(0)][4],i=rb([],[new Zv([new Qv(`inner`,Nv(e,Math.round(1e3*t)))],{width:Hv(r),height:Hv(t),style:`width:`+Hv(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=Hv(t),i.style.width=Hv(r),{type:`elem`,elem:i}},Jx=.008,Yx={type:`kern`,size:-1*Jx},Xx=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),Zx=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),Qx=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`â`:e===`\\Uparrow`?c=l=`â`:e===`\\downarrow`?o=c=`â`:e===`\\Downarrow`?o=c=`â`:e===`\\updownarrow`?(o=`\\uparrow`,c=`â`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`â`,l=`\\Downarrow`):Xx.has(e)?(c=`â£`,u=`vert`,d=333):Zx.has(e)?(c=`â¥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`â¡`,c=`â¢`,l=`â£`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`â¤`,c=`â¥`,l=`â¦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`â`?(c=o=`â¢`,l=`â£`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`â`?(o=`â¡`,c=l=`â¢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`â`?(c=o=`â¥`,l=`â¦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`â`?(o=`â¤`,c=l=`â¥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`â`,c=`â`,l=`â`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`â`,c=`â`,l=`â `,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`â§`,s=`â¨`,l=`â©`,c=`âª`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`â«`,s=`â¬`,l=`â`,c=`âª`,f=`Size4-Regular`):e===`\\lgroup`||e===`â®`?(o=`â§`,l=`â©`,c=`âª`,f=`Size4-Regular`):e===`\\rgroup`||e===`â¯`?(o=`â«`,l=`â`,c=`âª`,f=`Size4-Regular`):e===`\\lmoustache`||e===`â°`?(o=`â§`,l=`â`,c=`âª`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`â±`)&&(o=`â«`,l=`â©`,c=`âª`,f=`Size4-Regular`);var p=Bx(o,f,i),m=p.height+p.depth,h=Bx(c,f,i),g=h.height+h.depth,_=Bx(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=Bx(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,E=[];if(u.length>0){var ee=C-m-v,D=Math.round(C*1e3),te=Fv(u,Math.round(ee*1e3)),ne=new Qv(u,te),re=Hv(d/1e3),ie=Hv(D/1e3),ae=rb([],[new Zv([ne],{width:re,height:ie,viewBox:`0 0 `+d+` `+D})],r);ae.height=D/1e3,ae.style.width=re,ae.style.height=ie,E.push({type:`elem`,elem:ae})}else{if(E.push(Kx(l,f,i)),E.push(Yx),s===null){var oe=C-m-v+2*Jx;E.push(qx(c,oe,r))}else{var se=(C-m-v-y)/2+2*Jx;E.push(qx(c,se,r)),E.push(Yx),E.push(Kx(s,f,i)),E.push(Yx),E.push(qx(c,se,r))}E.push(Yx),E.push(Kx(o,f,i))}var ce=r.havingBaseStyle(vv.TEXT);return Vx(V([`delimsizing`,`mult`],[lb({positionType:`bottom`,positionData:T,children:E})],ce),vv.TEXT,r,a)},$x=80,eS=.08,tS=function(e,t,n,r,i){return rb([`hide-tail`],[new Zv([new Qv(e,Mv(e,r,n))],{width:`400em`,height:Hv(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},nS=function(e,t){var n=t.havingBaseSizing(),r=fS(`\\surd`,e*n.sizeMultiplier,uS,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+$x,e<1?i=1:e<1.4&&(i=.7),s=(1+a+eS)/i,c=(1+a)/i,o=tS(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+$x)*oS[r.size],c=(oS[r.size]+a)/i,s=(oS[r.size]+a+eS)/i,o=tS(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+eS,c=e+a,l=Math.floor(1e3*e+a)+$x,o=tS(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=Hv(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},rS=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}
302`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`â`,`â`,`\\lceil`,`\\rceil`,`â`,`â`,`\\surd`]),iS=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`â®`,`â¯`,`\\lmoustache`,`\\rmoustache`,`â°`,`â±`]),aS=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),oS=[0,1.2,1.8,2.4,3],sS=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`â¨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`â©`)&&(e=`\\rangle`),rS.has(e)||aS.has(e))return Gx(e,t,!1,n,r,i);if(iS.has(e))return Qx(e,oS[t],!1,n,r,i);throw new V_(`Illegal delimiter: '`+e+`'`)},cS=[{type:`small`,style:vv.SCRIPTSCRIPT},{type:`small`,style:vv.SCRIPT},{type:`small`,style:vv.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],lS=[{type:`small`,style:vv.SCRIPTSCRIPT},{type:`small`,style:vv.SCRIPT},{type:`small`,style:vv.TEXT},{type:`stack`}],uS=[{type:`small`,style:vv.SCRIPTSCRIPT},{type:`small`,style:vv.SCRIPT},{type:`small`,style:vv.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],dS=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},fS=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=Bx(e,dS(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},pS=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`â¨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`â©`)&&(e=`\\rangle`);var o=aS.has(e)?cS:rS.has(e)?uS:lS,s=fS(e,t,o,r);return s.type===`small`?Ux(e,s.style,n,r,i,a):s.type===`large`?Gx(e,s.size,n,r,i,a):Qx(e,t,n,r,i,a)},mS=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return pS(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},hS={"\\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}},gS=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,.`.split(`,`));function _S(e){return`isMiddle`in e}function vS(e,t){var n=yx(e);if(n&&gS.has(n.text))return n;throw n?new V_(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new V_(`Invalid delimiter type '`+e.type+`'`,e)}Cb({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 n=vS(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:hS[e.funcName].size,mclass:hS[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?V([e.mclass]):sS(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(Gb(e.delim,e.mode));var n=new H(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=Hv(oS[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function yS(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}Cb({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new V_(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:vS(t[0],e).text,color:n}}}),Cb({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=vS(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=_x(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{yS(e);for(var n=jb(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];_S(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?Ib(t,[`mopen`]):mS(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(_S(u)){var d=u.isMiddle;n[l]=mS(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=Ib(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=mS(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),V([`minner`],n,t)},mathmlBuilder:(e,t)=>{yS(e);var n=Xb(e.body,t);if(e.left!==`.`){var r=new H(`mo`,[Gb(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new H(`mo`,[Gb(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return Kb(n)}}),Cb({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=vS(t[0],e);if(!e.parser.leftrightDepth)throw new V_(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=Ib(t,[]):(n=sS(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new H(`mo`,[e.delim===`\\vert`||e.delim===`|`?Gb(`|`,`text`):Gb(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}});var bS=(e,t)=>{var n=sb(Lb(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=Y_(e.body);if(r===`sout`)a=V([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=Vv({number:.6,unit:`pt`},t),l=Vv({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=Hv(d/2+c);var f=Math.floor(1e3*d*i);a=rb([`hide-tail`],[new Zv([new Qv(`phase`,Av(f))],{width:`400em`,height:Hv(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=Hv(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=px(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=Hv(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=Hv(h),a.style.borderRightWidth=Hv(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=lb({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});
vendor: 4,903 bytes, line 302
302else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=lb({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?V([`mord`,`cancel-lap`],[g],t):V([`mord`],[g],t)},xS=(e,t)=>{var n,r=new H(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[Qb(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+Hv(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};Cb({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=_x(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:bS,mathmlBuilder:xS}),Cb({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=_x(t[0],`color-token`).color,o=_x(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:bS,mathmlBuilder:xS}),Cb({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),Cb({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:bS,mathmlBuilder:xS}),Cb({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:bS,mathmlBuilder:xS}),Cb({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var SS={};function CS(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)SS[n[c]]=s;a&&(xb[t]=a),o&&(Sb[t]=o)}var wS={};function U(e,t){wS[e]=t}var TS=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},ES=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,TS.range(this,t))}};function DS(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var OS=e=>{if(!e.parser.settings.displayMode)throw new V_(`{`+e.envName+`} can be used only in display mode.`)},kS=new Set([`gather`,`gather*`]);function AS(e){if(!e.includes(`ed`))return!e.includes(`*`)}function jS(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new V_(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new ES(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(DS(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);
vendor: 2,067 bytes, line 302
302var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new V_(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var w=void 0;e.gullet.future().text!==` `&&(w=e.parseSizeGroup(!0)),g.push(w?w.value:null),b(),_.push(DS(e)),m=[],h.push(m),y()}else throw new V_(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function MS(e){return e.slice(0,1)===`d`?`display`:`text`}var NS=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(vv.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?Vv({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var C=Lb(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S.cells[r]=C}var w=e.rowGaps[n],T=0;w&&(T=Vv(w,t),T>0&&(T+=g,x<T&&(x=T),T=0)),e.addJot&&n<e.body.length-1&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+T,s[n]=S,v(a[n+1])}var E=_/2+t.fontMetrics().axisHeight,ee=e.cols||[],D=[],te,ne,re=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ie=s[n],ae=ie.pos-E,oe=e.tags[n],se=void 0;se=oe===!0?V([`eqn-num`],[],t):oe===!1?V([],[],t):V([],jb(oe,t,!0),t),se.depth=ie.depth,se.height=ie.he
vendor: 43,044 bytes, lines 302-305
302ight,re.push({type:`elem`,elem:se,shift:ae})}for(r=0,ne=0;r<o||ne<ee.length;++r,++ne){for(var ce=ee[ne],le=!0;(ue=ce)?.type===`separator`;){var ue;if(le||(te=V([`arraycolsep`],[]),te.style.width=Hv(t.fontMetrics().doubleRuleSep),D.push(te)),ce.separator===`|`||ce.separator===`:`){var de=ce.separator===`|`?`solid`:`dashed`,fe=V([`vertical-separator`],[],t);fe.style.height=Hv(_),fe.style.borderRightWidth=Hv(l),fe.style.borderRightStyle=de,fe.style.margin=`0 `+Hv(-l/2);var pe=_-E;pe&&(fe.style.verticalAlign=Hv(-pe)),D.push(fe)}else throw new V_(`Invalid separator type: `+ce.separator);ne++,ce=ee[ne],le=!1}if(!(r>=o)){var me=void 0;(r>0||e.hskipBeforeAndAfter)&&(me=ce?.pregap??d,me!==0&&(te=V([`arraycolsep`],[]),te.style.width=Hv(me),D.push(te)));var he=[];for(n=0;n<i;++n){var ge=s[n],_e=ge.cells[r];if(_e){var ve=ge.pos-E;_e.depth=ge.depth,_e.height=ge.height,he.push({type:`elem`,elem:_e,shift:ve})}}var ye=lb({positionType:`individualShift`,children:he}),be=V([`col-align-`+(ce?.align||`c`)],[ye]);D.push(be),(r<o-1||e.hskipBeforeAndAfter)&&(me=ce?.postgap??d,me!==0&&(te=V([`arraycolsep`],[]),te.style.width=Hv(me),D.push(te)))}}var xe=V([`mtable`],D);if(c.length>0){for(var Se=ib(`hline`,t,l),Ce=ib(`hdashline`,t,l),we=[{type:`elem`,elem:xe,shift:0}];c.length>0;){var Te=c.pop(),Ee=Te.pos-E;Te.isDashed?we.push({type:`elem`,elem:Ce,shift:Ee}):we.push({type:`elem`,elem:Se,shift:Ee})}xe=lb({positionType:`individualShift`,children:we})}if(re.length===0)return V([`mord`],[xe],t);var De=V([`tag`],[lb({positionType:`individualShift`,children:re})],t);return ob([xe,De])},PS={c:`center `,l:`left `,r:`right `},FS=function(e,t){for(var n=[],r=new H(`mtd`,[],[`mtr-glue`]),i=new H(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new H(`mtd`,[Qb(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new H(`mtr`,s))}var l=new H(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,Hv(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=PS[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,w=e.hLinesBeforeRow;d+=w[0].length>0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T<w.length-1;T++)C+=w[T].length===0?`none `:w[T][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new H(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new H(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},IS=function(e,t){e.envName.includes(`ed`)||OS(e);var n=[],r=e.envName.includes(`at`)?`alignat`:`align`,i=e.envName===`split`,a=jS(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:AS(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o=0,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var l=``,u=0;u<t[0].body.length;u++){var d=_x(t[0].body[u],`textord`);l+=d.text}o=Number(l),s=o*2}var f=!s;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)_x(_x(e[t],`styling`).body[0],`ordgroup`).body.unshift(c);if(f)s<e.length&&(s=e.length);else{var n=e.length/2;if(o<n)throw new V_(`Too many math in a row: `+(`expected `+o+`, but got `+n),e[0])}});for(var p=0;p<s;++p){var m=`r`,h=0;p%2==1?m=`l`:p>0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a};CS({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(yx(t[0])?[t[0]]:_x(t[0],`ordgroup`).body).map(function(e){var t=vx(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new V_(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return jS(e.parser,r,MS(e.envName))},htmlBuilder:NS,mathmlBuilder:FS}),CS({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(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new V_(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=jS(e.parser,r,MS(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:NS,mathmlBuilder:FS}),CS({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=jS(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:NS,mathmlBuilder:FS}),CS({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(yx(t[0])?[t[0]]:_x(t[0],`ordgroup`).body).map(function(e){var t=vx(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new V_(`Unknown column alignment: `+t,e)});if(n.length>1)throw new V_(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=jS(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new V_(`{subarray} can contain only one column`);return i},htmlBuilder:NS,mathmlBuilder:FS}),CS({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=jS(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},MS(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:NS,mathmlBuilder:FS}),CS({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:IS,htmlBuilder:NS,mathmlBuilder:FS}),CS({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){kS.has(e.envName)&&OS(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:AS(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return jS(e.parser,t,`display`)},htmlBuilder:NS,mathmlBuilder:FS}),CS({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:IS,htmlBuilder:NS,mathmlBuilder:FS}),CS({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){OS(e);var t={autoTag:AS(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return jS(e.parser,t,`display`)},htmlBuilder:NS,mathmlBuilder:FS}),CS({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return OS(e),Nx(e.parser)},htmlBuilder:NS,mathmlBuilder:FS}),U(`\\nonumber`,`\\gdef\\@eqnsw{0}`),U(`\\notag`,`\\nonumber`),Cb({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new V_(e.funcName+` valid only within array environment`)}});var LS=SS;Cb({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new V_(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=_x(i.body[o],`textord`).text;if(r===`\\begin`){if(!LS.hasOwnProperty(a))throw new V_(`No such environment: `+a,i);var s=LS[a],{args:c,optArgs:l}=n.parseArguments(`\\begin{`+a+`}`,s),u={mode:n.mode,envName:a,parser:n},d=s.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=_x(n.parseFunction(),`environment`);if(p.name!==a)throw new V_(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var RS=(e,t)=>{var n=e.font,r=t.withFont(n);return Lb(e.body,r)},zS=(e,t)=>{var n=e.font,r=t.withFont(n);return Qb(e.body,r)},BS={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};Cb({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:n,funcName:r}=e,i=Tb(t[0]),a=r;return a in BS&&(a=BS[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:RS,mathmlBuilder:zS}),Cb({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:Dx(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:Y_(r)}}}),Cb({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:RS,mathmlBuilder:zS});var VS=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=Lb(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=Lb(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=Vv(e.barSize,t),u=ib(`frac-line`,t,d)):u=ib(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===vv.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=lb({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=lb({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===vv.DISPLAY.size?t.fontMetrics().delim1:n.size===vv.SCRIPTSCRIPT.size?t.havingStyle(vv.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?Ib(t,[`mopen`]):pS(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?V([]):e.rightDelim==null?Ib(t,[`mclose`]):pS(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return V([`mord`].concat(a.sizingClasses(t)),[x,V([`mfrac`],[g]),S],t)},HS=(e,t)=>{var n=new H(`mfrac`,[Qb(e.numer,t),Qb(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=Vv(e.barSize,t);n.setAttribute(`linethickness`,Hv(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new H(`mo`,[new Vb(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new H(`mo`,[new Vb(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return Kb(i)}return n},US=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;Cb({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),US({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:VS,mathmlBuilder:HS}),Cb({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var WS=[`display`,`text`,`script`,`scriptscript`],GS=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};Cb({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=Tb(t[0]),o=a.type===`atom`&&a.family===`open`?GS(a.text):null,s=Tb(t[1]),c=s.type===`atom`&&s.family===`close`?GS(s.text):null,l=_x(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=_x(p.body[0],`textord`);f=WS[Number(m.text)]}}else p=_x(p,`textord`),f=WS[Number(p.text)];return US({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),Cb({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:_x(t[0],`size`).value,token:i}}}),Cb({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=_x(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var KS=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?Lb(e.sup,t.havingStyle(n.sup()),t):Lb(e.sub,t.havingStyle(n.sub()),t),i=_x(e.base,`horizBrace`)):i=_x(e,`horizBrace`);var a=Lb(i.base,t.havingBaseStyle(vv.DISPLAY)),o=fx(i,t),s=i.isOver?lb({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):lb({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=V([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?lb({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):lb({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return V([`minner`,i.isOver?`mover`:`munder`],[s],t)};Cb({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:KS,mathmlBuilder:(e,t)=>{var n=lx(e.label);return new H(e.isOver?`mover`:`munder`,[Qb(e.base,t),n])}}),Cb({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=_x(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:Eb(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=jb(e.body,t,!1);return ab(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Zb(e.body,t);return n instanceof H||(n=new H(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),Cb({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=_x(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:Eb(s)}}}),Cb({type:`hbox`,names:[`\\hbox`],props:{numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:`hbox`,mode:n.mode,body:Eb(t[0])}},htmlBuilder(e,t){return ob(jb(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new H(`mrow`,Xb(e.body,t.withFont(``)))}}),Cb({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],props:{numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,a=_x(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u<l.length;u++){var d=l[u],f=d.indexOf(`=`);if(f<0)throw new V_(`\\htmlData key/value '`+d+`' missing equals sign`);var p=d.slice(0,f),m=d.slice(f+1);c[`data-`+p.trim()]=m}s={command:`\\htmlData`,attributes:c};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:c,body:Eb(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=jb(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=V(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>Zb(e.body,t)}),Cb({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:Eb(t[0]),mathml:Eb(t[1])}},htmlBuilder:(e,t)=>ob(jb(e.html,t,!1)),mathmlBuilder:(e,t)=>Zb(e.mathml,t)});var qS=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new V_(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!Bv(n))throw new V_(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};Cb({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=_x(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=qS(d);break;case`height`:a=qS(d);break;case`totalheight`:o=qS(d);break;default:throw new V_(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=_x(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=Vv(e.height,t),r=0;e.totalheight.number>0&&(r=Vv(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Vv(e.width,t));var a={height:Hv(n+r)};i>0&&(a.width=Hv(i)),r>0&&(a.verticalAlign=Hv(-r));var o=new Hee(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new H(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=Vv(e.height,t),i=0;if(e.totalheight.number>0&&(i=Vv(e.totalheight,t)-r,n.setAttribute(`valign`,Hv(-i))),n.setAttribute(`height`,Hv(r+i)),e.width.number>0){var a=Vv(e.width,t);n.setAttribute(`width`,Hv(a))}return n.setAttribute(`src`,e.src),n}}),Cb({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=_x(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return ub(e.dimension,t)},mathmlBuilder(e,t){return new Hb(Vv(e.dimension,t))}}),Cb({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=V([],[Lb(e.body,t)]),n=V([`inner`],[n],t)):n=V([`inner`],[Lb(e.body,t)]);var r=V([`fix`],[]),i=V([e.alignment],[n,r],t),a=V([`strut`]);return a.style.height=Hv(i.height+i.depth),i.depth&&(a.style.verticalAlign=Hv(-i.depth)),i.children.unshift(a),i=V([`thinbox`],[i],t),V([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new H(`mpadded`,[Qb(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),Cb({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),Cb({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new V_(`Mismatched `+e.funcName)}});var JS=(e,t)=>{switch(t.style.size){case vv.DISPLAY.size:return e.display;case vv.TEXT.size:return e.text;case vv.SCRIPT.size:return e.script;case vv.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Cb({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:Eb(t[0]),text:Eb(t[1]),script:Eb(t[2]),scriptscript:Eb(t[3])}},htmlBuilder:(e,t)=>ob(jb(JS(e,t),t,!1)),mathmlBuilder:(e,t)=>Zb(JS(e,t),t)});var YS=(e,t,n,r,i,a,o)=>{e=V([],[e]);var s=n&&Y_(n),c,l;if(t){var u=Lb(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=Lb(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=lb({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:Hv(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:Hv(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=lb({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:Hv(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=lb({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:Hv(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=V([`mspace`],[],r);m.style.marginRight=Hv(a),p.unshift(m)}return V([`mop`,`op-limits`],p,r)},XS=new Set([`\\smallint`]),ZS=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=_x(e.base,`op`),i=!0):a=_x(e,`op`);var o=t.style,s=!1;o.size===vv.DISPLAY.size&&a.symbol&&!XS.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=Xy(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=mb(d+`Size`+(s?`2`:`1`),t);c=lb({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=jb(a.body,t,!0);p.length===1&&p[0]instanceof Xv?(c=p[0],c.classes[0]=`mop`):c=V([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(Zy(a.name[h],a.mode,t));c=V([`mop`],m,t)}var g=0,_=0;return(c instanceof Xv||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?YS(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=Hv(g)),c)},QS=(e,t)=>{var n;if(e.symbol)n=new H(`mo`,[Gb(e.name,e.mode)]),XS.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new H(`mo`,Xb(e.body,t));else{n=new H(`mi`,[new Vb(e.name.slice(1))]);var r=new H(`mo`,[Gb(`â¡`,`text`)]);n=e.parentIsSupSub?new H(`mrow`,[n,r]):Bb([n,r])}return n},$S={"â":`\\prod`,"â":`\\coprod`,"â":`\\sum`,"â":`\\bigwedge`,"â":`\\bigvee`,"â":`\\bigcap`,"â":`\\bigcup`,"â¨":`\\bigodot`,"â¨":`\\bigoplus`,"â¨":`\\bigotimes`,"â¨":`\\biguplus`,"â¨":`\\bigsqcup`};Cb({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.â.â.â.â.â.â.â.â¨.â¨.â¨.â¨.â¨`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=$S[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:ZS,mathmlBuilder:QS}),Cb({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Eb(r)}},htmlBuilder:ZS,mathmlBuilder:QS});var eC={"â«":`\\int`,"â¬":`\\iint`,"â":`\\iiint`,"â®":`\\oint`,"â¯":`\\oiint`,"â°":`\\oiiint`};Cb({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`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ZS,mathmlBuilder:QS}),Cb({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:ZS,mathmlBuilder:QS}),Cb({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`â«`,`â¬`,`â`,`â®`,`â¯`,`â°`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=eC[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:ZS,mathmlBuilder:QS});var tC=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=_x(e.base,`operatorname`),i=!0):a=_x(e,`operatorname`);var o;if(a.body.length>0){for(var s=jb(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof Xv&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=V([`mop`],s,t)}else o=V([`mop`],[],t);return i?YS(o,n,r,t,t.style,0,0):o};Cb({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:Eb(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:tC,mathmlBuilder:(e,t)=>{for(var n=Xb(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof Hb)){if(a instanceof H)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 Vb?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}r&&(n=[new Vb(n.map(e=>e.toText()).join(``))]);var s=new H(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new H(`mo`,[Gb(`â¡`,`text`)]);return e.parentIsSupSub?new H(`mrow`,[s,c]):Bb([s,c])}}),U(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),wb({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?ob(jb(e.body,t,!1)):V([`mord`],jb(e.body,t,!0),t)},mathmlBuilder(e,t){return Zb(e.body,t,!0)}}),Cb({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=Lb(e.body,t.havingCrampedStyle()),r=ib(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return V([`mord`,`overline`],[lb({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new H(`mo`,[new Vb(`â¾`)]);n.setAttribute(`stretchy`,`true`);var r=new H(`mover`,[Qb(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),Cb({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:Eb(r)}},htmlBuilder:(e,t)=>ob(jb(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new H(`mphantom`,Xb(e.body,t))}),U(`\\hphantom`,`\\smash{\\phantom{#1}}`),Cb({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>V([`mord`,`rlap`],[V([`inner`],[Lb(e.body,t.withPhantom())]),V([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new H(`mpadded`,[new H(`mphantom`,Xb(Eb(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),Cb({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=_x(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Lb(e.body,t);return lb({positionType:`shift`,positionData:-Vv(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new H(`mpadded`,[Qb(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),Cb({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),Cb({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=_x(t[0],`size`),o=_x(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&_x(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=V([`mord`,`rule`],[],t),r=Vv(e.width,t),i=Vv(e.height,t),a=e.shift?Vv(e.shift,t):0;return n.style.borderRightWidth=Hv(r),n.style.borderTopWidth=Hv(i),n.style.bottom=Hv(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Vv(e.width,t),r=Vv(e.height,t),i=e.shift?Vv(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new H(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,Hv(n)),o.setAttribute(`height`,Hv(r));var s=new H(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,Hv(i)):(s.setAttribute(`height`,Hv(i)),s.setAttribute(`depth`,Hv(-i))),s.setAttribute(`voffset`,Hv(i)),s}});function nC(e,t,n){for(var r=jb(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return ob(r)}var rC=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];Cb({type:`sizing`,names:rC,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:rC.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return nC(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new H(`mstyle`,Xb(e.body,n));return r.setAttribute(`mathsize`,Hv(n.sizeMultiplier)),r}}),Cb({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&_x(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=vx(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=V([],[Lb(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return V([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return V([`mord`],[lb({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new H(`mpadded`,[Qb(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),Cb({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=Lb(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=sb(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<vv.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:c}=nS(n.height+n.depth+a+r,t),l=o.height-s;l>n.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=Hv(c);var d=lb({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(vv.SCRIPTSCRIPT),p=Lb(e.index,f,t);return V([`mord`,`sqrt`],[V([`root`],[lb({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}return V([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new H(`mroot`,[Qb(n,t),Qb(r,t)]):new H(`msqrt`,[Qb(n,t)])}});var iC={display:vv.DISPLAY,text:vv.TEXT,script:vv.SCRIPT,scriptscript:vv.SCRIPTSCRIPT};function aC(e){return e in iC}Cb({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!aC(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=iC[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),nC(e.body,r,t)},mathmlBuilder(e,t){var n=iC[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new H(`mstyle`,Xb(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var oC=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===vv.DISPLAY.size||n.alwaysHandleSupSub)?ZS:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===vv.DISPLAY.size||n.limits)?tC:null:n.type===`accent`?Y_(n.base)?xx:null:n.type===`horizBrace`&&!e.sub===n.isOver?KS:null:null};wb({type:`supsub`,htmlBuilder(e,t){var n=oC(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=Lb(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&Y_(r);if(i){var p=t.havingStyle(t.style.sup());s=Lb(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=Lb(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===vv.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=Hv(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof Xv||y)&&(v=Hv(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=lb({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=lb({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=lb({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return V([Fb(o,`right`)||`mord`],[o,V([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[Qb(e.base,t)];e.sub&&a.push(Qb(e.sub,t)),e.sup&&a.push(Qb(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===vv.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===vv.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===vv.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===vv.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===vv.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===vv.DISPLAY)?`munder`:`msub`}return new H(o,a)}}),wb({type:`atom`,htmlBuilder(e,t){return Zy(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new H(`mo`,[Gb(e.text,e.mode)]);if(e.family===`bin`){var r=Jb(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var sC={mi:`italic`,mn:`normal`,mtext:`normal`};wb({type:`mathord`,htmlBuilder(e,t){return $y(e,t,`mathord`)},mathmlBuilder(e,t){var n=new H(`mi`,[Gb(e.text,e.mode,t)]),r=Jb(e,t)||`italic`;return r!==sC[n.type]&&n.setAttribute(`mathvariant`,r),n}}),wb({type:`textord`,htmlBuilder(e,t){return $y(e,t,`textord`)},mathmlBuilder(e,t){var n=Gb(e.text,e.mode,t),r=Jb(e,t)||`normal`,i=e.mode===`text`?new H(`mtext`,[n]):/[0-9]/.test(e.text)?new H(`mn`,[n]):e.text===`\\prime`?new H(`mo`,[n]):new H(`mi`,[n]);return r!==sC[i.type]&&i.setAttribute(`mathvariant`,r),i}});var cC={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},lC={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};wb({type:`spacing`,htmlBuilder(e,t){if(lC.hasOwnProperty(e.text)){var n=lC[e.text].className||``;if(e.mode===`text`){var r=$y(e,t,`textord`);return r.classes.push(n),r}return V([`mspace`,n],[Zy(e.text,e.mode,t)],t)}if(cC.hasOwnProperty(e.text))return V([`mspace`,cC[e.text]],[],t);throw new V_(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(lC.hasOwnProperty(e.text))n=new H(`mtext`,[new Vb(`\xA0`)]);else if(cC.hasOwnProperty(e.text))return new H(`mspace`);else throw new V_(`Unknown type of space "`+e.text+`"`);return n}});var uC=()=>{var e=new H(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};wb({type:`tag`,mathmlBuilder(e,t){var n=new H(`mtable`,[new H(`mtr`,[uC(),new H(`mtd`,[Zb(e.body,t)]),uC(),new H(`mtd`,[Zb(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var dC={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},fC={"\\textbf":`textbf`,"\\textmd":`textmd`},pC={"\\textit":`textit`,"\\textup":`textup`},mC=(e,t)=>{var n=e.font;return n?dC[n]?t.withTextFontFamily(dC[n]):fC[n]?t.withTextFontWeight(fC[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(pC[n]):t};Cb({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:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:Eb(i),font:r}},htmlBuilder(e,t){var n=mC(e,t);return V([`mord`,`text`],jb(e.body,n,!0),n)},mathmlBuilder(e,t){var n=mC(e,t);return Zb(e.body,n)}}),Cb({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Lb(e.body,t),r=ib(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return V([`mord`,`underline`],[lb({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new H(`mo`,[new Vb(`â¾`)]);n.setAttribute(`stretchy`,`true`);var r=new H(`munder`,[Qb(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),Cb({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Lb(e.body,t),r=t.fontMetrics().axisHeight;return lb({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new H(`mrow`,[new H(`mpadded`,[Qb(e.body,t)],[`vcenter`])])}}),Cb({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new V_(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=hC(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(Xy(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return V([`mord`,`text`].concat(i.sizingClasses(t)),tb(r),i)},mathmlBuilder(e,t){var n=new H(`mtext`,[new Vb(hC(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var hC=e=>e.body.replace(/ /g,e.star?`â£`:`\xA0`),gC=bb,_C=`[ \r 303 ]`,vC=`\\\\[a-zA-Z@]+`,yC=`\\\\[^\ud800-\udfff]`,bC=`(`+vC+`)`+_C+`*`,xC=`\\\\( 304|[ \r ]+ 305?)[ \r ]*`,SC=`[Ì-ͯ]`,Jee=RegExp(SC+`+$`),Yee=`(`+_C+`+)|`+(xC+`|`)+`([
305!-\\[\\]-â§âª-í¿ï¤-ï¿¿]`+(SC+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(SC+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+bC)+(`|`+yC+`)`),CC=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Yee,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new ES(`EOF`,new TS(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new V_(`Unexpected character: '`+e[t]+`'`,new ES(e[t],new TS(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(` 306`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.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=i+1,this.lex()}return new ES(r,new TS(this,t,this.tokenRegex.lastIndex))}},Xee=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new V_(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},Zee=wS;U(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),U(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),U(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),U(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),U(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),U(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),U(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var wC={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};U(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new V_("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=wC[t.text],r==null||r>=n)throw new V_(`Invalid base-`+n+` digit `+t.text);for(var i;(i=wC[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`});var TC=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new V_(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new V_(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new V_(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new V_(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};U(`\\newcommand`,e=>TC(e,!1,!0,!1)),U(`\\renewcommand`,e=>TC(e,!0,!1,!1)),U(`\\providecommand`,e=>TC(e,!0,!0,!0)),U(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),U(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),U(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),gC[n],oy.math[n],oy.text[n]),``}),U(`\\bgroup`,`{`),U(`\\egroup`,`}`),U(`~`,`\\nobreakspace`),U(`\\lq`,"`"),U(`\\rq`,`'`),U(`\\aa`,`\\r a`),U(`\\AA`,`\\r A`),U(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),U(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),U(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),U(`â¬`,`\\mathscr{B}`),U(`â°`,`\\mathscr{E}`),U(`â±`,`\\mathscr{F}`),U(`â`,`\\mathscr{H}`),U(`â`,`\\mathscr{I}`),U(`â`,`\\mathscr{L}`),U(`â³`,`\\mathscr{M}`),U(`â`,`\\mathscr{R}`),U(`â`,`\\mathfrak{C}`),U(`â`,`\\mathfrak{H}`),U(`â¨`,`\\mathfrak{Z}`),U(`\\Bbbk`,`\\Bbb{k}`),U(`\\llap`,`\\mathllap{\\textrm{#1}}`),U(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),U(`\\clap`,`\\mathclap{\\textrm{#1}}`),U(`\\mathstrut`,`\\vphantom{(}`),U(`\\underbar`,`\\underline{\\text{#1}}`),U(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),U(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`â }}"),U(`\\ne`,`\\neq`),U(`â `,`\\neq`),U(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`â}}"),U(`â`,`\\notin`),U(`â`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`â}}"),U(`â`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`â}}"),U(`â`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`â}}"),U(`â`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`â}}"),U(`â`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`â}}"),U(`â`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`â}}"),U(`â`,"\\html@mathml{\\stackrel{\\tiny?}{=}}
306{\\mathrel{\\char`â}}"),U(`â`,`\\perp`),U(`â¼`,`\\mathclose{!\\mkern-0.8mu!}`),U(`â`,`\\notni`),U(`â`,`\\ulcorner`),U(`â`,`\\urcorner`),U(`â`,`\\llcorner`),U(`â`,`\\lrcorner`),U(`©`,`\\copyright`),U(`®`,`\\textregistered`),U(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),U(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),U(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),U(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),U(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),U(`â®`,`\\vdots`),U(`\\varGamma`,`\\mathit{\\Gamma}`),U(`\\varDelta`,`\\mathit{\\Delta}`),U(`\\varTheta`,`\\mathit{\\Theta}`),U(`\\varLambda`,`\\mathit{\\Lambda}`),U(`\\varXi`,`\\mathit{\\Xi}`),U(`\\varPi`,`\\mathit{\\Pi}`),U(`\\varSigma`,`\\mathit{\\Sigma}`),U(`\\varUpsilon`,`\\mathit{\\Upsilon}`),U(`\\varPhi`,`\\mathit{\\Phi}`),U(`\\varPsi`,`\\mathit{\\Psi}`),U(`\\varOmega`,`\\mathit{\\Omega}`),U(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),U(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),U(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),U(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),U(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),U(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),U(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),U(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var EC={",":`\\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`},Qee=new Set([`bin`,`rel`]);U(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in EC?t=EC[n]:(n.slice(0,4)===`\\not`||n in oy.math&&Qee.has(oy.math[n].group))&&(t=`\\dotsb`),t});var DC={")":!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};U(`\\dotso`,function(e){return e.future().text in DC?`\\ldots\\,`:`\\ldots`}),U(`\\dotsc`,function(e){var t=e.future().text;return t in DC&&t!==`,`?`\\ldots\\,`:`\\ldots`}),U(`\\cdots`,function(e){return e.future().text in DC?`\\@cdots\\,`:`\\@cdots`}),U(`\\dotsb`,`\\cdots`),U(`\\dotsm`,`\\cdots`),U(`\\dotsi`,`\\!\\cdots`),U(`\\dotsx`,`\\ldots\\,`),U(`\\DOTSI`,`\\relax`),U(`\\DOTSB`,`\\relax`),U(`\\DOTSX`,`\\relax`),U(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),U(`\\,`,`\\tmspace+{3mu}{.1667em}`),U(`\\thinspace`,`\\,`),U(`\\>`,`\\mskip{4mu}`),U(`\\:`,`\\tmspace+{4mu}{.2222em}`),U(`\\medspace`,`\\:`),U(`\\;`,`\\tmspace+{5mu}{.2777em}`),U(`\\thickspace`,`\\;`),U(`\\!`,`\\tmspace-{3mu}{.1667em}`),U(`\\negthinspace`,`\\!`),U(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),U(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),U(`\\enspace`,`\\kern.5em `),U(`\\enskip`,`\\hskip.5em\\relax`),U(`\\quad`,`\\hskip1em\\relax`),U(`\\qquad`,`\\hskip2em\\relax`),U(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),U(`\\tag@paren`,`\\tag@literal{({#1})}`),U(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new V_(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),U(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),U(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),U(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),U(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),U(`\\newline`,`\\\\\\relax`),U(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var OC=Hv(ey[`Main-Regular`][84][1]-.7*ey[`Main-Regular`][65][1]);U(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+OC+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),U(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+OC+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),U(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),U(`\\@hspace`,`\\hskip #1\\relax`),U(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),U(`\\ordinarycolon`,`:`),U(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),U(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),U(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),U(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),U(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),U(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),U(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),U(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),U(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),U(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),U(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),U(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),U(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),U(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),U(`â·`,`\\dblcolon`),U(`â¹`,`\\eqcolon`),U(`â`,`\\coloneqq`),U(`â`,`\\eqqcolon`),U(`â©´`,`\\Coloneqq`),U(`\\ratio`,`\\vcentcolon`),U(`\\coloncolon`,`\\dblcolon`),U(`\\colonequals`,`\\coloneqq`),U(`\\coloncolonequals`,`\\Coloneqq`),U(`\\equalscolon`,`\\eqqcolon`),U(`\\equalscoloncolon`,`\\Eqqcolon`),U(`\\colonminus`,`\\coloneq`),U(`\\coloncolonminus`,`\\Coloneq`),U(`\\minuscolon`,`\\eqcolon`),U(`\\minuscoloncolon`,`\\Eqcolon`),U(`\\coloncolonapprox`,`\\Colonapprox`),U(`\\coloncolonsim`,`\\Colonsim`),U(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),U(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),U(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),U(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),U(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`â}}"),U(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),U(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),U(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),U(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),U(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),U(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),U(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),U(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),U(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{â©}`),U(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{â¨}`),U(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{â±}`),U(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{â±}`),U(`\\nleqq`,`\\html@mathml{\\@nleqq}{â°}`),U(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{â°}`),U(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{â¤}`),U(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{â¦}`),U(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{â}`),U(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{â}`),U(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{â}`),U(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{â«}`),U(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{â}`),U(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{â«}`),U(`\\imath`,`\\html@mathml{\\@imath}{ı}`),U(`\\jmath`,`\\html@mathml{\\@jmath}{È·}`),U(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}
306{\\mathopen{\\char`â¦}}"),U(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`â§}}"),U(`â¦`,`\\llbracket`),U(`â§`,`\\rrbracket`),U(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`â¦}}"),U(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`â¦}}"),U(`â¦`,`\\lBrace`),U(`â¦`,`\\rBrace`),U(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),U(`⦵`,`\\minuso`),U(`\\darr`,`\\downarrow`),U(`\\dArr`,`\\Downarrow`),U(`\\Darr`,`\\Downarrow`),U(`\\lang`,`\\langle`),U(`\\rang`,`\\rangle`),U(`\\uarr`,`\\uparrow`),U(`\\uArr`,`\\Uparrow`),U(`\\Uarr`,`\\Uparrow`),U(`\\N`,`\\mathbb{N}`),U(`\\R`,`\\mathbb{R}`),U(`\\Z`,`\\mathbb{Z}`),U(`\\alef`,`\\aleph`),U(`\\alefsym`,`\\aleph`),U(`\\Alpha`,`\\mathrm{A}`),U(`\\Beta`,`\\mathrm{B}`),U(`\\bull`,`\\bullet`),U(`\\Chi`,`\\mathrm{X}`),U(`\\clubs`,`\\clubsuit`),U(`\\cnums`,`\\mathbb{C}`),U(`\\Complex`,`\\mathbb{C}`),U(`\\Dagger`,`\\ddagger`),U(`\\diamonds`,`\\diamondsuit`),U(`\\empty`,`\\emptyset`),U(`\\Epsilon`,`\\mathrm{E}`),U(`\\Eta`,`\\mathrm{H}`),U(`\\exist`,`\\exists`),U(`\\harr`,`\\leftrightarrow`),U(`\\hArr`,`\\Leftrightarrow`),U(`\\Harr`,`\\Leftrightarrow`),U(`\\hearts`,`\\heartsuit`),U(`\\image`,`\\Im`),U(`\\infin`,`\\infty`),U(`\\Iota`,`\\mathrm{I}`),U(`\\isin`,`\\in`),U(`\\Kappa`,`\\mathrm{K}`),U(`\\larr`,`\\leftarrow`),U(`\\lArr`,`\\Leftarrow`),U(`\\Larr`,`\\Leftarrow`),U(`\\lrarr`,`\\leftrightarrow`),U(`\\lrArr`,`\\Leftrightarrow`),U(`\\Lrarr`,`\\Leftrightarrow`),U(`\\Mu`,`\\mathrm{M}`),U(`\\natnums`,`\\mathbb{N}`),U(`\\Nu`,`\\mathrm{N}`),U(`\\Omicron`,`\\mathrm{O}`),U(`\\plusmn`,`\\pm`),U(`\\rarr`,`\\rightarrow`),U(`\\rArr`,`\\Rightarrow`),U(`\\Rarr`,`\\Rightarrow`),U(`\\real`,`\\Re`),U(`\\reals`,`\\mathbb{R}`),U(`\\Reals`,`\\mathbb{R}`),U(`\\Rho`,`\\mathrm{P}`),U(`\\sdot`,`\\cdot`),U(`\\sect`,`\\S`),U(`\\spades`,`\\spadesuit`),U(`\\sub`,`\\subset`),U(`\\sube`,`\\subseteq`),U(`\\supe`,`\\supseteq`),U(`\\Tau`,`\\mathrm{T}`),U(`\\thetasym`,`\\vartheta`),U(`\\weierp`,`\\wp`),U(`\\Zeta`,`\\mathrm{Z}`),U(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),U(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),U(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),U(`\\bra`,`\\mathinner{\\langle{#1}|}`),U(`\\ket`,`\\mathinner{|{#1}\\rangle}`),U(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),U(`\\Bra`,`\\left\\langle#1\\right|`),U(`\\Ket`,`\\left|#1\\right\\rangle`);var kC=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};U(`\\bra@ket`,kC(!1)),U(`\\bra@set`,kC(!0)),U(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),U(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),U(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),U(`\\angln`,`{\\angl n}`),U(`\\blue`,`\\textcolor{##6495ed}{#1}`),U(`\\orange`,`\\textcolor{##ffa500}{#1}`),U(`\\pink`,`\\textcolor{##ff00af}{#1}`),U(`\\red`,`\\textcolor{##df0030}{#1}`),U(`\\green`,`\\textcolor{##28ae7b}{#1}`),U(`\\gray`,`\\textcolor{gray}{#1}`),U(`\\purple`,`\\textcolor{##9d38bd}{#1}`),U(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),U(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),U(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),U(`\\blueD`,`\\textcolor{##11accd}{#1}`),U(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),U(`\\tealA`,`\\textcolor{##94fff5}{#1}`),U(`\\tealB`,`\\textcolor{##26edd5}{#1}`),U(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),U(`\\tealD`,`\\textcolor{##01a995}{#1}`),U(`\\tealE`,`\\textcolor{##208170}{#1}`),U(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),U(`\\greenB`,`\\textcolor{##8af281}{#1}`),U(`\\greenC`,`\\textcolor{##74cf70}{#1}`),U(`\\greenD`,`\\textcolor{##1fab54}{#1}`),U(`\\greenE`,`\\textcolor{##0d923f}{#1}`),U(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),U(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),U(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),U(`\\goldD`,`\\textcolor{##e07d10}{#1}`),U(`\\goldE`,`\\textcolor{##a75a05}{#1}`),U(`\\redA`,`\\textcolor{##fca9a9}{#1}`),U(`\\redB`,`\\textcolor{##ff8482}{#1}`),U(`\\redC`,`\\textcolor{##f9685d}{#1}`),U(`\\redD`,`\\textcolor{##e84d39}{#1}
306`),U(`\\redE`,`\\textcolor{##bc2612}{#1}`),U(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),U(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),U(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),U(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),U(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),U(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),U(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),U(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),U(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),U(`\\purpleE`,`\\textcolor{##543b78}{#1}`),U(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),U(`\\mintB`,`\\textcolor{##edf2df}{#1}`),U(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),U(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),U(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),U(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),U(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),U(`\\grayE`,`\\textcolor{##babec2}{#1}`),U(`\\grayF`,`\\textcolor{##888d93}{#1}`),U(`\\grayG`,`\\textcolor{##626569}{#1}`),U(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),U(`\\grayI`,`\\textcolor{##21242c}{#1}`),U(`\\kaBlue`,`\\textcolor{##314453}{#1}`),U(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var AC={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},$ee=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Xee(Zee,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new CC(e,this.settings)}switchMode(e){this.mode=e}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(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new ES(`EOF`,n.loc)),this.pushTokens(r),new ES(``,TS.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new V_(`Extra }`,i)}else if(i.text===`EOF`)throw new V_(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new V_(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new V_(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new V_(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new V_(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new V_(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new V_(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ES(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new CC(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||gC.hasOwnProperty(e)||oy.math.hasOwnProperty(e)||oy.text.hasOwnProperty(e)||AC.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?gC.hasOwnProperty(e)&&!gC[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},jC=/^[âââââââââââ
âââââââᵢⱼââââââáµ£ââᵤᵥâᵦᵧᵨᵩᵪ]/,MC=Object.freeze({"â":`+`,"â":`-`,"â":`=`,"â":`(`,"â":`)`,"â":`0`,"â":`1`,"â":`2`,"â":`3`,"â
306":`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`,áµ:`β`,áµ:`γ`,áµ:`δ`,áµ :`Ï`,ᵡ:`Ï`,á¶¿:`θ`}),NC={"Ì":{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`}},PC={á:`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Ì`,ά:`αÌ`,á½°:`αÌ`,á¾±:`αÌ`,á¾°:`αÌ`,Î:`εÌ`,á½²:`εÌ`,ή:`ηÌ`,á½´:`ηÌ`,ί:`ιÌ`,á½¶:`ιÌ`,Ï:`ιÌ`,Î:`ιÌÌ`,á¿:`ιÌÌ`,á¿:`ιÌ`,á¿:`ιÌ`,Ï:`οÌ`,ὸ:`οÌ`,Ï:`Ï
Ì`,ὺ:`Ï
Ì`,Ï:`Ï
Ì`,ΰ:`Ï
ÌÌ`,á¿¢:`Ï
ÌÌ`,á¿¡:`Ï
Ì`,á¿ :`Ï
Ì`,Ï:`ÏÌ`,á½¼:`ÏÌ`,Î:`Î¥Ì`,Ὺ:`Î¥Ì`,Ϋ:`Î¥Ì`,á¿©:`Î¥Ì`,Ῠ:`Î¥Ì`,Î:`ΩÌ`,Ὼ:`ΩÌ`},FC=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new $ee(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new V_(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ES(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&gC[i.text]&&gC[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new V_(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s}
vendor: 10,094 bytes, lines 306-307
306,o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new V_(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new V_(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new V_(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new V_(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new V_(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(MC[i.text]){var s=jC.test(i.text),c=[];for(c.push(new ES(MC[i.text])),this.consume();;){var l=this.fetch().text;if(!MC[l]||jC.test(l)!==s)break;c.unshift(new ES(MC[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}else break}return n||r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=gC[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new V_(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new V_(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new V_(`Can't use function '`+r+`' in math mode`,n);var{args:a,optArgs:o}=this.parseArguments(r,i);return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=gC[e];if(o&&o.handler)return o.handler(a,t,n);throw new V_(`No function handler for `+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],i=[],a=0;a<n;a++){var o=t.argTypes&&t.argTypes[a],s=a<t.numOptionalArgs;(`primitive`in t&&t.primitive&&o==null||t.type===`sqrt`&&a===1&&i[0]==null)&&(o=`primitive`);var c=this.parseGroupOfType(`argument to '`+e+`'`,o,s);if(s)i.push(c);else if(c!=null)r.push(c);else throw new V_(`Null argument, please report this as a bug`)}return{args:r,optArgs:i}}parseGroupOfType(e,t,n){switch(t){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,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(`raw`,n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new V_(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new V_(`Expected group as `+e,this.fetch());return a;case`original`:case null:case void 0:return this.parseArgumentGroup(n);default:throw new V_(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r=``,i;(i=this.fetch()).text!==`EOF`;)r+=i.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new V_(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(`color`,e);if(t==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(t.text);if(!n)throw new V_(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(`size`,e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new V_(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!Bv(i))throw new V_(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(`url`,e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:TS.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!AC.hasOwnProperty(r)){if(this.settings.throwOnError)throw new V_(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:TS.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:TS.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:TS.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new V_(`\\verb assertion failed -- 307 please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}PC.hasOwnProperty(t[0])&&!oy[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=PC[t[0]]+t.slice(1));var i=Jee.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(oy[this.mode][t]){this.settings.strict&&this.mode===`math`&&jy.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=oy[this.mode][t].group,s=TS.range(e);a=gx(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Sv(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:TS.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!NC[l])throw new V_(`Unknown accent ' `+l+`'`,e);var u=NC[l][this.mode]||NC[l].text;if(!u)throw new V_(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:TS.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}};FC.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var IC=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new FC(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new V_(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new ES(`\\df@tag`)])}]}return r},LC=function(e,t,n){t.textContent=``;var r=VC(e,n).toNode();t.appendChild(r)};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.`),LC=function(){throw new V_(`KaTeX doesn't work in quirks mode.`)});var RC=function(e,t){return VC(e,t).toMarkup()},zC=function(e,t){return IC(e,new tv(t))},BC=function(e,t,n){if(n.throwOnError||!(e instanceof V_))throw e;var r=V([`katex-error`],[new Xv(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},VC=function(e,t){var n=new tv(t);try{return ox(IC(e,n),e,n)}catch(t){return BC(t,e,n)}},HC=function(e,t){var n=new tv(t);try{return sx(IC(e,n),e,n)}catch(t){return BC(t,e,n)}},UC=`0.16.47`,WC={Span:Jv,Anchor:Yv,SymbolNode:Xv,SvgNode:Zv,PathNode:Qv,LineNode:$v},GC={version:UC,render:LC,renderToString:RC,ParseError:V_,SETTINGS_SCHEMA:Z_,__parse:zC,__renderToDomTree:VC,__renderToHTMLTree:HC,__setFontMetrics:ry,__defineSymbol
307:P,__defineFunction:Cb,__defineMacro:U,__domTree:WC},ete={},tte=[];function KC(e){let t=e||ete;return function(e,n){Gh(e,`element`,function(e,r){let i=Array.isArray(e.properties.className)?e.properties.className:tte,a=i.includes(`language-math`),o=i.includes(`math-display`),s=i.includes(`math-inline`),c=o;if(!a&&!o&&!s)return;let l=r[r.length-1],u=e;if(e.tagName===`code`&&a&&l&&l.type===`element`&&l.tagName===`pre`&&(u=l,l=r[r.length-2],c=!0),!l)return;let d=A_(u,{whitespace:`pre`}),f;try{f=GC.renderToString(d,{...t,displayMode:c,throwOnError:!0})}catch(i){let a=i,o=a.name.toLowerCase();n.message(`Could not render math with KaTeX`,{ancestors:[...r,e],cause:a,place:e.position,ruleId:o,source:`rehype-katex`});try{f=GC.renderToString(d,{...t,displayMode:c,strict:`ignore`,throwOnError:!1})}catch{f=[{type:`element`,tagName:`span`,properties:{className:[`katex-error`],style:`color:`+(t.errorColor||`#cc0000`),title:String(i)},children:[{type:`text`,value:d}]}]}}typeof f==`string`&&(f=p_(f,{fragment:!0}).children);let p=l.children.indexOf(u);return l.children.splice(p,1,...f),Wh})}}var nte=typeof self==`object`?self:globalThis,qC=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new nte[e](t)},rte=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(qC(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(qC(a,o),i)};return r},JC=e=>rte(new Map,e)(0),YC=``,{toString:ite}={},{keys:ate}=Object,XC=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=ite.call(e).slice(8,-1);switch(n){case`Array`:return[1,YC];case`Object`:return[2,YC];case`Date`:return[3,YC];case`RegExp`:return[4,YC];case`Map`:return[5,YC];case`Set`:return[6,YC];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},ZC=([e,t])=>e===0&&(t===`function`||t===`symbol`),ote=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=XC(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of ate(r))(e||!ZC(XC(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?YC:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(ZC(XC(n))||ZC(XC(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!ZC(XC(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},QC=(e,{json:t,lossy:n}={})=>{let r=[];return ote(!(t||n),!!t,new Map,r)(e),r},$C=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?JC(QC(e,t)):structuredClone(e):(e,t)=>JC(QC(e,t));function ste(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=ew(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}
vendor: 13,754 bytes, lines 307-308
307function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=ew(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function ew(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(` 308`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var tw={}.hasOwnProperty,cte=Object.prototype;function lte(e,t){let n=t||{};return nw({file:n.file||void 0,location:!1,schema:n.space===`svg`?zg:Rg,verbose:n.verbose||!1},e)}function nw(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},iw(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:rw(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=ste(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},iw(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},iw(e,r,n),n}default:return n=ute(e,t),n}}function rw(e,t){let n=-1,r=[];for(;++n<t.length;){let i=nw(e,t[n]);r.push(i)}return r}function ute(e,t){let n=e.schema;e.schema=t.namespaceURI===n_.svg?zg:Rg;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;tw.call(cte,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?t_:e_)(t.tagName,i,rw(e,t.childNodes));if(iw(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&aw(r.startTag),o=r&&r.endTag&&aw(r.endTag),s=nw(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function iw(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=dte(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function dte(e,t,n){let r=aw(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)tw.call(n.attrs,i)&&(r[Fg(e.schema,i).property]=aw(n.attrs[i]));n.startTag;let a=aw(n.startTag),o=n.endTag?aw(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function aw(e){let t=ow({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ow({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ow(e){return e.line&&e.column?e:void 0}var sw={}.hasOwnProperty;function cw(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&sw.call(t,e)){let n=String(t[e]);i=sw.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var fte={},pte={}.hasOwnProperty,lw=cw(`type`,{handlers:{root:hte,element:bte,text:vte,comment:yte,doctype:_te}});function mte(e,t){let n=(t||fte).space;return lw(e,n===`svg`?zg:Rg)}function hte(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=uw(e.children,n,t),dw(e,n),n}function gte(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=uw(e.children,n,t),dw(e,n),n}function _te(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return dw(e,t),t}function vte(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return dw(e,t),t}function yte(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return dw(e,t),t}function bte(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=zg);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&pte.call(e.properties,a)){let t=xte(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:n_[o],childNodes:[],parentNode:null};return s.childNodes=uw(e.children,s,r),dw(e,s),e.tagName===`template`&&e.content&&(s.content=gte(e.content,r)),s}function xte(e,t,n){let r=Fg(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Vg(n):Gg(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=n_[r.space]}return i}function uw(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=lw(e[r],n);a.parentNode=t,i.push(a)}return i}function dw(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var fw=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Ste=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]),W;(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`})(W||={});var pw={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function mw(e){return e>=55296&&e<=57343}function hw(e){return e>=56320&&e<=57343}function gw(e,t){return(e-55296)*1024+9216+t}function _w(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function vw(e){return e>=64976&&e<=65007||Ste.has(e)}var G;(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`})(G||={});var yw=65536,bw=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=yw,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(hw(t))return this.pos++,this._addGap(),gw(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,W.EOF;return this._err(G.surrogateInInputStream),e}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(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,W.EOF;let n=this.html.charCodeAt(t);return n===W.CARRIAGE_RETURN?W.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,W.EOF;let e=this.html.charCodeAt(this.pos);return e===W.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,W.LINE_FEED):e===W.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,mw(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===W.LINE_FEED||e===W.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){_w(e)?this._err(G.controlCharacterInInputStream):vw(e)&&this._err(G.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},xw;(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`})(xw||={});function Sw(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var Cw
vendor: 26,690 bytes, line 308
308=new Uint16Array(`áµ<ÃıÊÒÕ»×ÙµÛÞ¢ßà à©àªà¶¡à¹à¼à¼¦áá¨á¡ááááá¥\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;ä¼Ã¬à¢°Ã¢â©;ä»È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è»\xA0ଷ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È;astÐâ¹§â¹²àº
è¶;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;æ`.split(``).map(e=>e.charCodeAt(0))),
308ww=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]]);String.fromCodePoint;function Tw(e){return e>=55296&&e<=57343||e>1114111?65533:ww.get(e)??e}var Ew;
vendor: 8,377 bytes, line 308
308(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`})(Ew||={});var Dw=32,Ow;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(Ow||={});function kw(e){return e>=Ew.ZERO&&e<=Ew.NINE}function Aw(e){return e>=Ew.UPPER_A&&e<=Ew.UPPER_F||e>=Ew.LOWER_A&&e<=Ew.LOWER_F}function jw(e){return e>=Ew.UPPER_A&&e<=Ew.UPPER_Z||e>=Ew.LOWER_A&&e<=Ew.LOWER_Z||kw(e)}function Mw(e){return e===Ew.EQUALS||jw(e)}var Nw;(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`})(Nw||={});var Pw;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Pw||={});var Fw=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Nw.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Pw.Strict}startEntity(e){this.decodeMode=e,this.state=Nw.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Nw.EntityStart:return e.charCodeAt(t)===Ew.NUM?(this.state=Nw.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Nw.NamedEntity,this.stateNamedEntity(e,t));case Nw.NumericStart:return this.stateNumericStart(e,t);case Nw.NumericDecimal:return this.stateNumericDecimal(e,t);case Nw.NumericHex:return this.stateNumericHex(e,t);case Nw.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Dw)===Ew.LOWER_X?(this.state=Nw.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Nw.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(kw(r)||Aw(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(kw(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Ew.SEMI)this.consumed+=1;else if(this.decodeMode===Pw.Strict)return 0;return this.emitCodePoint(Tw(this.result),this.consumed),this.errors&&(e!==Ew.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&Ow.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=Iw(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Pw.Attribute&&(i===0||Mw(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&Ow.VALUE_LENGTH)>>14,i!==0){if(a===Ew.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Pw.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&Ow.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~Ow.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Nw.NamedEntity:return this.result!==0&&(this.decodeMode!==Pw.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Nw.NumericDecimal:return this.emitNumericEntity(0,2);case Nw.NumericHex:return this.emitNumericEntity(0,3);case Nw.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Nw.EntityStart:return 0}}};function Iw(e,t,n,r){let i=(t&Ow.BRANCH_LENGTH)>>7,a=t&Ow.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var K;(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/`})(K||={});var Lw;(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`})(Lw||={});var Rw;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(Rw||={});var q;(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`})(q||={});var J;(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]=`COL`,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]=`
308LI`,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`})(J||={});var zw=new Map([[q.A,J.A],[q.ADDRESS,J.ADDRESS],[q.ANNOTATION_XML,J.ANNOTATION_XML],[q.APPLET,J.APPLET],[q.AREA,J.AREA],[q.ARTICLE,J.ARTICLE],[q.ASIDE,J.ASIDE],[q.B,J.B],[q.BASE,J.BASE],[q.BASEFONT,J.BASEFONT],[q.BGSOUND,J.BGSOUND],[q.BIG,J.BIG],[q.BLOCKQUOTE,J.BLOCKQUOTE],[q.BODY,J.BODY],[q.BR,J.BR],[q.BUTTON,J.BUTTON],[q.CAPTION,J.CAPTION],[q.CENTER,J.CENTER],[q.CODE,J.CODE],[q.COL,J.COL],[q.COLGROUP,J.COLGROUP],[q.DD,J.DD],[q.DESC,J.DESC],[q.DETAILS,J.DETAILS],[q.DIALOG,J.DIALOG],[q.DIR,J.DIR],[q.DIV,J.DIV],[q.DL,J.DL],[q.DT,J.DT],[q.EM,J.EM],[q.EMBED,J.EMBED],[q.FIELDSET,J.FIELDSET],[q.FIGCAPTION,J.FIGCAPTION],[q.FIGURE,J.FIGURE],[q.FONT,J.FONT],[q.FOOTER,J.FOOTER],[q.FOREIGN_OBJECT,J.FOREIGN_OBJECT],[q.FORM,J.FORM],[q.FRAME,J.FRAME],[q.FRAMESET,J.FRAMESET],[q.H1,J.H1],[q.H2,J.H2],[q.H3,J.H3],[q.H4,J.H4],[q.H5,J.H5],[q.H6,J.H6],[q.HEAD,J.HEAD],[q.HEADER,J.HEADER],[q.HGROUP,J.HGROUP],[q.HR,J.HR],[q.HTML,J.HTML],[q.I,J.I],[q.IMG,J.IMG],[q.IMAGE,J.IMAGE],[q.INPUT,J.INPUT],[q.IFRAME,J.IFRAME],[q.KEYGEN,J.KEYGEN],[q.LABEL,J.LABEL],[q.LI,J.LI],[q.LINK,J.LINK],[q.LISTING,J.LISTING],[q.MAIN,J.MAIN],[q.MALIGNMARK,J.MALIGNMARK],[q.MARQUEE,J.MARQUEE],[q.MATH,J.MATH],[q.MENU,J.MENU],[q.META,J.META],[q.MGLYPH,J.MGLYPH],[q.MI,J.MI],[q.MO,J.MO],[q.MN,J.MN],[q.MS,J.MS],[q.MTEXT,J.MTEXT],[q.NAV,J.NAV],[q.NOBR,J.NOBR],[q.NOFRAMES,J.NOFRAMES],[q.NOEMBED,J.NOEMBED],[q.NOSCRIPT,J.NOSCRIPT],[q.OBJECT,J.OBJECT],[q.OL,J.OL],[q.OPTGROUP,J.OPTGROUP],[q.OPTION,J.OPTION],[q.P,J.P],[q.PARAM,J.PARAM],[q.PLAINTEXT,J.PLAINTEXT],[q.PRE,J.PRE],[q.RB,J.RB],[q.RP,J.RP],[q.RT,J.RT],[q.RTC,J.RTC],[q.RUBY,J.RUBY],[q.S,J.S],[q.SCRIPT,J.SCRIPT],[q.SEARCH,J.SEARCH],[q.SECTION,J.SECTION],[q.SELECT,J.SELECT],[q.SOURCE,J.SOURCE],[q.SMALL,J.SMALL],[q.SPAN,J.SPAN],[q.STRIKE,J.STRIKE],[q.STRONG,J.STRONG],[q.STYLE,J.STYLE],[q.SUB,J.SUB],[q.SUMMARY,J.SUMMARY],[q.SUP,J.SUP],[q.TABLE,J.TABLE],[q.TBODY,J.TBODY],[q.TEMPLATE,J.TEMPLATE],[q.TEXTAREA,J.TEXTAREA],[q.TFOOT,J.TFOOT],[q.TD,J.TD],[q.TH,J.TH],[q.THEAD,J.THEAD],[q.TITLE,J.TITLE],[q.TR,J.TR],[q.TRACK,J.TRACK],[q.TT,J.TT],[q.U,J.U],[q.UL,J.UL],[q.SVG,J.SVG],[q.VAR,J.VAR],[q.WBR,J.WBR],[q.XMP,J.XMP]]);function Bw(e){return zw.get(e)??J.UNKNOWN}var Y=J,Vw={[K.HTML]:new Set([Y.ADDRESS,Y.APPLET,Y.AREA,Y.ARTICLE,Y.ASIDE,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BLOCKQUOTE,Y.BODY,Y.BR,Y.BUTTON,Y.CAPTION,Y.CENTER,Y.COL,Y.COLGROUP,Y.DD,Y.DETAILS,Y.DIR,Y.DIV,Y.DL,Y.DT,Y.EMBED,Y.FIELDSET,Y.FIGCAPTION,Y.FIGURE,Y.FOOTER,Y.FORM,Y.FRAME,Y.FRAMESET,Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6,Y.HEAD,Y.HEADER,Y.HGROUP,Y.HR,Y.HTML,Y.IFRAME,Y.IMG,Y.INPUT,Y.LI,Y.LINK,Y.LISTING,Y.MAIN,Y.MARQUEE,Y.MENU,Y.META,Y.NAV,Y.NOEMBED,Y.NOFRAMES,Y.NOSCRIPT,Y.OBJECT,Y.OL,Y.P,Y.PARAM,Y.PLAINTEXT,Y.PRE,Y.SCRIPT,Y.SECTION,Y.SELECT,Y.SOURCE,Y.STYLE,Y.SUMMARY,Y.TABLE,Y.TBODY,Y.TD,Y.TEMPLATE,Y.TEXTAREA,Y.TFOOT,Y.TH,Y.THEAD,Y.TITLE,Y.TR,Y.TRACK,Y.UL,Y.WBR,Y.XMP]),[K.MATHML]:new Set([Y.MI,Y.MO,Y.MN,Y.MS,Y.MTEXT,Y.ANNOTATION_XML]),[K.SVG]:new Set([Y.TITLE,Y.FOREIGN_OBJECT,Y.DESC]),[K.XLINK]:new Set,[K.XML]:new Set,[K.XMLNS]:new Set},Hw=new Set([Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6]);q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.PLAINTEXT;var X;(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]=`SCR
308IPT_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`})(X||={});var Uw={DATA:X.DATA,RCDATA:X.RCDATA,RAWTEXT:X.RAWTEXT,SCRIPT_DATA:X.SCRIPT_DATA,PLAINTEXT:X.PLAINTEXT,CDATA_SECTION:X.CDATA_SECTION};function Ww(e){return e>=W.DIGIT_0&&e<=W.DIGIT_9}function Gw(e){return e>=W.LATIN_CAPITAL_A&&e<=W.LATIN_CAPITAL_Z}function Kw(e){return e>=W.LATIN_SMALL_A&&e<=W.LATIN_SMALL_Z}function qw(e){return Kw(e)||Gw(e)}function Jw(e){return qw(e)||Ww(e)}function Yw(e){return e+32}function Xw(e){return e===W.SPACE||e===W.LINE_FEED||e===W.TABULATION||e===W.FORM_FEED}function Zw(e){return Xw(e)||e===W.SOLIDUS||e===W.GREATER_THAN_SIGN}function Qw(e){return e===W.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:mw(e)?G.surrogateCharacterReference:vw(e)?G.noncharacterCharacterReference:_w(e)||e===W.CARRIAGE_RETURN?G.controlCharacterReference:null}var $w=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=X.DATA,this.returnState=X.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new bw(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Fw(Cw,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(G.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(G.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Qw(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),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(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:xw.START_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:xw.END_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:xw.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:xw.DOCTYPE,name:e,forceQuirks:!1,publicId:null,
vendor: 100,390 bytes, line 308
308systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(Sw(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(G.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=Bw(e.tagName),e.type===xw.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(G.endTagWithAttributes),e.selfClosing&&this._err(G.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case xw.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case xw.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case xw.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:xw.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Xw(e)?xw.WHITESPACE_CHARACTER:e===W.NULL?xw.NULL_CHARACTER:xw.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(xw.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=X.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Pw.Attribute:Pw.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===X.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case X.DATA:this._stateData(e);break;case X.RCDATA:this._stateRcdata(e);break;case X.RAWTEXT:this._stateRawtext(e);break;case X.SCRIPT_DATA:this._stateScriptData(e);break;case X.PLAINTEXT:this._statePlaintext(e);break;case X.TAG_OPEN:this._stateTagOpen(e);break;case X.END_TAG_OPEN:this._stateEndTagOpen(e);break;case X.TAG_NAME:this._stateTagName(e);break;case X.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case X.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case X.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case X.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case X.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case X.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case X.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case X.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case X.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case X.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case X.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case X.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case X.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case X.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case X.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case X.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case X.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case X.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case X.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case X.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case X.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case X.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case X.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case X.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case X.BOGUS_COMMENT:this._stateBogusComment(e);break;case X.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case X.COMMENT_START:this._stateCommentStart(e);break;case X.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case X.COMMENT:this._stateComment(e);break;case X.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case X.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case X.COMMENT_END:this._stateCommentEnd(e);break;case X.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case X.DOCTYPE:this._stateDoctype(e);break;case X.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case X.DOCTYPE_NAME:this._stateDoctypeName(e);break;case X.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case X.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case X.CDATA_SECTION:this._stateCdataSection(e);break;case X.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case X.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case X.CHARACTER_REFERENCE:this._stateCharacterReference();break;case X.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.TAG_OPEN;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitCodePoint(e);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case W.AMPERSAND:this._startCharacterReference();break;case W.LESS_THAN_SIGN:this.state=X.RCDATA_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.RAWTEXT_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(qw(e))this._createStartTagToken(),this.state=X.TAG_NAME,this._stateTagName(e);else switch(e){case W.EXCLAMATION_MARK:this.state=X.MARKUP_DECLARATION_OPEN;break;case W.SOLIDUS:this.state=X.END_TAG_OPEN;break;case W.QUESTION_MARK:this._err(G.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e);break;case W.EOF:this._err(G.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(G.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=X.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(qw(e))this._createEndTagToken(),this.state=X.TAG_NAME,this._stateTagName(e);else switch(e){case W.GREATER_THAN_SIGN:this._err(G.missingEndTagName),this.state=X.DATA;break;case W.EOF:this._err(G.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(G.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this.state=X.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),t.tagName+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Gw(e)?Yw(e):e)}}_stateRcdataLessThanSign(e){e===W.SOLIDUS?this.state=X.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=X.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){qw(e)?(this.state=X.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=X.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=X.BEFORE_ATTRIBUTE_NAME,!1;case W.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=X.SELF_CLOSING_START_TAG,!1;case W.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=X.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===W.SOLIDUS?this.state=X.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){qw(e)?(this.state=X.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case W.SOLIDUS:this.state=X.SCRIPT_DATA_END_TAG_OPEN;break;case W.EXCLAMATION_MARK:this.state=X.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=X.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){qw(e)?(this.state=X.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===W.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===W.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.GREATER_THAN_SIGN:this.state=X.SCRIPT_DATA,this._emitChars(`>`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===W.SOLIDUS?this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:qw(e)?(this._emitChars(`<`),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){qw(e)?(this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(pw.SCRIPT,!1)&&Zw(this.preprocessor.peek(pw.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<pw.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.GREATER_THAN_SIGN:this.state=X.SCRIPT_DATA,this._emitChars(`>`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===W.SOLIDUS?(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(pw.SCRIPT,!1)&&Zw(this.preprocessor.peek(pw.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<pw.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._err(G.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=X.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this._leaveAttrName(),this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._leaveAttrName(),this.state=X.BEFORE_ATTRIBUTE_VALUE;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:this._err(G.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(Gw(e)?Yw(e):e)}}_stateAfterAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:this.state=X.SELF_CLOSING_START_TAG;break;case W.EQUALS_SIGN:this.state=X.BEFORE_ATTRIBUTE_VALUE;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:this.state=X.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case W.APOSTROPHE:this.state=X.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingAttributeValue),this.state=X.DATA,this.emitCurrentTagToken();break;default:this.state=X.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case W.APOSTROPHE:this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.AMPERSAND:this._startCharacterReference();break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:case W.EQUALS_SIGN:case W.GRAVE_ACCENT:this._err(G.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this._leaveAttrValue(),this.state=X.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._err(G.missingWhitespaceBetweenAttributes),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case W.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=X.DATA,this.emitCurrentTagToken();break}case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._err(G.unexpectedSolidusInTag),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(pw.DASH_DASH,!0)?(this._createCommentToken(pw.DASH_DASH.length+1),this.state=X.COMMENT_START):this._consumeSequenceIfMatch(pw.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(pw.DOCTYPE.length+1),this.state=X.DOCTYPE):this._consumeSequenceIfMatch(pw.CDATA_START,!0)?this.inForeignNode?this.state=X.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(pw.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=X.BOGUS_COMMENT):this._ensureHibernation()||(this._err(G.incorrectlyOpenedComment),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_START_DASH;break;case W.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=X.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=X.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END;break;case W.GREATER_THAN_SIGN:this._err(G.abruptClosingOfEmptyComment),this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=X.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END_DASH;break;case W.LESS_THAN_SIGN:t.data+=`<`,this.state=X.COMMENT_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.data+=`�`;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case W.EXCLAMATION_MARK:t.data+=`!`,this.state=X.COMMENT_LESS_THAN_SIGN_BANG;break;case W.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=X.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===W.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=X.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===W.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=X.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==W.GREATER_THAN_SIGN&&e!==W.EOF&&this._err(G.nestedComment),this.state=X.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=X.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentComment(t);break;case W.EXCLAMATION_MARK:this.state=X.COMMENT_END_BANG;break;case W.HYPHEN_MINUS:t.data+=`-`;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=X.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:t.data+=`--!`,this.state=X.COMMENT_END_DASH;break;case W.GREATER_THAN_SIGN:this._err(G.incorrectlyClosedComment),this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=X.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case W.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBeforeDoctypeName),this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Gw(e))this._createDoctypeToken(String.fromCharCode(Yw(e))),this.state=X.DOCTYPE_NAME;else switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.NULL:this._err(G.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=X.DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:{this._err(G.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=X.DATA;break}case W.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=X.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.AFTER_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.NULL:this._err(G.unexpectedNullCharacter),t.name+=`�`;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Gw(e)?Yw(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(pw.PUBLIC,!1)?this.state=X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(pw.SYSTEM,!1)?this.state=X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(G.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.publicId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.publicId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.QUOTATION_MARK:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.systemId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.systemId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.NULL:this._err(G.unexpectedNullCharacter);break;case W.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case W.RIGHT_SQUARE_BRACKET:this.state=X.CDATA_SECTION_BRACKET;break;case W.EOF:this._err(G.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===W.RIGHT_SQUARE_BRACKET?this.state=X.CDATA_SECTION_END:(this._emitChars(`]`),this.state=X.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA;break;case W.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=X.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(W.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Jw(this.preprocessor.peek(1))?X.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Jw(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===W.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},eT=new Set([J.DD,J.DT,J.LI,J.OPTGROUP,J.OPTION,J.P,J.RB,J.RP,J.RT,J.RTC]),tT=new Set([...eT,J.CAPTION,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]),nT=new Set([J.APPLET,J.CAPTION,J.HTML,J.MARQUEE,J.OBJECT,J.TABLE,J.TD,J.TEMPLATE,J.TH]),rT=new Set([...nT,J.OL,J.UL]),iT=new Set([...nT,J.BUTTON]),aT=new Set([J.ANNOTATION_XML,J.MI,J.MN,J.MO,J.MS,J.MTEXT]),oT=new Set([J.DESC,J.FOREIGN_OBJECT,J.TITLE]),sT=new Set([J.TR,J.TEMPLATE,J.HTML]),cT=new Set([J.TBODY,J.TFOOT,J.THEAD,J.TEMPLATE,J.HTML]),lT=new Set([J.TABLE,J.TEMPLATE,J.HTML]),uT=new Set([J.TD,J.TH]),dT=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=J.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===J.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===K.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==K.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Hw,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(uT,K.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(lT,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(cT,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(sT,K.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===J.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===J.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case K.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case K.SVG:if(oT.has(r))return!1;break;case K.MATHML:if(aT.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,nT)}hasInListItemScope(e){return this.hasInDynamicScope(e,rT)}hasInButtonScope(e){return this.hasInDynamicScope(e,iT)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case K.HTML:if(Hw.has(t))return!0;if(nT.has(t))return!1;break;case K.SVG:if(oT.has(t))return!1;break;case K.MATHML:if(aT.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case J.TABLE:case J.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===K.HTML)switch(this.tagIDs[e]){case J.TBODY:case J.THEAD:case J.TFOOT:return!0;case J.TABLE:case J.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case J.OPTION:case J.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&eT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&tT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&tT.has(this.currentTagId);)this.pop()}},fT=3,pT;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(pT||={});var mT={type:pT.Marker},hT=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===pT.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<fT)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<fT)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=fT&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(mT)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:pT.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:pT.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(mT);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===pT.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===pT.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===pT.Element&&t.element===e)}},gT={createDocument(){return{nodeName:`#document`,mode:Rw.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,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,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};gT.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(gT.isTextNode(n)){n.value+=t;return}}gT.appendChild(e,gT.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gT.isTextNode(r)?r.value+=t:gT.insertBefore(e,gT.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},_T=`html`,vT=`about:legacy-compat`,yT=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,bT=`+//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//`.split(`,`),xT=[...bT,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],ST=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),CT=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],wT=[...CT,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function TT(e,t){return t.some(t=>e.startsWith(t))}function ET(e){return e.name===_T&&e.publicId===null&&(e.systemId===null||e.systemId===vT)}function DT(e){if(e.name!==_T)return Rw.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===yT)return Rw.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),ST.has(n))return Rw.QUIRKS;let e=t===null?xT:bT;if(TT(n,e))return Rw.QUIRKS;if(e=t===null?CT:wT,TT(n,e))return Rw.LIMITED_QUIRKS}return Rw.NO_QUIRKS}var OT={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},kT=`definitionurl`,AT=`definitionURL`,jT=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`.split(`.`).map(e=>[e.toLowerCase(),e])),MT=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:K.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:K.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:K.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:K.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:K.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:K.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:K.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:K.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:K.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:K.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:K.XMLNS}]]),NT=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`.split(`.`).map(e=>[e.toLowerCase(),e])),PT=new Set([J.B,J.BIG,J.BLOCKQUOTE,J.BODY,J.BR,J.CENTER,J.CODE,J.DD,J.DIV,J.DL,J.DT,J.EM,J.EMBED,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HR,J.I,J.IMG,J.LI,J.LISTING,J.MENU,J.META,J.NOBR,J.OL,J.P,J.PRE,J.RUBY,J.S,J.SMALL,J.SPAN,J.STRONG,J.STRIKE,J.SUB,J.SUP,J.TABLE,J.TT,J.U,J.UL,J.VAR]);function FT(e){let t=e.tagID;return t===J.FONT&&e.attrs.some(({name:e})=>e===Lw.COLOR||e===Lw.SIZE||e===Lw.FACE)||PT.has(t)}function IT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===kT){e.attrs[t].name=AT;break}}function LT(e){for(let t=0;t<e.attrs.length;t++){let n=jT.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function RT(e){for(let t=0;t<e.attrs.length;t++){let n=MT.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function zT(e){let t=NT.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Bw(e.tagName))}function BT(e,t){return t===K.MATHML&&(e===J.MI||e===J.MO||e===J.MN||e===J.MS||e===J.MTEXT)}function VT(e,t,n){if(t===K.MATHML&&e===J.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Lw.ENCODING){let t=n[e].value.toLowerCase();return t===OT.TEXT_HTML||t===OT.APPLICATION_XML}}return t===K.SVG&&(e===J.FOREIGN_OBJECT||e===J.DESC||e===J.TITLE)}function HT(e,t,n,r){return(!r||r===K.HTML)&&VT(e,t,n)||(!r||r===K.MATHML)&&BT(e,t)}var UT=`hidden`,WT=8,GT=3,Z;(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`})(Z||={});var KT={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},qT=new Set([J.TABLE,J.TBODY,J.TFOOT,J.THEAD,J.TR]),JT={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gT,onParseError:null},YT=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Z.INITIAL,this.originalInsertionMode=Z.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={...JT,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new $w(this.options,this),this.activeFormattingElements=new hT(this.treeAdapter),this.fragmentContextID=n?Bw(this.treeAdapter.getTagName(n)):J.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new dT(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...JT,...t};e??=n.treeAdapter.createElement(q.TEMPLATE,K.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,K.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===J.TEMPLATE&&i.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??KT,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===K.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,K.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Z.TEXT}switchToPlaintextParsing(){this.insertionMode=Z.TEXT,this.originalInsertionMode=Z.IN_BODY,this.tokenizer.state=Uw.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===q.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===K.HTML)switch(this.fragmentContextID){case J.TITLE:case J.TEXTAREA:this.tokenizer.state=Uw.RCDATA;break;case J.STYLE:case J.XMP:case J.IFRAME:case J.NOEMBED:case J.NOFRAMES:case J.NOSCRIPT:this.tokenizer.state=Uw.RAWTEXT;break;case J.SCRIPT:this.tokenizer.state=Uw.SCRIPT_DATA;break;case J.PLAINTEXT:this.tokenizer.state=Uw.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,K.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,K.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(q.HTML,K.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,J.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===xw.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===J.SVG&&this.treeAdapter.getTagName(t)===q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===K.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===J.MGLYPH||e.tagID===J.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,K.HTML)}_processToken(e){switch(e.type){case xw.CHARACTER:this.onCharacter(e);break;case xw.NULL_CHARACTER:this.onNullCharacter(e);break;case xw.COMMENT:this.onComment(e);break;case xw.DOCTYPE:this.onDoctype(e);break;case xw.START_TAG:this._processStartTag(e);break;case xw.END_TAG:this.onEndTag(e);break;case xw.EOF:this.onEof(e);break;case xw.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return HT(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===pT.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Z.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(J.P),this.openElements.popUntilTagNamePopped(J.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case J.TR:this.insertionMode=Z.IN_ROW;return;case J.TBODY:case J.THEAD:case J.TFOOT:this.insertionMode=Z.IN_TABLE_BODY;return;case J.CAPTION:this.insertionMode=Z.IN_CAPTION;return;case J.COLGROUP:this.insertionMode=Z.IN_COLUMN_GROUP;return;case J.TABLE:this.insertionMode=Z.IN_TABLE;return;case J.BODY:this.insertionMode=Z.IN_BODY;return;case J.FRAMESET:this.insertionMode=Z.IN_FRAMESET;return;case J.SELECT:this._resetInsertionModeForSelect(e);return;case J.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case J.HTML:this.insertionMode=this.headElement?Z.AFTER_HEAD:Z.BEFORE_HEAD;return;case J.TD:case J.TH:if(e>0){this.insertionMode=Z.IN_CELL;return}break;case J.HEAD:if(e>0){this.insertionMode=Z.IN_HEAD;return}}this.insertionMode=Z.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===J.TEMPLATE)break;if(e===J.TABLE){this.insertionMode=Z.IN_SELECT_IN_TABLE;return}}this.insertionMode=Z.IN_SELECT}_isElementCausesFosterParenting(e){return qT.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case J.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===K.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case J.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Vw[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){pO(this,e);return}switch(this.insertionMode){case Z.INITIAL:cE(this,e);break;case Z.BEFORE_HTML:dE(this,e);break;case Z.BEFORE_HEAD:mE(this,e);break;case Z.IN_HEAD:vE(this,e);break;case Z.IN_HEAD_NO_SCRIPT:xE(this,e);break;case Z.AFTER_HEAD:wE(this,e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:DE(this,e);break;case Z.TEXT:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:SD(this,e);break;case Z.IN_TABLE_TEXT:FD(this,e);break;case Z.IN_COLUMN_GROUP:HD(this,e);break;case Z.AFTER_BODY:iO(this,e);break;case Z.AFTER_AFTER_BODY:uO(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fO(this,e);return}switch(this.insertionMode){case Z.INITIAL:cE(this,e);break;case Z.BEFORE_HTML:dE(this,e);break;case Z.BEFORE_HEAD:mE(this,e);break;case Z.IN_HEAD:vE(this,e);break;case Z.IN_HEAD_NO_SCRIPT:xE(this,e);break;case Z.AFTER_HEAD:wE(this,e);break;case Z.TEXT:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:SD(this,e);break;case Z.IN_COLUMN_GROUP:HD(this,e);break;case Z.AFTER_BODY:iO(this,e);break;case Z.AFTER_AFTER_BODY:uO(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){rE(this,e);return}switch(this.insertionMode){case Z.INITIAL:case Z.BEFORE_HTML:case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_TEMPLATE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:rE(this,e);break;case Z.IN_TABLE_TEXT:ID(this,e);break;case Z.AFTER_BODY:iE(this,e);break;case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:aE(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Z.INITIAL:sE(this,e);break;case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:this._err(e,G.misplacedDoctype);break;case Z.IN_TABLE_TEXT:ID(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,G.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?hO(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:cE(this,e);break;case Z.BEFORE_HTML:lE(this,e);break;case Z.BEFORE_HEAD:fE(this,e);break;case Z.IN_HEAD:hE(this,e);break;case Z.IN_HEAD_NO_SCRIPT:yE(this,e);break;case Z.AFTER_HEAD:SE(this,e);break;case Z.IN_BODY:oD(this,e);break;case Z.IN_TABLE:jD(this,e);break;case Z.IN_TABLE_TEXT:ID(this,e);break;case Z.IN_CAPTION:RD(this,e);break;case Z.IN_COLUMN_GROUP:BD(this,e);break;case Z.IN_TABLE_BODY:UD(this,e);break;case Z.IN_ROW:GD(this,e);break;case Z.IN_CELL:qD(this,e);break;case Z.IN_SELECT:YD(this,e);break;case Z.IN_SELECT_IN_TABLE:ZD(this,e);break;case Z.IN_TEMPLATE:$D(this,e);break;case Z.AFTER_BODY:nO(this,e);break;case Z.IN_FRAMESET:aO(this,e);break;case Z.AFTER_FRAMESET:sO(this,e);break;case Z.AFTER_AFTER_BODY:lO(this,e);break;case Z.AFTER_AFTER_FRAMESET:dO(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?gO(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:cE(this,e);break;case Z.BEFORE_HTML:uE(this,e);break;case Z.BEFORE_HEAD:pE(this,e);break;case Z.IN_HEAD:gE(this,e);break;case Z.IN_HEAD_NO_SCRIPT:bE(this,e);break;case Z.AFTER_HEAD:CE(this,e);break;case Z.IN_BODY:vD(this,e);break;case Z.TEXT:bD(this,e);break;case Z.IN_TABLE:MD(this,e);break;case Z.IN_TABLE_TEXT:ID(this,e);break;case Z.IN_CAPTION:zD(this,e);break;case Z.IN_COLUMN_GROUP:VD(this,e);break;case Z.IN_TABLE_BODY:WD(this,e);break;case Z.IN_ROW:KD(this,e);break;case Z.IN_CELL:JD(this,e);break;case Z.IN_SELECT:XD(this,e);break;case Z.IN_SELECT_IN_TABLE:QD(this,e);break;case Z.IN_TEMPLATE:eO(this,e);break;case Z.AFTER_BODY:rO(this,e);break;case Z.IN_FRAMESET:oO(this,e);break;case Z.AFTER_FRAMESET:cO(this,e);break;case Z.AFTER_AFTER_BODY:uO(this,e)}}onEof(e){switch(this.insertionMode){case Z.INITIAL:cE(this,e);break;case Z.BEFORE_HTML:dE(this,e);break;case Z.BEFORE_HEAD:mE(this,e);break;case Z.IN_HEAD:vE(this,e);break;case Z.IN_HEAD_NO_SCRIPT:xE(this,e);break;case Z.AFTER_HEAD:wE(this,e);break;case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:yD(this,e);break;case Z.TEXT:xD(this,e);break;case Z.IN_TABLE_TEXT:ID(this,e);break;case Z.IN_TEMPLATE:tO(this,e);break;case Z.AFTER_BODY:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:oE(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===W.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.TEXT:case Z.IN_COLUMN_GROUP:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:this._insertCharacters(e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:case Z.AFTER_BODY:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:EE(this,e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:SD(this,e);break;case Z.IN_TABLE_TEXT:PD(this,e)}}};function XT(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):_D(e,t),n}function ZT(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function QT(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=GT;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=$T(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function $T(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function eE(e,t,n){let r=Bw(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===J.TEMPLATE&&i===K.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function tE(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function nE(e,t){for(let n=0;n<WT;n++){let n=XT(e,t);if(!n)break;let r=ZT(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=QT(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&eE(e,a,i),tE(e,r,n)}}function rE(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function iE(e,t){e._appendCommentNode(t,e.openElements.items[0])}function aE(e,t){e._appendCommentNode(t,e.document)}function oE(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function sE(e,t){e._setDocumentType(t);let n=t.forceQuirks?Rw.QUIRKS:DT(t);ET(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Z.BEFORE_HTML}function cE(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Rw.QUIRKS),e.insertionMode=Z.BEFORE_HTML,e._processToken(t)}function lE(e,t){t.tagID===J.HTML?(e._insertElement(t,K.HTML),e.insertionMode=Z.BEFORE_HEAD):dE(e,t)}function uE(e,t){let n=t.tagID;(n===J.HTML||n===J.HEAD||n===J.BODY||n===J.BR)&&dE(e,t)}function dE(e,t){e._insertFakeRootElement(),e.insertionMode=Z.BEFORE_HEAD,e._processToken(t)}function fE(e,t){switch(t.tagID){case J.HTML:oD(e,t);break;case J.HEAD:e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD;break;default:mE(e,t)}}function pE(e,t){let n=t.tagID;n===J.HEAD||n===J.BODY||n===J.HTML||n===J.BR?mE(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function mE(e,t){e._insertFakeElement(q.HEAD,J.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD,e._processToken(t)}function hE(e,t){switch(t.tagID){case J.HTML:oD(e,t);break;case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TITLE:e._switchToTextParsing(t,Uw.RCDATA);break;case J.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Uw.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=Z.IN_HEAD_NO_SCRIPT);break;case J.NOFRAMES:case J.STYLE:e._switchToTextParsing(t,Uw.RAWTEXT);break;case J.SCRIPT:e._switchToTextParsing(t,Uw.SCRIPT_DATA);break;case J.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:vE(e,t)}}function gE(e,t){switch(t.tagID){case J.HEAD:e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD;break;case J.BODY:case J.BR:case J.HTML:vE(e,t);break;case J.TEMPLATE:_E(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function _E(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==J.TEMPLATE&&e._err(t,G.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,G.endTagWithoutMatchingOpenElement)}function vE(e,t){e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD,e._processToken(t)}function yE(e,t){switch(t.tagID){case J.HTML:oD(e,t);break;case J.BASEFONT:case J.BGSOUND:case J.HEAD:case J.LINK:case J.META:case J.NOFRAMES:case J.STYLE:hE(e,t);break;case J.NOSCRIPT:e._err(t,G.nestedNoscriptInHead);break;default:xE(e,t)}}function bE(e,t){switch(t.tagID){case J.NOSCRIPT:e.openElements.pop(),e.insertionMode=Z.IN_HEAD;break;case J.BR:xE(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function xE(e,t){let n=t.type===xw.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Z.IN_HEAD,e._processToken(t)}function SE(e,t){switch(t.tagID){case J.HTML:oD(e,t);break;case J.BODY:e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_BODY;break;case J.FRAMESET:e._insertElement(t,K.HTML),e.insertionMode=Z.IN_FRAMESET;break;case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:e._err(t,G.abandonedHeadElementChild),e.openElements.push(e.headElement,J.HEAD),hE(e,t),e.openElements.remove(e.headElement);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:wE(e,t)}}function CE(e,t){switch(t.tagID){case J.BODY:case J.HTML:case J.BR:wE(e,t);break;case J.TEMPLATE:_E(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function wE(e,t){e._insertFakeElement(q.BODY,J.BODY),e.insertionMode=Z.IN_BODY,TE(e,t)}function TE(e,t){switch(t.type){case xw.CHARACTER:DE(e,t);break;case xw.WHITESPACE_CHARACTER:EE(e,t);break;case xw.COMMENT:rE(e,t);break;case xw.START_TAG:oD(e,t);break;case xw.END_TAG:vD(e,t);break;case xw.EOF:yD(e,t)}}function EE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function DE(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function OE(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function kE(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function AE(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_FRAMESET)}function jE(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function ME(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Hw.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function NE(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function PE(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),n||(e.formElement=e.openElements.current))}function FE(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===J.LI&&r===J.LI||(n===J.DD||n===J.DT)&&(r===J.DD||r===J.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==J.ADDRESS&&r!==J.DIV&&r!==J.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function IE(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=Uw.PLAINTEXT}function LE(e,t){e.openElements.hasInScope(J.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1}function RE(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(nE(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function BE(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(J.NOBR)&&(nE(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function VE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function HE(e,t){e.treeAdapter.getDocumentMode(e.document)!==Rw.QUIRKS&&e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_TABLE}function UE(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function WE(e){let t=Sw(e,Lw.TYPE);return t!=null&&t.toLowerCase()===UT}function GE(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),WE(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function KE(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function qE(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function JE(e,t){t.tagName=q.IMG,t.tagID=J.IMG,UE(e,t)}function YE(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Uw.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Z.TEXT}function XE(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Uw.RAWTEXT)}function ZE(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Uw.RAWTEXT)}function QE(e,t){e._switchToTextParsing(t,Uw.RAWTEXT)}function $E(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Z.IN_TABLE||e.insertionMode===Z.IN_CAPTION||e.insertionMode===Z.IN_TABLE_BODY||e.insertionMode===Z.IN_ROW||e.insertionMode===Z.IN_CELL?Z.IN_SELECT_IN_TABLE:Z.IN_SELECT}function eD(e,t){e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function tD(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function nD(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(J.RTC),e._insertElement(t,K.HTML)}function rD(e,t){e._reconstructActiveFormattingElements(),IT(t),RT(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function iD(e,t){e._reconstructActiveFormattingElements(),LT(t),RT(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function aD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function oD(e,t){switch(t.tagID){case J.I:case J.S:case J.B:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.SMALL:case J.STRIKE:case J.STRONG:zE(e,t);break;case J.A:RE(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:ME(e,t);break;case J.P:case J.DL:case J.OL:case J.UL:case J.DIV:case J.DIR:case J.NAV:case J.MAIN:case J.MENU:case J.ASIDE:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.DETAILS:case J.ADDRESS:case J.ARTICLE:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:jE(e,t);break;case J.LI:case J.DD:case J.DT:FE(e,t);break;case J.BR:case J.IMG:case J.WBR:case J.AREA:case J.EMBED:case J.KEYGEN:UE(e,t);break;case J.HR:qE(e,t);break;case J.RB:case J.RTC:tD(e,t);break;case J.RT:case J.RP:nD(e,t);break;case J.PRE:case J.LISTING:NE(e,t);break;case J.XMP:XE(e,t);break;case J.SVG:iD(e,t);break;case J.HTML:OE(e,t);break;case J.BASE:case J.LINK:case J.META:case J.STYLE:case J.TITLE:case J.SCRIPT:case J.BGSOUND:case J.BASEFONT:case J.TEMPLATE:hE(e,t);break;case J.BODY:kE(e,t);break;case J.FORM:PE(e,t);break;case J.NOBR:BE(e,t);break;case J.MATH:rD(e,t);break;case J.TABLE:HE(e,t);break;case J.INPUT:GE(e,t);break;case J.PARAM:case J.TRACK:case J.SOURCE:KE(e,t);break;case J.IMAGE:JE(e,t);break;case J.BUTTON:LE(e,t);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:VE(e,t);break;case J.IFRAME:ZE(e,t);break;case J.SELECT:$E(e,t);break;case J.OPTION:case J.OPTGROUP:eD(e,t);break;case J.NOEMBED:case J.NOFRAMES:QE(e,t);break;case J.FRAMESET:AE(e,t);break;case J.TEXTAREA:YE(e,t);break;case J.NOSCRIPT:e.options.scriptingEnabled?QE(e,t):aD(e,t);break;case J.PLAINTEXT:IE(e,t);break;case J.COL:case J.TH:case J.TD:case J.TR:case J.HEAD:case J.FRAME:case J.TBODY:case J.TFOOT:case J.THEAD:case J.CAPTION:case J.COLGROUP:break;default:aD(e,t)}}function sD(e,t){if(e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function cD(e,t){e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,rO(e,t))}function lD(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function uD(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(J.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(J.FORM):n&&e.openElements.remove(n))}function dD(e){e.openElements.hasInButtonScope(J.P)||e._insertFakeElement(q.P,J.P),e._closePElement()}function fD(e){e.openElements.hasInListItemScope(J.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(J.LI),e.openElements.popUntilTagNamePopped(J.LI))}function pD(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function mD(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function hD(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function gD(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,J.BR),e.openElements.pop(),e.framesetOk=!1}function _D(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==J.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function vD(e,t){switch(t.tagID){case J.A:case J.B:case J.I:case J.S:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.NOBR:case J.SMALL:case J.STRIKE:case J.STRONG:nE(e,t);break;case J.P:dD(e);break;case J.DL:case J.UL:case J.OL:case J.DIR:case J.DIV:case J.NAV:case J.PRE:case J.MAIN:case J.MENU:case J.ASIDE:case J.BUTTON:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.ADDRESS:case J.ARTICLE:case J.DETAILS:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.LISTING:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:lD(e,t);break;case J.LI:fD(e);break;case J.DD:case J.DT:pD(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:mD(e);break;case J.BR:gD(e);break;case J.BODY:sD(e,t);break;case J.HTML:cD(e,t);break;case J.FORM:uD(e);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:hD(e,t);break;case J.TEMPLATE:_E(e,t);break;default:_D(e,t)}}function yD(e,t){e.tmplInsertionModeStack.length>0?tO(e,t):oE(e,t)}function bD(e,t){var n;t.tagID===J.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function xD(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function SD(e,t){if(e.openElements.currentTagId!==void 0&&qT.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Z.IN_TABLE_TEXT,t.type){case xw.CHARACTER:FD(e,t);break;case xw.WHITESPACE_CHARACTER:PD(e,t)}else ND(e,t)}function CD(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CAPTION}function wD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_COLUMN_GROUP}function TD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,J.COLGROUP),e.insertionMode=Z.IN_COLUMN_GROUP,BD(e,t)}function ED(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_TABLE_BODY}function DD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,J.TBODY),e.insertionMode=Z.IN_TABLE_BODY,UD(e,t)}function OD(e,t){e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function kD(e,t){WE(t)?e._appendElement(t,K.HTML):ND(e,t),t.ackSelfClosing=!0}function AD(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function jD(e,t){switch(t.tagID){case J.TD:case J.TH:case J.TR:DD(e,t);break;case J.STYLE:case J.SCRIPT:case J.TEMPLATE:hE(e,t);break;case J.COL:TD(e,t);break;case J.FORM:AD(e,t);break;case J.TABLE:OD(e,t);break;case J.TBODY:case J.TFOOT:case J.THEAD:ED(e,t);break;case J.INPUT:kD(e,t);break;case J.CAPTION:CD(e,t);break;case J.COLGROUP:wD(e,t);break;default:ND(e,t)}}function MD(e,t){switch(t.tagID){case J.TABLE:e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode());break;case J.TEMPLATE:_E(e,t);break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:ND(e,t)}}function ND(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,TE(e,t),e.fosterParentingEnabled=n}function PD(e,t){e.pendingCharacterTokens.push(t)}function FD(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ID(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ND(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var LD=new Set([J.CAPTION,J.COL,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]);function RD(e,t){let n=t.tagID;LD.has(n)?e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,jD(e,t)):oD(e,t)}function zD(e,t){let n=t.tagID;switch(n){case J.CAPTION:case J.TABLE:e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,n===J.TABLE&&MD(e,t));break;case J.BODY:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:vD(e,t)}}function BD(e,t){switch(t.tagID){case J.HTML:oD(e,t);break;case J.COL:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TEMPLATE:hE(e,t);break;default:HD(e,t)}}function VD(e,t){switch(t.tagID){case J.COLGROUP:e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break;case J.TEMPLATE:_E(e,t);break;case J.COL:break;default:HD(e,t)}}function HD(e,t){e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE,e._processToken(t))}function UD(e,t){switch(t.tagID){case J.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_ROW;break;case J.TH:case J.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(q.TR,J.TR),e.insertionMode=Z.IN_ROW,GD(e,t);break;case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,jD(e,t));break;default:jD(e,t)}}function WD(e,t){let n=t.tagID;switch(t.tagID){case J.TBODY:case J.TFOOT:case J.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break;case J.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,MD(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:case J.TR:break;default:MD(e,t)}}function GD(e,t){switch(t.tagID){case J.TH:case J.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CELL,e.activeFormattingElements.insertMarker();break;case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,UD(e,t));break;default:jD(e,t)}}function KD(e,t){switch(t.tagID){case J.TR:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY);break;case J.TABLE:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,WD(e,t));break;case J.TBODY:case J.TFOOT:case J.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(J.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,WD(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:break;default:MD(e,t)}}function qD(e,t){let n=t.tagID;LD.has(n)?(e.openElements.hasInTableScope(J.TD)||e.openElements.hasInTableScope(J.TH))&&(e._closeTableCell(),GD(e,t)):oD(e,t)}function JD(e,t){let n=t.tagID;switch(n){case J.TD:case J.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_ROW);break;case J.TABLE:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),KD(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:break;default:vD(e,t)}}function YD(e,t){switch(t.tagID){case J.HTML:oD(e,t);break;case J.OPTION:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case J.OPTGROUP:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case J.HR:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop(),e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.INPUT:case J.KEYGEN:case J.TEXTAREA:case J.SELECT:e.openElements.hasInSelectScope(J.SELECT)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),t.tagID!==J.SELECT&&e._processStartTag(t));break;case J.SCRIPT:case J.TEMPLATE:hE(e,t)}}function XD(e,t){switch(t.tagID){case J.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===J.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===J.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop();break;case J.OPTION:e.openElements.currentTagId===J.OPTION&&e.openElements.pop();break;case J.SELECT:e.openElements.hasInSelectScope(J.SELECT)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode());break;case J.TEMPLATE:_E(e,t)}}function ZD(e,t){let n=t.tagID;n===J.CAPTION||n===J.TABLE||n===J.TBODY||n===J.TFOOT||n===J.THEAD||n===J.TR||n===J.TD||n===J.TH?(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),e._processStartTag(t)):YD(e,t)}function QD(e,t){let n=t.tagID;n===J.CAPTION||n===J.TABLE||n===J.TBODY||n===J.TFOOT||n===J.THEAD||n===J.TR||n===J.TD||n===J.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),e.onEndTag(t)):XD(e,t)}function $D(e,t){switch(t.tagID){case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:hE(e,t);break;case J.CAPTION:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:e.tmplInsertionModeStack[0]=Z.IN_TABLE,e.insertionMode=Z.IN_TABLE,jD(e,t);break;case J.COL:e.tmplInsertionModeStack[0]=Z.IN_COLUMN_GROUP,e.insertionMode=Z.IN_COLUMN_GROUP,BD(e,t);break;case J.TR:e.tmplInsertionModeStack[0]=Z.IN_TABLE_BODY,e.insertionMode=Z.IN_TABLE_BODY,UD(e,t);break;case J.TD:case J.TH:e.tmplInsertionModeStack[0]=Z.IN_ROW,e.insertionMode=Z.IN_ROW,GD(e,t);break;default:e.tmplInsertionModeStack[0]=Z.IN_BODY,e.insertionMode=Z.IN_BODY,oD(e,t)}}function eO(e,t){t.tagID===J.TEMPLATE&&_E(e,t)}function tO(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):oE(e,t)}function nO(e,t){t.tagID===J.HTML?oD(e,t):iO(e,t)}function rO(e,t){if(t.tagID===J.HTML){if(e.fragmentContext||(e.insertionMode=Z.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===J.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else iO(e,t)}function iO(e,t){e.insertionMode=Z.IN_BODY,TE(e,t)}function aO(e,t){switch(t.tagID){case J.HTML:oD(e,t);break;case J.FRAMESET:e._insertElement(t,K.HTML);break;case J.FRAME:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.NOFRAMES:hE(e,t)}}function oO(e,t){t.tagID===J.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==J.FRAMESET&&(e.insertionMode=Z.AFTER_FRAMESET))}function sO(e,t){switch(t.tagID){case J.HTML:oD(e,t);break;case J.NOFRAMES:hE(e,t)}}function cO(e,t){t.tagID===J.HTML&&(e.insertionMode=Z.AFTER_AFTER_FRAMESET)}function lO(e,t){t.tagID===J.HTML?oD(e,t):uO(e,t)}function uO(e,t){e.insertionMode=Z.IN_BODY,TE(e,t)}function dO(e,t){switch(t.tagID){case J.HTML:oD(e,t);break;case J.NOFRAMES:hE(e,t)}}function fO(e,t){t.chars=`�`,e._insertCharacters(t)}function pO(e,t){e._insertCharacters(t),e.framesetOk=!1}function mO(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==K.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function hO(e,t){if(FT(t))mO(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===K.MATHML?IT(t):r===K.SVG&&(zT(t),LT(t)),RT(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function gO(e,t){if(t.tagID===J.P||t.tagID===J.BR){mO(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===K.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR;var _O=yO(`end`),vO=yO(`start`);function yO(e){return t;function t(t){let n=t&&t.position&&t.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 bO(e){let t=vO(e),n=_O(e);if(t&&n)return{start:t,end:n}}var xO=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,SO=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),CO={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function wO(e,t){let n=RO(e),r=cw(`type`,{handlers:{root:EO,element:DO,text:OO,comment:jO,doctype:kO,raw:MO},unknown:NO}),i={parser:n?new YT(CO):YT.getFragmentParser(void 0,CO),handle(e){r(e,i)},stitches:!1,options:t||{}};
vendor: 29,605 bytes, line 308
308r(e,i),PO(i,vO());let a=lte(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&qh(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function TO(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function EO(e,t){TO(e.children,t)}function DO(e,t){IO(e,t),TO(e.children,t),LO(e,t)}function OO(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:xw.CHARACTER,chars:e.value,location:zO(e)};PO(t,vO(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function kO(e,t){let n={type:xw.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:zO(e)};PO(t,vO(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function AO(e,t){t.stitches=!0;let n=BO(e);`children`in e&&`children`in n&&(n.children=wO({type:`root`,children:e.children},t.options).children),jO({type:`comment`,value:{stitch:n}},t)}function jO(e,t){let n=e.value,r={type:xw.COMMENT,data:n,location:zO(e)};PO(t,vO(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function MO(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,FO(t,vO(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(xO,`<$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;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function NO(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))AO(n,t);else{let e=``;throw SO.has(n.type)&&(e=". 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"),Error("Cannot compile `"+n.type+"` node"+e)}}function PO(e,t){FO(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,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=Uw.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 FO(e,t){if(t&&t.offset!==void 0){let n={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=n}}function IO(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Uw.PLAINTEXT)return;PO(t,vO(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:n_.html;i===n_.html&&n===`svg`&&(i=n_.svg);let a=mte({...e,children:[]},{space:i===n_.svg?`svg`:`html`}),o={type:xw.START_TAG,tagName:n,tagID:Bw(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:zO(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function LO(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&fw.includes(n)||t.parser.tokenizer.state===Uw.PLAINTEXT)return;PO(t,_O(e));let r={type:xw.END_TAG,tagName:n,tagID:Bw(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:zO(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Uw.RCDATA||t.parser.tokenizer.state===Uw.RAWTEXT||t.parser.tokenizer.state===Uw.SCRIPT_DATA)&&(t.parser.tokenizer.state=Uw.DATA)}function RO(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function zO(e){let t=vO(e)||{line:void 0,column:void 0,offset:void 0},n=_O(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function BO(e){return`children`in e?$C({...e,children:[]}):$C(e)}function VO(e){return function(t,n){return wO(t,{...e,file:n})}}var HO=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],UO={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...HO,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...HO],h2:[[`className`,`sr-only`]],img:[...HO,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...HO,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...HO],table:[...HO],ul:[...HO,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},WO={}.hasOwnProperty;function GO(e,t){let n={type:`root`,children:[]},r=KO({schema:t?{...UO,...t}:UO,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function KO(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return qO(e,n);case`doctype`:return JO(e,n);case`element`:return YO(e,n);case`root`:return XO(e,n);case`text`:return ZO(e,n)}}}function qO(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return ik(r,t),r}}function JO(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return ik(e,t),e}}function YO(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=QO(e,t.children),i=$O(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&WO.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return ik(o,t),o}function XO(e,t){let n={type:`root`,children:QO(e,t.children)};return ik(n,t),n}function ZO(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return ik(n,t),n}function QO(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=KO(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function $O(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&WO.call(r,n)?r[n]:void 0,o=r&&WO.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(WO.call(s,l)){let t=s[l],n=ek(e,ak(a,l),l,t);n??=ek(e,ak(o,l),l,t),n!=null&&(c[l]=n)}if(i&&WO.call(i,n)){let e=i[n];for(l in e)WO.call(e,l)&&!WO.call(c,l)&&(c[l]=e[l])}return c}function ek(e,t,n,r){return t?Array.isArray(r)?tk(e,t,n,r):nk(e,t,n,r):void 0}function tk(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=nk(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function nk(e,t,n,r){if((typeof r==`boolean`||typeof r==`number`||typeof r==`string`)&&rk(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function rk(e,t,n){let r=e.schema.protocols&&WO.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function ik(e,t){let n=bO(t);t.data&&(e.data=$C(t.data)),n&&(e.position=n)}function ak(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function ok(e){return function(t){return GO(t,e)}}var sk={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},ck={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:`CDATA[`,characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:`content`,contentTypeDocument:`document`,contentTypeFlow:`flow`,contentTypeString:`string`,contentTypeText:`text`,hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},lk={data:`data`,whitespace:`whitespace`,lineEnding:`lineEnding`,lineEndingBlank:`lineEndingBlank`,linePrefix:`linePrefix`,lineSuffix:`lineSuffix`,atxHeading:`atxHeading`,atxHeadingSequence:`atxHeadingSequence`,atxHeadingText:`atxHeadingText`,autolink:`autolink`,autolinkEmail:`autolinkEmail`,autolinkMarker:`autolinkMarker`,autolinkProtocol:`autolinkProtocol`,characterEscape:`characterEscape`,characterEscapeValue:`characterEscapeValue`,characterReference:`characterReference`,characterReferenceMarker:`characterReferenceMarker`,characterReferenceMarkerNumeric:`characterReferenceMarkerNumeric`,characterReferenceMarkerHexadecimal:`characterReferenceMarkerHexadecimal`,characterReferenceValue:`characterReferenceValue`,codeFenced:`codeFenced`,codeFencedFence:`codeFencedFence`,codeFencedFenceSequence:`codeFencedFenceSequence`,codeFencedFenceInfo:`codeFencedFenceInfo`,codeFencedFenceMeta:`codeFencedFenceMeta`,codeFlowValue:`codeFlowValue`,codeIndented:`codeIndented`,codeText:`codeText`,codeTextData:`codeTextData`,codeTextPadding:`codeTextPadding`,codeTextSequence:`codeTextSequence`,content:`content`,definition:`definition`,definitionDestination:`definitionDestination`,definitionDestinationLiteral:`definitionDestinationLiteral`,definitionDestinationLiteralMarker:`definitionDestinationLiteralMarker`,definitionDestinationRaw:`definitionDestinationRaw`,definitionDestinationString:`definitionDestinationString`,definitionLabel:`definitionLabel`,definitionLabelMarker:`definitionLabelMarker`,definitionLabelString:`definitionLabelString`,definitionMarker:`definitionMarker`,definitionTitle:`definitionTitle`,definitionTitleMarker:`definitionTitleMarker`,definitionTitleString:`definitionTitleString`,emphasis:`emphasis`,emphasisSequence:`emphasisSequence`,emphasisText:`emphasisText`,escapeMarker:`escapeMarker`,hardBreakEscape:`hardBreakEscape`,hardBreakTrailing:`hardBreakTrailing`,htmlFlow:`htmlFlow`,htmlFlowData:`htmlFlowData`,htmlText:`htmlText`,htmlTextData:`htmlTextData`,image:`image`,label:`label`,labelText:`labelText`,labelLink:`labelLink`,labelImage:`labelImage`,labelMarker:`labelMarker`,labelImageMarker:`labelImageMarker`,labelEnd:`labelEnd`,link:`link`,paragraph:`paragraph`,reference:`reference`,referenceMarker:`referenceMarker`,referenceString:`referenceString`,resource:`resource`,resourceDestination:`resourceDestination`,resourceDestinationLiteral:`resourceDestinationLiteral`,resourceDestinationLiteralMarker:`resourceDestinationLiteralMarker`,resourceDestinationRaw:`resourceDestinationRaw`,resourceDestinationString:`resourceDestinationString`,resourceMarker:`resourceMarker`,resourceTitle:`resourceTitle`,resourceTitleMarker:`resourceTitleMarker`,resourceTitleString:`resourceTitleString`,setextHeading:`setextHeading`,setextHeadingText:`setextHeadingText`,setextHeadingLine:`setextHeadingLine`,setextHeadingLineSequence:`setextHeadingLineSequence`,strong:`strong`,strongSequence:`strongSequence`,strongText:`strongText`,thematicBreak:`thematicBreak`,thematicBreakSequence:`thematicBreakSequence`,blockQuote:`blockQuote`,blockQuotePrefix:`blockQuotePrefix`,blockQuoteMarker:`blockQuoteMarker`,blockQuotePrefixWhitespace:`blockQuotePrefixWhitespace`,listOrdered:`listOrdered`,listUnordered:`listUnordered`,listItemIndent:`listItemIndent`,listItemMarker:`listItemMarker`,listItemPrefix:`listItemPrefix`,listItemPrefixWhitespace:`listItemPrefixWhitespace`,listItemValue:`listItemValue`,chunkDocument:`chunkDocument`,chunkContent:`chunkContent`,chunkFlow:`chunkFlow`,chunkText:`chunkText`,chunkString:`chunkString`},uk=Sk(/[A-Za-z]/),dk=Sk(/[\dA-Za-z]/),fk=Sk(/[#-'*+\--9=?A-Z^-~]/);function pk(e){return e!==null&&(e<32||e===127)}var mk=Sk(/\d/),hk=Sk(/[\dA-Fa-f]/),gk=Sk(/[!-/:-@[-`{-~]/);function _k(e){return e!==null&&e<-2}function vk(e){return e!==null&&(e<0||e===32)}function yk(e){return e===-2||e===-1||e===32}var bk=Sk(/\p{P}|\p{S}/u),xk=Sk(/\s/);function Sk(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var Ck=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],wk=[12288,12288,65281,65376,65504,65510],Tk=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Ek=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],Dk=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],Ok=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=i*2;if(t<e[a])r=i-1;else if(t>e[a+1])n=i+1;else return!0}return!1},kk=19968,[Ak,jk]=Mk(Dk);function Mk(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(kk>=i&&kk<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}var Nk=e=>e<161||e>1114109?!1:Ok(Ck,e),Pk=e=>e<12288||e>65510?!1:Ok(wk,e),Fk=e=>e<8361||e>65518?!1:Ok(Tk,e),Ik=e=>e<32||e>10630?!1:Ok(Ek,e),Lk=e=>e>=Ak&&e<=jk?!0:e<4352||e>262141?!1:Ok(Dk,e);function Rk(e){return Nk(e)?`ambiguous`:Pk(e)?`fullwidth`:Fk(e)?`halfwidth`:Ik(e)?`narrow`:Lk(e)?`wide`:`neutral`}function zk(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Bk(e){return zk(e),Rk(e)}var Vk=Object.defineProperty,Hk=(e,t,n)=>t in e?Vk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uk=(e,t,n)=>Hk(e,typeof t==`symbol`?t:t+``,n);function Wk(e){return/^\p{Emoji_Presentation}/u.test(String.fromCodePoint(e))}function Gk(e){if(!e||e<4352)return!1;switch(Bk(e)){case`fullwidth`:case`halfwidth`:return!0;case`wide`:return!Wk(e);case`narrow`:return!1;case`ambiguous`:return 917760<=e&&e<=917999&&null;case`neutral`:return/^\p{sc=Hangul}/u.test(String.fromCodePoint(e))}}function Kk(e,t){return t!==65025||!e||e<8216?!1:e===8216||e===8217||e===8220||e===8221}function qk(e){return e!==null&&e>=65024&&e<=65038}var Jk=Xk(/\p{P}|\p{S}/u),Yk=Xk(/\s/);function Xk(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCodePoint(t))}}var Zk;(e=>{e.spaceOrPunctuation=3,e.cjk=4096,e.cjkPunctuation=4098,e.ivs=8192,e.cjkOrIvs=12288,e.nonEmojiGeneralUseVS=16384,e.variationSelector=24576,e.ivsToCjkRightShift=1})(Zk||={});function Qk(e){if(e===sk.eof||vk(e)||Yk(e))return ck.characterGroupWhitespace;let t=0;if(e>=4352){if(qk(e))return Zk.nonEmojiGeneralUseVS;switch(Gk(e)){case null:return Zk.ivs;case!0:t|=Zk.cjk}}return Jk(e)&&(t|=ck.characterGroupPunctuation),t}function $k(e,t,n){if(!oA(e))return e;let r=t(),i=Qk(r);return!r||tA(i)?e:Kk(r,n)?Zk.cjkPunctuation:eA(i)}function eA(e){return e&~Zk.ivs}function tA(e){return!!(e&ck.characterGroupWhitespace)}function nA(e){return(e&Zk.cjkPunctuation)===ck.characterGroupPunctuation}function rA(e){return!!(e&Zk.cjk)}function iA(e){return e===Zk.ivs}function aA(e){return!!(e&Zk.cjkOrIvs)}function oA(e){return e===Zk.nonEmojiGeneralUseVS}function sA(e){return!!(e&Zk.spaceOrPunctuation)}function cA(e){return!!(e&&e>=55296&&e<=56319)}function lA(e){return!!(e&&e>=56320&&e<=57343)}function uA(e,t,n){if(t._bufferIndex<2)return e;let r=n({start:{...t,_bufferIndex:t._bufferIndex-2},end:t}).codePointAt(0);return r&&r>=65536?r:e}function dA(e,t,n){let r=e>=65536?2:1;if(t._bufferIndex<1+r)return null;let i=t._bufferIndex-r-2,a=n({start:{...t,_bufferIndex:i>=0?i:0},end:{...t,_bufferIndex:t._bufferIndex-r}}),o=a.charCodeAt(a.length-1);if(Number.isNaN(o))return null;if(a.length<2||o<56320||57343<o)return o;let s=a.codePointAt(0);return s&&s>=65536?s:o}var fA=class{constructor(e,t,n){this.previousCode=e,this.nowPoint=t,this.sliceSerialize=n,Uk(this,`cachedValue`)}value(){return this.cachedValue===void 0&&(this.cachedValue=dA(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function pA(e,t,n){let r=n({start:t,end:{...t,_bufferIndex:t._bufferIndex+2}}).codePointAt(0);return r&&r>=65536?r:e}function mA(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function hA(e,t){return e.length>0?(mA(e,e.length,0,t),e):t}function gA(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var _A={name:`attention`,resolveAll:vA,tokenize:yA};function vA(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};bA(d,-c),bA(f,c),o={type:c>1?lk.strongSequence:lk.emphasisSequence,start:d,end:{...e[r][1].end}},s={type:c>1?lk.strongSequence:lk.emphasisSequence,start:{...e[n][1].start},end:f},a={type:c>1?lk.strongText:lk.emphasisText,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?lk.strong:lk.emphasis,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=hA(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=hA(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),t.parser.constructs.insideSpan.null,l=hA(l,gA(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=hA(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=hA(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,mA(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function yA(e,t){let n=this.parser.constructs.attentionMarkers.null,{now:r,sliceSerialize:i,previous:a}=this,o=lA(a)?uA(a,r(),i):a,s=Qk(o),c=new fA(o,r(),i),l=$k(s,c.value.bind(c),o),u;return d;function d(t){return t===sk.asterisk||sk.underscore,u=t,e.enter(`attentionSequence`),f(t)}function f(a){if(a===u)return e.consume(a),f;let s=e.exit(`attentionSequence`),c=Qk(cA(a)?pA(a,r(),i):a),d=nA(l),p=d||tA(l),m=nA(c),h=m||tA(c),g=aA(l),_=!h||m&&(p||g)||n.includes(a),v=!p||d&&(h||rA(c))||n.includes(o);return s._open=!!(u===sk.asterisk?_:_&&(sA(l)||!v)),s._close=!!(u===sk.asterisk?v:v&&(sA(c)||!_)),t(a)}}function bA(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}function xA(){return{text:{[sk.asterisk]:_A,[sk.underscore]:_A},insideSpan:{null:[_A]}}}function SA(){let e=this.data();(e.micromarkExtensions||=[]).push(xA())}function CA(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{[sk.tilde]:n},insideSpan:{null:[n]},attentionMarkers:{null:[sk.tilde]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&mA(o,o.length,0,gA(s,e.slice(r+1,n),t)),mA(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),mA(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=lk.data);return e}function i(e,n,r){let{now:i,sliceSerialize:a,previous:o}=this,s=lA(o)?uA(o,i(),a):o,c=Qk(s),l=new fA(s,i(),a),u=$k(c,l.value.bind(l),s),d=this.events,f=0;return p;function p(t){return sk.tilde,s===sk.tilde&&d[d.length-1][1].type!==lk.characterEscape?r(t):(e.enter(`strikethroughSequenceTemporary`),m(t))}function m(o){let c=Qk(s);if(o===sk.tilde)return f>1?r(o):(e.consume(o),f++,m);if(f<2&&!t)return r(o);let l=e.exit(`strikethroughSequenceTemporary`),d=Qk(cA(o)?pA(o,i(),a):o),p=nA(u)||tA(u),h=nA(d)||tA(d),g=rA(u)||iA(c);return l._open=!h||d===ck.attentionSideAfter&&(p||g),l._close=!p||c===ck.attentionSideAfter&&(h||rA(d)),n(o)}}}function wA(e){let t=this.data();(t.micromarkExtensions||=[]).push(CA(e))}function TA(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function EA(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function DA(e,t,n){let r=Rh((n||{}).ignore||[]),i=OA(t),a=-1;for(;++a<i.length;)Gh(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function OA(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([kA(e[0]),AA(e[1])])}return t}function kA(e){return typeof e==`string`?new RegExp(EA(e),`g`):e}function AA(e){return typeof e==`function`?e:function(){return e}}var jA=`phrasing`,MA=[`autolink`,`link`,`image`,`label`];
vendor: 4,727 bytes, lines 308-309
308function NA(){return{transforms:[VA],enter:{literalAutolink:FA,literalAutolinkEmail:IA,literalAutolinkHttp:IA,literalAutolinkWww:IA},exit:{literalAutolink:BA,literalAutolinkEmail:zA,literalAutolinkHttp:LA,literalAutolinkWww:RA}}}function PA(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:jA,notInConstruct:MA},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:jA,notInConstruct:MA},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:jA,notInConstruct:MA}]}}function FA(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function IA(e){this.config.enter.autolinkProtocol.call(this,e)}function LA(e){this.config.exit.autolinkProtocol.call(this,e)}function RA(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function zA(e){this.config.exit.autolinkEmail.call(this,e)}function BA(e){this.exit(e)}function VA(e){DA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,HA],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,UA]],{ignore:[`link`,`linkReference`]})}function HA(e,t,n,r,i){let a=``;if(!KA(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!WA(n)))return!1;let o=GA(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function UA(e,t,n,r){return!KA(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function WA(e){let 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 GA(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=TA(e,`(`),a=TA(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function KA(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||xk(n)||bk(n))&&(!t||n!==47)}function qA(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}rj.peek=nj;function JA(){this.buffer()}function YA(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function XA(){this.buffer()}function ZA(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function QA(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=qA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $A(e){this.exit(e)}function ej(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=qA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tj(e){this.exit(e)}function nj(){return`[`}function rj(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function ij(){return{enter:{gfmFootnoteCallString:JA,gfmFootnoteCall:YA,gfmFootnoteDefinitionLabelString:XA,gfmFootnoteDefinition:ZA},exit:{gfmFootnoteCallString:QA,gfmFootnoteCall:$A,gfmFootnoteDefinitionLabelString:ej,gfmFootnoteDefinition:tj}}}function aj(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:rj},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` 309`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?sj:oj))),s(),o}}function oj(e,t,n){return t===0?e:sj(e,t,n)}function sj(e,t,n){return(n?``:` `)+e}var cj=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];pj.peek=mj;function lj(){return{canContainEols:[`delete`],enter:{strikethrough:dj},exit:{strikethrough:fj}}}function uj(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:cj}],handlers:{delete:pj}}}function dj(e){this.enter({type:`delete`,children:[]},e)}function fj(e){this.exit(e)}function pj(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function mj(){return`~`}function hj(e){return e.length}function gj(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||hj,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=_j(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}
vendor: 7,878 bytes, lines 309-321
309o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=vj(r[d]);else{let e=vj(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(` 310`)}function _j(e){return e==null?``:String(e)}function vj(e){let 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}function yj(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),bj);return i(),o}function bj(e,t,n){return`>`+(n?``:` `)+e}function xj(e,t){return Sj(e,t.inConstruct,!0)&&!Sj(e,t.notInConstruct,!1)}function Sj(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Cj(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===` 311`&&xj(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\ 312`}function wj(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Tj(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 Ej(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Dj(e,t,n,r){let i=Ej(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Tj(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Oj);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(wj(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` 313`,encode:["`"],...s.current()})),t()}return u+=s.move(` 314`),a&&(u+=s.move(a+` 315`)),u+=s.move(c),l(),u}function Oj(e,t,n){return(n?``:` `)+e}function kj(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Aj(e,t,n,r){let i=kj(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` 316`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function jj(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Mj(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Nj(e){if(e===null||vk(e)||xk(e))return 1;if(bk(e))return 2}function Pj(e,t,n){let r=Nj(e),i=Nj(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Fj.peek=Ij;function Fj(e,t,n,r){let i=jj(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Pj(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Mj(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Pj(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Mj(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Ij(e,t,n){return n.options.emphasis||`*`}var Lj={};function Rj(e,t){let n=t||Lj;return zj(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function zj(e,t,n){if(Vj(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Bj(e.children,t,n)}return Array.isArray(e)?Bj(e,t,n):``}function Bj(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=zj(e[i],t,n);return r.join(``)}function Vj(e){return!!(e&&typeof e==`object`)}function Hj(e,t){let n=!1;return qh(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Rj(e)&&(t.options.setext||n))}function Uj(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Hj(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` 317`,after:` 318`});return r(),t(),o+` 319`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(` 320`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:` 321`,...a.current()});return/^[\t ]/.test(l)&&(l=Mj(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Wj.peek=Gj;function Wj(e){return e.value||``}function Gj(){return`<`}Kj.peek=qj;function Kj(e,t,n,r){let i=kj(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function qj(){return`!`}Jj.peek=Yj;function Jj(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Yj(){return`!`}Xj.peek=Zj;function Xj(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Zj(){return"`"}function Qj(e,t){let n=Rj(e);
vendor: 9,302 bytes, lines 321-323
321return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][a-z+.-]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}$j.peek=eM;function $j(e,t,n,r){let i=kj(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Qj(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function eM(e,t,n){return Qj(e,n)?`<`:`[`}tM.peek=nM;function tM(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function nM(){return`[`}function rM(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function iM(e){let t=rM(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function aM(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function oM(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function sM(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?aM(n):rM(n),s=e.ordered?o===`.`?`)`:`.`:iM(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),oM(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function cM(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function lM(e,t,n,r){let i=cM(n),a=n.bulletCurrent||rM(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function uM(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var dM=Rh([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function fM(e,t,n,r){return(e.children.some(function(e){return dM(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function pM(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}mM.peek=hM;function mM(e,t,n,r){let i=pM(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Pj(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Mj(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Pj(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Mj(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function hM(e,t,n){return n.options.strong||`*`}function gM(e,t,n,r){return n.safe(e.value,r)}function _M(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function vM(e,t,n){let r=(oM(n)+(n.options.ruleSpaces?` `:``)).repeat(_M(n));return n.options.ruleSpaces?r.slice(0,-1):r}var yM={blockquote:yj,break:Cj,code:Dj,definition:Aj,emphasis:Fj,hardBreak:Cj,heading:Uj,html:Wj,image:Kj,imageReference:Jj,inlineCode:Xj,link:$j,linkReference:tM,list:sM,listItem:lM,paragraph:uM,root:fM,strong:mM,text:gM,thematicBreak:vM},bM=document.createElement(`i`);function xM(e){let t=`&`+e+`;`;bM.innerHTML=t;let n=bM.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function SM(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var CM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wM(e){return e.replace(CM,TM)}function TM(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return SM(n.slice(t?2:1),t?16:10)}return xM(n)||e}function EM(){return{enter:{table:DM,tableData:jM,tableHeader:jM,tableRow:kM},exit:{codeText:MM,table:OM,tableData:AM,tableHeader:AM,tableRow:AM}}}function DM(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function OM(e){this.exit(e),this.data.inTable=void 0}function kM(e){this.enter({type:`tableRow`,children:[]},e)}function AM(e){this.exit(e)}function jM(e){this.enter({type:`tableCell`,children:[]},e)}function MM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,NM));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function NM(e,t){return t===`|`?t:e}function PM(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` 322`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` 323`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return gj(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=yM.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function FM(){return{exit:{taskListCheckValueChecked:LM,taskListCheckValueUnchecked:LM,paragraph:RM}}}function IM(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:zM}}}function LM(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function RM(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function zM(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=yM.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}
vendor: 16,491 bytes, line 323
323function BM(){return[NA(),ij(),lj(),EM(),FM()]}function VM(e){return{extensions:[PA(),aj(e),uj(),PM(e),IM()]}}var HM={}.hasOwnProperty;function UM(e){let t={},n=-1;for(;++n<e.length;)WM(t,e[n]);return t}function WM(e,t){let n;for(n in t){let r=(HM.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){HM.call(r,a)||(r[a]=[]);let e=i[a];GM(r[a],Array.isArray(e)?e:e?[e]:[])}}}function GM(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);mA(e,0,0,r)}var KM={tokenize:oN,partial:!0},qM={tokenize:sN,partial:!0},JM={tokenize:cN,partial:!0},YM={tokenize:lN,partial:!0},XM={tokenize:uN,partial:!0},ZM={name:`wwwAutolink`,tokenize:iN,previous:dN},QM={name:`protocolAutolink`,tokenize:aN,previous:fN},$M={name:`emailAutolink`,tokenize:rN,previous:pN},eN={};function tN(){return{text:eN}}for(var nN=48;nN<123;)eN[nN]=$M,nN++,nN===58?nN=65:nN===91&&(nN=97);eN[43]=$M,eN[45]=$M,eN[46]=$M,eN[95]=$M,eN[72]=[$M,QM],eN[104]=[$M,QM],eN[87]=[$M,ZM],eN[119]=[$M,ZM];function rN(e,t,n){let r=this,i,a;return o;function o(t){return!mN(t)||!pN.call(r,r.previous)||hN(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return mN(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(XM,u,l)(t):t===45||t===95||dk(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&uk(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function iN(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!dN.call(r,r.previous)||hN(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(KM,e.attempt(qM,e.attempt(JM,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function aN(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&fN.call(r,r.previous)&&!hN(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(uk(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||pk(t)||vk(t)||xk(t)||bk(t)?n(t):e.attempt(qM,e.attempt(JM,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function oN(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function sN(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(YM,c,s)(t):t===null||vk(t)||xk(t)||t!==45&&bk(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function cN(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?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(YM,t,a)(o):o===null||vk(o)||xk(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function lN(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||vk(o)||xk(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||vk(e)||xk(e)?t(e):r(e)}function a(e){return uk(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):uk(t)?(e.consume(t),o):n(t)}}function uN(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return dk(e)?n(e):t(e)}}function dN(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||vk(e)}function fN(e){return!uk(e)}function pN(e){return!(e===47||mN(e))}function mN(e){return e===43||e===45||e===46||e===95||dk(e)}function hN(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function gN(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&dk(e.charCodeAt(n+1))&&dk(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}var _N={name:`attention`,resolveAll:vN,tokenize:yN};function vN(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};bN(d,-c),bN(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=hA(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=hA(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=hA(l,gA(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=hA(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=hA(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,mA(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function yN(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Nj(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Nj(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function bN(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var xN={name:`autolink`,tokenize:SN};function SN(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return uk(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||dk(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||dk(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||pk(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):fk(t)?(e.consume(t),l):n(t)}function u(e){return dk(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||dk(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function CN(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return yk(r)?(e.enter(n),s(r)):t(r)}function s(r){return yk(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var wN={partial:!0,tokenize:TN};function TN(e,t,n){return r;function r(t){return yk(t)?CN(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||_k(e)?t(e):n(e)}}var EN={continuation:{tokenize:ON},exit:kN,name:`blockQuote`,tokenize:DN};function DN(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return yk(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ON(e,t,n){let r=this;return i;function i(t){return yk(t)?CN(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(EN,t,n)(r)}}function kN(e){e.exit(`blockQuote`)}var AN={name:`characterEscape`,tokenize:jN};function jN(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return gk(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var MN={name:`characterReference`,tokenize:NN};function NN(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=dk,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=hk,u):(e.enter(`characterReferenceValue`),a=7,o=mk,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===dk&&!xM(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var PN={partial:!0,tokenize:LN},FN={concrete:!0,name:`codeFenced`,tokenize:IN};function IN(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),yk(t)?CN(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||_k(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(PN,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||_k(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):yk(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),CN(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||_k(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||_k(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&yk(t)?CN(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||_k(t)?e.check(PN,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||_k(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),yk(t)?CN(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),yk(t)?CN(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||_k(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function LN(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var RN={name:`codeIndented`,tokenize:BN},zN={partial:!0,tokenize:VN};function BN(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),CN(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):_k(t)?e.attempt(zN,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||_k(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function VN(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):_k(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):CN(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):_k(e)?i(e):n(e)}}var HN={name:`codeText`,previous:WN,resolve:UN,tokenize:GN};function UN(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function WN(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function GN(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):_k(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||_k(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var KN=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&qN(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),qN(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),qN(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);qN(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);qN(this.left,t.reverse())}}}};function qN(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function JN(e){let t={},n=-1,r,i,a,o,s,c,l,u=new KN(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;
vendor: 30,349 bytes, line 323
323)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,YN(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return mA(e,0,1/0,u.slice(0)),!l}function YN(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var XN={resolve:QN,tokenize:$N},ZN={partial:!0,tokenize:eP};function QN(e){return JN(e),e}function $N(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):_k(t)?e.check(ZN,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function eP(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),CN(e,a,`linePrefix`)}function a(i){if(i===null||_k(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function tP(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||pk(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||_k(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||vk(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||pk(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function nP(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):_k(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||_k(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!yk(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function rP(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):_k(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),CN(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||_k(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function iP(e,t){let n;return r;function r(i){return _k(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):yk(i)?CN(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var aP={name:`definition`,tokenize:sP},oP={partial:!0,tokenize:cP};function sP(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return nP.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=qA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return vk(t)?iP(e,l)(t):l(t)}function l(t){return tP(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(oP,d,d)(t)}function d(t){return yk(t)?CN(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||_k(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function cP(e,t,n){return r;function r(t){return vk(t)?iP(e,i)(t):n(t)}function i(t){return rP(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return yk(t)?CN(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||_k(e)?t(e):n(e)}}var lP={name:`hardBreakEscape`,tokenize:uP};function uP(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return _k(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var dP={name:`headingAtx`,resolve:fP,tokenize:pP};function fP(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},mA(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function pP(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||vk(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||_k(n)?(e.exit(`atxHeading`),t(n)):yk(n)?CN(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||vk(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var mP=`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`.split(`.`),hP=[`pre`,`script`,`style`,`textarea`],gP={concrete:!0,name:`htmlFlow`,resolveTo:yP,tokenize:bP},_P={partial:!0,tokenize:SP},vP={partial:!0,tokenize:xP};function yP(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 bP(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ce):uk(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):uk(a)?(e.consume(a),i=4,r.interrupt?t:ce):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ce):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return uk(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||vk(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&hP.includes(l)?(i=1,r.interrupt?t(s):D(s)):mP.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||dk(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return yk(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||uk(t)?(e.consume(t),b):yk(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||dk(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):yk(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):yk(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||_k(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||vk(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||yk(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||_k(t)?D(t):yk(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),ae):t===62&&i===4?(e.consume(t),le):t===63&&i===3?(e.consume(t),ce):t===93&&i===5?(e.consume(t),se):_k(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(_P,ue,te)(t)):t===null||_k(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(vP,ne,ue)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||_k(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),ce):D(t)}function ae(t){return t===47?(e.consume(t),o=``,oe):D(t)}function oe(t){if(t===62){let n=o.toLowerCase();return hP.includes(n)?(e.consume(t),le):D(t)}return uk(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),oe):D(t)}function se(t){return t===93?(e.consume(t),ce):D(t)}function ce(t){return t===62?(e.consume(t),le):t===45&&i===2?(e.consume(t),ce):D(t)}function le(t){return t===null||_k(t)?(e.exit(`htmlFlowData`),ue(t)):(e.consume(t),le)}function ue(n){return e.exit(`htmlFlow`),t(n)}}function xP(e,t,n){let r=this;return i;function i(t){return _k(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function SP(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(wN,t,n)}}var CP={name:`htmlText`,tokenize:wP};function wP(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):uk(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):uk(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):_k(t)?(o=d,ae(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):_k(t)?(o=h,ae(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):_k(t)?(o=v,ae(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):_k(t)?(o=y,ae(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return uk(t)?(e.consume(t),S):n(t)}function S(t){return t===45||dk(t)?(e.consume(t),S):C(t)}function C(t){return _k(t)?(o=C,ae(t)):yk(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||dk(t)?(e.consume(t),w):t===47||t===62||vk(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||uk(t)?(e.consume(t),E):_k(t)?(o=T,ae(t)):yk(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||dk(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):_k(t)?(o=ee,ae(t)):yk(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):_k(t)?(o=D,ae(t)):yk(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):_k(t)?(o=te,ae(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||vk(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||vk(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ae(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return yk(t)?CN(e,se,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):se(t)}function se(t){return e.enter(`htmlTextData`),o(t)}}var TP={name:`labelEnd`,resolveAll:kP,resolveTo:AP,tokenize:jP},EP={tokenize:MP},DP={tokenize:NP},OP={tokenize:PP};function kP(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&mA(e,0,e.length,n),e}function AP(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=hA(s,e.slice(a+1,a+r+3)),s=hA(s,[[`enter`,u,t]]),s=hA(s,gA(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=hA(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=hA(s,e.slice(o+1)),s=hA(s,[[`exit`,c,t]]),mA(e,a,e.length,s),e}function jP(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(qA(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(EP,u,o?u:d)(t):t===91?e.attempt(DP,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(OP,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function MP(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return vk(t)?iP(e,a)(t):a(t)}function a(t){return t===41?u(t):tP(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return vk(t)?iP(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?rP(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return vk(t)?iP(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function NP(e,t,n){let r=this;return i;function i(t){return nP.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(qA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function PP(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var FP={name:`labelStartImage`,resolveAll:TP.resolveAll,tokenize:IP};function IP(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var LP={name:`labelStartLink`,resolveAll:TP.resolveAll,tokenize:RP};function RP(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var zP={name:`lineEnding`,tokenize:BP};function BP(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),CN(e,t,`linePrefix`)}}var VP={name:`thematicBreak`,tokenize:HP};function HP(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||_k(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),yk(t)?CN(e,s,`whitespace`)(t):s(t))}}var UP={continuation:{tokenize:qP},exit:YP,name:`list`,tokenize:KP},WP={partial:!0,tokenize:XP},GP={partial:!0,tokenize:JP};function KP(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:mk(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(VP,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return mk(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(wN,r.interrupt?n:u,e.attempt(WP,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return yk(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function qP(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(wN,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,CN(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!yk(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(GP,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,CN(e,e.attempt(UP,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function JP(e,t,n){let r=this;return CN(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function YP(e){e.exit(this.containerState.type)}function XP(e,t,n){let r=this;return CN(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!yk(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var ZP={name:`setextUnderline`,resolveTo:Cte,tokenize:wte};function Cte(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function wte(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),yk(t)?CN(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||_k(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Tte={tokenize:Nte,partial:!0};function Ete(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Ate,continuation:{tokenize:jte},exit:Mte}},text:{91:{name:`gfmFootnoteCall`,tokenize:kte},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Dte,resolveTo:Ote}}}}function Dte(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=qA(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Ote(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.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)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function kte(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||vk(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(qA(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return vk(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Ate(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||vk(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=qA(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return vk(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),CN(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function jte(e,t,n){return e.check(wN,t,e.attempt(Tte,t,n))}function Mte(e){e.exit(`gfmFootnoteDefinition`)}function Nte(e,t,n){let r=this;return CN(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Pte(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&mA(o,o.length,0,gA(s,e.slice(r+1,n),t)),mA(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),mA(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Nj(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Nj(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Fte=class{constructor(){this.map=[]}add(e,t,n){Ite(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Ite(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Lte(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Rte(){return{flow:{null:{name:`table`,tokenize:zte,resolveAll:Bte}}}}function zte(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):_k(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):yk(t)?CN(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||vk(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,yk(t)?CN(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return yk(t)?CN(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||_k(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return yk(t)?CN(e,b,`whitespace`)(t):b(t)}
vendor: 13,365 bytes, lines 323-336
323function b(n){return n===124?m(n):n===null||_k(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||_k(n)?(e.exit(`tableRow`),t(n)):yk(n)?CN(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||vk(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Bte(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Fte;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&($P(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=QP(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=QP(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=QP(f,t,o,i,n,d)):(o[0]=o[1],d=QP(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&$P(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Lte(t.events,n))}return e}function QP(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},eF(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=eF(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=eF(t.events,n[2]),a=eF(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},eF(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function $P(e,t,n,r,i){let a=[],o=eF(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function eF(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Vte={name:`tasklistCheck`,tokenize:Ute};function Hte(){return{text:{91:Vte}}}function Ute(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return vk(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return _k(r)?t(r):yk(r)?e.check({tokenize:Wte},t,n)(r):n(r)}}function Wte(e,t,n){return CN(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Gte(e){return UM([tN(),Ete(),Pte(e),Rte(),Hte()])}var Kte={};function qte(e){let t=this,n=e||Kte,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Gte(n)),a.push(BM()),o.push(VM(n))}function Jte(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function Yte(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:` 324`,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(wj(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:` 325`,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(` 326`),i&&(c+=a.move(i+` 327`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var Xte={tokenize:Zte,concrete:!0,name:`mathFlow`},tF={tokenize:Qte,partial:!0};function Zte(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),CN(e,l,`whitespace`)(t))}function l(t){return t===null||_k(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||_k(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(tF,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?CN(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):_k(t)?e.attempt(tF,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||_k(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return CN(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),CN(e,c,`whitespace`)(t))}function c(r){return r===null||_k(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function Qte(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function $te(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:ene,previous:tne,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):_k(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||_k(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function ene(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function tne(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function nne(e){return{flow:{36:Xte},text:{36:$te(e)}}}var rne={};function nF(e){let t=this,n=e||rne,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(nne(n)),a.push(Jte()),o.push(Yte(n))}var ine=/(\*\*)([^*]*?)$/,ane=/(__)([^_]*?)$/,one=/(\*\*\*)([^*]*?)$/,sne=/(\*)([^*]*?)$/,cne=/(_)([^_]*?)$/,lne=/(`)([^`]*?)$/,une=/(~~)([^~]*?)$/,rF=/^[\s_~*`]*$/,iF=/^[\s]*[-*+][\s]+$/,dne=/[\p{L}\p{N}_]/u,fne=/^```[^`\n]*```?$/,pne=/^\*{4,}$/,aF=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95||dne.test(e)},oF=e=>{let t=(e.match(/```/g)||[]).length;return t>0&&t%2==0&&e.includes(` 328`)},mne=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},hne=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]===`[`)n+=1;else if(e[r]===`]`&&(--n,n===0))return r;return-1},sF=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]===`\\`&&e[i+1]===`$`){i+=1;continue}e[i]===`$`&&(e[i+1]===`$`?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},gne=(e,t,n)=>{if(n!==` `&&n!==` `)return!1;let r=0;for(let n=t-1;n>=0;--n)if(e[n]===` 329`){r=n+1;break}for(let n=r;n<t;n+=1)if(e[n]!==` `&&e[n]!==` `)return!1;return!0},_ne=(e,t,n,r)=>!!(n===`\\`||n===`*`||r===`*`||n&&r&&aF(n)&&aF(r)||gne(e,t,r)),vne=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!==`*`)continue;let i=r>0?e[r-1]:``,a=r<n-1?e[r+1]:``;_ne(e,r,i,a)||(t+=1)}return t},yne=(e,t,n,r)=>!!(n===`\\`||e.includes(`$`)&&sF(e,t)||n===`_`||r===`_`||n&&r&&aF(n)&&aF(r)),bne=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!==`_`)continue;let i=r>0?e[r-1]:``,a=r<n-1?e[r+1]:``;yne(e,r,i,a)||(t+=1)}return t},xne=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]===`*`?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},Sne=e=>{if(oF(e))return e;let t=e.match(ine);if(t){let n=t[2];if(!n||rF.test(n))return e;let r=e.lastIndexOf(t[1]),i=e.substring(0,r).lastIndexOf(` 330`),a=i===-1?0:i+1,o=e.substring(a,r);if(iF.test(o)&&n.includes(` 331`))return e;if((e.match(/\*\*/g)||[]).length%2==1)return`${e}**`}return e},Cne=e=>{let t=e.match(ane);if(t){let n=t[2];if(!n||rF.test(n))return e;let r=e.lastIndexOf(t[1]),i=e.substring(0,r).lastIndexOf(` 332`),a=i===-1?0:i+1,o=e.substring(a,r);if(iF.test(o)&&n.includes(` 333`))return e;if((e.match(/__/g)||[]).length%2==1)return`${e}__`}return e},wne=e=>{for(let t=0;t<e.length;t+=1)if(e[t]===`*`&&e[t-1]!==`*`&&e[t+1]!==`*`&&e[t-1]!==`\\`){let n=t>0?e[t-1]:``,r=t<e.length-1?e[t+1]:``;if(n&&r&&aF(n)&&aF(r))continue;return t}return-1},Tne=e=>{if(oF(e)||!e.match(sne))return e;let t=wne(e);if(t===-1)return e;let n=e.substring(t+1);return!n||rF.test(n)?e:vne(e)%2==1?`${e}*`:e},Ene=e=>{for(let t=0;t<e.length;t+=1)if(e[t]===`_`&&e[t-1]!==`_`&&e[t+1]!==`_`&&e[t-1]!==`\\`&&!sF(e,t)){let n=t>0?e[t-1]:``,r=t<e.length-1?e[t+1]:``;if(n&&r&&aF(n)&&aF(r))continue;return t}return-1},Dne=e=>{let t=e.length;for(;t>0&&e[t-1]===` 334`;)--t;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},One=e=>{if(oF(e)||!e.match(cne))return e;let t=Ene(e);if(t===-1)return e;let n=e.substring(t+1);return!n||rF.test(n)?e:bne(e)%2==1?Dne(e):e},kne=e=>{if(oF(e)||pne.test(e))return e;let t=e.match(one);if(t){let n=t[2];if(!n||rF.test(n))return e;if(xne(e)%2==1)return`${e}***`}return e},cF=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},Ane=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},jne=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!Ane(e,n)&&(t+=1);return t},Mne=e=>!e.match(fne)||e.includes(` 335`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Nne=e=>{let t=(e.match(/```/g)||[]).length;return!!(t>0&&t%2==0&&e.includes(` 336`)||(e.endsWith("```\n")||e.endsWith("```"))&&t%2==0)},Pne=e=>(e.match(/```/g)||[]).length%2==1,Fne=e=>{let t=Mne(e);if(t!==null)return t;if(Nne(e))return e;let n=e.match(lne);
336if(n&&!Pne(e)){let t=n[2];if(!t||rF.test(t))return e;if(jne(e)%2==1)return`${e}\``}return e},Ine=e=>{if((e.match(/\$\$/g)||[]).length%2==0)return e;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(` 337`,t)!==-1&&!e.endsWith(` 338`)?`${e} 339$$`:`${e}$$`},Lne=(e,t)=>{if(e.substring(t+2).includes(`)`))return null;let n=mne(e,t);if(n===-1||cF(e,n))return null;let r=n>0&&e[n-1]===`!`,i=r?n-1:n,a=e.substring(0,i);return r?a:`${a}[${e.substring(n+1,t)}](streamdown:incomplete-link)`},Rne=(e,t)=>{let n=t>0&&e[t-1]===`!`,r=n?t-1:t;if(!e.substring(t+1).includes(`]`)){let t=e.substring(0,r);return n?t:`${e}](streamdown:incomplete-link)`}if(hne(e,t)===-1){let t=e.substring(0,r);return n?t:`${e}](streamdown:incomplete-link)`}return null},zne=e=>{let t=e.lastIndexOf(`](`);if(t!==-1&&!cF(e,t)){let n=Lne(e,t);if(n!==null)return n}for(let t=e.length-1;t>=0;--t)if(e[t]===`[`&&!cF(e,t)){let n=Rne(e,t);if(n!==null)return n}return e},Bne=e=>{let t=e.match(une);if(t){let n=t[2];if(!n||rF.test(n))return e;if((e.match(/~~/g)||[]).length%2==1)return`${e}~~`}return e},Vne=e=>{if(!e||typeof e!=`string`)return e;let t=e,n=zne(t);return n.endsWith(`](streamdown:incomplete-link)`)?n:(t=n,t=kne(t),t=Sne(t),t=Cne(t),t=Tne(t),t=One(t),t=Fne(t),t=Bne(t),t=Ine(t),t)},Hne=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Une=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),lF=e=>{let t=Une(e);return t.charAt(0).toUpperCase()+t.slice(1)},uF=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Wne=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},Gne={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`},Kne=(0,c.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},l)=>(0,c.createElement)(`svg`,{ref:l,...Gne,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:uF(`lucide`,i),...!a&&!Wne(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,c.createElement)(e,t)),...Array.isArray(a)?a:[a]])),dF=(e,t)=>{let n=(0,c.forwardRef)(({className:n,...r},i)=>(0,c.createElement)(Kne,{ref:i,iconNode:t,className:uF(`lucide-${Hne(lF(e))}`,`lucide-${e}`,n),...r}));return n.displayName=lF(e),n},fF=dF(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),pF=dF(`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`}]]),mF=dF(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),qne=dF(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Jne=dF(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Yne=dF(`rotate-ccw`,[[`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`}]]),Xne=dF(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Zne=dF(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Qne=dF(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),$ne=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ere=(e,t)=>({classGroupId:e,validator:t}),hF=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),gF=`-`,_F=[],tre=`arbitrary..`,nre=e=>{let t=ire(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return rre(e);let n=e.split(gF);return vF(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?$ne(i,t):t:i||_F}return n[e]||_F}}},vF=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=vF(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(gF):e.slice(t).join(gF),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},rre=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?tre+r:void 0})(),ire=e=>{let{theme:t,classGroups:n}=e;return are(n,t)},are=(e,t)=>
vendor: 13,871 bytes, line 339
339{let n=hF();for(let r in e){let i=e[r];yF(i,n,r,t)}return n},yF=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ore(i,t,n,r)}},ore=(e,t,n,r)=>{if(typeof e==`string`){sre(e,t,n);return}if(typeof e==`function`){cre(e,t,n,r);return}lre(e,t,n,r)},sre=(e,t,n)=>{let r=e===``?t:bF(t,e);r.classGroupId=n},cre=(e,t,n,r)=>{if(ure(e)){yF(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ere(n,e))},lre=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];yF(o,bF(t,a),n,r)}},bF=(e,t)=>{let n=e,r=t.split(gF),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=hF(),n.nextPart.set(t,i)),n=i}return n},ure=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,dre=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},xF=`!`,SF=`:`,fre=[],CF=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),pre=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===SF){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(xF)?(c=s.slice(0,-1),l=!0):s.startsWith(xF)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return CF(t,l,c,u)};if(t){let e=t+SF,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):CF(fre,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},mre=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},hre=e=>({cache:dre(e.cacheSize),parseClassName:pre(e),sortModifiers:mre(e),postfixLookupClassGroupIds:gre(e),...nre(e)}),gre=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},_re=/\s+/,vre=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(_re),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+xF:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},yre=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=wF(n))&&(i&&(i+=` `),i+=r);return i},wF=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=wF(e[r]))&&(n&&(n+=` `),n+=t);return n},bre=(e,...t)=>{let n,r,i,a,o=o=>(n=hre(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=vre(e,n);return i(e,a),a};return a=o,(...e)=>a(yre(...e))},xre=[],TF=e=>{let t=t=>t[e]||xre;return t.isThemeGetter=!0,t},EF=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,DF=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sre=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Cre=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wre=/\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$/,Tre=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ere=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dre=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,OF=e=>Sre.test(e),kF=e=>!!e&&!Number.isNaN(Number(e)),AF=e=>!!e&&Number.isInteger(Number(e)),jF=e=>e.endsWith(`%`)&&kF(e.slice(0,-1)),MF=e=>Cre.test(e),NF=()=>!0,Ore=e=>wre.test(e)&&!Tre.test(e),PF=()=>!1,kre=e=>Ere.test(e),Are=e=>Dre.test(e),jre=e=>!FF(e)&&!BF(e),Mre=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Nre=e=>WF(e,JF,PF),FF=e=>EF.test(e),IF=e=>WF(e,YF,Ore),LF=e=>WF(e,Vre,kF),Pre=e=>WF(e,ZF,NF),Fre=e=>WF(e,XF,PF),RF=e=>WF(e,KF,PF),Ire=e=>WF(e,qF,Are),zF=e=>WF(e,QF,kre),BF=e=>DF.test(e),VF=e=>GF(e,YF),Lre=e=>GF(e,XF),HF=e=>GF(e,KF),Rre=e=>GF(e,JF),zre=e=>GF(e,qF),UF=e=>GF(e,QF,!0),Bre=e=>GF(e,ZF,!0),WF=(e,t,n)=>{let r=EF.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},GF=(e,t,n=!1)=>{let r=DF.exec(e);return r?r[1]?t(r[1]):n:!1},KF=e=>e===`position`||e===`percentage`,qF=e=>e===`image`||e===`url`,JF=e=>e===`length`||e===`size`||e===`bg-size`,YF=e=>e===`length`,Vre=e=>e===`number`,XF=e=>e===`family-name`,ZF=e=>e===`number`||e===`weight`,QF=e=>e===`shadow`,Hre=bre(()=>{let e=TF(`color`),t=TF(`font`),n=TF(`text`),r=TF(`font-weight`),i=TF(`tracking`),a=TF(`leading`),o=TF(`breakpoint`),s=TF(`container`),c=TF(`spacing`),l=TF(`radius`),u=TF(`shadow`),d=TF(`inset-shadow`),f=TF(`text-shadow`),p=TF(`drop-shadow`),m=TF(`blur`),h=TF(`perspective`),g=TF(`aspect`),_=TF(`ease`),v=TF(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),BF,FF],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[BF,FF,c],T=()=>[OF,`full`,`auto`,...w()],E=()=>[AF,`none`,`subgrid`,BF,FF],ee=()=>[`auto`,{span:[`full`,AF,BF,FF]},AF,BF,FF],D=()=>[AF,`auto`,BF,FF],te=()=>[`auto`,`min`,`max`,`fr`,BF,FF],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...w()],ae=()=>[OF,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],oe=()=>[OF,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],se=()=>[OF,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],ce=()=>[e,BF,FF],le=()=>[...b(),HF,RF,{position:[BF,FF]}],ue=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],de=()=>[`auto`,`cover`,`contain`,Rre,Nre,{size:[BF,FF]}],fe=()=>[jF,VF,IF],pe=()=>[``,`none`,`full`,l,BF,FF],me=()=>[``,kF,VF,IF],he=()=>[`solid`,`dashed`,`dotted`,`double`],ge=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],_e=()=>[kF,jF,HF,RF],ve=()=>[``,`none`,m,BF,FF],ye=()=>[`none`,kF,BF,FF],be=()=>[`none`,kF,BF,FF],xe=()=>[kF,BF,FF],Se=()=>[OF,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[MF],breakpoint:[MF],color:[NF],container:[MF],"drop-shadow":[MF],ease:[`in`,`out`,`in-out`],font:[jre],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[MF],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[MF],shadow:[MF],spacing:[`px`,kF],text:[MF],"text-shadow":[MF],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,OF,FF,BF,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,BF,FF]}],"container-named":[Mre],columns:[{columns:[kF,FF,BF,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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`],sr:[`sr-only`,`not-sr-only`],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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[AF,`auto`,BF,FF]}],basis:[{basis:[OF,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[kF,OF,`auto`,`initial`,`none`,FF]}],grow:[{grow:[``,kF,BF,FF]}],shrink:[{shrink:[``,kF,BF,FF]}],order:[{order:[AF,`first`,`last`,`none`,BF,FF]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ae()}],"inline-size":[{inline:[`auto`,...oe()]}],"min-inline-size":[{"min-inline":[`auto`,...oe()]}],"max-inline-size":[{"max-inline":[`none`,...oe()]}],"block-size":[{block:[`auto`,...se()]}],"min-block-size":[{"min-block":[`auto`,...se()]}],"max-block-size":[{"max-block":[`none`,...se()]}],w:[{w:[s,`screen`,...ae()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ae()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ae()]}],h:[{h:[`screen`,`lh`,...ae()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ae()]}],"max-h":[{"max-h":[`screen`,`lh`,...ae()]}],"font-size":[{text:[`base`,n,VF,IF]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Bre,Pre]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,jF,FF]}],"font-family":[{font:[Lre,Fre,t]}],"font-features":[{"font-features":[FF]}],"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:[i,BF,FF]}],"line-clamp":[{"line-clamp":[kF,`none`,BF,LF]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,BF,FF]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,BF,FF]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:ce()}],"text-color":[{text:ce()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...he(),`wavy`]}],"text-decoration-thickness":[{decoration:[kF,`from-font`,`auto`,BF,IF]}],"text-decoration-color":[{decoration:ce()}],"underline-offset":[{"underline-offset":[kF,`auto`,BF,FF]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[AF,BF,FF]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,BF,FF]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,BF,FF]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:de()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},AF,BF,FF],radial:[``,BF,FF],conic:[AF,BF,FF]},zre,Ire]}],"bg-color":[{bg:ce()}],"gradient-from-pos":[{from:fe()}
vendor: 7,950 bytes, line 339
339],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:ce()}],"gradient-via":[{via:ce()}],"gradient-to":[{to:ce()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":me()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...he(),`hidden`,`none`]}],"divide-style":[{divide:[...he(),`hidden`,`none`]}],"border-color":[{border:ce()}],"border-color-x":[{"border-x":ce()}],"border-color-y":[{"border-y":ce()}],"border-color-s":[{"border-s":ce()}],"border-color-e":[{"border-e":ce()}],"border-color-bs":[{"border-bs":ce()}],"border-color-be":[{"border-be":ce()}],"border-color-t":[{"border-t":ce()}],"border-color-r":[{"border-r":ce()}],"border-color-b":[{"border-b":ce()}],"border-color-l":[{"border-l":ce()}],"divide-color":[{divide:ce()}],"outline-style":[{outline:[...he(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[kF,BF,FF]}],"outline-w":[{outline:[``,kF,VF,IF]}],"outline-color":[{outline:ce()}],shadow:[{shadow:[``,`none`,u,UF,zF]}],"shadow-color":[{shadow:ce()}],"inset-shadow":[{"inset-shadow":[`none`,d,UF,zF]}],"inset-shadow-color":[{"inset-shadow":ce()}],"ring-w":[{ring:me()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:ce()}],"ring-offset-w":[{"ring-offset":[kF,IF]}],"ring-offset-color":[{"ring-offset":ce()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":ce()}],"text-shadow":[{"text-shadow":[`none`,f,UF,zF]}],"text-shadow-color":[{"text-shadow":ce()}],opacity:[{opacity:[kF,BF,FF]}],"mix-blend":[{"mix-blend":[...ge(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[kF]}],"mask-image-linear-from-pos":[{"mask-linear-from":_e()}],"mask-image-linear-to-pos":[{"mask-linear-to":_e()}],"mask-image-linear-from-color":[{"mask-linear-from":ce()}],"mask-image-linear-to-color":[{"mask-linear-to":ce()}],"mask-image-t-from-pos":[{"mask-t-from":_e()}],"mask-image-t-to-pos":[{"mask-t-to":_e()}],"mask-image-t-from-color":[{"mask-t-from":ce()}],"mask-image-t-to-color":[{"mask-t-to":ce()}],"mask-image-r-from-pos":[{"mask-r-from":_e()}],"mask-image-r-to-pos":[{"mask-r-to":_e()}],"mask-image-r-from-color":[{"mask-r-from":ce()}],"mask-image-r-to-color":[{"mask-r-to":ce()}],"mask-image-b-from-pos":[{"mask-b-from":_e()}],"mask-image-b-to-pos":[{"mask-b-to":_e()}],"mask-image-b-from-color":[{"mask-b-from":ce()}],"mask-image-b-to-color":[{"mask-b-to":ce()}],"mask-image-l-from-pos":[{"mask-l-from":_e()}],"mask-image-l-to-pos":[{"mask-l-to":_e()}],"mask-image-l-from-color":[{"mask-l-from":ce()}],"mask-image-l-to-color":[{"mask-l-to":ce()}],"mask-image-x-from-pos":[{"mask-x-from":_e()}],"mask-image-x-to-pos":[{"mask-x-to":_e()}],"mask-image-x-from-color":[{"mask-x-from":ce()}],"mask-image-x-to-color":[{"mask-x-to":ce()}],"mask-image-y-from-pos":[{"mask-y-from":_e()}],"mask-image-y-to-pos":[{"mask-y-to":_e()}],"mask-image-y-from-color":[{"mask-y-from":ce()}],"mask-image-y-to-color":[{"mask-y-to":ce()}],"mask-image-radial":[{"mask-radial":[BF,FF]}],"mask-image-radial-from-pos":[{"mask-radial-from":_e()}],"mask-image-radial-to-pos":[{"mask-radial-to":_e()}],"mask-image-radial-from-color":[{"mask-radial-from":ce()}],"mask-image-radial-to-color":[{"mask-radial-to":ce()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[kF]}],"mask-image-conic-from-pos":[{"mask-conic-from":_e()}],"mask-image-conic-to-pos":[{"mask-conic-to":_e()}],"mask-image-conic-from-color":[{"mask-conic-from":ce()}],"mask-image-conic-to-color":[{"mask-conic-to":ce()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,BF,FF]}],filter:[{filter:[``,`none`,BF,FF]}],blur:[{blur:ve()}],brightness:[{brightness:[kF,BF,FF]}],contrast:[{contrast:[kF,BF,FF]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,UF,zF]}],"drop-shadow-color":[{"drop-shadow":ce()}],grayscale:[{grayscale:[``,kF,BF,FF]}],"hue-rotate":[{"hue-rotate":[kF,BF,FF]}],invert:[{invert:[``,kF,BF,FF]}],saturate:[{saturate:[kF,BF,FF]}],sepia:[{sepia:[``,kF,BF,FF]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,BF,FF]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[kF,BF,FF]}],"backdrop-contrast":[{"backdrop-contrast":[kF,BF,FF]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,kF,BF,FF]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kF,BF,FF]}],"backdrop-invert":[{"backdrop-invert":[``,kF,BF,FF]}],"backdrop-opacity":[{"backdrop-opacity":[kF,BF,FF]}],"backdrop-saturate":[{"backdrop-saturate":[kF,BF,FF]}],"backdrop-sepia":[{"backdrop-sepia":[``,kF,BF,FF]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,BF,FF]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[kF,`initial`,BF,FF]}],ease:[{ease:[`linear`,`initial`,_,BF,FF]}],delay:[{delay:[kF,BF,FF]}],animate:[{animate:[`none`,v,BF,FF]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,BF,FF]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":[`scale-3d`],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[BF,FF,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":[`translate-none`],zoom:[{zoom:[AF,BF,FF]}],accent:[{accent:ce()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:ce()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],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
339-in`,`zoom-out`,BF,FF]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":ce()}],"scrollbar-track-color":[{"scrollbar-track":ce()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`]}
339],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`,BF,FF]}],fill:[{fill:[`none`,...ce()]}],"stroke-w":[{stroke:[kF,VF,IF,LF]}],stroke:[{stroke:[`none`,...ce()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`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-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`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`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),Ure=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gre={};function $F(e,t){return((t||Gre).jsx?Wre:Ure).test(e)}var Kre=/[ \t\n\f\r]/g;function eI(e){return typeof e==`object`?e.type===`text`&&tI(e.value):tI(e)}function tI(e){return e.replace(Kre,``)===``}var qre=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` 340`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Jre=n((e=>
vendor: 3,292 bytes, line 340
340{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(qre());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Yre=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Xre=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Jre()),r=Yre();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}));function nI(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?iI(e.position):`start`in e||`end`in e?iI(e):`line`in e||`column`in e?rI(e):``}function rI(e){return aI(e&&e.line)+`:`+aI(e&&e.column)}function iI(e){return rI(e&&e.start)+`-`+rI(e&&e.end)}function aI(e){return e&&typeof e==`number`?e:1}var oI=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=nI(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};oI.prototype.file=``,oI.prototype.name=``,oI.prototype.reason=``,oI.prototype.message=``,oI.prototype.stack=``,oI.prototype.column=void 0,oI.prototype.line=void 0,oI.prototype.ancestors=void 0,oI.prototype.cause=void 0,oI.prototype.fatal=void 0,oI.prototype.place=void 0,oI.prototype.ruleId=void 0,oI.prototype.source=void 0;var Zre=t(Xre(),1),sI={}.hasOwnProperty,Qre=new Map,$re=/[A-Z]/g,eie=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),tie=new Set([`td`,`th`]),cI=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function lI(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=lie(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");
vendor: 21,087 bytes, lines 340-342
340if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=cie(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?zg:Rg,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=uI(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function uI(e,t,n){if(t.type===`element`)return nie(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return rie(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return aie(e,t,n);if(t.type===`mdxjsEsm`)return iie(e,t);if(t.type===`root`)return oie(e,t,n);if(t.type===`text`)return sie(e,t)}function nie(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=zg,e.schema=i),e.ancestors.push(t);let a=mI(e,t.tagName,!1),o=uie(e,t),s=pI(e,t);return eie.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!eI(e)})),dI(e,o,a,t),fI(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function rie(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}hI(e,t.position)}function iie(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hI(e,t.position)}function aie(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=zg,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:mI(e,t.name,!0),o=die(e,t),s=pI(e,t);return dI(e,o,a,t),fI(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function oie(e,t,n){let r={};return fI(r,pI(e,t)),e.create(t,e.Fragment,r,n)}function sie(e,t){return t.value}function dI(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fI(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function cie(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function lie(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=vO(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function uie(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&sI.call(t.properties,i)){let a=fie(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&tie.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function die(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else hI(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else hI(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function pI(e,t){let n=[],r=-1,i=e.passKeys?new Map:Qre;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=uI(e,a,o);s!==void 0&&n.push(s)}return n}function fie(e,t,n){let r=Fg(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Vg(n):Gg(n)),r.property===`style`){let t=typeof n==`object`?n:pie(e,String(n));return e.stylePropertyNameCase===`css`&&(t=mie(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?jg[r.property]||r.property:r.attribute,n]}}function pie(e,t){try{return(0,Zre.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new oI("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=cI+`#cannot-parse-style-attribute`,r}}function mI(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=$F(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=$F(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return sI.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);hI(e)}function hI(e,t){let n=new oI("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=cI+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function mie(e){let t={},n;for(n in e)sI.call(e,n)&&(t[hie(n)]=e[n]);return t}function hie(e){let t=e.replace($re,gie);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function gie(e){return`-`+e.toLowerCase()}var _ie={tokenize:vie};function vie(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),CN(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return _k(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var yie={tokenize:bie},gI={tokenize:xie};function bie(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return mA(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gI,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(gI,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return _k(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;mA(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function xie(e,t,n){return CN(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var Sie={tokenize:Cie};function Cie(e){let t=this,n=e.attempt(wN,r,e.attempt(this.parser.constructs.flowInitial,i,CN(e,e.attempt(this.parser.constructs.flow,i,e.attempt(XN,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var wie={resolveAll:vI()},Tie=_I(`string`),Eie=_I(`text`);function _I(e){return{resolveAll:vI(e===`text`?Die:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function vI(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Die(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Oie=e({attentionMarkers:()=>Iie,contentInitial:()=>Aie,disable:()=>Lie,document:()=>kie,flow:()=>Mie,flowInitial:()=>jie,insideSpan:()=>Fie,string:()=>Nie,text:()=>Pie}),kie={42:UP,43:UP,45:UP,48:UP,49:UP,50:UP,51:UP,52:UP,53:UP,54:UP,55:UP,56:UP,57:UP,62:EN},Aie={91:aP},jie={[-2]:RN,[-1]:RN,32:RN},Mie={35:dP,42:VP,45:[ZP,VP],60:gP,61:ZP,95:VP,96:FN,126:FN},Nie={38:MN,92:AN},Pie={[-5]:zP,[-4]:zP,[-3]:zP,33:FP,38:MN,42:_N,60:[xN,CP],91:LP,92:[lP,AN],93:TP,95:_N,96:HN},Fie={null:[_N,wie]},Iie={null:[42,95]},Lie={null:[]};function Rie(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=hA(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=gA(a,l.events,l),l.events):[]}function f(e,t){return Bie(p(e),t)}function p(e){return zie(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){_k(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&mA(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function zie(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Bie(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=` 341`;break;case-3:o=`\r 342`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function yI(e){let t={constructs:UM([Oie,...(e||{}).extensions||[]]),content:n(_ie),defined:[],document:n(yie),flow:n(Sie),lazy:{},string:n(Tie),text:n(Eie)};return t;function n(e){return n;function n(n){return Rie(t,e,n)}}}function bI(e){for(;!JN(e););return e}var xI=/[\0\t\n\r]/g;function SI(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(xI.lastIndex=u,c=xI.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var CI={}.hasOwnProperty;function wI(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),TI(n)(bI(yI(n).document().write(SI()(e,t,!0))))}function TI(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(De),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(Ce),blockQuote:a(ve),characterEscape:T,characterReference:T,codeFenced:a(ye),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ye,o),codeText:a(be,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(xe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Se),hardBreakEscape:a(we),hardBreakTrailing:a(we),htmlFlow:a(Te,o),htmlFlowData:T,htmlText:a(Te,o),htmlTextData:T,image:a(Ee),label:o,link:a(De),listItem:a(ke),listItemValue:f,listOrdered:a(Oe,d),listUnordered:a(Oe),paragraph:a(Ae),reference:de,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ce),strong:a(je),thematicBreak:a(Ne)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:_e,autolinkProtocol:ge,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:me,characterReference:he,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(ae),label:se,labelText:oe,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:fe,resourceDestinationString:ce,resourceTitleString:le,resource:ue,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};DI(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];CI.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||kI).call(a,void 0,e[0])}for(r.position={start:EI(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:EI(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:EI(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||kI).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+nI({start:e.start,end:e.end})+`): itâs not open`);n.position.end=EI(e.end)}function u(){return Rj(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=qA(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Me(),n.position={start:EI(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=EI(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=EI(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.t
vendor: 4,765 bytes, lines 342-344
342ype)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function oe(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=wM(t),n.identifier=qA(t).toLowerCase()}function se(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function le(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ue(){this.data.inReference=void 0}function de(){this.data.referenceType=`collapsed`}function fe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=qA(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function pe(e){this.data.characterReferenceType=e.type}function me(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=SM(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=xM(t);let i=this.stack[this.stack.length-1];i.value+=r}function he(e){let t=this.stack.pop();t.position.end=EI(e.end)}function ge(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function _e(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ve(){return{type:`blockquote`,children:[]}}function ye(){return{type:`code`,lang:null,meta:null,value:``}}function be(){return{type:`inlineCode`,value:``}}function xe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function Se(){return{type:`emphasis`,children:[]}}function Ce(){return{type:`heading`,depth:0,children:[]}}function we(){return{type:`break`}}function Te(){return{type:`html`,value:``}}function Ee(){return{type:`image`,title:null,url:``,alt:null}}function De(){return{type:`link`,title:null,url:``,children:[]}}function Oe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ke(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ae(){return{type:`paragraph`,children:[]}}function je(){return{type:`strong`,children:[]}}function Me(){return{type:`text`,value:``}}function Ne(){return{type:`thematicBreak`}}}function EI(e){return{line:e.line,column:e.column,offset:e.offset}}function DI(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?DI(e,r):OI(e,r)}}function OI(e,t){let n;for(n in t)if(CI.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function kI(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+nI({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+nI({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+nI({start:t.start,end:t.end})+`) is still open`)}function AI(e){let t=this;t.parser=n;function n(n){return wI(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function jI(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function MI(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:` 343`}]}function NI(e,t){let n=t.value?t.value+` 344`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};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 PI(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FI(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}
vendor: 4,652 bytes, lines 344-346
344function II(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=gN(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function LI(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RI(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function zI(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function BI(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zI(e,t);let i={src:gN(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function VI(e,t){let n={src:gN(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function HI(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function UI(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zI(e,t);let i={href:gN(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function WI(e,t){let n={href:gN(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function GI(e,t,n){let r=e.all(t),i=n?KI(n):qI(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:` 345`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:` 346`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function KI(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=qI(n[r])}return t}function qI(e){return e.spread??e.children.length>1}function JI(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function YI(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XI(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ZI(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QI(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=vO(t.children[1]),o=_O(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{}
vendor: 6,819 bytes, lines 346-352
346,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function $I(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function eL(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var tL=9,nL=32;function rL(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(iL(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(iL(t.slice(i),i>0,!1)),a.join(``)}function iL(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===tL||t===nL;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===tL||t===nL;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function aL(e,t){let n={type:`text`,value:rL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function oL(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var sL={blockquote:jI,break:MI,code:NI,delete:PI,emphasis:FI,footnoteReference:II,heading:LI,html:RI,imageReference:BI,image:VI,inlineCode:HI,linkReference:UI,link:WI,listItem:GI,list:JI,paragraph:YI,root:XI,strong:ZI,table:QI,tableCell:eL,tableRow:$I,text:aL,thematicBreak:oL,toml:cL,yaml:cL,definition:cL,footnoteDefinition:cL};function cL(){}function lL(e,t){let n=[{type:`text`,value:`â©`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function uL(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function dL(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||lL,r=e.options.footnoteBackLabel||uL,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=gN(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...$C(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` 347`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` 348`}]}}var fL={}.hasOwnProperty,pL={};function mL(e,t){let n=t||pL,r=new Map,i=new Map,a={all:s,applyData:gL,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...sL,...n.handlers},one:o,options:n,patch:hL,wrap:vL};return qh(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(fL.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=$C(n);return r.children=a.all(e),r}return $C(e)}return(a.options.unknownHandler||_L)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=yL(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=yL(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function hL(e,t){e.position&&(t.position=bO(e))}function gL(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,$C(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function _L(e,t){let n=t.data||{},r=`value`in t&&!(fL.call(n,`hProperties`)||fL.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function vL(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:` 349`});++r<e.length;)r&&n.push({type:`text`,value:` 350`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:` 351`}),n}function yL(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bL(e,t){let n=mL(e,t),r=n.one(e,void 0),i=dL(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` 352`},i)),a}function xL(e,t){return e&&`run`in e?async function(n,r){let i=bL(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bL(n,{file:r,...e||t})}}function SL(e){if(e)throw e}var CL=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{}
vendor: 11,292 bytes, line 352
352,c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function wL(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function TL(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?EL(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function EL(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var DL={basename:OL,dirname:kL,extname:AL,join:jL,sep:`/`};function OL(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);PL(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function kL(e){if(PL(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function AL(e){PL(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function jL(...e){let t=-1,n;for(;++t<e.length;)PL(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:ML(n)}function ML(e){PL(e);let t=e.codePointAt(0)===47,n=NL(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function NL(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function PL(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var FL={cwd:IL};function IL(){return`/`}function LL(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function RL(e){if(typeof e==`string`)e=new URL(e);else if(!LL(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return zL(e)}function zL(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var BL=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],VL=class{constructor(e){let t;t=e?LL(e)?{path:e}:typeof e==`string`||GL(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:FL.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<BL.length;){let e=BL[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)BL.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?DL.basename(this.path):void 0}set basename(e){UL(e,`basename`),HL(e,`basename`),this.path=DL.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?DL.dirname(this.path):void 0}set dirname(e){WL(this.basename,`dirname`),this.path=DL.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?DL.extname(this.path):void 0}set extname(e){if(HL(e,`extname`),WL(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=DL.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){LL(e)&&(e=RL(e)),UL(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?DL.basename(this.path,this.extname):void 0}set stem(e){UL(e,`stem`),HL(e,`stem`),this.path=DL.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new oI(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function HL(e,t){if(e&&e.includes(DL.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+DL.sep+"`")}function UL(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function WL(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function GL(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var KL=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),qL=t(CL(),1),JL={}.hasOwnProperty,YL=new class e extends KL{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=TL()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,qL.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(QL(`data`,this.frozen),this.namespace[e]=t,this):JL.call(this.namespace,e)&&this.namespace[e]||void 0:e?(QL(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=tR(e),n=this.parser||this.Parser;return XL(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),XL(`process`,this.parser||this.Parser),ZL(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=tR(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);rR(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),XL(`processSync`,this.parser||this.Parser),ZL(`processSync`,this.compiler||this.Compiler),this.process(e,r),eR(`processSync`,`process`,t),n;function r(e,r){t=!0,SL(e),n=r}}run(e,t,n){$L(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=tR(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),eR(`runSync`,`run`,n),r;function i(e,t){SL(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=tR(t),r=this.compiler||this.Compiler;return ZL(`stringify`,r),$L(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(QL(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,qL.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];wL(o)&&wL(r)&&(r=(0,qL.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function XL(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function ZL(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function QL(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $L(e){if(!wL(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function eR(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function tR(e){return nR(e)?e:new VL(e)}function nR(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function rR(e){return typeof e==`string`||iR(e)}function iR(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function aR(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var oR=aR();function sR(e){oR=e}var cR={exec:()=>null};function lR(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(dR.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var uR=(()=>{try{return!0}catch{return!1}})(),dR={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,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine
vendor: 7,856 bytes, lines 352-353
352:/\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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},fR=/^(?:[ \t]*(?:\n|$))+/,pR=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,mR=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hR=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,gR=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_R=/(?:[*+-]|\d{1,9}[.)])/,vR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,yR=lR(vR).replace(/bull/g,_R).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(),bR=lR(vR).replace(/bull/g,_R).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(),xR=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,SR=/^[^\n]+/,CR=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,wR=lR(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,CR).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),TR=lR(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_R).getRegex(),ER=`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`,DR=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,OR=lR(`^ {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|/?>)[\\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`,DR).replace(`tag`,ER).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),kR=lR(xR).replace(`hr`,hR).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[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ER).getRegex(),AR={blockquote:lR(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,kR).getRegex(),code:pR,def:wR,fences:mR,heading:gR,hr:hR,html:OR,lheading:yR,list:TR,newline:fR,paragraph:kR,table:cR,text:SR},jR=lR(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,hR).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[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ER).getRegex(),MR={...AR,lheading:bR,table:jR,paragraph:lR(xR).replace(`hr`,hR).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,jR).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,ER).getRegex()},NR={...AR,html:lR(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,DR).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:cR,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:lR(xR).replace(`hr`,hR).replace(`heading`,` *#{1,6} *[^ 353]`).replace(`lheading`,yR).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},PR=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,FR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,IR=/^( {2,}|\\)\n(?!\s*$)/,LR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,RR=/[\p{P}\p{S}]/u,zR=/[\s\p{P}\p{S}]/u,BR=/[^\s\p{P}\p{S}]/u,VR=lR(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,zR).getRegex(),HR=/(?!~)[\p{P}\p{S}]/u,UR=/(?!~)[\s\p{P}\p{S}]/u,WR=/(?:[^\s\p{P}\p{S}]|~)/u,GR=lR(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,uR?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),KR=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,qR=lR(KR,`u`).replace(/punct/g,RR).getRegex(),JR=lR(KR,`u`).replace(/punct/g,HR).getRegex(),YR=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,XR=lR(YR,`gu`).replace(/notPunctSpace/g,BR).replace(/punctSpace/g,zR).replace(/punct/g,RR).getRegex(),ZR=lR(YR,`gu`).replace(/notPunctSpace/g,WR).replace(/punctSpace/g,UR).replace(/punct/g,HR).getRegex(),QR=lR(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,BR).replace(/punctSpace/g,zR).replace(/punct/g,RR).getRegex(),$R=lR(/\\(punct)/,`gu`).replace(/punct/g,RR).getRegex(),ez=lR(/^<(scheme:[^\s\x00-\x1f<>]*|email)>
353/).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(),tz=lR(DR).replace(`(?:-->|$)`,`-->`).getRegex(),nz=lR(`^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`,tz).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rz=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,iz=lR(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,rz).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),az=lR(/^!?\[(label)\]\[(ref)\]/).replace(`label`,rz).replace(`ref`,CR).getRegex(),oz=lR(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,CR).getRegex(),sz=lR(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,az).replace(`nolink`,oz).getRegex(),cz=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,lz={_backpedal:cR,anyPunctuation:$R,autolink:ez,blockSkip:GR,br:IR,code:FR,del:cR,emStrongLDelim:qR,emStrongRDelimAst:XR,emStrongRDelimUnd:QR,escape:PR,link:iz,nolink:oz,punctuation:VR,reflink:az,reflinkSearch:sz,tag:nz,text:LR,url:cR},uz={...lz,link:lR(/^!?\[(label)\]\((.*?)\)/).replace(`label`,rz).getRegex(),reflink:lR(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,rz).getRegex()},dz={...lz,emStrongRDelimAst:ZR,emStrongLDelim:JR,url:lR(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,cz).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:lR(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,cz).getRegex()},fz={...dz,br:lR(IR).replace(`{2,}`,`*`).getRegex(),text:lR(dz.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},pz={normal:AR,gfm:MR,pedantic:NR},mz={normal:lz,gfm:dz,breaks:fz,pedantic:uz},hz={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},gz=e=>hz[e];function _z(e,t){if(t){if(dR.escapeTest.test(e))return e.replace(dR.escapeReplace,gz)}else if(dR.escapeTestNoEncode.test(e))return e.replace(dR.escapeReplaceNoEncode,gz);return e}function vz(e){try{e=encodeURI(e).replace(dR.percentDecode,`%`)}catch{return null}return e}function yz(e,t){let n=e.replace(dR.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(dR.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(dR.slashPipe,`|`);return n}function bz(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function xz(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Sz(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Cz(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` 354`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` 355`)}var wz=class{options;rules;lexer;constructor(e){this.options=e||oR}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 e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:bz(e,` 356`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Cz(e,t[3]||``,this.rules);return{type:`code`,raw:e,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 e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=bz(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:bz(t[0],` 357`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=bz(t[0],` 358`).split(` 359`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(` 360`),c=s.replace(this.rules.other.blockquoteSetextReplace,` 361 $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n} 362${s}`:s,r=r?`${r} 363${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;
vendor: 20,105 bytes, lines 363-410
363if(u?.type===`blockquote`){let t=u,a=t.raw+` 364`+e.join(` 365`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if(u?.type===`list`){let t=u,a=t.raw+` 366`+e.join(` 367`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(` 368`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(` 369`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(` 370`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+` 371`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(` 372`,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=` 373`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=` 374`+l}!u&&!l.trim()&&(u=!0),r+=f+` 375`,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}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 e=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`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=yz(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(` 376`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(yz(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));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 e=t[1].charAt(t[1].length-1)===` 377`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}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 e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=bz(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=xz(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Sz(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Sz(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Tz=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||oR,this.options.tokenizer=this.options.tokenizer||new wz,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 t={other:dR,block:pz.normal,inline:mz.normal};this.options.pedantic?(t.block=pz.pedantic,t.inline=mz.pedantic):this.options.gfm&&(t.block=pz.gfm,t.inline=this.options.breaks?mz.breaks:mz.gfm),this.tokenizer.rules=t}static get rules(){return{block:pz,inline:mz}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(dR.carriageReturn,` 378`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(dR.tabCharGlobal,` `).replace(dR.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=` 379`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` 380`)?``:` 381`)+r.raw,n.text+=` 382`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` 383`)?``:` 384`)+r.raw,n.text+=` 385`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(` 386`)?``:` 387`)+r.raw,a.text+=` 388`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(` 389`)?``:` 390`)+r.raw,n.text+=` 391`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},Ez=class{options;parser;constructor(e){this.options=e||oR}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(dR.notSpaceStart)?.[0],i=e.replace(dR.endingNewline,``)+` 392`;return r?`<pre><code class="language-`+_z(r)+`">`+(n?i:_z(i,!0))+`</code></pre> 393`:`<pre><code>`+(n?i:_z(i,!0))+`</code></pre> 394`}blockquote({tokens:e}){return`<blockquote> 395${this.parser.parse(e)}</blockquote> 396`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}> 397`}hr(e){return`<hr> 398`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`> 399`+r+`</`+i+`> 400`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+_z(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li> 401`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox">`}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p> 402`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table> 403<thead> 404`+t+`</thead> 405`+r+`</table> 406`}tablerow({text:e}){return`<tr> 407${e}</tr> 408`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}> 409`}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>${_z(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=vz(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+_z(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=vz(e);if(i===null)return _z(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${_z(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:_z(e.text)}},Dz=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},Oz=class e{options;renderer;textRenderer;constructor(e){this.options=e||oR,this.options.renderer=this.options.renderer||new Ez,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Dz}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(t!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){n+=t||``;continue}}let a=i;switch(a.type){case`space`:n+=this.renderer.space(a);continue;case`hr`:n+=this.renderer.hr(a);continue;case`heading`:n+=this.renderer.heading(a);continue;case`code`:n+=this.renderer.code(a);continue;case`table`:n+=this.renderer.table(a);continue;case`blockquote`:n+=this.renderer.blockquote(a);continue;case`list`:n+=this.renderer.list(a);continue;case`html`:n+=this.renderer.html(a);continue;case`def`:n+=this.renderer.def(a);continue;case`paragraph`:n+=this.renderer.paragraph(a);continue;case`text`:{let i=a,o=this.renderer.text(i);for(;r+1<e.length&&e[r+1].type===`text`;)i=e[++r],o+=` 410`+this.renderer.text(i);n+=t?this.renderer.paragraph({type:`paragraph`,raw:o,text:o,tokens:[{type:`text`,raw:o,text:o,escaped:!0}]}):o;continue}default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},kz=class{options;block;constructor(e){this.options=e||oR}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Tz.lex:Tz.lexInline}provideParser(){return this.block?Oz.parse:Oz.parseInline}},Az=new class{defaults=aR();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Oz;Renderer=Ez;TextRenderer=Dz;Lexer=Tz;Tokenizer=wz;Hooks=kz;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;
410for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Ez(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new wz(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new kz;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=kz.passThroughHooks.has(n)?e=>{if(this.defaults.async&&kz.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Tz.lex(e,t??this.defaults)}parser(e,t){return Oz.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(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 t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?Tz.lex:Tz.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?Oz.parse:Oz.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?Tz.lex:Tz.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?Oz.parse:Oz.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` 411Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+_z(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function jz(e,t){return Az.parse(e,t)}jz.options=jz.setOptions=function(e){return Az.setOptions(e),jz.defaults=Az.defaults,sR(jz.defaults),jz},jz.getDefaults=aR,jz.defaults=oR,jz.use=function(...e){return Az.use(...e),jz.defaults=Az.defaults,sR(jz.defaults),jz},jz.walkTokens=function(e,t){return Az.walkTokens(e,t)},jz.parseInline=Az.parseInline,jz.Parser=Oz,jz.parser=Oz.parse,jz.Renderer=Ez,jz.TextRenderer=Dz,jz.Lexer=Tz,jz.lexer=Tz.lex,jz.Tokenizer=wz,jz.Hooks=kz,jz.parse=jz,jz.options,jz.setOptions,jz.use,jz.walkTokens,jz.parseInline,Oz.parse,Tz.lex;var Mz=`modulepreload`,Nz=function(e){return`/`+e},Pz={},Fz=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Nz(t,n),t=s(t),t in Pz)return;Pz[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Mz,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n
411)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Iz=(...e)=>Hre(ra(e)),Lz=(e,t,n)=>{let r=typeof t==`string`?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},Rz=(0,c.createContext)({code:``}),zz=()=>(0,c.useContext)(Rz),Bz=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let[s,l]=(0,c.useState)(!1),u=(0,c.useRef)(0),{code:d}=zz(),{isAnimating:f}=(0,c.useContext)(oV),p=a??d,m=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{s||(await navigator.clipboard.writeText(p),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,c.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let h=s?fF:pF;return(0,O.jsx)(`button`,{className:Iz(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-copy-button`,disabled:f,onClick:m,title:`Copy Code`,type:`button`,...o,children:r??(0,O.jsx)(h,{size:14})})},Vz={"1c":`1c`,"1c-query":`1cq`,abap:`abap`,"actionscript-3":`as`,ada:`ada`,adoc:`adoc`,"angular-html":`html`,"angular-ts":`ts`,apache:`conf`,apex:`cls`,apl:`apl`,applescript:`applescript`,ara:`ara`,asciidoc:`adoc`,asm:`asm`,astro:`astro`,awk:`awk`,ballerina:`bal`,bash:`sh`,bat:`bat`,batch:`bat`,be:`be`,beancount:`beancount`,berry:`berry`,bibtex:`bib`,bicep:`bicep`,blade:`blade.php`,bsl:`bsl`,c:`c`,"c#":`cs`,"c++":`cpp`,cadence:`cdc`,cairo:`cairo`,cdc:`cdc`,clarity:`clar`,clj:`clj`,clojure:`clj`,"closure-templates":`soy`,cmake:`cmake`,cmd:`cmd`,cobol:`cob`,codeowners:`CODEOWNERS`,codeql:`ql`,coffee:`coffee`,coffeescript:`coffee`,"common-lisp":`lisp`,console:`sh`,coq:`v`,cpp:`cpp`,cql:`cql`,crystal:`cr`,cs:`cs`,csharp:`cs`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cql`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,docker:`dockerfile`,dockerfile:`dockerfile`,dotenv:`env`,"dream-maker":`dm`,edge:`edge`,elisp:`el`,elixir:`ex`,elm:`elm`,"emacs-lisp":`el`,erb:`erb`,erl:`erl`,erlang:`erl`,f:`f`,"f#":`fs`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`f90`,f95:`f95`,fennel:`fnl`,fish:`fish`,fluent:`ftl`,for:`for`,"fortran-fixed-form":`f`,"fortran-free-form":`f90`,fs:`fs`,fsharp:`fs`,fsl:`fsl`,ftl:`ftl`,gdresource:`tres`,gdscript:`gd`,gdshader:`gdshader`,genie:`gs`,gherkin:`feature`,"git-commit":`gitcommit`,"git-rebase":`gitrebase`,gjs:`js`,gleam:`gleam`,"glimmer-js":`js`,"glimmer-ts":`ts`,glsl:`glsl`,gnuplot:`plt`,go:`go`,gql:`gql`,graphql:`graphql`,groovy:`groovy`,gts:`gts`,hack:`hack`,haml:`haml`,handlebars:`hbs`,haskell:`hs`,haxe:`hx`,hbs:`hbs`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,hs:`hs`,html:`html`,"html-derivative":`html`,http:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,jade:`jade`,java:`java`,javascript:`js`,jinja:`jinja`,jison:`jison`,jl:`jl`,js:`js`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,julia:`jl`,kotlin:`kt`,kql:`kql`,kt:`kt`,kts:`kts`,kusto:`kql`,latex:`tex`,lean:`lean`,lean4:`lean`,less:`less`,liquid:`liquid`,lisp:`lisp`,lit:`lit`,llvm:`ll`,log:`log`,logo:`logo`,lua:`lua`,luau:`luau`,make:`mak`,makefile:`mak`,markdown:`md`,marko:`marko`,matlab:`m`,md:`md`,mdc:`mdc`,mdx:`mdx`,mediawiki:`wiki`,mermaid:`mmd`,mips:`s`,mipsasm:`s`,mmd:`mmd`,mojo:`mojo`,move:`move`,nar:`nar`,narrat:`narrat`,nextflow:`nf`,nf:`nf`,nginx:`conf`,nim:`nim`,nix:`nix`,nu:`nu`,nushell:`nu`,objc:`m`,"objective-c":`m`,"objective-cpp":`mm`,ocaml:`ml`,pascal:`pas`,perl:`pl`,perl6:`p6`,php:`php`,plsql:`pls`,po:`po`,polar:`polar`,postcss:`pcss`,pot:`pot`,potx:`potx`,powerquery:`pq`,powershell:`ps1`,prisma:`prisma`,prolog:`pl`,properties:`properties`,proto:`proto`,protobuf:`proto`,ps:`ps`,ps1:`ps1`,pug:`pug`,puppet:`pp`,purescript:`purs`,py:`py`,python:`py`,ql:`ql`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,racket:`rkt`,raku:`raku`,razor:`cshtml`,rb:`rb`,reg:`reg`,regex:`regex`,regexp:`regexp`,rel:`rel`,riscv:`s`,rs:`rs`,rst:`rst`,ruby:`rb`,rust:`rs`,sas:`sas`,sass:`sass`,scala:`scala`,scheme:`scm`,scss:`scss`,sdbl:`sdbl`,sh:`sh`,shader:`shader`,shaderlab:`shader`,shell:`sh`,shellscript:`sh`,shellsession:`sh`,smalltalk:`st`,
411solidity:`sol`,soy:`soy`,sparql:`rq`,spl:`spl`,splunk:`spl`,sql:`sql`,"ssh-config":`config`,stata:`do`,styl:`styl`,stylus:`styl`,svelte:`svelte`,swift:`swift`,"system-verilog":`sv`,systemd:`service`,talon:`talon`,talonscript:`talon`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,terraform:`tf`,tex:`tex`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`ts`,"ts-tags":`ts`,tsp:`tsp`,tsv:`tsv`,tsx:`tsx`,turtle:`ttl`,twig:`twig`,typ:`typ`,typescript:`ts`,typespec:`tsp`,typst:`typ`,v:`v`,vala:`vala`,vb:`vb`,verilog:`v`,vhdl:`vhdl`,vim:`vim`,viml:`vim`,vimscript:`vim`,vue:`vue`,"vue-html":`html`,"vue-vine":`vine`,vy:`vy`,vyper:`vy`,wasm:`wasm`,wenyan:`wy`,wgsl:`wgsl`,wiki:`wiki`,wikitext:`wiki`,wit:`wit`,wl:`wl`,wolfram:`wl`,xml:`xml`,xsl:`xsl`,yaml:`yaml`,yml:`yml`,zenscript:`zs`,zig:`zig`,zsh:`zsh`,æè¨:`wy`},Hz=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let{code:s}=zz(),{isAnimating:l}=(0,c.useContext)(oV),u=a??s,d=`file.${n&&n in Vz?Vz[n]:`txt`}`;return(0,O.jsx)(`button`,{className:Iz(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:()=>{try{Lz(d,u,`text/plain`),e?.()}catch(e){t?.(e)}},title:`Download file`,type:`button`,...o,children:r??(0,O.jsx)(mF,{size:14})})},Uz=()=>(0,O.jsxs)(`div`,{className:`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`,children:[(0,O.jsx)(`div`,{className:`h-[46px] w-full bg-muted/80`}),(0,O.jsx)(`div`,{className:`flex w-full items-center justify-center p-4`,children:(0,O.jsx)(qne,{className:`size-4 animate-spin`})})]}),Wz=/\.[^/.]+$/,Gz=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(Wz,``)}.${i}`}Lz(o,e,e.type)}catch(e){console.error(`Failed to download image:`,e)}};return n?(0,O.jsxs)(`div`,{className:`group relative my-4 inline-block`,"data-streamdown":`image-wrapper`,children:[(0,O.jsx)(`img`,{alt:r,className:Iz(`max-w-full rounded-lg`,t),"data-streamdown":`image`,src:n,...i}),(0,O.jsx)(`div`,{className:`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`}),(0,O.jsx)(`button`,{className:Iz(`absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background`,`opacity-0 group-hover:opacity-100`),onClick:a,title:`Download image`,type:`button`,children:(0,O.jsx)(mF,{size:14})})]}):null},Kz=async e=>{let t={startOnLoad:!1,theme:`default`,securityLevel:`strict`,fontFamily:`monospace`,suppressErrorRendering:!0,...e},n=(await Fz(async()=>{let{default:e}=await import(`./mermaid.core-C86RL-h9.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))).default;return n.initialize(t),n},qz=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),Jz=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[o,s]=(0,c.useState)(!1),l=(0,c.useRef)(null),{isAnimating:u}=(0,c.useContext)(oV),d=async t=>{try{if(t===`mmd`){Lz(`diagram.mmd`,e,`text/plain`),s(!1),r?.(t);return}let n=await Kz(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),c=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(c,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){Lz(`diagram.svg`,l,`image/svg+xml`),s(!1),r?.(t);return}if(t===`png`){Lz(`diagram.png`,await qz(l),`image/png`),r?.(t),s(!1);return}}catch(e){a?.(e)}};return(0,c.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,O.jsxs)(`div`,{className:`relative`,ref:l,children:[(0,O.jsx)(`button`,{className:Iz(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>s(!o),title:`Download diagram`,type:`button`,children:t??(0,O.jsx)(mF,{size:14})}),o&&(0,O.jsxs)(`div`,{className:`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`,children:[(0,O.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>d(`svg`),title:`Download diagram as SVG`,type:`button`,children:`SVG`}),(0,O.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>d(`png`),title:`Download diagram as PNG`,type:`button`,children:`PNG`}),(0,O.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>d(`mmd`),title:`Download diagram as MMD`,type:`button`,children:`MMD`})]})]})},Yz=0,Xz=()=>{Yz+=1,Yz===1&&(document.body.style.overflow=`hidden`)},Zz=()=>{Yz=Math.max(0,Yz-1),Yz===0&&(document.body.style.overflow=``)},Qz=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[o,s]=(0,c.useState)(!1),{isAnimating:l,controls:u}=(0,c.useContext)(oV),d=(()=>
411{if(typeof u==`boolean`)return u;let e=u.mermaid;return e===!1?!1:e===!0||e===void 0||e.panZoom!==!1})(),f=()=>{s(!o)};return(0,c.useEffect)(()=>{if(o){Xz();let e=e=>{e.key===`Escape`&&s(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Zz()}}},[o]),(0,c.useEffect)(()=>{o?n?.():r&&r()},[o,n,r]),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`button`,{className:Iz(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:l,onClick:f,title:`View fullscreen`,type:`button`,...a,children:(0,O.jsx)(Jne,{size:14})}),o&&(0,O.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`,onClick:f,onKeyDown:e=>{e.key===`Escape`&&f()},role:`button`,tabIndex:0,children:[(0,O.jsx)(`button`,{className:`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`,onClick:f,title:`Exit fullscreen`,type:`button`,children:(0,O.jsx)(Xne,{size:20})}),(0,O.jsx)(`div`,{className:`flex h-full w-full items-center justify-center p-4`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,O.jsx)(dV,{chart:e,className:`h-full w-full [&>div]:h-full [&>div]:overflow-hidden [&_svg]:h-auto [&_svg]:w-auto`,config:t,fullscreen:!0,showControls:d})})]})]})},$z=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},eB=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i===`"`){t=!0,n=!0;break}(i===`,`||i===` 412`)&&(t=!0)}return t?n?`"${e.replace(/"/g,`""`)}"`:`"${e}"`:e},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(`,`),o+=1);for(let e of n)a[o]=e.map(r).join(`,`),o+=1;return a.join(` 413`)},tB=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n=0;n<e.length;n+=1){let r=e[n];if(r===` `||r===` 414`||r===`\r`){t=!0;break}}if(!t)return e;let n=[];for(let t=0;t<e.length;t+=1){let r=e[t];r===` `?n.push(`\\t`):r===` 415`?n.push(`\\n`):r===`\r`?n.push(`\\r`):n.push(r)}return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(` 416`)},nB=e=>{let t=!1;for(let n=0;n<e.length;n+=1){let r=e[n];if(r===`\\`||r===`|`){t=!0;break}}if(!t)return e;let n=[];for(let t=0;t<e.length;t+=1){let r=e[t];r===`\\`?n.push(`\\\\`):r===`|`?n.push(`\\|`):n.push(r)}return n.join(``)},rB=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0,a=t.map(e=>nB(e));r[i]=`| ${a.join(` | `)} |`,i+=1;let o=Array(t.length);for(let e=0;e<t.length;e+=1)o[e]=`---`;r[i]=`| ${o.join(` | `)} |`,i+=1;for(let e of n)if(e.length<t.length){let n=Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=r<e.length?nB(e[r]):``;r[i]=`| ${n.join(` | `)} |`,i+=1}else{let t=e.map(e=>nB(e));r[i]=`| ${t.join(` | `)} |`,i+=1}return r.join(` 417`)},iB=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,o]=(0,c.useState)(!1),[s,l]=(0,c.useState)(!1),u=(0,c.useRef)(null),d=(0,c.useRef)(0),{isAnimating:f}=(0,c.useContext)(oV),p=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=$z(t),s=e===`csv`?eB(a):tB(a),c=new ClipboardItem({"text/plain":new Blob([s],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),o(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,c.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let m=s?fF:pF;return(0,O.jsxs)(`div`,{className:`relative`,ref:u,children:[(0,O.jsx)(`button`,{className:Iz(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:f,onClick:()=>o(!a),title:`Copy table`,type:`button`,children:e??(0,O.jsx)(m,{size:14})}),a&&(0,O.jsxs)(`div`,{className:`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`,children:[(0,O.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>p(`csv`),title:`Copy table as CSV`,type:`button`,children:`CSV`}),(0,O.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>p(`tsv`),title:`Copy table as TSV`,type:`button`,children:`TSV`})]})]})},aB=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=(0,c.useState)(!1),o=(0,c.useRef)(null),{isAnimating:s}=(0,c.useContext)(oV),l=e=>{try{let t=(o.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=$z(t),s=e===`csv`?eB(i):rB(i);Lz(`table.${e===`csv`?`csv`:`md`}`,s,e===`csv`?`text/csv`:`text/markdown`),a(!1),n?.(e)}catch(e){r?.(e)}};return(0,c.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&a(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,O.jsxs)(`div`,{className:`relative`,ref:o,children:[(0,O.jsx)(`button`,{className:Iz(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:s,onClick:()=>a(!i),title:`Download table`,type:`button`,children:e??(0,O.jsx)(mF,{size:14})}),i&&(0,O.jsxs)(`div`,{className:`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`,children:[(0,O.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>l(`csv`),title:`Download table as CSV`,type:`button`,children:`CSV`}),(0,O.jsx)(`button`,{className:`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`,onClick:()=>l(`markdown`),title:`Download table as Markdown`,type:`button`,children:`Markdown`})]})]})},oB=({children:e,className:t,showControls:n,...r})=>(0,O.jsxs)(`div`,{className:`my-4 flex flex-col space-y-2`,"data-streamdown":`table-wrapper`,children:[n&&(0,O.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,O.jsx)(iB,{}),(0,O.jsx)(aB,{})]}),(0,O.jsx)(`div`,{className:`overflow-x-auto`,children:(0,O.jsx)(`table`,{className:Iz(`w-full border-collapse border border-border`,t),"data-streamdown":`table`,...r,children:e})})]}),sB=(0,c.lazy)(()=>Fz(()=>import(`./code-block-IT6T5CEO-8GVWVVT4.js`).then(e=>({default:e.CodeBlock})),__vite__mapDeps([20,4]))),cB=(0,c.lazy)(()=>Fz(()=>import(`./mermaid-VLURNSYL-CTiI41WL.js`).then(e=>({default:e.Mermaid})),[])),lB=/language-([^\s]+)/;function uB(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;
417if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function dB(e,t){return e.className===t.className&&uB(e.node,t.node)}var fB=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,pB=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0||n[t]!==!1},mB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`ol`,{className:Iz(`list-inside list-decimal whitespace-normal`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>dB(e,t));mB.displayName=`MarkdownOl`;var hB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`li`,{className:Iz(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&uB(e.node,t.node));hB.displayName=`MarkdownLi`;var gB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`ul`,{className:Iz(`list-inside list-disc whitespace-normal`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>dB(e,t));gB.displayName=`MarkdownUl`;var _B=(0,c.memo)(({className:e,node:t,...n})=>(0,O.jsx)(`hr`,{className:Iz(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>dB(e,t));_B.displayName=`MarkdownHr`;var vB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`span`,{className:Iz(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>dB(e,t));vB.displayName=`MarkdownStrong`;var yB=(0,c.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=n===`streamdown:incomplete-link`;return(0,O.jsx)(`a`,{className:Iz(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":a,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>dB(e,t)&&e.href===t.href);yB.displayName=`MarkdownA`;var bB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`h1`,{className:Iz(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>dB(e,t));bB.displayName=`MarkdownH1`;var xB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`h2`,{className:Iz(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>dB(e,t));xB.displayName=`MarkdownH2`;var SB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`h3`,{className:Iz(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>dB(e,t));SB.displayName=`MarkdownH3`;var CB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`h4`,{className:Iz(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>dB(e,t));CB.displayName=`MarkdownH4`;var wB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`h5`,{className:Iz(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>dB(e,t));wB.displayName=`MarkdownH5`;var TB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`h6`,{className:Iz(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>dB(e,t));TB.displayName=`MarkdownH6`;var EB=(0,c.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,c.useContext)(oV),a=fB(i,`table`);return(0,O.jsx)(oB,{className:t,"data-streamdown":`table-wrapper`,showControls:a,...r,children:e})},(e,t)=>dB(e,t));EB.displayName=`MarkdownTable`;var DB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`thead`,{className:Iz(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>dB(e,t));DB.displayName=`MarkdownThead`;var OB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`tbody`,{className:Iz(`divide-y divide-border bg-muted/40`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>dB(e,t));OB.displayName=`MarkdownTbody`;var kB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`tr`,{className:Iz(`border-border border-b`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>dB(e,t));kB.displayName=`MarkdownTr`;var AB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`th`,{className:Iz(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>dB(e,t));AB.displayName=`MarkdownTh`;var jB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`td`,{className:Iz(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>dB(e,t));jB.displayName=`MarkdownTd`;var MB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`blockquote`,{className:Iz(`my-4 border-muted-foreground
417/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>dB(e,t));MB.displayName=`MarkdownBlockquote`;var NB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`sup`,{className:Iz(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>dB(e,t));NB.displayName=`MarkdownSup`;var PB=(0,c.memo)(({children:e,className:t,node:n,...r})=>(0,O.jsx)(`sub`,{className:Iz(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>dB(e,t));PB.displayName=`MarkdownSub`;var FB=(0,c.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,c.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,c.isValidElement)(e)){if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,c.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,c.isValidElement)(e))return e;if(e.type===mB){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,O.jsx)(`section`,{className:t,...r,children:i}):null}return(0,O.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>dB(e,t));FB.displayName=`MarkdownSection`;var IB=(0,c.memo)(({node:e,className:t,children:n,...r})=>{let i=(e?.position)?.start.line===(e?.position)?.end.line,{mermaid:a,controls:o}=(0,c.useContext)(oV);if(i)return(0,O.jsx)(`code`,{className:Iz(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let s=(t?.match(lB))?.at(1)??``,l=``;if((0,c.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?l=n.props.children:typeof n==`string`&&(l=n),s===`mermaid`){let e=fB(o,`mermaid`),n=pB(o,`download`),r=pB(o,`copy`),i=pB(o,`fullscreen`),s=pB(o,`panZoom`);return(0,O.jsx)(c.Suspense,{fallback:(0,O.jsx)(Uz,{}),children:(0,O.jsxs)(`div`,{className:Iz(`group relative my-4 h-auto rounded-xl border p-4`,t),"data-streamdown":`mermaid-block`,children:[e&&(n||r||i)&&(0,O.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[n&&(0,O.jsx)(Jz,{chart:l,config:a?.config}),r&&(0,O.jsx)(Bz,{code:l}),i&&(0,O.jsx)(Qz,{chart:l,config:a?.config})]}),(0,O.jsx)(cB,{chart:l,config:a?.config,showControls:s})]})})}let u=fB(o,`code`);return(0,O.jsx)(c.Suspense,{fallback:(0,O.jsx)(Uz,{}),children:(0,O.jsx)(sB,{className:Iz(`overflow-x-auto border-border border-t`,t),code:l,language:s,children:u&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Hz,{code:l,language:s}),(0,O.jsx)(Bz,{})]})})})},(e,t)=>e.className===t.className&&uB(e.node,t.node));IB.displayName=`MarkdownCode`;var LB=(0,c.memo)(Gz,(e,t)=>e.className===t.className&&uB(e.node,t.node));LB.displayName=`MarkdownImg`;var RB=(0,c.memo)(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);return i.length===1&&(0,c.isValidElement)(i[0])&&i[0].props.node?.tagName===`img`?(0,O.jsx)(O.Fragment,{children:e}):(0,O.jsx)(`p`,{className:t,...r,children:e})},(e,t)=>dB(e,t));RB.displayName=`MarkdownParagraph`;var zB={ol:mB,li:hB,ul:gB,hr:_B,strong:vB,a:yB,h1:bB,h2:xB,h3:SB,h4:CB,h5:wB,h6:TB,table:EB,thead:DB,tbody:OB,tr:kB,th:AB,td:jB,blockquote:MB,c
417ode:IB,img:LB,pre:({children:e})=>e,sup:NB,sub:PB,p:RB,section:FB},BB=[],VB={allowDangerousHtml:!0},HB=new WeakMap,UB=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n<e.length;n+=1){let r=e[n];if(n>0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=HB.get(e);n||(n=e.name,HB.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=HB.get(r);e||(e=r.name,HB.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},WB=e=>{let t=GB(e),n=e.children||``;return qB(t.runSync(t.parse(n),n),e)},GB=e=>{let t=UB.get(e);if(t)return t;let n=KB(e);return UB.set(e,n),n},KB=e=>{let t=e.rehypePlugins||BB,n=e.remarkPlugins||BB,r=e.remarkRehypeOptions?{...VB,...e.remarkRehypeOptions}:VB;return YL().use(AI).use(n).use(xL,r).use(t)},qB=(e,t)=>lI(e,{Fragment:O.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0}),JB=/\[\^[^\]\s]{1,200}\](?!:)/,YB=/\[\^[^\]\s]{1,200}\]:/,XB=/<\/(\w+)>/,ZB=/<(\w+)[\s>]/,QB=e=>{let t=0;for(;t<e.length&&(e[t]===` `||e[t]===` `||e[t]===` 418`||e[t]===`\r`);)t+=1;return t+1<e.length&&e[t]===`$`&&e[t+1]===`$`},$B=e=>{let t=e.length-1;for(;t>=0&&(e[t]===` `||e[t]===` `||e[t]===` 419`||e[t]===`\r`);)--t;return t>=1&&e[t]===`$`&&e[t-1]===`$`},eV=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]===`$`&&e[n+1]===`$`&&(t+=1,n+=1);return t},tV=e=>{let t=JB.test(e),n=YB.test(e);if(t||n)return[e];let r=Tz.lex(e,{gfm:!0}),i=[],a=[];for(let e of r){let t=e.raw,n=i.length;if(a.length>0){if(i[n-1]+=t,e.type===`html`){let e=t.match(XB);if(e){let t=e[1];a.at(-1)===t&&a.pop()}}continue}if(e.type===`html`&&e.block){let e=t.match(ZB);if(e){let n=e[1];t.includes(`</${n}>`)||a.push(n)}}if(t.trim()===`$$`&&n>0){let e=i[n-1],r=QB(e),a=eV(e);if(r&&a%2==1){i[n-1]=e+t;continue}}if(n>0&&$B(t)){let e=i[n-1],r=QB(e),a=eV(e),o=eV(t);if(r&&a%2==1&&!QB(t)&&o===1){i[n-1]=e+t;continue}}i.push(t)}return i},nV={raw:VO,katex:[KC,{errorColor:`var(--color-muted-foreground)`}],sanitize:[ok,{}],harden:[Yh,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},rV={gfm:[qte,{}],math:[nF,{singleDollarTextMath:!1}],cjkFriendly:[SA,{}],cjkFriendlyGfmStrikethrough:[wA,{}]},iV=Object.values(nV),aV=Object.values(rV),oV=(0,c.createContext)({shikiTheme:[`github-light`,`github-dark`],controls:!0,isAnimating:!1,mode:`streaming`,mermaid:void 0}),sV=(0,c.memo)(({content:e,shouldParseIncompleteMarkdown:t,...n})=>{let r=(0,c.useMemo)(()=>typeof e==`string`&&t?Vne(e.trim()):e,[e,t]);return(0,O.jsx)(WB,{...n,children:r})},(e,t)=>{if(e.content!==t.content||e.shouldParseIncompleteMarkdown!==t.shouldParseIncompleteMarkdown||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return e.rehypePlugins===t.rehypePlugins&&e.remarkPlugins===t.remarkPlugins});sV.displayName=`Block`;var cV=[`github-light`,`github-dark`],lV=(0,c.memo)(({children:e,mode:t=`streaming`,parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=iV,remarkPlugins:a=aV,className:o,shikiTheme:s=cV,mermaid:l,controls:u=!0,isAnimating:d=!1,BlockComponent:f=sV,parseMarkdownIntoBlocksFn:p=tV,...m})=>{let h=(0,c.useId)(),[g,_]=(0,c.useTransition)(),[v,y]=(0,c.useState)([]),b=(0,c.useMemo)(()=>p(typeof e==`string`?e:``),[e,p]);(0,c.useEffect)(()=>{t===`streaming`?_(()=>{y(b)}):y(b)},[b,t]);let x=t===`streaming`?v:b,S=(0,c.useMemo)(()=>x.map((e,t)=>`${h}-${t}`),[x.length,h]),C=(0,c.useMemo)(()=>({shikiTheme:s,controls:u,isAnimating:d,mode:t,mermaid:l}),[s,u,d,t,l]),w=(0,c.useMemo)(()=>({...zB,...r}),[r]);return(0,c.useEffect)(()=>
419{if(!(Array.isArray(i)&&i.some(e=>Array.isArray(e)?e[0]===KC:e===KC)))return;let t=!1;if(Array.isArray(a)){let e=a.find(e=>Array.isArray(e)?e[0]===nF:e===nF);e&&Array.isArray(e)&&e[1]&&(t=e[1].singleDollarTextMath===!0)}let n=typeof e==`string`?e:``,r=n.includes(`$$`),o=t&&(/[^$]\$[^$]/.test(n)||/^\$[^$]/.test(n)||/[^$]\$$/.test(n));(r||o)&&Fz(()=>Promise.resolve({}),__vite__mapDeps([21]))},[i,a,e]),t===`static`?(0,O.jsx)(oV.Provider,{value:C,children:(0,O.jsx)(`div`,{className:Iz(`space-y-4 whitespace-normal`,o),children:(0,O.jsx)(WB,{components:w,rehypePlugins:i,remarkPlugins:a,...m,children:e})})}):(0,O.jsx)(oV.Provider,{value:C,children:(0,O.jsx)(`div`,{className:Iz(`space-y-4 whitespace-normal`,o),children:x.map((e,t)=>(0,O.jsx)(f,{components:w,content:e,index:t,rehypePlugins:i,remarkPlugins:a,shouldParseIncompleteMarkdown:n,...m},S[t]))})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode);lV.displayName=`Streamdown`;var uV=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let l=(0,c.useRef)(null),u=(0,c.useRef)(null),[d,f]=(0,c.useState)(o),[p,m]=(0,c.useState)({x:0,y:0}),[h,g]=(0,c.useState)(!1),[_,v]=(0,c.useState)({x:0,y:0}),[y,b]=(0,c.useState)({x:0,y:0}),x=(0,c.useCallback)(e=>{f(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),S=(0,c.useCallback)(()=>{x(i)},[x,i]),C=(0,c.useCallback)(()=>{x(-i)},[x,i]),w=(0,c.useCallback)(()=>{f(o),m({x:0,y:0})},[o]),T=(0,c.useCallback)(e=>{e.preventDefault();let t=e.deltaY>0?-i:i;x(t)},[x,i]),E=(0,c.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;g(!0),v({x:e.clientX,y:e.clientY}),b(p);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[p]),ee=(0,c.useCallback)(e=>{if(!h)return;e.preventDefault();let t=e.clientX-_.x,n=e.clientY-_.y;m({x:y.x+t,y:y.y+n})},[h,_,y]),D=(0,c.useCallback)(e=>{g(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,c.useEffect)(()=>{let e=l.current;if(e)return e.addEventListener(`wheel`,T,{passive:!1}),()=>{e.removeEventListener(`wheel`,T)}},[T]),(0,c.useEffect)(()=>{let e=u.current;if(e&&h)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,ee,{passive:!1}),e.addEventListener(`pointerup`,D),e.addEventListener(`pointercancel`,D),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,ee),e.removeEventListener(`pointerup`,D),e.removeEventListener(`pointercancel`,D)}},[h,ee,D]),(0,O.jsxs)(`div`,{className:Iz(`relative`,s?`h-full w-full`:`w-full`,t),ref:l,style:{cursor:h?`grabbing`:`grab`},children:[a&&(0,O.jsxs)(`div`,{className:Iz(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,O.jsx)(`button`,{className:`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,disabled:d>=r,onClick:S,title:`Zoom in`,type:`button`,children:(0,O.jsx)(Zne,{size:16})}),(0,O.jsx)(`button`,{className:`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,disabled:d<=n,onClick:C,title:`Zoom out`,type:`button`,children:(0,O.jsx)(Qne,{size:16})}),(0,O.jsx)(`button`,{className:`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:w,title:`Reset zoom and pan`,type:`button`,children:(0,O.jsx)(Yne,{size:16})})]}),(0,O.jsx)(`div`,{className:Iz(`origin-center transition-transform duration-150 ease-out`,s&&`flex w-full items-center justify-center`),onPointerDown:E,ref:u,role:`application`,style:{transform:`translate(${p.x}px, ${p.y}px) scale(${d})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},dV=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,o]=(0,c.useState)(null),[s,l]=(0,c.useState)(!0),[u,d]=(0,c.useState)(``),[f,p]=(0,c.useState)(``),[m,h]=(0,c.useState)(0),{mermaid:g}=(0,c.useContext)(oV),_=g?.errorComponent;if((0,c.useEffect)(()=>{(async()=>{try{o(null),l(!0);let t=await Kz(n),r=e.split(``).reduce((e,t)=>
419(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);d(a),p(a)}catch(e){if(!(f||u)){let t=e instanceof Error?e.message:`Failed to render Mermaid chart`;o(t)}}finally{l(!1)}})()},[e,n,m]),s&&!u&&!f)return(0,O.jsx)(`div`,{className:Iz(`my-4 flex justify-center p-4`,t),children:(0,O.jsxs)(`div`,{className:`flex items-center space-x-2 text-muted-foreground`,children:[(0,O.jsx)(`div`,{className:`h-4 w-4 animate-spin rounded-full border-current border-b-2`}),(0,O.jsx)(`span`,{className:`text-sm`,children:`Loading diagram...`})]})});if(a&&!u&&!f)return _?(0,O.jsx)(_,{chart:e,error:a,retry:()=>h(e=>e+1)}):(0,O.jsxs)(`div`,{className:Iz(`rounded-lg border border-red-200 bg-red-50 p-4`,t),children:[(0,O.jsxs)(`p`,{className:`font-mono text-red-700 text-sm`,children:[`Mermaid Error: `,a]}),(0,O.jsxs)(`details`,{className:`mt-2`,children:[(0,O.jsx)(`summary`,{className:`cursor-pointer text-red-600 text-xs`,children:`Show Code`}),(0,O.jsx)(`pre`,{className:`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`,children:e})]})]});let v=u||f;return(0,O.jsx)(uV,{className:Iz(r?`h-full w-full overflow-hidden`:`my-4 overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,O.jsx)(`div`,{"aria-label":`Mermaid chart`,className:Iz(`flex justify-center`,r&&`h-full w-full items-center`),dangerouslySetInnerHTML:{__html:v},role:`img`})})},fV=/\[P\d+(?:\s*,\s*P\d+)*\]/g,pV=/P\d+/g;function mV(e){if(!e.includes(`[P`))return null;let t=[],n=0,r=!1;fV.lastIndex=0;let i;for(;(i=fV.exec(e))!==null;){r=!0,i.index>n&&t.push({type:`text`,value:e.slice(n,i.index)});for(let e of i[0].match(pV)??[])t.push({type:`citation`,data:{hName:`sup`,hProperties:{title:e}},children:[{type:`text`,value:`[${e}]`}]});n=i.index+i[0].length}return r?(n<e.length&&t.push({type:`text`,value:e.slice(n)}),t):null}function hV(e){let t=e.children;if(!t||t.length===0)return;let n=[],r=!1;for(let e of t)if(e.type===`text`&&typeof e.value==`string`){let t=mV(e.value);if(t){n.push(...t),r=!0;continue}n.push(e)}else hV(e),n.push(e);r&&(e.children=n)}function gV(){return e=>hV(e)}var _V=/#graph(\d+)#/g;function vV(e){if(!e.includes(`#graph`))return null;let t=[],n=0,r=!1;_V.lastIndex=0;let i;for(;(i=_V.exec(e))!==null;)r=!0,i.index>n&&t.push({type:`text`,value:e.slice(n,i.index)}),t.push({type:`graph`,data:{hName:`samp`,hProperties:{title:i[1]}},children:[{type:`text`,value:i[0]}]}),n=i.index+i[0].length;return r?(n<e.length&&t.push({type:`text`,value:e.slice(n)}),t):null}function yV(e){let t=[],n=[],r=()=>{n.some(e=>e.type!==`text`||/\S/.test(e.value??``))&&t.push({type:`paragraph`,children:n}),n=[]};for(let i of e)i.type===`graph`?(r(),t.push(i)):n.push(i);return r(),t}var bV=new Set([`strong`,`emphasis`,`delete`,`link`,`linkReference`]);function xV(e,t){let n=[],r=[],i=()=>{r.some(e=>e.type!==`text`||/\S/.test(e.value??``))&&n.push({...e,children:r}),r=[]};for(let e of t)e.type===`graph`?(i(),n.push(e)):r.push(e);return i(),n}function SV(e){let t=e.children;if(!t||t.length===0)return;let n=[],r=!1;for(let e of t)if(e.type===`text`&&typeof e.value==`string`){let t=vV(e.value);if(t){n.push(...t),r=!0;continue}n.push(e)}else{SV(e);let t=e.children?.some(e=>e.type===`graph`);if(t&&e.type===`paragraph`){n.push(...yV(e.children)),r=!0;continue}if(t&&bV.has(e.type)){n.push(...xV(e,e.children)),r=!0;continue}n.push(e)}r&&(e.children=n)}function CV(){return e=>SV(e)}var wV=[`green`,`red`,`cyan`],TV={green:`dt-green`,red:`dt-red`,cyan:`dt-cyan`};function EV(e){return wV.some(t=>t===e)}function DV(e){return EV(e)?e:`cyan`}var OV=20,kV=/\{([blp]):([-\d.,\s]+)\}(?:=(\w+))?(?![\w=-])/g,AV=/^\{([blp]):([-\d.,\s]+)\}(?:=(\w+))?$/;function jV(e){if(e.length<=OV)return e;let t=(e.length-1)/19;return Array.from({length:OV},(n,r)=>e[Math.round(r*t)])}function MV(e){if(e.every(e=>e>=0&&e<=100))return e;let t=Math.min(...e),n=t<0?e.map(e=>e-t):e,r=Math.max(...n);return r===0?n:n.map(e=>e/r*100)}function NV(e,t){if(e===`p`){let[e]=t;if(e===void 0)return null;let n=Math.round(e);return n<0||n>100?null:[n]}return MV(jV(t)).map(Math.round)}function PV(e){let t=AV.exec(e);if(!t)return null;let[,n,r,i]=t,a=r.split(`,`).map(e=>e.trim()===``?NaN:Number(e.trim()));if(a.length===0||a.some(Number.isNaN)||(n===`p`?a.length!==1:a.length<2))return null;let o=NV(n,a);return o?{type:n,values:o,color:DV(i),body:`{${n}:${o.join(`,`)}}`}:null}function FV({raw:e}){let t=PV(e);return t?(0,O.jsx)(`span`,{className:j(`dt-chart`,TV[t.color]),"aria-hidden":`true`,children:t.body}):(0,O.jsx)(c.Fragment,{children:e})}function IV(e){let t=[],n=0,r=!1;for(let i of e.matchAll(kV))PV(i[0])&&(r=!0,i.index>n&&t.push(e.slice(n,i.index)),t.push((0,O.jsx)(FV,{raw:i[0]},`dt-${i.index}`)),n=i.index+i[0].length);return r?(n<e.length&&t.push(e.slice(n)),t):e}function LV(e){return typeof e==`string`?IV(e):Array.isArray(e)?e.map((e,t)=>typeof e==`string`?(0,O.jsx)(c.Fragment,{children:IV(e)},`dt-part-${t}`):e):e}function RV(e){function t({node:t,children:n,...r}){return(0,c.createElement)(e,r,LV(n))}return t.displayName=`DatatypeText(${e})`,t}var zV={p:RV(`p`),li:RV(`li`),td:RV(`td`),th:RV(`th`),h1:RV(`h1`),h2:RV(`h2`),h3:RV(`h3`),h4:RV(`h4`),h5:RV(`h5`),h6:RV(`h6`),strong:RV(`strong`),em:RV(`em`),del:RV(`del`),blockquote:RV(`blockquote`)},BV=`«`,VV=`»`,HV=/\}=(\w+)(?![\w=-])/;function UV(e){return e.value??e.children?.map(UV).join(``)??``}function WV(e){return{type:`statPill`,data:{hName:`ins`,hProperties:{title:DV(HV.exec(e.map(UV).join(``))?.[1])}},children:e}}function GV(e){let t=[],n=null,r=!1,i=(e,t)=>{t&&e.push({type:`text`,value:t})};for(let a of e){if(a.type!==`text`||typeof a.value!=`string`){(n??t).push(a);continue}let e=a.value;for(;e;)if(n){let a=e.indexOf(VV);if(a===-1){i(n,e);break}i(n,e.slice(0,a)),t.push(WV(n)),n=null,r=!0,e=e.slice(a+1)}else{let r=e.indexOf(BV);if(r===-1){i(t,e);break}i(t,e.slice(0,r)),n=[],e=e.slice(r+1)}}
419return r?(n&&t.push({type:`text`,value:BV},...n),t):null}function KV(e){if(!e.children)return;e.children.forEach(KV);let t=GV(e.children);t&&(e.children=t)}function qV(){return e=>KV(e)}var JV=Object.defineProperty,YV=(e,t)=>JV(e,`name`,{value:t,configurable:!0}),XV,ZV=`HoverCard`,[QV,Vie]=An(ZV,[Uu]),$V=Uu(),[eH,tH]=QV(ZV),nH=YV(e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,l=$V(t),u=c.useRef(0),d=c.useRef(0),f=c.useRef(!1),p=c.useRef(!1),[m,h]=Zr({prop:r,defaultProp:i??!1,onChange:a,caller:ZV}),g=c.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>h(!0),o)},[o,h]),_=c.useCallback(()=>{clearTimeout(u.current),!f.current&&!p.current&&(d.current=window.setTimeout(()=>h(!1),s))},[s,h]),v=c.useCallback(()=>h(!1),[h]);return c.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),(0,O.jsx)(eH,{scope:t,open:m,onOpenChange:h,onOpen:g,onClose:_,onDismiss:v,hasSelectionRef:f,isPointerDownOnContentRef:p,children:(0,O.jsx)(td,{...l,children:n})})},`HoverCard`),rH=`HoverCardTrigger`,iH=c.forwardRef(YV(function(e,t){let{__scopeHoverCard:n,...r}=e,i=tH(rH,n),a=$V(n);return(0,O.jsx)(nd,{asChild:!0,...a,children:(0,O.jsx)(lr.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:k(e.onPointerEnter,lH(i.onOpen)),onPointerLeave:k(e.onPointerLeave,lH(i.onClose)),onFocus:k(e.onFocus,i.onOpen),onBlur:k(e.onBlur,i.onClose),onTouchStart:k(e.onTouchStart,e=>e.preventDefault())})})},`HoverCardTrigger`)),[Hie,aH]=QV(`HoverCardPortal`,{forceMount:void 0}),oH=`HoverCardContent`,sH=c.forwardRef(YV(function(e,t){let n=aH(oH,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=tH(oH,e.__scopeHoverCard);return(0,O.jsx)(Lr,{present:r||a.open,children:(0,O.jsx)(cH,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:k(e.onPointerEnter,lH(a.onOpen)),onPointerLeave:k(e.onPointerLeave,lH(a.onClose)),ref:t})})},`HoverCardContent`)),cH=c.forwardRef(YV(function(e,t){let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,l=tH(oH,n),u=$V(n),d=c.useRef(null),f=En(t,d),[p,m]=c.useState(!1);return c.useEffect(()=>{if(p){let e=document.body;return XV=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=XV,e.style.webkitUserSelect=XV}}},[p]),c.useEffect(()=>{if(d.current){let e=YV(()=>{m(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(l.hasSelectionRef.current=!0)})},`handlePointerUp`);return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),c.useEffect(()=>{d.current&&uH(d.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,O.jsx)(xr,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:k(a,e=>{e.preventDefault()}),onDismiss:l.onDismiss,children:(0,O.jsx)(rd,{...u,...s,onPointerDown:k(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&m(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:f,style:{...s.style,userSelect:p?`text`:void 0,WebkitUserSelect:p?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})},`HoverCardContentImpl`));function lH(e){return t=>t.pointerType===`touch`?void 0:e()}YV(lH,`excludeTouch`);function uH(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:YV(e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}YV(uH,`getTabbableNodes`);
419var dH=nH,fH=iH,pH=sH,mH=dH,hH=fH,gH=c.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,O.jsx)(pH,{ref:i,align:t,sideOffset:n,className:j(`z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]`,e),...r}));gH.displayName=pH.displayName;var _H={core:`Maslow Insights`,notebook:`User Documents`};function vH(e){return e?e.replace(/^Maslow Core Insights \/ Industry\s*·\s*/,``).replace(/^Maslow core insights\s*·\s*/,``):``}function yH(e){return!!e&&e!==e.toUpperCase()&&e===e.toLowerCase()}var bH=new Set([`,`,`:`,`;`]);function xH(e){if(!e)return``;let t=e.replace(/\s+/g,` `).trim();if(!t||(t.length>=2&&yH(t[0])&&t[1]===` `&&(t=t.slice(2)),t.length>=2&&t[t.length-2]===` `&&yH(t[t.length-1])&&(t=t.slice(0,-2)),!t))return``;yH(t[0])&&(t=`...${t}`);let n=t[t.length-1];return yH(n)?t=`${t}...`:bH.has(n)&&(t=`${t} ...`),t}function SH(e,t){let n=new Map;for(let t of e)n.set(t.id,t);let r=new Map,i=new Map;return t.forEach((e,t)=>{e.id&&(i.set(e.id,e),r.set(e.id,t+1))}),{passageById:n,sourceNumberById:r,sourceById:i}}var CH=(0,c.createContext)({passageById:new Map,sourceNumberById:new Map,sourceById:new Map});function wH(){return(0,c.useContext)(CH)}function TH({passages:e,sources:t,children:n}){let r=(0,c.useMemo)(()=>SH(e,t),[e,t]);return(0,O.jsx)(CH.Provider,{value:r,children:n})}var EH=/^P(\d+)$/;function DH(e){let t=EH.exec(e);return t?Number(t[1]):void 0}function OH(e){let t=e.title,{passageById:n,sourceNumberById:r,sourceById:i}=wH();if(!t||!EH.test(t))return(0,O.jsx)(`sup`,{className:e.className,children:e.children});let a=n.get(t),o=a?.sourceId,s=o?i.get(o):void 0,c=(o?r.get(o):void 0)??DH(t);if(!a&&c==null)return(0,O.jsx)(O.Fragment,{children:e.children});let l=s?.scope??a?.pool,u=l?_H[l]:void 0,d=s?.name?vH(s.name):void 0,f=xH(a?.text);return!d&&!u&&!f?(0,O.jsx)(`sup`,{className:e.className,children:c??e.children}):(0,O.jsxs)(mH,{openDelay:120,closeDelay:80,children:[(0,O.jsx)(hH,{asChild:!0,children:(0,O.jsx)(`button`,{type:`button`,className:`mx-0.5 inline-flex h-[1.15em] min-w-[1.15em] cursor-default items-center justify-center rounded-full bg-primary/10 px-[0.35em] align-middle text-[0.7em] font-medium leading-none text-primary transition-colors hover:bg-primary/20`,"data-testid":`citation-pill`,children:c})}),(0,O.jsxs)(gH,{className:`w-80 space-y-2`,align:`start`,children:[(d||u)&&(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[d&&(0,O.jsx)(`span`,{className:`truncate font-medium text-sm text-foreground`,children:d}),u&&(0,O.jsx)(qf,{variant:`secondary`,className:`shrink-0`,children:u})]}),f&&(0,O.jsx)(`p`,{className:`max-h-48 overflow-y-auto text-muted-foreground text-xs leading-relaxed`,children:f})]})]})}var kH={green:`stat-green`,red:`stat-red`,cyan:`stat-cyan`};function AH({title:e,className:t,children:n}){return EV(e)?(0,O.jsx)(`span`,{className:j(`stat-pill`,kH[e],t),children:LV(n)}):(0,O.jsx)(`ins`,{title:e,className:t,children:n})}var jH=(0,c.createContext)({graphs:[],isStreaming:!1});function MH(){return(0,c.useContext)(jH)}function NH({graphs:e,isStreaming:t,children:n}){let r=(0,c.useMemo)(()=>({graphs:e,isStreaming:t}),[e,t]);return(0,O.jsx)(jH.Provider,{value:r,children:n})}var PH=`https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.umd.min.js`,FH=`sha384-XcdcwHqIPULERb2yDEM4R0XaQKU3YnDsrTmjACBZyfdVVqjh6xQ4/DCMd7XLcA6Y`,IH=`https://cdn.jsdelivr.net`,LH=`maslow:viz-height`,RH=`maslow:viz-export-request`,zH=`maslow:viz-export`,BH={light:{fg:`hsl(0 0% 9%)`,bg:`hsl(0 0% 100%)`,grid:`hsl(0 0% 89%)`,accent:`hsl(193 38% 46%)`,muted:`hsl(0 0% 45%)`},dark:{fg:`hsl(0 0% 95%)`,bg:`hsl(0 0% 7%)`,grid:`hsl(0 0% 17%)`,accent:`hsl(193 38% 46%)`,muted:`hsl(0 0% 60%)`}},VH=[`default-src 'none'`,`script-src 'unsafe-inline' ${IH}`,`style-src 'unsafe-inline'`,`img-src data:`,`font-src data:`,`connect-src 'none'`,`base-uri 'none'`,`form-action 'none'`,`frame-sr
419c 'none'`,`child-src 'none'`].join(`; `),HH=` 420(function () { 421 function reportHeight() { 422 var height = Math.ceil(document.documentElement.scrollHeight); 423 parent.postMessage({ type: '${LH}', height: height }, '*'); 424 } 425 if (typeof ResizeObserver === 'function') { 426 new ResizeObserver(reportHeight).observe(document.body); 427 } 428 window.addEventListener('load', reportHeight); 429 reportHeight(); 430 431 window.addEventListener('message', function (event) { 432 if (event.source !== window.parent) return; 433 if (!event.data || event.data.type !== '${RH}') return; 434 var canvas = document.querySelector('canvas'); 435 if (!canvas) { 436 parent.postMessage({ type: '${zH}', error: 'no-canvas' }, '*'); 437 return; 438 } 439 try { 440 parent.postMessage( 441 { type: '${zH}', dataUrl: canvas.toDataURL('image/png') }, 442 '*' 443 ); 444 } catch (_err) { 445 parent.postMessage({ type: '${zH}', error: 'export-failed' }, '*'); 446 } 447 }); 448})(); 449`;function UH(e){return BH[e]}function WH(e,t){let n=BH[t];return`<!doctype html> 450<html> 451<head> 452<meta charset="utf-8"> 453<meta http-equiv="Content-Security-Policy" content="${VH}"> 454<script src="${PH}" integrity="${FH}" crossorigin="anonymous"><\/script> 455<script> 456window.VIZ_THEME = ${JSON.stringify(n)}; 457if (window.Chart) { 458 Chart.defaults.devicePixelRatio = 2; 459 Chart.defaults.color = window.VIZ_THEME.fg; 460 Chart.defaults.borderColor = window.VIZ_THEME.grid; 461} 462<\/script> 463<style> 464:root { 465 color-scheme: ${t}; 466 --viz-fg: ${n.fg}; 467 --viz-bg: ${n.bg}; 468 --viz-grid: ${n.grid}; 469 --viz-accent: ${n.accent}; 470 --viz-muted: ${n.muted}; 471} 472html, body { 473 margin: 0; 474 padding: 0; 475 background: var(--viz-bg); 476 color: var(--viz-fg); 477 font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; 478} 479body { padding: 8px; overflow: hidden; } 480canvas { max-width: 100%; } 481</style> 482</head> 483<body> 484${e} 485<script>${HH}<\/script> 486</body> 487</html>`}var GH=5e3,KH=/^data:image\/png;base64,/,qH=8388608,JH=class extends Error{code;constructor(e,t){super(t),this.code=e,this.name=`VizExportError`}};function YH(e){return new Promise((t,n)=>{let r=e.contentWindow;if(!r){n(new JH(`export-failed`,`The chart frame is not loaded.`));return}let i=window.setTimeout(()=>{a(),n(new JH(`timeout`,`The chart did not respond to the export request.`))},GH);function a(){window.clearTimeout(i),window.removeEventListener(`message`,o)}function o(r){if(r.source!==e.contentWindow)return;let i=r.data;if(!i||typeof i!=`object`)return;let o=i;o.type===`maslow:viz-export`&&(a(),typeof o.dataUrl==`string`?t(o.dataUrl):o.error===`no-canvas`?n(new JH(`no-canvas`,`This visualization has no chart image.`)):n(new JH(`export-failed`,`The chart could not be captured.`)))}window.addEventListener(`message`,o),r.postMessage({type:RH},`*`)})}var XH=40;async function ZH({title:e,pngDataUrl:t,theme:n}){if(!KH.test(t)||t.length>
487qH)throw new JH(`invalid-png`,`The chart image is not a valid PNG.`);let r=await $H(t),{jsPDF:i}=await Fz(async()=>{let{jsPDF:e}=await import(`./jspdf.es.min-CNIizAmF.js`);return{jsPDF:e}},__vite__mapDeps([22,4])),a=UH(n),o=eU(a.bg),s=eU(a.fg),c=eU(a.muted),l=new i({orientation:`landscape`,unit:`pt`,format:`a4`}),u=l.internal.pageSize.getWidth(),d=l.internal.pageSize.getHeight();l.setFillColor(o.r,o.g,o.b),l.rect(0,0,u,d,`F`),l.setFont(`helvetica`,`bold`),l.setFontSize(16),l.setTextColor(s.r,s.g,s.b),l.text(e,XH,XH),l.setFont(`helvetica`,`normal`),l.setFontSize(10),l.setTextColor(c.r,c.g,c.b),l.text(`Generated ${new Date().toLocaleString()}`,XH,56);let f=u-80,p=d-72-XH,m=Math.min(f/r.naturalWidth,p/r.naturalHeight),h=r.naturalWidth*m,g=r.naturalHeight*m,_=XH+(f-h)/2;l.addImage(t,`PNG`,_,72,h,g),l.setFontSize(9),l.setTextColor(c.r,c.g,c.b),l.text(`Maslow Insights`,XH,d-XH/2),l.save(`${tU(e)}.pdf`)}function QH(e,t,n){let r=new Blob([WH(e,n)],{type:`text/html`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${tU(t)}.html`,a.rel=`noopener`,document.body.appendChild(a),a.click(),a.remove(),window.setTimeout(()=>URL.revokeObjectURL(i),1e4)}function $H(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=()=>
487n(new JH(`invalid-png`,`The chart image failed to decode.`)),r.src=e})}function eU(e){let t=/^hsl\((\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%\)$/.exec(e.trim());if(!t)return{r:255,g:255,b:255};let n=Number(t[1])/360,r=Number(t[2])/100,i=Number(t[3])/100;if(r===0){let e=Math.round(i*255);return{r:e,g:e,b:e}}let a=i<.5?i*(1+r):i+r-i*r,o=2*i-a,s=e=>(e<0&&(e+=1),e>1&&--e,e<1/6?o+(a-o)*6*e:e<1/2?a:e<2/3?o+(a-o)*(2/3-e)*6:o);return{r:Math.round(s(n+1/3)*255),g:Math.round(s(n)*255),b:Math.round(s(n-1/3)*255)}}function tU(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`chart`}var nU=256,rU=80,iU=2e3;function aU({fragment:e,title:t}){let{theme:n}=nf(),{toast:r}=ln(),[i,a]=(0,c.useState)(nU),[o,s]=(0,c.useState)(!1),[l,u]=(0,c.useState)(!1),[d,f]=(0,c.useState)(!0),p=(0,c.useRef)(null),m=(0,c.useMemo)(()=>WH(e,n),[e,n]);async function h(){let e=p.current;if(e&&!l){u(!0);try{await ZH({title:t,pngDataUrl:await YH(e),theme:n})}catch(e){e instanceof JH&&e.code===`no-canvas`?(f(!1),r({title:`PDF not available`,description:`This visualization has no chart image â download it as HTML instead.`,variant:`destructive`})):r({title:`Export failed`,description:`The chart could not be exported to PDF.`,variant:`destructive`})}finally{u(!1)}}}function g(){try{QH(e,t,n)}catch{r({title:`Export failed`,description:`The chart could not be downloaded as HTML.`,variant:`destructive`})}}return(0,c.useEffect)(()=>{let e=0;function t(t){if(t.source!==p.current?.contentWindow)return;let n=t.data;if(!n||typeof n!=`object`||n.type!==`maslow:viz-height`)return;let r=Number(n.height);if(!Number.isFinite(r))return;let i=Math.min(iU,Math.max(rU,Math.ceil(r)));cancelAnimationFrame(e),e=requestAnimationFrame(()=>{a(i),s(!0)})}return window.addEventListener(`message`,t),()=>{window.removeEventListener(`message`,t),cancelAnimationFrame(e)}},[]),(0,O.jsxs)(`div`,{className:`group relative my-3 w-full overflow-hidden rounded-lg border bg-card transition-[height] duration-200`,style:{height:i},"data-testid":`viz-frame`,"data-height-reported":o||void 0,children:[(0,O.jsx)(`iframe`,{ref:p,srcDoc:m,sandbox:`allow-scripts`,referrerPolicy:`no-referrer`,loading:`lazy`,scrolling:`no`,title:t,"aria-label":t,className:`h-full w-full border-0`}),o&&(0,O.jsxs)(`div`,{className:`absolute right-2 top-2 flex gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100`,children:[d&&(0,O.jsxs)(M,{variant:`secondary`,size:`sm`,disabled:l,onClick:h,"aria-label":`Download ${t} as PDF`,"data-testid":`viz-export-pdf`,children:[(0,O.jsx)($a,{}),` PDF`]}),(0,O.jsxs)(M,{variant:`secondary`,size:`sm`,disabled:l,onClick:g,"aria-label":`Download ${t} as HTML`,"data-testid":`viz-export-html`,children:[(0,O.jsx)(Za,{}),` HTML`]})]})]})}var oU=/^\d+$/;function sU(e){let{graphs:t,isStreaming:n}=MH();if(!e.title||!oU.test(e.title))return(0,O.jsx)(`samp`,{className:e.className,children:e.children});let r=t[Number(e.title)-1];return r?.type===`html`?(0,O.jsx)(aU,{fragment:r.content,title:`Chart ${e.title}`}):n?(0,O.jsx)(_h,{className:`relative my-3 flex h-64 w-full items-center justify-center rounded-lg`,"data-testid":`graph-skeleton`,children:(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Building chartâ¦`})}):null}var cU=[...Object.values(rV),gV,CV,qV],lU={sup:OH,samp:sU,ins:AH,...zV},uU=({className:e,from:t,...n})=>(0,O.jsx)(`div`,{className:j(`group flex w-full max-w-[95%] flex-col gap-2`,t===`user`?`is-user ml-auto justify-end`:`is-assistant`,e),...n}),dU=({children:e,className:t,...n})=>(0,O.jsx)(`div`,{className:j(`is-user:dark flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm`,`group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground`,`group-[.is-assistant]:text-foreground`,t),...n,children:e}),fU=(0,c.createContext)(null),pU=()=>{let e=(0,c.useContext)(fU);if(!e)throw Error(`MessageBranch components must be used within MessageBranch`);return e},mU=({defaultBranch:e=0,onBranchChange:t,className:n,...r})=>{let[i,a]=(0,c.useState)(e),[o,s]=(0,c.useState)([]),l=e=>{a(e),t?.(e)},u={currentBranch:i,totalBranches:o.length,goToPrevious:()=>{let e=i>0?i-1:o.length-1;l(e)},goToNext:()=>{let e=i<o.length-1?i+1:0;l(e)},branches:o,setBranches:s};return(0,O.jsx)(fU.Provider,{value:u,children:(0,O.jsx)(`div`,{className:j(`grid w-full gap-2 [&>div]:pb-0`,n),...r})})},hU=({children:e,...t})=>{let{currentBranch:n,setBranches:r,branches:i}=pU(),a=Array.isArray(e)?e:[e];return(0,c.useEffect)(()=>{i.length!==a.length&&r(a)},[a,i,r]),a.map((e,r)=>(0,O.jsx)(`div`,{className:j(`grid gap-2 overflow-hidden [&>div]:pb-0`,r===n?`block`:`hidden`),...t,children:e},e.key))},gU=(0,c.memo)(({className:e,...t})=>(0,O.jsx)(lV,{className:j(`size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_ol]:list-decimal [&_ul]:list-disc [&_ol]:pl-6 [&_ul]:pl-6 [&_li]:my-1`,e),remarkPlugins:cU,components:lU,...t}),(e,t)=>e.children===t.children);gU.displayName=`MessageResponse`;var _U=Object.defineProperty,vU=(e,t)=>_U(e,`name`,{value:t,configurable:!0}),yU=`Collapsible`,[bU,Uie]=An(yU),[xU,SU]=bU(yU),CU=c.forwardRef(vU(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l,u]=Zr({prop:r,defaultProp:i??!1,onChange:o,caller:yU});return(0,O.jsx)(xU,{scope:n,disabled:a,contentId:Cc(),open:l,onOpenToggle:c.useCallback(()=>u(e=>!e),[u]),children:(0,O.jsx)(lr.div,{"data-state":kU(l),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),wU=`CollapsibleTrigger`,TU=c.forwardRef(vU(function(e,t){let{__scopeCollapsible:n,...r}=e,i=SU(wU,n);return(0,O.jsx)(lr.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":kU(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:k(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),EU=`CollapsibleContent`,DU=c.forwardRef(vU(function(e,t){let{forceMount:n,...r}=e,i=SU(EU,e.__scopeCollapsible);return(0,O.jsx)(Lr,{present:n||i.open,children:({present:e})=>(0,O.jsx)(OU,{...r,ref:t,present:e})})},`CollapsibleContent`)),OU=c.forwardRef(vU(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=SU(EU,n),[s,l]=c.useState(r),u=c.useRef(null),d=En(t,u),f=c.useRef(0),p=f.current,m=c.useRef(0),h=m.current,g=o.open||s,_=c.useRef(g),v=c.useRef(void 0);return c.useEffect(()=>{let e=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(e)},[]),jr(()=>{let e=u.current;if(e){v.current=v.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();f.current=t.height,m.current=t.width,_.current||(e.style.transitionDuration=v.current.transitionDuration,e.style.animationName=v.current.animationName),l(r)}},[o.open,r]),(0,O.jsx)(lr.div,{"data-state":kU(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:g&&i})},`CollapsibleContentImpl`));function kU(e){return e?`open`:`closed`}vU(kU,`getState`);var AU=CU,jU=TU,MU=DU,NU=({className:e,...t})=>(0,O.jsx)(AU,{className:j(`not-prose mb-4 text-primary text-xs`,e),...t}),PU=({className:e,count:t,children:n,...r})=>(0,O.jsx)(jU,{className:j(`flex items-center gap-2`,e),...r,children:n??(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`p`,{className:`font-medium`,children:[`Used `,t,` sources`]}),(0,O.jsx)(ka,{className:`h-4 w-4`})]})}),FU=({className:e,...t})=>(0,O.jsx)(MU,{className:j(`mt-3 flex w-fit flex-col gap-2`,`data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...t}),IU=({title:e,number:t,children:n,...r})=>(0,O.jsx)(`div`,{className:`flex items-center gap-2`,...r,children:n??(0,O.jsxs)(O.Fragment,{children:[t!=null&&(0,O.jsxs)(`span`,{className:`shrink-0 font-medium tabular-nums`,children:[t,` â`]}),(0,O.jsx)(`span`,{className:`font-medium`,children:e})]})}),LU=1,RU=.9,zU=.8,BU=.17,VU=.1,HU=.999,UU=.9999,WU=.99,GU=/[\\\/_+.#"@\[\(\{&]/,KU=/[\\\/_+.#"@\[\(\{&]/g,qU=/[\s-]/,JU=/[\s-]/g;function YU(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?LU:WU;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=YU(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=LU:GU.test(e.charAt(l-1))?(d*=zU,p=e.slice(i,l-1).match(KU),p&&i>0&&(d*=HU**+p.length)):qU.test(e.charAt(l-1))?(d*=RU,m=e.slice(i,l-1).match(JU),m&&i>0&&(d*=HU**+m.length)):(d*=BU,i>0&&(d*=HU**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=UU)),(d<VU&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=YU(e,t,n,r,l+1,a+2,o),f*VU>d&&(d=f*VU)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function XU(e){return e.toLowerCase().replace(JU,` `)}function ZU(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,YU(e,t,XU(e),XU(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function QU(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}function $U(e,t){if(typeof e==`function`)return e(t);
487e!=null&&(e.current=t)}function eW(...e){return t=>{let n=!1,r=e.map(e=>{let r=$U(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():$U(e[t],null)}}}}function tW(...e){return c.useCallback(eW(...e),e)}function nW(e,t=[]){let n=[];function r(t,r){let i=c.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,l=c.useMemo(()=>o,Object.values(o));return(0,O.jsx)(s.Provider,{value:l,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:l=!1}=s,u=o?.[e]?.[a]||i,d=c.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>c.createContext(e));return function(n){let r=n?.[e]||t;return c.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,rW(i,...t)]}function rW(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var iW=globalThis?.document?c.useLayoutEffect:()=>{},aW=c.useId||(()=>void 0),oW=0;function sW(e){let[t,n]=c.useState(aW());return iW(()=>{e||n(e=>e??String(oW++))},[e]),e||(t?`radix-${t}`:``)}var cW=c.useInsertionEffect||iW;function lW({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=uW({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{let t=c.useRef(e!==void 0);c.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[l,c.useCallback(t=>{if(s){let n=dW(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function uW({defaultProp:e,onChange:t}){let[n,r]=c.useState(e),i=c.useRef(n),a=c.useRef(t);return cW(()=>{a.current=t},[t]),c.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function dW(e){return typeof e==`function`}function fW(e){let t=c.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];yW(r)&&typeof CW==`function`&&(r=CW(r._payload)),c.Children.forEach(r,e=>{if(_W(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;yW(n)&&typeof CW==`function`&&(n=CW(n._payload)),a=mW(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=c.cloneElement(a,void 0,s):!o&&c.Children.count(r)===1&&c.isValidElement(r)&&(a=r);let l=a?gW(a):void 0,u=tW(n,l);if(!a){if(r||r===0)throw Error(o?SW(e):xW(e));return r}let d=hW(i,a.props??{});return a.type!==c.Fragment&&(d.ref=n?u:l),c.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}var pW=Symbol.for(`radix.slottable`),mW=(e,t)=>{if(`child`in e.props){let t=e.props.child;return c.isValidElement(t)?c.cloneElement(t,void 0,e.props.children(t.props.children)):null}return c.isValidElement(t)?t:null};function hW(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function gW(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _W(e){return c.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===pW}var vW=Symbol.for(`react.lazy`);function yW(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===vW&&`_payload`in e&&bW(e._payload)}function bW(e){return typeof e==`object`&&!!e&&`then`in e}var xW=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,SW=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,CW=c.use,wW=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>
487{let n=fW(`Primitive.${t}`),r=c.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,O.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function TW(e,t){e&&mn.flushSync(()=>e.dispatchEvent(t))}function EW(e){let t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}var DW=`DismissableLayer`,OW=`dismissableLayer.update`,kW=`dismissableLayer.pointerDownOutside`,AW=`dismissableLayer.focusOutside`,jW,MW=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),NW=c.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...u}=e,d=c.useContext(MW),[f,p]=c.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=c.useState({}),g=tW(t,p),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,b=f?_.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=c.useRef(!1),w=RW(e=>{a?.(e),s?.(e),e.defaultPrevented||l?.()},{ownerDocument:m,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:c.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...d.branches].some(t=>t.contains(e));return S&&!t},[d.branches,S])}),T=zW(e=>{if(r&&C.current)return;let t=e.target;[...d.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||l?.())},m),E=f?b===_.length-1:!1,ee=EW(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return c.useEffect(()=>{if(E)return m.addEventListener(`keydown`,ee,{capture:!0}),()=>m.removeEventListener(`keydown`,ee,{capture:!0})},[m,E,ee]),c.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(jW=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),BW(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=jW))}},[f,m,n,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),BW())},[f,d]),c.useEffect(()=>{let e=()=>h({});return document.addEventListener(OW,e),()=>document.removeEventListener(OW,e)},[]),(0,O.jsx)(wW.div,{...u,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:QU(e.onFocusCapture,T.onFocusCapture),onBlurCapture:QU(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:QU(e.onPointerDownCapture,w.onPointerDownCapture)})});NW.displayName=DW;var PW=`DismissableLayerBranch`,FW=c.forwardRef((e,t)=>{let n=c.useContext(MW),r=c.useRef(null),i=tW(t,r);return c.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,O.jsx)(wW.div,{...e,ref:i})});FW.displayName=PW;function IW(){let e=c.useContext(MW),[t,n]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}var LW=()=>!0;function RW(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=LW}=t,s=EW(e),l=c.useRef(!1),u=c.useRef(!1),d=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}function t(){return Array.from(d.current.values()).some(Boolean)}function c(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}function p(e){u.current&&d.current.set(e.type,!1)}let m=a=>{if(a.target&&!l.current){let c=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||VW(kW,s,p,{discrete:!0})};if(!o(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?c():(n.removeEventListener(`click`,f.current),f.current=c,n.addEventListener(`click`,f.current,{once:!0}))}
vendor: 2,390 bytes, line 487
487else n.removeEventListener(`click`,f.current),e();l.current=!1},h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,c,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,c,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:()=>l.current=!0}}function zW(e,t=globalThis?.document){let n=EW(e),r=c.useRef(!1);return c.useEffect(()=>{let e=e=>{e.target&&!r.current&&VW(AW,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function BW(){let e=new CustomEvent(OW);document.dispatchEvent(e)}function VW(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?TW(i,a):i.dispatchEvent(a)}var HW=`focusScope.autoFocusOnMount`,UW=`focusScope.autoFocusOnUnmount`,WW={bubbles:!1,cancelable:!0},GW=`FocusScope`,KW=c.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=c.useState(null),u=EW(i),d=EW(a),f=c.useRef(null),p=tW(t,l),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let e=function(e){if(m.paused||!s)return;let t=e.target;s.contains(t)?f.current=t:$W(f.current,{select:!0})},t=function(e){if(m.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||$W(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&$W(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,m.paused]),c.useEffect(()=>{if(s){eG.add(m);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(HW,WW);s.addEventListener(HW,u),s.dispatchEvent(t),t.defaultPrevented||(qW(rG(YW(s)),{select:!0}),document.activeElement===e&&$W(s))}return()=>{s.removeEventListener(HW,u),setTimeout(()=>{let t=new CustomEvent(UW,WW);
487s.addEventListener(UW,d),s.dispatchEvent(t),t.defaultPrevented||$W(e??document.body,{select:!0}),s.removeEventListener(UW,d),eG.remove(m)},0)}}},[s,u,d,m]);let h=c.useCallback(e=>{if(!n&&!r||m.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=JW(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&$W(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&$W(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,m.paused]);return(0,O.jsx)(wW.div,{tabIndex:-1,...o,ref:p,onKeyDown:h})});KW.displayName=GW;function qW(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if($W(r,{select:t}),document.activeElement!==n)return}function JW(e){let t=YW(e);return[XW(t,e),XW(t.reverse(),e)]}function YW(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function XW(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ZW(r,{upTo:t})))return r}function ZW(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 QW(e){return e instanceof HTMLInputElement&&`select`in e}function $W(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&QW(e)&&t&&e.select()}}var eG=tG();function tG(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=nG(e,t),e.unshift(t)},remove(t){e=nG(e,t),e[0]?.resume()}}}function nG(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rG(e){return e.filter(e=>e.tagName!==`A`)}var iG=`Portal`,aG=c.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=c.useState(!1);iW(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?mn.createPortal((0,O.jsx)(wW.div,{...r,ref:t}),o):null});aG.displayName=iG;function oG(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}var sG=e=>{let{present:t,children:n}=e,r=cG(t),i=typeof n==`function`?n({present:r.isPresent}):c.Children.only(n),a=uG(r.ref,fG(i));return typeof n==`function`||r.isPresent?c.cloneElement(i,{ref:a}):null};sG.displayName=`Presence`;function cG(e){let[t,n]=c.useState(),r=c.useRef(null),i=c.useRef(e),a=c.useRef(`none`),o=c.useRef(void 0),[s,l]=oG(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return c.useEffect(()=>{s===`mounted`?(a.current=o.current??dG(r.current),o.current=void 0):a.current=`none`},[s]),iW(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=dG(t);e?(o.current=s,l(`MOUNT`)):s===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),iW(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=dG(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=dG(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:c.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=dG(t)}else r.current=null;n(e)},[])}}function lG(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function uG(...e){let t=c.useRef(e);return t.current=e,c.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=lG(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():lG(n[e],null)}}},[])}function dG(e){return e?.animationName||`none`}function fG(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pG=0,mG=null;function hG(){c.useEffect(()=>{mG||={start:gG(),end:gG()};let{start:e,end:t}=mG;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),pG++,()=>{pG===1&&(mG?.start.remove(),mG?.end.remove(),mG=null),pG=Math.max(0,pG-1)}},[])}function gG(){let 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 _G=`Dialog`,[vG,Wie]=nW(_G),[yG,bG]=vG(_G),xG=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=c.useRef(null),l=c.useRef(null),[u,d]=lW({prop:r,defaultProp:i??!1,onChange:a,caller:_G});return(0,O.jsx)(yG,{scope:t,triggerRef:s,contentRef:l,contentId:sW(),titleId:sW(),descriptionId:sW(),open:u,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};xG.displayName=_G;var SG=`DialogTrigger`,CG=c.forwardRef((e,t)=>
487{let{__scopeDialog:n,...r}=e,i=bG(SG,n),a=tW(t,i.triggerRef);return(0,O.jsx)(wW.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":UG(i.open),...r,ref:a,onClick:QU(e.onClick,i.onOpenToggle)})});CG.displayName=SG;var wG=`DialogPortal`,[TG,EG]=vG(wG,{forceMount:void 0}),DG=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=bG(wG,t);return(0,O.jsx)(TG,{scope:t,forceMount:n,children:c.Children.map(r,e=>(0,O.jsx)(sG,{present:n||a.open,children:(0,O.jsx)(aG,{asChild:!0,container:i,children:e})}))})};DG.displayName=wG;var OG=`DialogOverlay`,kG=c.forwardRef((e,t)=>{let n=EG(OG,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=bG(OG,e.__scopeDialog);return a.modal?(0,O.jsx)(sG,{present:r||a.open,children:(0,O.jsx)(jG,{...i,ref:t})}):null});kG.displayName=OG;var AG=fW(`DialogOverlay.RemoveScroll`),jG=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=bG(OG,n),a=tW(t,IW());return(0,O.jsx)(Cm,{as:AG,allowPinchZoom:!0,shards:[i.contentRef],children:(0,O.jsx)(wW.div,{"data-state":UG(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),MG=`DialogContent`,NG=c.forwardRef((e,t)=>{let n=EG(MG,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=bG(MG,e.__scopeDialog);return(0,O.jsx)(sG,{present:r||a.open,children:a.modal?(0,O.jsx)(PG,{...i,ref:t}):(0,O.jsx)(FG,{...i,ref:t})})});NG.displayName=MG;var PG=c.forwardRef((e,t)=>{let n=bG(MG,e.__scopeDialog),r=c.useRef(null),i=tW(t,n.contentRef,r);return c.useEffect(()=>{let e=r.current;if(e)return Mm(e)},[]),(0,O.jsx)(IG,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:QU(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:QU(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:QU(e.onFocusOutside,e=>e.preventDefault())})}),FG=c.forwardRef((e,t)=>{let n=bG(MG,e.__scopeDialog),r=c.useRef(!1),i=c.useRef(!1);return(0,O.jsx)(IG,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),IG=c.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=bG(MG,n);return hG(),(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(KW,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,O.jsx)(NW,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":UG(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),LG=`DialogTitle`,RG=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=bG(LG,n);return(0,O.jsx)(wW.h2,{id:i.titleId,...r,ref:t})});RG.displayName=LG;var zG=`DialogDescription`,BG=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=bG(zG,n);return(0,O.jsx)(wW.p,{id:i.descriptionId,...r,ref:t})});BG.displayName=zG;var VG=`DialogClose`,HG=c.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=bG(VG,n);return(0,O.jsx)(wW.button,{type:`button`,...r,ref:t,onClick:QU(e.onClick,()=>i.onOpenChange(!1))})});HG.displayName=VG;function UG(e){return e?`open`:`closed`}var WG=`[cmdk-group=""]`,GG=`[cmdk-group-items=""]`,KG=`[cmdk-group-heading=""]`,qG=`[cmdk-item=""]`,JG=`${qG}:not([aria-disabled="true"])`,YG=`cmdk-item-select`,XG=`data-value`,ZG=(e,t,n)=>ZU(e,t,n),QG=c.createContext(void 0),$G=()=>c.useContext(QG),eK=c.createContext(void 0),tK=()=>c.useContext(eK),nK=c.createContext(void 0),rK=c.forwardRef((e,t)=>{let n=_K(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=_K(()=>new Set),i=_K(()=>new Map),a=_K(()=>new Map),o=_K(()=>new Set),s=hK(e),{label:l,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=sW(),b=sW(),x=sW(),S=c.useRef(null),C=bK();gK(()=>
vendor: 8,664 bytes, line 487
487{if(d!==void 0){let e=d.trim();n.current.value=e,w.emit()}},[d]),gK(()=>{C(6,ne)},[]);let w=c.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)te(),ee(),C(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=re()?.id,w.emit()}),r||C(5,ne),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=c.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{ee(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{te(),ee(),n.current.value||D(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=re();C(4,()=>{te(),t?.getAttribute(`id`)===e&&D(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:l||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??ZG;return e?r(e,n.current.search,t):0}function ee(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;ie().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(GG);t?t.appendChild(e.parentElement===t?e:e.closest(`${GG} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${GG} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${WG}[${XG}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=ie().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(XG);w.setState(`value`,e||void 0)}function te(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function ne(){var e;let t=re();t&&(t.parentElement?.firstChild===t&&((e=t.closest(WG)?.querySelector(KG))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function re(){return S.current?.querySelector(`${qG}[aria-selected="true"]`)}function ie(){return Array.from(S.current?.querySelectorAll(JG)||[])}function ae(e){let t=ie()[e];t&&w.setState(`value`,t.getAttribute(XG))}function oe(e){var t;let n=re(),r=ie(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(XG))}function se(e){let t=re()?.closest(WG),n;for(;t&&!n;)t=e>0?pK(t,WG):mK(t,WG),n=t?.querySelector(JG);n?w.setState(`value`,n.getAttribute(XG)):oe(e)}let ce=()=>ae(ie().length-1),le=e=>{e.preventDefault(),e.metaKey?ce():e.altKey?se(1):oe(1)},ue=e=>{e.preventDefault(),e.metaKey?ae(0):e.altKey?se(-1):oe(-1)};return c.createElement(wW.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&le(e);break;case`ArrowDown`:le(e);break;case`p`:case`k`:_&&e.ctrlKey&&ue(e);break;case`ArrowUp`:ue(e);break;case`Home`:e.preventDefault(),ae(0);break;case`End`:e.preventDefault(),ce();break;case`Enter`:{e.preventDefault();let t=re();if(t){let e=new Event(YG);t.dispatchEvent(e)}}}}},c.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:CK},l),SK(e,e=>c.createElement(eK.Provider,{value:w},c.createElement(QG.Provider,{value:T},e))))}),iK=c.forwardRef((e,t)=>{let n=sW(),r=c.useRef(null),i=c.useContext(nK),a=$G(),o=hK(e),s=o.current?.forceMount??i?.forceMount;gK(()=>{if(!s)return a.item(n,i?.id)},[s]);let l=yK(n,r,[e.value,e.children,r],e.keywords),u=tK(),d=vK(e=>e.value&&e.value===l.current),f=vK(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);c.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(YG,p),()=>t.removeEventListener(YG,p)},[f,e.onSelect,e.disabled]);function p(){var e,t;m(),(t=(e=o.current).onSelect)==null||t.call(e,l.current)}function m(){u.setState(`value`,l.current,!0)}if(!f)return null;let{disabled:h,value:g,onSelect:_,forceMount:v,keywords:y,...b}=e;return c.createElement(wW.div,{ref:eW(r,t),...b,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!h,"aria-selected":!!d,"data-disabled":!!h,"data-selected":!!d,onPointerMove:h||a.getDisablePointerSelection()?void 0:m,onClick:h?void 0:p},e.children)}),aK=c.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=sW(),s=c.useRef(null),l=c.useRef(null),u=sW(),d=$G(),f=vK(e=>i||d.filter()===!1?!0:!e.search||e.filtered.groups.has(o));gK(()=>d.group(o),[]),yK(o,s,[e.value,e.heading,l]);let p=c.useMemo(()=>({id:o,forceMount:i}),[i]);return c.createElement(wW.div,{ref:eW(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!f||void 0},n&&c.createElement(`div`,{ref:l,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),SK(e,e=>c.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},c.createElement(nK.Provider,{value:p},e))))}),oK=c.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=c.useRef(null),a=vK(e=>!e.search);return!n&&!a?null:c.createElement(wW.div,{ref:eW(i,t),...r,"cmdk-separator":``,role:`separator`})}),sK=c.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=tK(),o=vK(e=>e.search),s=vK(e=>e.selectedItemId),l=$G();return c.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),c.createElement(wW.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),cK=c.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=c.useRef(null),o=c.useRef(null),s=vK(e=>e.selectedItemId),l=$G();return c.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),c.createElement(wW.div,{ref:eW(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},SK(e,e=>c.createElement(`div`,{ref:eW(o,l.listInnerRef),"cmdk-list-sizer":``},e)))}),lK=c.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return c.createElement(xG,{open:n,onOpenChange:r},c.createElement(DG,{container:o},c.createElement(kG,{"cmdk-overlay":``,className:i}),c.createElement(NG,{"aria-label":e.label,"cmdk-dialog":``,className:a},c.createElement(rK,{ref:t,...s}))))}),uK=c.forwardRef((e,t)=>vK(e=>e.filtered.count===0)?c.createElement(wW.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),dK=c.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return c.createElement(wW.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},SK(e,e=>c.createElement(`div`,{"aria-hidden":!0},e)))}),fK=Object.assign(rK,{List:cK,Item:iK,Input:sK,Group:aK,Separator:oK,Dialog:lK,Empty:uK,Loading:dK});function pK(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function mK(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function hK(e){let t=c.useRef(e);return gK(()=>{t.current=e}),t}var gK=typeof window>`u`?c.useEffect:c.useLayoutEffect;function _K(e){let t=c.useRef();return t.current===void 0&&(t.current=e()),t}function vK(e){let t=tK(),n=()=>e(t.snapshot());
487return c.useSyncExternalStore(t.subscribe,n,n)}function yK(e,t,n,r=[]){let i=c.useRef(),a=$G();return gK(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(XG,s),i.current=s}),i}var bK=()=>{let[e,t]=c.useState(),n=_K(()=>new Map);return gK(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function xK(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function SK({asChild:e,children:t},n){return e&&c.isValidElement(t)?c.cloneElement(xK(t),{ref:t.ref},n(t.props.children)):n(t)}var CK={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},wK=Bm,TK=Hm,EK=Km,DK=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(Jm,{ref:n,className:j(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));DK.displayName=Jm.displayName;var OK=c.forwardRef(({className:e,children:t,...n},r)=>(0,O.jsxs)(EK,{children:[(0,O.jsx)(DK,{}),(0,O.jsxs)(Qm,{ref:r,className:j(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...n,children:[t,(0,O.jsxs)(sh,{className:`absolute right-4 top-4 roun
487ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,O.jsx)(ds,{className:`h-4 w-4`}),(0,O.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));OK.displayName=Qm.displayName;var kK=({className:e,...t})=>(0,O.jsx)(`div`,{className:j(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});kK.displayName=`DialogHeader`;var AK=({className:e,...t})=>(0,O.jsx)(`div`,{className:j(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});AK.displayName=`DialogFooter`;var jK=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(rh,{ref:n,className:j(`text-lg font-semibold leading-none tracking-tight`,e),...t}));jK.displayName=rh.displayName;var MK=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(ah,{ref:n,className:j(`text-sm text-muted-foreground`,e),...t}));MK.displayName=ah.displayName;var NK=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(fK,{ref:n,className:j(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,e),...t}));NK.displayName=fK.displayName;var PK=c.forwardRef(({className:e,...t},n)=>(0,O.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,O.jsx)(Ho,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,O.jsx)(fK.Input,{ref:n,className:j(`flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));PK.displayName=fK.Input.displayName;var FK=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(fK.List,{ref:n,className:j(`max-h-[300px] overflow-y-auto overflow-x-hidden`,e),...t}));FK.displayName=fK.List.displayName;var IK=c.forwardRef((e,t)=>(0,O.jsx)(fK.Empty,{ref:t,className:`py-6 text-center text-sm`,...e}));IK.displayName=fK.Empty.displayName;var LK=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(fK.Group,{ref:n,className:j(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t}));LK.displayName=fK.Group.displayName;var RK=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(fK.Separator,{ref:n,className:j(`-mx-1 h-px bg-border`,e),...t}));RK.displayName=fK.Separator.displayName;var zK=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(fK.Item,{ref:n,className:j(`relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,e),...t}));zK.displayName=fK.Item.displayName;var BK=Object.defineProperty,VK=(e,t)=>BK(e,`name`,{value:t,configurable:!0}),HK=c.createContext(void 0);function UK(e){let t=c.useContext(HK);return e||t||`ltr`}VK(UK,`useDirection`);var WK=Object.defineProperty,GK=(e,t)=>WK(e,`name`,{value:t,configurable:!0}),KK=!1;function qK(){let[e,t]=c.useState(KK);return c.useEffect(()=>{KK||(KK=!0,t(!0))},[]),e}GK(qK,`useIsHydrated`);var JK=c.useSyncExternalStore;function YK(){return()=>{}}GK(YK,`subscribe`);function XK(){return JK(YK,()=>!0,()=>!1)}GK(XK,`useIsHydratedModern`);var ZK=typeof JK==`function`?XK:qK,QK=Object.defineProperty,$K=(e,t)=>QK(e,`name`,{value:t,configurable:!0}),eq=`rovingFocusGroup.onEntryFocus`,tq={bubbles:!1,cancelable:!0},nq=`RovingFocusGroup`,[rq,iq,aq]=Xn(nq),[oq,sq]=An(nq,[aq]),[cq,lq]=oq(nq),uq=c.forwardRef($K(function(e,t){return(0,O.jsx)(rq.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(rq.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,O.jsx)(dq,{...e,ref:t})})})},`RovingFocusGroup`)),dq=c.forwardRef($K(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=c.useRef(null),m=En(t,p),h=UK(a),[g,_]=Zr({prop:o,defaultProp:s??null,onChange:l,caller:nq}),[v,y]=c.useState(!1),b=pr(u),x=iq(n),S=c.useRef(!1),[C,w]=c.useState(0);return c.useEffect(()=>{let e=p.current;if(e)return e.addEventListener(eq,b),()=>e.removeEventListener(eq,b)},[b]),(0,O.jsx)(cq,{scope:n,orientation:r,dir:h,loop:i,currentTabStopId:g,onItemFocus:c.useCallback(e=>_(e),[_]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:c.useCallback(()=>w(e=>e-1),[]),children:(0,O.jsx)(lr.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:`none`,...e.style},onMouseDown:k(e.onMouseDown,()=>{S.current=!0}),onFocus:k(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(eq,tq);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>
487e.focusable);_q([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),d)}}S.current=!1}),onBlur:k(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),fq=`RovingFocusGroupItem`,pq=c.forwardRef($K(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,l=Cc(),u=a||l,d=lq(fq,n),f=d.currentTabStopId===u,p=iq(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=d,_=ZK();return jr(()=>{if(_&&r)return m(),()=>h()},[_,r,m,h]),c.useEffect(()=>{if(!_&&r)return m(),()=>h()},[_,r,m,h]),(0,O.jsx)(rq.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,O.jsx)(lr.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:k(e.onMouseDown,e=>{r?d.onItemFocus(u):e.preventDefault()}),onFocus:k(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:k(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=gq(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?vq(n,r+1):n.slice(r+1)}setTimeout(()=>_q(n))}}),children:typeof o==`function`?o({isCurrentTabStop:f,hasTabStop:g!=null}):o})})},`RovingFocusGroupItem`)),mq={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function hq(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}$K(hq,`getDirectionAwareKey`);function gq(e,t,n){let r=hq(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return mq[r]}$K(gq,`getFocusIntent`);function _q(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}$K(_q,`focusFirst`);function vq(e,t){return e.map((n,r)=>e[(t+r)%e.length])}$K(vq,`wrapArray`);var yq=uq,bq=pq,xq=Object.defineProperty,Sq=(e,t)=>xq(e,`name`,{value:t,configurable:!0}),Cq=[`Enter`,` `],wq=[`ArrowDown`,`PageUp`,`Home`],Tq=[`ArrowUp`,`PageDown`,`End`],Eq=[...wq,...Tq],Dq={ltr:[...Cq,`ArrowRight`],rtl:[...Cq,`ArrowLeft`]},Oq={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},kq=`Menu`,[Aq,jq,Mq]=Xn(kq),[Nq,Pq]=An(kq,[Mq,Uu,sq]),Fq=Uu(),Iq=sq(),[Lq,Rq]=Nq(kq),[zq,Bq]=Nq(kq),Vq=Sq(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Fq(t),[l,u]=c.useState(null),d=c.useRef(!1),f=pr(a),p=UK(i);return c.useEffect(()=>{let e=Sq(()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Sq(()=>d.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),c.useEffect(()=>{if(!n)return;let e=Sq(()=>f(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,f]),(0,O.jsx)(td,{...s,children:(0,O.jsx)(Lq,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:(0,O.jsx)(zq,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:o,children:r})})})},`Menu`),Hq=c.forwardRef(Sq(function(e,t){let{__scopeMenu:n,...r}=e,i=Fq(n);return(0,O.jsx)(nd,{...i,...r,ref:t})},`MenuAnchor`)),Uq=`MenuPortal`,[Wq,Gq]=Nq(Uq,{forceMount:void 0}),Kq=Sq(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Rq(Uq,t);return(0,O.jsx)(Wq,{scope:t,forceMount:n,children:(0,O.jsx)(Lr,{present:n||a.open,children:(0,O.jsx)(Nr,{asChild:!0,container:i,children:r})})})},`MenuPortal`),qq=`MenuContent`,[Jq,Yq]=Nq(qq),Xq=c.forwardRef(Sq(function(e,t){let n=Gq(qq,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Rq(qq,e.__scopeMenu),o=Bq(qq,e.__scopeMenu);return(0,O.jsx)(Aq.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(Lr,{present:r||a.open,children:(0,O.jsx)(Aq.Slot,{scope:e.__scopeMenu,children:o.modal?(0,O.jsx)(Zq,{...i,ref:t}):(0,O.jsx)(Qq,{...i,ref:t})})})})},`MenuContent`)),Zq=c.forwardRef(Sq(function(e,t){let n=Rq(qq,e.__scopeMenu),r=c.useRef(null),i=En(t,r);return c.useEffect(()=>{let e=r.current;if(e)return Mm(e)},[]),(0,O.jsx)(eJ,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:k(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Qq=c.forwardRef(Sq(function(e,t){let n=Rq(qq,e.__scopeMenu);return(0,O.jsx)(eJ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),$q=Pn(`MenuContent.ScrollLock`),eJ=c.forwardRef(Sq(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:h,...g}=e,_=Rq(qq,n),v=Bq(qq,n),y=Fq(n),b=Iq(n),x=jq(n),[S,C]=c.useState(null),w=c.useRef(null),T=En(t,w,_.onContentChange),E=c.useRef(0),ee=c.useRef(``),D=c.useRef(0),te=c.useRef(null),ne=c.useRef(`right`),re=c.useRef(0),ie=h?Cm:c.Fragment,ae=h?{as:$q,allowPinchZoom:!0}:void 0,oe=Sq(e=>{let t=ee.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=EJ(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;Sq((function e(t){ee.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>
487o.focus())},`handleTypeaheadSearch`);c.useEffect(()=>()=>window.clearTimeout(E.current),[]),Dp();let se=c.useCallback(e=>ne.current===te.current?.side&&OJ(e,te.current?.area),[]);return(0,O.jsx)(Jq,{scope:n,searchRef:ee,onItemEnter:c.useCallback(e=>{se(e)&&e.preventDefault()},[se]),onItemLeave:c.useCallback(e=>{se(e)||(w.current?.focus(),C(null))},[se]),onTriggerLeave:c.useCallback(e=>{se(e)&&e.preventDefault()},[se]),pointerGraceTimerRef:D,onPointerGraceIntentChange:c.useCallback(e=>{te.current=e},[]),children:(0,O.jsx)(ie,{...ae,children:(0,O.jsx)(up,{asChild:!0,trapped:i,onMountAutoFocus:k(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,O.jsx)(xr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:(0,O.jsx)(yq,{asChild:!0,...b,dir:v.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:k(l,e=>{v.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,O.jsx)(rd,{role:`menu`,"aria-orientation":`vertical`,"data-state":xJ(_.open),"data-radix-menu-content":``,dir:v.dir,...y,...g,ref:T,style:{outline:`none`,...g.style},onKeyDown:k(g.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&oe(e.key));let i=w.current;if(e.target!==i||!Eq.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);Tq.includes(e.key)&&a.reverse(),wJ(a)}),onBlur:k(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),ee.current=``)}),onPointerMove:k(e.onPointerMove,kJ(e=>{let t=e.target,n=re.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>re.current?`right`:`left`;ne.current=t,re.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),tJ=c.forwardRef(Sq(function(e,t){let{__scopeMenu:n,...r}=e;return(0,O.jsx)(lr.div,{role:`group`,...r,ref:t})},`MenuGroup`)),nJ=c.forwardRef(Sq(function(e,t){let{__scopeMenu:n,...r}=e;return(0,O.jsx)(lr.div,{...r,ref:t})},`MenuLabel`)),rJ=`MenuItem`,iJ=`menu.itemSelect`,aJ=c.forwardRef(Sq(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=c.useRef(null),o=Bq(rJ,e.__scopeMenu),s=Yq(rJ,e.__scopeMenu),l=En(t,a),u=c.useRef(!1),d=Sq(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(iJ,{bubbles:!0,cancelable:!0});e.addEventListener(iJ,e=>r?.(e),{once:!0}),ur(e,t),t.defaultPrevented?u.current=!1:o.onClose()}},`handleSelect`);return(0,O.jsx)(oJ,{...i,ref:l,disabled:n,onClick:k(e.onClick,d),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:k(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:k(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&Cq.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),oJ=c.forwardRef(Sq(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Yq(rJ,n),s=Iq(n),l=c.useRef(null),u=En(t,l),[d,f]=c.useState(!1),[p,m]=c.useState(``);return c.useEffect(()=>{let e=l.current;e&&m((e.textContent??``).trim())},[a.children]),(0,O.jsx)(Aq.ItemSlot,{scope:n,disabled:r,textValue:i??p,children:(0,O.jsx)(bq,{asChild:!0,...s,focusable:!r,children:(0,O.jsx)(lr.div,{role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:u,onPointerMove:k(e.onPointerMove,kJ(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:k(e.onPointerLeave,kJ(e=>o.onItemLeave(e))),onFocus:k(e.onFocus,()=>f(!0)),onBlur:k(e.onBlur,()=>f(!1))})})})},`MenuItemImpl`)),sJ=c.forwardRef(Sq(function(e,t){let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,O.jsx)(fJ,{scope:e.__scopeMenu,checked:n,children:(0,O.jsx)(aJ,{role:`menuitemcheckbox`,"aria-checked":SJ(n)?`mixed`:n,...i,ref:t,"data-state":CJ(n),onSelect:k(i.onSelect,()=>r?.(SJ(n)?!0:!n),{checkForDefaultPrevented:!1})})})},`MenuCheckboxItem`)),[Gie,cJ]=Nq(`MenuRadioGroup`,{value:void 0,onValueChange:Sq(()=>{},`onValueChange`)}),lJ=`MenuRadioItem`,uJ=c.forwardRef(Sq(function(e,t){let{value:n,...r}=e,i=cJ(lJ,e.__scopeMenu),a=n===i.value;return(0,O.jsx)(fJ,{scope:e.__scopeMenu,checked:a,children:(0,O.jsx)(aJ,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":CJ(a),onSelect:k(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),dJ=`MenuItemIndicator`,[fJ,pJ]=Nq(dJ,{checked:!1}
487),mJ=c.forwardRef(Sq(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=pJ(dJ,n);return(0,O.jsx)(Lr,{present:r||SJ(a.checked)||a.checked===!0,children:(0,O.jsx)(lr.span,{...i,ref:t,"data-state":CJ(a.checked)})})},`MenuItemIndicator`)),hJ=c.forwardRef(Sq(function(e,t){let{__scopeMenu:n,...r}=e;return(0,O.jsx)(lr.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[Kie,gJ]=Nq(`MenuSub`),_J=`MenuSubTrigger`,vJ=c.forwardRef(Sq(function(e,t){let n=Rq(_J,e.__scopeMenu),r=Bq(_J,e.__scopeMenu),i=gJ(_J,e.__scopeMenu),a=Yq(_J,e.__scopeMenu),o=c.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},d=c.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);c.useEffect(()=>d,[d]),c.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),l(null)}},[s,l]);let f=En(t,i.onTriggerChange);return(0,O.jsx)(Hq,{asChild:!0,...u,children:(0,O.jsx)(oJ,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":xJ(n.open),...e,ref:f,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:k(e.onPointerMove,kJ(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:k(e.onPointerLeave,kJ(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:k(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||(a.searchRef.current===``||t.key!==` `)&&Dq[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})},`MenuSubTrigger`)),yJ=`MenuSubContent`,bJ=c.forwardRef(Sq(function(e,t){let n=Gq(qq,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=Rq(qq,e.__scopeMenu),s=Bq(qq,e.__scopeMenu),l=gJ(yJ,e.__scopeMenu),u=c.useRef(null),d=En(t,u);return(0,O.jsx)(Aq.Provider,{scope:e.__scopeMenu,children:(0,O.jsx)(Lr,{present:r||o.open,children:(0,O.jsx)(Aq.Slot,{scope:e.__scopeMenu,children:(0,O.jsx)(eJ,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:d,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:k(e.onFocusOutside,e=>{e.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:k(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:k(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Oq[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})},`MenuSubContent`));function xJ(e){return e?`open`:`closed`}Sq(xJ,`getOpenState`);function SJ(e){return e===`indeterminate`}Sq(SJ,`isIndeterminate`);function CJ(e){return SJ(e)?`indeterminate`:e?`checked`:`unchecked`}Sq(CJ,`getCheckedState`);function wJ(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Sq(wJ,`focusFirst`);function TJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Sq(TJ,`wrapArray`);function EJ(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=TJ(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Sq(EJ,`getNextMatch`);function DJ(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Sq(DJ,`isPointInPolygon`);function OJ(e,t){return t?DJ({x:e.clientX,y:e.clientY},t):!1}Sq(OJ,`isPointerInGraceArea`);function kJ(e){return t=>t.pointerType===`mouse`?e(t):void 0}Sq(kJ,`whenMouse`);var AJ=Vq,jJ=Hq,MJ=Kq,NJ=Xq,PJ=tJ,FJ=nJ,IJ=aJ,LJ=sJ,RJ=uJ,zJ=mJ,BJ=hJ,VJ=vJ,HJ=bJ,UJ=Object.defineProperty,WJ=(e,t)=>
487UJ(e,`name`,{value:t,configurable:!0}),GJ=`DropdownMenu`,[KJ,qie]=An(GJ,[Pq]),qJ=Pq(),[JJ,YJ]=KJ(GJ),XJ=WJ(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,l=qJ(t),u=c.useRef(null),[d,f]=Zr({prop:i,defaultProp:a??!1,onChange:o,caller:GJ});return(0,O.jsx)(JJ,{scope:t,triggerId:Cc(),triggerRef:u,contentId:Cc(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(e=>!e),[f]),modal:s,children:(0,O.jsx)(AJ,{...l,open:d,onOpenChange:f,dir:r,modal:s,children:n})})},`DropdownMenu`),ZJ=`DropdownMenuTrigger`,QJ=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=YJ(ZJ,n),o=qJ(n),s=En(t,a.triggerRef);return(0,O.jsx)(jJ,{asChild:!0,...o,children:(0,O.jsx)(lr.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:k(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:k(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),$J=WJ(e=>{let{__scopeDropdownMenu:t,...n}=e,r=qJ(t);return(0,O.jsx)(MJ,{...r,...n})},`DropdownMenuPortal`),eY=`DropdownMenuContent`,tY=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=YJ(eY,n),a=qJ(n),o=c.useRef(!1);return(0,O.jsx)(NJ,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:k(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:k(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),nY=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qJ(n);return(0,O.jsx)(PJ,{...i,...r,ref:t})},`DropdownMenuGroup`)),rY=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qJ(n);return(0,O.jsx)(FJ,{...i,...r,ref:t})},`DropdownMenuLabel`)),iY=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qJ(n);return(0,O.jsx)(IJ,{...i,...r,ref:t})},`DropdownMenuItem`)),aY=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qJ(n);return(0,O.jsx)(LJ,{...i,...r,ref:t})},`DropdownMenuCheckboxItem`)),oY=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qJ(n);return(0,O.jsx)(RJ,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),sY=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qJ(n);return(0,O.jsx)(zJ,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),cY=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qJ(n);return(0,O.jsx)(BJ,{...i,...r,ref:t})},`DropdownMenuSeparator`)),lY=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qJ(n);return(0,O.jsx)(VJ,{...i,...r,ref:t})},`DropdownMenuSubTrigger`)),uY=c.forwardRef(WJ(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=qJ(n);return(0,O.jsx)(HJ,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuSubContent`)),dY=XJ,fY=QJ,pY=$J,mY=tY,hY=nY,gY=rY,_Y=iY,vY=aY,yY=oY,bY=sY,xY=cY,SY=lY,CY=uY,wY=dY,TY=fY,EY=hY,DY=c.forwardRef(({className:e,inset:t,children:n,...r},i)=>(0,O.jsxs)(SY,{ref:i,className:j(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,t&&`pl-8`,e),...r,children:[n,(0,O.jsx)(ja,{className:`ml-auto`})]}));
487DY.displayName=SY.displayName;var OY=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(CY,{ref:n,className:j(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]`,e),...t}));OY.displayName=CY.displayName;var kY=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,O.jsx)(pY,{children:(0,O.jsx)(mY,{ref:r,sideOffset:t,className:j(`z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]`,e),...n})}));kY.displayName=mY.displayName;var AY=c.forwardRef(({className:e,inset:t,...n},r)=>(0,O.jsx)(_Y,{ref:r,className:j(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0`,t&&`pl-8`,e),...n}));AY.displayName=_Y.displayName;var jY=c.forwardRef(({className:e,children:t,checked:n,...r},i)=>(0,O.jsxs)(vY,{ref:i,...r,className:j(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n!==void 0&&{checked:n},children:[(0,O.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,O.jsx)(bY,{children:(0,O.jsx)(Oa,{className:`h-4 w-4`})})}),t]}));jY.displayName=vY.displayName;var MY=c.forwardRef(({className:e,children:t,...n},r)=>(0,O.jsxs)(yY,{ref:r,className:j(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,O.jsx)(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,O.jsx)(bY,{children:(0,O.jsx)(Ra,{className:`h-2 w-2 fill-current`})})}),t]}));MY.displayName=yY.displayName;var NY=c.forwardRef(({className:e,inset:t,...n},r)=>(0,O.jsx)(gY,{ref:r,className:j(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));NY.displayName=gY.displayName;var PY=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(xY,{ref:n,className:j(`-mx-1 my-1 h-px bg-muted`,e),...t}));PY.displayName=xY.displayName;var FY=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`textarea`,{className:j(`flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:n,...t}));FY.displayName=`Textarea`;function IY({className:e,...t}){return(0,O.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:j(`group/input-group border-input dark:bg-input/30 shadow-xs relative flex w-full items-center rounded-md border outline-none transition-[color,box-shadow]`,`h-9 has-[>textarea]:h-auto`,`has-[>[data-align=inline-start]]:[&>input]:pl-2`,`has-[>[data-align=inline-end]]:[&>input]:pr-2`,`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3`,`has-[[data-slot=input-group-control]:focus-visible]:ring-ring has-[[data-slot=input-group-control]:focus-visible]:ring-1`,`has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40`,e),...t})}var LY=oa(`text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]`,"inline-end":`order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]`,"block-start":`[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5`,"block-end":`[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5`}},defaultVariants:{align:`inline-start`}});function RY({className:e,align:t=`inline-start`,...n}){return(0,O.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:j(LY({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var zY=oa(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5`,sm:`h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5`,"icon-xs":`size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function BY({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,O.jsx)(M,{type:t,"data-size":r,variant:n,className:j(zY({size:r}),e),...i})}function VY({className:e,...t}){return(0,O.jsx)(FY,{"data-slot":`input-group-control`,className:j(`flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent`,e),...t})}var HY=Object.defineProperty,UY=(e,t)=>HY(e,`name`,{value:t,configurable:!0});function WY(e,[t,n]){return Math.min(n,Math.max(t,e))}UY(WY,`clamp`);
487var GY=Object.defineProperty,KY=(e,t)=>GY(e,`name`,{value:t,configurable:!0});function qY(e){let t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}KY(qY,`usePrevious`);var JY=Object.defineProperty,YY=(e,t)=>JY(e,`name`,{value:t,configurable:!0}),XY=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ZY=[` `,`Enter`],QY=`Select`,[$Y,eX,tX]=Xn(QY),[nX,Jie]=An(QY,[tX,Uu]),rX=Uu(),[iX,aX]=nX(QY),[oX,sX]=nX(QY);function cX(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,_=rX(t),[v,y]=c.useState(null),[b,x]=c.useState(null),[S,C]=c.useState(!1),w=UK(u),[T,E]=Zr({prop:r,defaultProp:i??!1,onChange:a,caller:QY}),[ee,D]=Zr({prop:o,defaultProp:s,onChange:l,caller:QY}),te=c.useRef(null),ne=c.useRef(ee);c.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=YY(()=>D(ne.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,D]);let re=!v||!!h||!!v.closest(`form`),[ie,ae]=c.useState(new Set),oe=Cc(),se=Array.from(ie).map(e=>e.props.value).join(`;`),ce=c.useCallback(e=>{ae(t=>new Set(t).add(e))},[]),le=c.useCallback(e=>{ae(t=>{let n=new Set(t);return n.delete(e),n})},[]),ue={required:m,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:oe,value:ee,onValueChange:D,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:te,disabled:p,name:d,autoComplete:f,form:h,nativeOptions:ie,nativeSelectKey:se,isFormControl:re};return(0,O.jsx)(td,{..._,children:(0,O.jsx)(iX,{scope:t,...ue,children:(0,O.jsx)($Y.Provider,{scope:t,children:(0,O.jsx)(oX,{scope:t,onNativeOptionAdd:ce,onNativeOptionRemove:le,children:ZX(g)?g(ue):n})})})})}YY(cX,`SelectProvider`);var lX=YY(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,O.jsx)(cX,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,O.jsxs)(O.Fragment,{children:[n,e?(0,O.jsx)(XX,{__scopeSelect:t}):null]})})},`Select`),uX=`SelectTrigger`,dX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=rX(n),o=aX(uX,n),s=o.disabled||r,l=En(t,o.onTriggerChange),u=eX(n),d=c.useRef(`touch`),[f,p,m]=$X(e=>{let t=u().filter(e=>!e.disabled),n=eZ(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),h=YY(e=>{s||(o.onOpenChange(!0),m()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,O.jsx)(nd,{asChild:!0,...a,children:(0,O.jsx)(lr.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":QX(o.value)?``:void 0,...i,ref:l,onClick:k(i.onClick,e=>{e.currentTarget.focus(),d.current!==`mouse`&&h(e)}),onPointerDown:k(i.onPointerDown,e=>{d.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(h(e),e.preventDefault())}),onKeyDown:k(i.onKeyDown,e=>{let t=f.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&p(e.key),!(t&&e.key===` `)&&XY.includes(e.key)&&(h(),e.preventDefault())})})})},`SelectTrigger`)),fX=`SelectValue`,pX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,l=aX(fX,n),{onValueNodeHasChildrenChange:u}=l,d=a!==void 0,f=En(t,l.onValueNodeChange);jr(()=>{u(d)},[u,d]);let p=QX(l.value);return(0,O.jsx)(lr.span,{...s,asChild:!p&&s.asChild,ref:f,style:{pointerEvents:`none`},children:(0,O.jsx)(c.Fragment,{children:p?o:a},p?`placeholder`:`value`)})},`SelectValue`)),mX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,O.jsx)(lr.span,{"aria-hidden":!0,...i,ref:t,children:r||`â¼`})},`SelectIcon`)),[hX,gX]=nX(`SelectPortal`,{forceMount:void 0}),_X=YY(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,O.jsx)(hX,{scope:e.__scopeSelect,forceMount:n,children:(0,O.jsx)(Nr,{asChild:!0,...r})})},`SelectPortal`),vX=`SelectContent`,yX=c.forwardRef(YY(function(e,t){let n=gX(vX,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=aX(vX,e.__scopeSelect),[o,s]=c.useState();return jr(()=>{s(new DocumentFragment)},[]),(0,O.jsx)(Lr,{present:r||a.open,children:({present:e})=>e?(0,O.jsx)(TX,{...i,ref:t}):(0,O.jsx)(bX,{...i,fragment:o})})},`SelectContent`)),bX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?mn.createPortal((0,O.jsx)(SX,{scope:n,children:(0,O.jsx)($Y.Slot,{scope:n,children:(0,O.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),xX=10,[SX,CX]=nX(vX),wX=Pn(`SelectContent.RemoveScroll`),TX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:
487h,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=aX(vX,n),[b,x]=c.useState(null),[S,C]=c.useState(null),w=En(t,x),[T,E]=c.useState(null),[ee,D]=c.useState(null),te=eX(n),[ne,re]=c.useState(!1),ie=c.useRef(!1);c.useEffect(()=>{if(b)return Mm(b)},[b]),Dp();let ae=c.useCallback(e=>{let[t,...n]=te().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[te,S]),oe=c.useCallback(()=>ae([T,b]),[ae,T,b]);c.useEffect(()=>{ne&&oe()},[ne,oe]);let{onOpenChange:se,triggerPointerDownPosRef:ce}=y;c.useEffect(()=>{if(b){let e={x:0,y:0},t=YY(t=>{e={x:Math.abs(Math.round(t.pageX)-(ce.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ce.current?.y??0))}},`handlePointerMove`),n=YY(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||se(!1),document.removeEventListener(`pointermove`,t),ce.current=null},`handlePointerUp`);return ce.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,se,ce]),c.useEffect(()=>{let e=YY(()=>se(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[se]);let[le,ue]=$X(e=>{let t=te().filter(e=>!e.disabled),n=eZ(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),de=c.useCallback((e,t,n)=>{let r=!ie.current&&!n;(y.value!==void 0&&y.value===t||r)&&(E(e),r&&(ie.current=!0))},[y.value]),fe=c.useCallback(()=>b?.focus(),[b]),pe=c.useCallback((e,t,n)=>{let r=!ie.current&&!n;(y.value!==void 0&&y.value===t||r)&&D(e)},[y.value]),me=r===`popper`?DX:EX,he=me===DX?{side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:
vendor: 3,285 bytes, line 487
487h,hideWhenDetached:g,avoidCollisions:_}:{};return(0,O.jsx)(SX,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:de,selectedItem:T,onItemLeave:fe,itemTextRefCallback:pe,focusSelectedItem:oe,selectedItemText:ee,position:r,isPositioned:ne,searchRef:le,children:(0,O.jsx)(Cm,{as:wX,allowPinchZoom:!0,children:(0,O.jsx)(up,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:k(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,O.jsx)(xr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,O.jsx)(me,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...he,onPlaced:()=>re(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:k(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ue(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=te().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ae(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),EX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=aX(vX,n),o=CX(vX,n),[s,l]=c.useState(null),[u,d]=c.useState(null),f=En(t,d),p=eX(n),m=c.useRef(!1),h=c.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=o,b=c.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&_&&v){let e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-xX,d=WY(a,[xX,Math.max(xX,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-xX,d=WY(a,[xX,Math.max(xX,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=p(),c=window.innerHeight-xX*2,l=g.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=f+h+l+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-xX,ee=c-E,D=_.offsetHeight/2,te=_.offsetTop+D,ne=f+h+te,re=x-ne;if(ne<=E){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=u.clientHeight-g.offsetTop-g.offsetHeight,n=ne+Math.max(ee,D+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,f+g.offsetTop+(e?w:0)+D)+re;s.style.height=t+`px`,g.scrollTop=ne-E+g.offsetTop}s.style.margin=`${xX}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,_,v,a.dir,r]);jr(()=>b(),[b]);let[x,S]=c.useState();jr(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);let C=c.useCallback(e=>
487{e&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]);return(0,O.jsx)(OX,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:(0,O.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,O.jsx)(lr.div,{...i,ref:f,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),DX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=xX,...a}=e,o=rX(n);return(0,O.jsx)(rd,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[OX,kX]=nX(vX,{}),AX=`SelectViewport`,jX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=CX(AX,n),o=kX(AX,n),s=En(t,a.onViewportChange),l=c.useRef(0);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,O.jsx)($Y.Slot,{scope:n,children:(0,O.jsx)(lr.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:k(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(l.current-t.scrollTop);if(e>0){let r=window.innerHeight-xX*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}l.current=t.scrollTop})})})]})},`SelectViewport`)),[Yie,MX]=nX(`SelectGroup`),NX=`SelectLabel`,PX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,...r}=e,i=MX(NX,n);return(0,O.jsx)(lr.div,{id:i.id,...r,ref:t})},`SelectLabel`)),FX=`SelectItem`,[IX,LX]=nX(FX),RX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=aX(FX,n),l=CX(FX,n),u=s.value===r,[d,f]=c.useState(a??``),[p,m]=c.useState(!1),h=En(t,pr(e=>l.itemRefCallback?.(e,r,i))),g=Cc(),_=c.useRef(`touch`),v=YY(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,O.jsx)(IX,{scope:n,value:r,disabled:i,textId:g,isSelected:u,onItemTextChange:c.useCallback(e=>{f(t=>t||(e?.textContent??``).trim())},[]),children:(0,O.jsx)($Y.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:(0,O.jsx)(lr.div,{role:`option`,"aria-labelledby":g,"data-highlighted":p?``:void 0,"aria-selected":u&&p,"data-state":u?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:k(o.onFocus,()=>m(!0)),onBlur:k(o.onBlur,()=>m(!1)),onClick:k(o.onClick,()=>{_.current!==`mouse`&&v()}),onPointerUp:k(o.onPointerUp,()=>{_.current===`mouse`&&v()}),onPointerDown:k(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:k(o.onPointerMove,e=>{_.current=e.pointerType,i?l.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:k(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:k(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(l.searchRef?.current===``||e.key!==` `)&&(ZY.includes(e.key)&&v(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),zX=`SelectItemText`,BX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=aX(zX,n),s=CX(zX,n),l=LX(zX,n),u=sX(zX,n),[d,f]=c.useState(null),p=pr(e=>s.itemTextRefCallback?.(e,l.value,l.disabled)),m=En(t,f,l.onItemTextChange,p),h=d?.textContent,g=c.useMemo(()=>(0,O.jsx)(`option`,{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:_,onNativeOptionRemove:v}=u;return jr(()=>(_(g),()=>v(g)),[_,v,g]),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(lr.span,{id:l.textId,...a,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!QX(o.value)?mn.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),VX=`SelectItemIndicator`,HX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,...r}=e;return LX(VX,n).isSelected?(0,O.jsx)(lr.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),UX=`SelectScrollUpButton`,WX=c.forwardRef(YY(function(e,t){let n=CX(UX,e.__scopeSelect),r=kX(UX,e.__scopeSelect),[i,a]=c.useState(!1),o=En(t,r.onScrollButtonChange);return jr(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};YY(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,O.jsx)(qX,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),GX=`SelectScrollDownButton`,KX=c.forwardRef(YY(function(e,t){let n=CX(GX,e.__scopeSelect),r=kX(GX,e.__scopeSelect),[i,a]=c.useState(!1),o=En(t,r.onScrollButtonChange);return jr(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};YY(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,O.jsx)(qX,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null}
487,`SelectScrollDownButton`)),qX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=CX(`SelectScrollButton`,n),o=c.useRef(null),s=eX(n),l=c.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),jr(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,O.jsx)(lr.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:k(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:k(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:k(i.onPointerLeave,()=>{l()})})},`SelectScrollButtonImpl`)),JX=c.forwardRef(YY(function(e,t){let{__scopeSelect:n,...r}=e;return(0,O.jsx)(lr.div,{"aria-hidden":!0,...r,ref:t})},`SelectSeparator`)),YX=`SelectBubbleInput`,XX=c.forwardRef(YY(function({__scopeSelect:e,...t},n){let r=aX(YX,e),{value:i,onValueChange:a,required:o,disabled:s,name:l,autoComplete:u,form:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=c.useRef(null),h=En(n,m),g=i??``,_=qY(g),v=Array.from(f).some(e=>(e.props.value??``)===``);return c.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(_!==g&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,g),e.dispatchEvent(t)}},[_,g]),(0,O.jsxs)(lr.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:l,autoComplete:u,disabled:s,form:d,onChange:e=>a(e.target.value),...t,style:{...ii,...t.style},ref:h,defaultValue:g,children:[QX(i)&&!v?(0,O.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function ZX(e){return typeof e==`function`}YY(ZX,`isFunction`);function QX(e){return e===``||e===void 0}YY(QX,`shouldShowPlaceholder`);function $X(e){let t=pr(e),n=c.useRef(``),r=c.useRef(0),i=c.useCallback(e=>{let i=n.current+e;t(i),YY((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=c.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}YY($X,`useTypeaheadSearch`);function eZ(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=tZ(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}YY(eZ,`findNextItem`);function tZ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}YY(tZ,`wrapArray`);var nZ=lX,rZ=pX,iZ=c.forwardRef(({className:e,children:t,...n},r)=>(0,O.jsxs)(dX,{ref:r,className:j(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1`,e),...n,children:[t,(0,O.jsx)(mX,{asChild:!0,children:(0,O.jsx)(ka,{className:`h-4 w-4 opacity-50`})})]}));iZ.displayName=dX.displayName;var aZ=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(WX,{ref:n,className:j(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,O.jsx)(Ma,{className:`h-4 w-4`})}));aZ.displayName=WX.displayName;var oZ=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(KX,{ref:n,className:j(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,O.jsx)(ka,{className:`h-4 w-4`})}));oZ.displayName=KX.displayName;var sZ=c.forwardRef(({className:e,children:t,position:n=`popper`,...r},i)=>(0,O.jsx)(_X,{children:(0,O.jsxs)(yX,{ref:i,className:j(`relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
487de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,O.jsx)(aZ,{}),(0,O.jsx)(jX,{className:j(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,O.jsx)(oZ,{})]})}));sZ.displayName=yX.displayName;var cZ=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(PX,{ref:n,className:j(`px-2 py-1.5 text-sm font-semibold`,e),...t}));cZ.displayName=PX.displayName;var lZ=c.forwardRef(({className:e,children:t,...n},r)=>(0,O.jsxs)(RX,{ref:r,className:j(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,O.jsx)(`span`,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,O.jsx)(HX,{children:(0,O.jsx)(Oa,{className:`h-4 w-4`})})}),(0,O.jsx)(BX,{children:t})]}));lZ.displayName=RX.displayName;var uZ=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(JX,{ref:n,className:j(`-mx-1 my-1 h-px bg-muted`,e),...t}));uZ.displayName=JX.displayName;var dZ=(0,c.createContext)(null),fZ=(0,c.createContext)(null),pZ=()=>(0,c.useContext)(dZ),mZ=()=>(0,c.useContext)(fZ),hZ=(0,c.createContext)(null),gZ=()=>{let e=mZ(),t=(0,c.useContext)(hZ),n=e??t;if(!n)throw Error(`usePromptInputAttachments must be used within a PromptInput or PromptInputProvider`);return n},_Z=({className:e,accept:t,multiple:n,globalDrop:r,syncHiddenInput:i,maxFiles:a,maxFileSize:o,onError:s,onSubmit:l,children:u,...d})=>{let f=pZ(),p=!!f,m=(0,c.useRef)(null),h=(0,c.useRef)(null),[g,_]=(0,c.useState)([]),v=p?f.attachments.files:g,y=(0,c.useRef)(v);y.current=v;let b=(0,c.useCallback)(()=>{m.current?.click()},[]),x=(0,c.useCallback)(e=>!t||t.trim()===``||t.split(`,`).map(e=>e.trim()).filter(Boolean).some(t=>{if(t.endsWith(`/*`)){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t}),[t]),S=(0,c.useCallback)(e=>{let t=Array.from(e),n=t.filter(e=>x(e));if(t.length&&n.length===0){s?.({code:`accept`,message:`No files match the accepted types.`});return}let r=n.filter(e=>!o||e.size<=o);if(n.length>0&&r.length===0){s?.({code:`max_file_size`,message:`All files exceed the maximum size.`});return}_(e=>{let t=typeof a==`number`?Math.max(0,a-e.length):void 0,n=typeof t==`number`?r.slice(0,t):r;typeof t==`number`&&r.length>t&&s?.({code:`max_files`,message:`Too many files. Some were not added.`});let i=[];for(let e of n)i.push({id:Lh(),type:`file`,url:URL.createObjectURL(e),mediaType:e.type,filename:e.name});return e.concat(i)})},[x,a,o,s]),C=(0,c.useCallback)(e=>_(t=>{let n=t.find(t=>t.id===e);return n?.url&&URL.revokeObjectURL(n.url),t.filter(t=>t.id!==e)}),[]),w=(0,c.useCallback)(()=>_(e=>{for(let t of e)t.url&&URL.revokeObjectURL(t.url);return[]}),[]),T=p?f.attachments.add:S,E=p?f.attachments.remove:C,ee=p?f.attachments.clear:w,D=p?f.attachments.openFileDialog:b;(0,c.useEffect)(()=>{p&&f.__registerFileInput(m,()=>m.current?.click())},[p,f]),(0,c.useEffect)(()=>{i&&m.current&&v.length===0&&(m.current.value=``)},[v,i]),(0,c.useEffect)(()=>{let e=h.current;if(!e||r)return;let t=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault()},n=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault(),e.dataTransfer?.files&&e.dataTransfer.files.length>0&&T(e.dataTransfer.files)};return e.addEventListener(`dragover`,t),e.addEventListener(`drop`,n),()=>{e.removeEventListener(`dragover`,t),e.removeEventListener(`drop`,n)}},[T,r]),(0,c.useEffect)(()=>{if(!r)return;let e=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault()},t=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault(),e.dataTransfer?.files&&e.dataTransfer.files.length>0&&T(e.dataTransfer.files)};return document.addEventListener(`dragover`,e),document.addEventListener(`drop`,t),()=>{document.removeEventListener(`dragover`,e),document.removeEventListener(`drop`,t)}},[T,r]),(0,c.useEffect)(()=>()=>{if(!p)for(let e of y.current)e.url&&URL.revokeObjectURL(e.url)},[p]);let te=e=>{e.currentTarget.files&&T(e.currentTarget.files),e.currentTarget.value=``},ne=async e=>{try{let t=await(await fetch(e)).blob();return new Promise(e=>{let n=new FileReader;n.onloadend=()=>e(n.result),n.onerror=()=>e(null),n.readAsDataURL(t)})}catch{return null}},re=(0,c.useMemo)(()=>({files:v.map(e=>({...e,id:e.id})),add:T,remove:E,clear:ee,openFileDialog:D,fileInputRef:m}),[v,T,E,ee,D]),ie=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`input`,{accept:t,"aria-label":`Upload files`,className:`hidden`,multiple:n,onChange:te,ref:m,title:`Upload files`,type:`file`}),(0,O.jsx)(`form`,{className:j(`w-full`,e),onSubmit:e=>{e.preventDefault();let t=e.currentTarget,n=p?f.textInput.value:new FormData(t).get(`message`)||``;p||t.reset(),Promise.all(v.map(async({id:e,...t})=>
487{if(t.url&&t.url.startsWith(`blob:`)){let e=await ne(t.url);return{...t,url:e??t.url}}return t})).then(t=>{try{let r=l({text:n,files:t},e);r instanceof Promise?r.then(()=>{ee(),p&&f.textInput.clear()}).catch(()=>{}):(ee(),p&&f.textInput.clear())}catch{}}).catch(()=>{})},ref:h,...d,children:(0,O.jsx)(IY,{className:`overflow-hidden !rounded-3xl `,children:u})})]});return p?ie:(0,O.jsx)(hZ.Provider,{value:re,children:ie})},vZ=({className:e,...t})=>(0,O.jsx)(`div`,{className:j(`contents`,e),...t}),yZ=({onChange:e,className:t,placeholder:n=`What would you like to know?`,...r})=>{let i=pZ(),a=gZ(),[o,s]=(0,c.useState)(!1),l=e=>{if(e.key===`Enter`){if(o||e.nativeEvent.isComposing||e.shiftKey)return;e.preventDefault();let t=e.currentTarget.form;if(t?.querySelector(`button[type="submit"]`)?.disabled)return;t?.requestSubmit()}if(e.key===`Backspace`&&e.currentTarget.value===``&&a.files.length>0){e.preventDefault();let t=a.files.at(-1);t&&a.remove(t.id)}},u=e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e of t)if(e.kind===`file`){let t=e.getAsFile();t&&n.push(t)}n.length>0&&(e.preventDefault(),a.add(n))},d=i?{value:i.textInput.value,onChange:t=>{i.textInput.setInput(t.currentTarget.value),e?.(t)}}:{onChange:e};return(0,O.jsx)(VY,{name:`message`,onCompositionEnd:()=>s(!1),onCompositionStart:()=>s(!0),onKeyDown:l,onPaste:u,placeholder:n,...r,...d,className:j(`field-sizing-content max-h-48 min-h-16`,t)})},bZ=({className:e,...t})=>(0,O.jsx)(RY,{align:`block-end`,className:j(`justify-between gap-1`,e),...t}),xZ=({className:e,...t})=>(0,O.jsx)(`div`,{className:j(`flex items-center gap-1`,e),...t}),SZ=({className:e,variant:t=`default`,size:n=`icon-sm`,status:r,children:i,...a})=>{let o=(0,O.jsx)(Va,{className:`size-4`});return r===`submitted`?o=(0,O.jsx)(vo,{className:`size-4 animate-spin`}):r===`streaming`?o=(0,O.jsx)(Zo,{className:`size-4`}):r===`error`&&(o=(0,O.jsx)(ds,{className:`size-4`})),(0,O.jsx)(BY,{"aria-label":`Submit`,className:j(e),size:n,type:`submit`,variant:t,...a,children:i??o})},CZ=[],wZ=[];function TZ(){let[e,t]=(0,c.useState)(1);return(0,c.useEffect)(()=>{let e=setInterval(()=>t(e=>e%3+1),500);return()=>clearInterval(e)},[]),(0,O.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[`Thinking`,`.`.repeat(e)]})}function EZ({size:e,newTab:t}){return t?(0,O.jsx)(M,{asChild:!0,variant:`outline`,size:e,children:(0,O.jsx)(`a`,{href:`/login`,target:`_blank`,rel:`noopener noreferrer`,children:`Login`})}):(0,O.jsx)(M,{asChild:!0,variant:`outline`,size:e,children:(0,O.jsx)(_e,{href:`/login`,children:`Login`})})}var DZ=[`What are the latest trends in employee recognition?`,`How do non-cash rewards impact engagement?`,`What does Gallup say about workplace motivation?`,`Best practices for peer-to-peer recognition programs`];function OZ(){let[e,t]=(0,c.useState)([]),[n,r]=(0,c.useState)(``),[i,a]=(0,c.useState)(!1),o=(0,c.useRef)(null);(0,c.useEffect)(()=>{let e=o.current;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},[e]);let s=(0,c.useCallback)(async n=>{if(!n.trim()||i)return;let o={id:Lh(),role:`user`,content:n.trim()},s=[...e,o];t(s),r(``),a(!0);try{let e=await fetch(`/api/ask-maslow/chat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({messages:s.map(e=>({role:e.role,content:e.content}))})});if(!e.ok)throw Error(`HTTP ${e.status}`);let n=await e.json();t(e=>[...e,{id:Lh(),role:`assistant`,content:n.content||`Sorry, I could not generate a response.`,sources:n.sources??[],passages:n.passages??[]}])}catch{t(e=>[...e,{id:Lh(),role:`assistant`,content:`Something went wrong. Please try again.`}])}finally{a(!1)}},[e,i]),l=e=>{let t=e.text?.trim();t&&!i&&s(t)},u=i?`submitted`:`ready`,d=e.length>0,f=pf();return(0,O.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,O.jsx)(`header`,{className:`border-b sticky top-0 bg-background z-50`,children:(0,O.jsxs)(`nav`,{className:`container max-w-6xl mx-auto px-6 py-4 flex justify-between items-center`,children:[(0,O.jsx)(Ih,{newTab:f}),(0,O.jsxs)(`div`,{className:`flex gap-3`,children:[(0,O.jsx)(M,{asChild:!0,size:`sm`,children:(0,O.jsx)(`a`,{href:`https://meetings.hubspot.com/bforrestal/maslow-insights-intro-virtual-demo`,target:`_blank`,rel:`noopener noreferrer`,children:`Book a Demo`})}),(0,O.jsx)(EZ,{size:`sm`,newTab:f})]})]})}),(0,O.jsxs)(`main`,{className:`container max-w-6xl mx-auto px-6`,children:[(0,O.jsxs)(`section`,{className:`py-16 text-center`,children:[(0,O.jsx)(qf,{variant:`outline`,className:`mb-4`,children:`Public Access`}),(0,O.jsx)(`h1`,{className:`text-4xl md:text-5xl font-bold tracking-tight mb-4`,children:`Industry Recognition Insights`}),(0,O.jsx)(`p`,{className:`text-lg text-muted-foreground max-w-2xl mx-auto mb-8`,children:`Explore data-driven insights and benchmarks about employee recognition across industries. No login required.`})]}),(0,O.jsx)(`section`,{className:`pb-16`,children:(0,O.jsxs)(`div`,{className:`max-w-3xl mx-auto`,children:[(0,O.jsxs)(`div`,{className:`text-center mb-6`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-center gap-3 mb-2`,children:[(0,O.jsx)(`img`,{src:`/maslow.svg`,alt:`Maslow Logo`,className:`w-10 h-10`}),(0,O.jsx)(`h2`,{className:`text-2xl font-semibold text-primary`,children:`Ask Maslow`})]}),(0,O.jsx)(`p`,{className:`text-muted-foreground text-sm max-w-md mx-auto`,children:`AI-powered advisor trained on 25 years of recognition expertise. Ask about incentive programs, recognition strategies, and industry trends.`})]}),d&&(0,O.jsxs)(`div`,{ref:o,className:`max-h-[600px] overflow-y-auto space-y-6 mb-4 p-6 rounded-lg border bg-card`,children:[e.map(e=>(0,O.jsx)(uU,{from:e.role,children:(0,O.jsx)(dU,{children:e.role===`assistant`?(0,O.jsxs)(`div`,{"data-testid":`ask-maslow-response`,className:`border-l-2 border-primary/30 pl-4 [&_h1]:text-primary [&_h2]:text-primary [&_h3]:text-primary [&_hr]:border-primary/20`,children:[e.sources&&e.sources.length>0&&(0,O.jsxs)(NU,{children:[(0,O.jsx)(PU,{count:e.sources.length}),(0,O.jsx)(FU,{children:e.sources.map((e,t)=>(0,O.jsx)(IU,{number:t+1,title:vH(e.name)},`${e.name}-${t}`))})]}),(0,O.jsx)(TH,{passages:e.passages??wZ,sources:e.sources??CZ,children:(0,O.jsx)(gU,{children:e.content})})]}):(0,O.jsx)(`p`,{children:e.content})})},e.id)),i&&(0,O.jsx)(uU,{from:`assistant`,children:(0,O.jsx)(dU,{children:(0,O.jsx)(`div`,{className:`border-l-2 border-primary/30 pl-4`,children:(0,O.jsx)(TZ,{})})})})]}
487),!d&&(0,O.jsx)(`div`,{className:`grid grid-cols-2 gap-3 mb-4`,children:DZ.map(e=>(0,O.jsx)(`button`,{onClick:()=>s(e),className:`text-left text-sm px-4 py-3 rounded-xl bg-secondary border border-border hover:border-primary/40 hover:bg-accent transition-colors`,children:e},e))}),(0,O.jsx)(`div`,{className:`pt-3`,children:(0,O.jsxs)(_Z,{onSubmit:l,className:`relative !z-0 bg-secondary rounded-3xl`,children:[(0,O.jsx)(vZ,{children:(0,O.jsx)(yZ,{value:n,disabled:i,placeholder:`Ask about recognition programs, incentives, trends...`,onChange:e=>r(e.target.value)})}),(0,O.jsxs)(bZ,{children:[(0,O.jsx)(`div`,{}),(0,O.jsx)(SZ,{disabled:!n.trim()||i,status:u})]})]})}),(0,O.jsx)(`p`,{className:`text-center text-xs text-muted-foreground mt-3`,children:`Responses may not be complete, current, or tailored to your specific situation.`})]})}),(0,O.jsxs)(`section`,{className:`py-16 border-t text-center`,children:[(0,O.jsx)(`h2`,{className:`text-3xl font-bold mb-4`,children:`Want Personalized Insights?`}),(0,O.jsx)(`p`,{className:`text-muted-foreground max-w-2xl mx-auto mb-8`,children:`Login to access insights specific to your organization, including custom reports, RewardStation integration, and advanced AI analysis.`}),(0,O.jsxs)(`div`,{className:`flex justify-center gap-3`,children:[(0,O.jsx)(M,{asChild:!0,size:`lg`,children:(0,O.jsx)(`a`,{href:`https://meetings.hubspot.com/bforrestal/maslow-insights-intro-virtual-demo`,target:`_blank`,rel:`noopener noreferrer`,children:`Book a Demo`})}),(0,O.jsx)(EZ,{size:`lg`,newTab:f})]})]})]})]})}function kZ(e){let t=[...e].sort().join(`,`),n=(0,c.useMemo)(()=>t?t.split(`,`):[],[t]),[r,i]=(0,c.useState)(()=>qd(n)),{mutateAsync:a,isPending:o,error:s}=Df(`/api/dives/embed-sessions`);return(0,c.useEffect)(()=>{let e=!1,t=qd(n);i(t);let r=n.filter(e=>!(e in t));if(r.length!==0)return a({keys:r}).then(t=>{e||(Jd(t.embeds),i(e=>({...e,...t.embeds})))}).catch(()=>{}),()=>{e=!0}},[n,a]),{embeds:r,isLoading:o,error:s}}var AZ=`https://embed-motherduck.com`,jZ=`maslow:dive-height`,MZ=`maslow:dive-wheel`,NZ=`maslow:dive-ready`,PZ=`maslow:dive-theme-ack`,FZ=`maslow:host-theme`,IZ=600;function LZ(e){if(e&&typeof e==`object`&&e.type===jZ){let t=Number(e.height);if(Number.isFinite(t)&&t>0)return Math.ceil(t)}return null}function RZ(e){return!!e&&typeof e==`object`&&e.type===NZ}function zZ(e){if(e&&typeof e==`object`&&e.type===PZ){let t=e.theme;if(t===`light`||t===`dark`)return t}return null}function BZ(e){if(e&&typeof e==`object`&&e.type===MZ){let t=Number(e.deltaY);
487if(Number.isFinite(t))return t}return null}function VZ(e,t){e?.postMessage({type:FZ,theme:t},AZ)}function HZ(e,t){return n=>{n===e.current&&t()}}function UZ(e,t){let n=LZ(e);if(n!==null)return t.onHeight(n),!0;if(RZ(e))return t.onReady(),!0;let r=zZ(e);if(r!==null)return t.onThemeAck(r),!0;let i=BZ(e);return i!==null&&(t.onWheel(i),!0)}function WZ(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if((e===`auto`||e===`scroll`)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}function GZ({dives:e,className:t}){let{embeds:n,isLoading:r}=kZ(e),i=e.filter(e=>e in n),a=e.filter(e=>!(e in n));return i.length===0&&!r?(0,O.jsx)(JZ,{className:t}):(0,O.jsxs)(`div`,{className:j(`space-y-6`,t),"data-testid":`dive-embeds`,children:[i.map(e=>{let t=n[e];return t?(0,O.jsx)(KZ,{diveKey:e,url:t},e):null}),r&&a.map(e=>(0,O.jsx)(qZ,{diveKey:e},e))]})}function KZ({diveKey:e,url:t}){let{theme:n}=nf(),[r,i]=(0,c.useState)(!1),[a,o]=(0,c.useState)(!1),[s,l]=(0,c.useState)(IZ),u=(0,c.useRef)(null),d=r&&a,f=(0,c.useRef)(n);return(0,c.useEffect)(()=>{f.current=n,VZ(u.current?.contentWindow,n)},[n]),(0,c.useEffect)(()=>{function e(e){e.origin===AZ&&e.source===u.current?.contentWindow&&UZ(e.data,{onHeight:l,onReady:()=>VZ(u.current?.contentWindow,f.current),onThemeAck:HZ(f,()=>o(!0)),onWheel:e=>{let t=WZ(u.current);t?t.scrollTop+=e:window.scrollBy(0,e)}})}return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[]),(0,O.jsxs)(`div`,{className:`relative w-full overflow-hidden rounded-lg border bg-card transition-[height] duration-200`,style:{height:s},children:[!d&&(0,O.jsx)(_h,{className:`absolute inset-0 h-full w-full`}),(0,O.jsx)(`iframe`,{ref:u,src:t,title:`dive-${e}`,sandbox:`allow-scripts allow-same-origin`,onLoad:e=>{i(!0),VZ(e.currentTarget.contentWindow,f.current)},className:j(`h-full w-full border-0 transition-opacity duration-300`,d?`opacity-100`:`opacity-0`),"data-testid":`dive-frame-${e}`})]})}function qZ({diveKey:e}){return(0,O.jsx)(_h,{className:`w-full rounded-lg`,style:{height:IZ},"data-testid":`dive-skeleton-${e}`})}function JZ({className:e}){return(0,O.jsx)(`div`,{className:j(`flex h-[200px] items-center justify-center rounded-lg border border-dashed text-sm text-muted-foreground`,e),"data-testid":`dive-embeds-empty`,children:`No insights available for your company yet.`})}function YZ(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e==`object`&&t===`[object Date]`?new e.constructor(+e):typeof e==`number`||t===`[object Number]`||typeof e==`string`||t===`[object String]`?new Date(e):new Date(NaN)}function XZ(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}var ZZ=365.2425,QZ=6048e5,$Z=864e5,eQ=43200,tQ=1440,nQ=86400;nQ*7,nQ*ZZ/12*3;var rQ={};function iQ(){return rQ}function aQ(e,t){let n=iQ(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=YZ(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function oQ(e){return aQ(e,{weekStartsOn:1})}function sQ(e){let t=YZ(e),n=t.getFullYear(),r=XZ(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let i=oQ(r),a=XZ(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);let o=oQ(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function cQ(e){let t=YZ(e);return t.setHours(0,0,0,0),t}function lQ(e){let t=YZ(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-n}function uQ(e,t){let n=cQ(e),r=cQ(t),i=+n-lQ(n),a=+r-lQ(r);return Math.round((i-a)/$Z)}function dQ(e){let t=sQ(e),n=XZ(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),oQ(n)}function fQ(e,t){let n=YZ(e),r=YZ(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function pQ(e){return XZ(e,Date.now())}function mQ(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function hQ(e){if(!mQ(e)&&typeof e!=`number`)return!1;let t=YZ(e);return!isNaN(Number(t))}function gQ(e,t){let n=YZ(e),r=YZ(t),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return i*12+a}function _Q(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function vQ(e,t){return+YZ(e)-YZ(t)}function yQ(e){let t=YZ(e);return t.setHours(23,59,59,999),t}function bQ(e){let t=YZ(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function xQ(e){let t=YZ(e);return+yQ(t)==+bQ(t)}function SQ(e,t){let n=YZ(e),r=YZ(t),i=fQ(n,r),a=Math.abs(gQ(n,r)),o;if(a<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*a);let t=fQ(n,r)===-i;xQ(YZ(e))&&a===1&&fQ(e,r)===1&&(t=!1),o=i*(a-Number(t))}return o===0?0:o}
vendor: 16,201 bytes, line 487
487function CQ(e,t,n){let r=vQ(e,t)/1e3;return _Q(n?.roundingMethod)(r)}function wQ(e){let t=YZ(e),n=XZ(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}var TQ={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},EQ=(e,t,n)=>{let r,i=TQ[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function DQ(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var OQ={date:DQ({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:DQ({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:DQ({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},kQ={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},AQ=(e,t,n,r)=>kQ[e];function jQ(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var MQ={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:jQ({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:jQ({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:jQ({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:jQ({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:jQ({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function NQ(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?FQ(s,e=>e.test(o)):PQ(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function PQ(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function FQ(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function IQ(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var LQ={code:`en-US`,formatDistance:EQ,formatLong:OQ,formatRelative:AQ,localize:MQ,match:{ordinalNumber:IQ({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:NQ({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:NQ({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:NQ({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:NQ({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:NQ({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function RQ(e){let t=YZ(e);return uQ(t,wQ(t))+1}function zQ(e){let t=YZ(e),n=+oQ(t)-dQ(t);return Math.round(n/QZ)+1}function BQ(e,t){let n=YZ(e),r=n.getFullYear(),i=iQ(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=XZ(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=aQ(o,t),c=XZ(e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=aQ(c,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function VQ(e,t){let n=iQ(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=BQ(e,t),a=XZ(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),aQ(a,t)}function HQ(e,t){let n=YZ(e),r=+aQ(n,t)-VQ(n,t);return Math.round(r/QZ)+1}function UQ(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var WQ={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return UQ(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):UQ(n+1,2)},d(e,t){return UQ(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return UQ(e.getHours()%12||12,t.length)},H(e,t){return UQ(e.getHours(),t.length)},m(e,t){return UQ(e.getMinutes(),t.length)},s(e,t){return UQ(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return UQ(Math.trunc(r*10**(n-3)),t.length)}},GQ={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},KQ={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return WQ.y(e,t)},Y:function(e,t,n,r){let i=BQ(e,r),a=i>0?i:1-i;return t===`YY`?UQ(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):UQ(a,t.length)},R:function(e,t){return UQ(sQ(e),t.length)},u:function(e,t){return UQ(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return UQ(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return UQ(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return WQ.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return UQ(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=HQ(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):UQ(i,t.length)},I:function(e,t,n){let r=zQ(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):UQ(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):WQ.d(e,t)},D:function(e,t,n){let r=RQ(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):UQ(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return UQ(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return UQ(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return UQ(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?GQ.noon:r===0?GQ.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?GQ.evening:r>=12?GQ.afternoon:r>=4?GQ.morning:GQ.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return WQ.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):WQ.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):UQ(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):UQ(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):WQ.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):WQ.s(e,t)},S:function(e,t){return WQ.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return JQ(r);case`XXXX`:case`XX`:return YQ(r);default:return YQ(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return JQ(r);case`xxxx`:case`xx`:return YQ(r);default:return YQ(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+qQ(r,`:`);default:return`GMT`+YQ(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+qQ(r,`:`);default:return`GMT`+YQ(r,`:`)}},t:function(e,t,n){return UQ(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return UQ(e.getTime(),t.length)}};function qQ(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+UQ(a,2)}function JQ(e,t){return e%60==0?(e>0?`-`:`+`)+UQ(Math.abs(e)/60,2):YQ(e,t)}function YQ(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=UQ(Math.trunc(r/60),2),a=UQ(r%60,2);return n+i+t+a}var XQ=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},ZQ=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},QQ={p:ZQ,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return XQ(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`})}return a.replace(`{{date}}`,XQ(r,t)).replace(`{{time}}`,ZQ(i,t))}}
vendor: 1,614 bytes, line 487
487,$Q=/^D+$/,e$=/^Y+$/,t$=[`D`,`DD`,`YY`,`YYYY`];function n$(e){return $Q.test(e)}function r$(e){return e$.test(e)}function i$(e,t,n){let r=a$(e,t,n);if(console.warn(r),t$.includes(e))throw RangeError(r)}function a$(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var o$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,c$=/^'([^]*?)'?$/,l$=/''/g,u$=/[a-zA-Z]/;function d$(e,t,n){let r=iQ(),i=n?.locale??r.locale??LQ,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=YZ(e);if(!hQ(s))throw RangeError(`Invalid time value`);let c=t.match(s$).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=QQ[t];return n(e,i.formatLong)}return e}).join(``).match(o$).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:f$(e)};if(KQ[t])return{isToken:!0,value:e};if(t.match(u$))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&r$(a)||!n?.useAdditionalDayOfYearTokens&&n$(a))&&i$(a,t,
487String(e));let o=KQ[a[0]];return o(s,a,i.localize,l)}).join(``)}function f$(e){let t=e.match(c$);return t?t[1].replace(l$,`'`):e}function p$(e,t,n){let r=iQ(),i=n?.locale??r.locale??LQ,a=fQ(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),s,c;a>0?(s=YZ(t),c=YZ(e)):(s=YZ(e),c=YZ(t));let l=CQ(c,s),u=(lQ(c)-lQ(s))/1e3,d=Math.round((l-u)/60),f;if(d<2)return n?.includeSeconds?l<5?i.formatDistance(`lessThanXSeconds`,5,o):l<10?i.formatDistance(`lessThanXSeconds`,10,o):l<20?i.formatDistance(`lessThanXSeconds`,20,o):l<40?i.formatDistance(`halfAMinute`,0,o):l<60?i.formatDistance(`lessThanXMinutes`,1,o):i.formatDistance(`xMinutes`,1,o):d===0?i.formatDistance(`lessThanXMinutes`,1,o):i.formatDistance(`xMinutes`,d,o);if(d<45)return i.formatDistance(`xMinutes`,d,o);if(d<90)return i.formatDistance(`aboutXHours`,1,o);if(d<1440){let e=Math.round(d/60);return i.formatDistance(`aboutXHours`,e,o)}if(d<2520)return i.formatDistance(`xDays`,1,o);if(d<43200){let e=Math.round(d/tQ);return i.formatDistance(`xDays`,e,o)}if(d<86400)return f=Math.round(d/eQ),i.formatDistance(`aboutXMonths`,f,o);if(f=SQ(c,s),f<12){let e=Math.round(d/eQ);return i.formatDistance(`xMonths`,e,o)}{let e=f%12,t=Math.trunc(f/12);return e<3?i.formatDistance(`aboutXYears`,t,o):e<9?i.formatDistance(`overXYears`,t,o):i.formatDistance(`almostXYears`,t+1,o)}}function m$(e,t){return p$(e,pQ(e),t)}var h$=Object.defineProperty,g$=(e,t)=>h$(e,`name`,{value:t,configurable:!0}),_$=`Avatar`,[v$,Xie]=An(_$),y$=[0,()=>void 0],[b$,x$]=v$(_$),S$=c.forwardRef(g$(function(e,t){let{__scopeAvatar:n,...r}=e,[i,a]=c.useState(`idle`),[o,s]=k$();return(0,O.jsx)(b$,{scope:n,imageLoadingStatus:i,setImageLoadingStatus:a,imageCount:o,setImageCount:s,children:(0,O.jsx)(lr.span,{...r,ref:t})})},`Avatar`)),C$=`AvatarImage`,w$=c.forwardRef(g$(function(e,t){let{__scopeAvatar:n,src:r,onLoadingStatusChange:i,...a}=e,o=x$(C$,n);o.setImageCount;let s=D$(r,{referrerPolicy:a.referrerPolicy,crossOrigin:a.crossOrigin,loadingStatus:o.imageLoadingStatus,setLoadingStatus:o.setImageLoadingStatus}),l=pr(e=>{i?.(e)}),u=c.useRef(s);return jr(()=>{let e=u.current;u.current=s,s!==e&&l(s)},[s,l]),s===`loaded`?(0,O.jsx)(lr.img,{...a,ref:t,src:r}):null},`AvatarImage`)),T$=`AvatarFallback`,E$=c.forwardRef(g$(function(e,t){let{__scopeAvatar:n,delayMs:r,...i}=e,a=x$(T$,n),[o,s]=c.useState(r===void 0);return c.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,O.jsx)(lr.span,{...i,ref:t}):null},`AvatarFallback`));function D$(e,{loadingStatus:t,setLoadingStatus:n,referrerPolicy:r,crossOrigin:i}){return jr(()=>{if(!e){n(`error`);return}let t=new window.Image,a=g$(e=>{let t=e.currentTarget;n(O$(t))},`handleLoad`),o=g$(()=>n(`error`),`handleError`);return t.addEventListener(`load`,a),t.addEventListener(`error`,o),r&&(t.referrerPolicy=r),t.crossOrigin=i??null,t.src=e,n(O$(t)),()=>{t.removeEventListener(`load`,a),t.removeEventListener(`error`,o),n(`idle`)}},[e,i,r,n]),t}g$(D$,`useImageLoadingStatus`);function O$(e){return e.complete?e.naturalWidth>0?`loaded`:`error`:`loading`}g$(O$,`getImageLoadingStatus`);function k$(){return y$}g$(k$,`useImageCount`);function A$(e){}g$(A$,`useUpdateImageCount`);var j$=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(S$,{ref:n,className:j(`relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full`,e),...t}));j$.displayName=S$.displayName;var M$=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(w$,{ref:n,className:j(`aspect-square h-full w-full`,e),...t}));M$.displayName=w$.displayName;var N$=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(E$,{ref:n,className:j(`flex h-full w-full items-center justify-center rounded-full bg-muted`,e),...t}));N$.displayName=E$.displayName;function P$({roles:e,className:t}){let n=Nf(e);return n.length===0?null:(0,O.jsx)(`div`,{className:j(`flex flex-wrap items-center gap-1`,t),children:n.map(e=>{let t=Ff(e);return(0,O.jsx)(qf,{variant:`secondary`,className:j(`text-xs font-medium border-transparent no-default-hover-elevate`,t.className),"data-testid":`badge-role`,children:t.label},e)})})}function F$({sourceData:e}){if(!e.metric)return null;let{value:t,label:n,context:r}=e.metric;return(0,O.jsxs)(`div`,{className:`bg-gradient-to-r from-teal-50 to-cyan-50 dark:from-teal-950/30 dark:to-cyan-950/30 border border-teal-200 dark:border-teal-800 rounded-lg p-4 mt-3`,"data-testid":`ai-data-card`,children:[(0,O.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,O.jsx)(`span`,{className:`text-2xl font-bold text-teal-700 dark:text-teal-300`,children:t}
487),(0,O.jsx)(`span`,{className:`text-sm text-teal-600 dark:text-teal-400`,children:n})]}),r&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:r})]})}var I$=[`ð`,`â¤ï¸`,`ð`,`ð¡`,`ð¥`];function L$({post:e}){let{user:t}=Zd(),{toast:n}=ln(),[r,i]=(0,c.useState)(!1),[a,o]=(0,c.useState)(``),[s,l]=(0,c.useState)(e.reactions),[u,d]=(0,c.useState)(!1),[f,p]=(0,c.useState)(!1),[m,h]=(0,c.useState)(e.isFollowingAuthor),[g,_]=(0,c.useState)(null);(0,c.useEffect)(()=>{l(e.reactions)},[e.reactions]),(0,c.useEffect)(()=>{h(e.isFollowingAuthor)},[e.isFollowingAuthor]);let v=t?.id===e.user.id,y=e.isAiGenerated===!0,b=()=>{let t=`${window.location.origin}/posts/${e.id}`,r=document.createElement(`textarea`);r.value=t,r.style.position=`fixed`,r.style.left=`-9999px`,r.style.top=`0`,r.setAttribute(`readonly`,``),document.body.appendChild(r),r.select();let i;try{i=document.execCommand(`copy`)}catch{i=!1}document.body.removeChild(r),i?(p(!0),n({title:`Link copied`,description:`Post link copied to clipboard`}),setTimeout(()=>p(!1),2e3)):n({title:`Copy the link below`,description:t,duration:1e4})},x=e.createdAt?m$(new Date(e.createdAt),{addSuffix:!1}):``,S=Df(`/api/posts/${e.id}/reactions`,{invalidate:[`/api/posts`],mutationOptions:{onMutate:async({emoji:e})=>{l(t=>t.find(t=>t.emoji===e)?t.map(t=>t.emoji===e?{...t,count:t.count+1,hasReacted:!0}:t):[...t,{emoji:e,count:1,hasReacted:!0}])},onError:(e,{emoji:t})=>{l(e=>{let n=e.find(e=>e.emoji===t);return n&&n.count>1?e.map(e=>e.emoji===t?{...e,count:e.count-1,hasReacted:!1}:e):e.filter(e=>e.emoji!==t)})}}}),C=kf(({emoji:t})=>`/api/posts/${e.id}/reactions/${encodeURIComponent(t)}`,{invalidate:[`/api/posts`],mutationOptions:{onMutate:async({emoji:e})=>{l(t=>{let n=t.find(t=>t.emoji===e);return n&&n.count>1?t.map(t=>t.emoji===e?{...t,count:t.count-1,hasReacted:!1}:t):t.filter(t=>t.emoji!==e)})},onError:(e,{emoji:t})=>{l(e=>e.find(e=>e.emoji===t)?e.map(e=>e.emoji===t?{...e,count:e.count+1,hasReacted:!0}:e):[...e,{emoji:t,count:1,hasReacted:!0}])}}}),w=Ef(r?`/api/posts/${e.id}/comments`:null),T=Df(`/api/posts/${e.id}/comments`,{invalidate:[`/api/posts/${e.id}/comments`,`/api/posts`],mutationOptions:{onSuccess:()=>{o(``)},onError:()=>{n({title:`Error`,description:`Failed to post comment`,variant:`destructive`})}}}),E=kf(({commentId:t})=>`/api/posts/${e.id}/comments/${t}`,{invalidate:[`/api/posts/${e.id}/comments`,`/api/posts`],mutationOptions:{onSettled:()=>_(null),onError:()=>{n({title:`Error`,description:`Failed to delete comment`,variant:`destructive`})}}}),ee=Df(`/api/follows`,{invalidate:[`/api/posts`,`/api/posts?filter=following`,`/api/posts?filter=trending`],mutationOptions:{onMutate:()=>{h(!0)},onError:()=>{h(!1),n({title:`Error`,description:`Failed to follow user`,variant:`destructive`})}}}),D=kf(()=>`/api/follows/user/${e.user.id}`,{invalidate:[`/api/posts`,`/api/posts?filter=following`,`/api/posts?filter=trending`],mutationOptions:{onMutate:()=>{h(!1)},onError:()=>{h(!0),n({title:`Error`,description:`Failed to unfollow user`,variant:`destructive`})}}}),te=()=>{if(!t?.id){n({title:`Sign in required`,description:`Please sign in to follow users.`,variant:`destructive`});return}m?D.mutate():ee.mutate({userId:e.user.id})},ne=e=>{if(e.preventDefault(),a.trim()){if(!t?.id){n({title:`Sign in required`,description:`Please sign in to comment.`,variant:`destructive`});return}T.mutate({content:a.trim()})}},re=e=>{_(e),E.mutate({commentId:e})},ie=e=>{if(!t||!t.id){n({title:`Sign in required`,description:`Please sign in to react to posts.`,variant:`destructive`});return}s.find(t=>t.emoji===e)?.hasReacted?C.mutate({emoji:e}):S.mutate({emoji:e})},ae=e.content.length>280,oe=u||!ae?e.content:e.content.slice(0,280)+`...`;return(0,O.jsx)(Bf,{className:j(`overflow-visible`,y&&`border-teal-200 dark:border-teal-800 bg-gradient-to-r from-teal-50/50 to-cyan-50/50 dark:from-teal-950/20 dark:to-cyan-950/20`),"data-testid":`post-card-${e.id}`,children:(0,O.jsx)(Wf,{className:`p-6`,children:(0,O.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,O.jsxs)(j$,{className:j(`h-10 w-10 shrink-0`,y&&`ring-2 ring-teal-400 ring-offset-2`),children:[(0,O.jsx)(M$,{src:e.user.avatar||void 0}),(0,O.jsx)(N$,{className:j(`bg-muted text-sm font-medium`,y&&`bg-teal-100 text-teal-700 dark:bg-teal-900 dark:text-teal-300`),children:y?(0,O.jsx)(Yo,{className:`w-4 h-4`}):e.user.displayName.charAt(0)})]}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,O.jsx)(`span`,{className:`font-semibold text-sm`,children:e.user.displayName}),y&&(0,O.jsxs)(qf,{variant:`secondary`,className:`bg-teal-100 text-teal-700 dark:bg-teal-900 dark:text-teal-300 gap-1`,children:[(0,O.jsx)(Yo,{className:`w-3 h-3`}),`AI Insight`]}),!y&&e.user.roles&&(0,O.jsx)(P$,{roles:e.user.roles})]}),!v&&!y&&t?.id&&(0,O.jsx)(M,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs gap-1`,onClick:te,disabled:ee.isPending||D.isPending,"data-testid":`button-follow-${e.user.id}`,children:ee.isPending||D.isPending?(0,O.jsx)(vo,{className:`w-3 h-3 animate-spin`}):m?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(cs,{className:`w-3 h-3`}),`Unfollow`]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(ls,{className:`w-3 h-3`}),`Follow`]})})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:x}),(0,O.jsxs)(wY,{children:[(0,O.jsx)(TY,{asChild:!0,children:(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`h-8 w-8`,"data-testid":`button-post-menu-${e.id}`,children:(0,O.jsx)(Ga,{className:`w-4 h-4`})})}),(0,O.jsxs)(kY,{align:`end`,children:[(0,O.jsxs)(AY,{disabled:!0,children:[`Save post`,` `,(0,O.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:`Coming soon`})]}),(0,O.jsxs)(AY,{disabled:!0,children:[`Copy link`,` `,(0,O.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:`Use share button`})]}),(0,O.jsxs)(AY,{disabled:!0,className:`text-destructive`,children:[`Report`,` `,(0,O.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:`Coming soon`})]})]})]})]})]}),(0,O.jsxs)(`div`,{className:`mt-3`,children:[(0,O.jsx)(`p`,{className:j(`text-sm leading-relaxed whitespace-pre-wrap`,y&&`text-gray-700 dark:text-gray-300`),children:oe}),ae&&!u&&(0,O.jsx)(M,{variant:`link`,className:`p-0 h-auto text-sm text-muted-foreground`,onClick:()=>d(!0),"data-testid":`button-show-more-${e.id}`,children:`Show more`})]}),y&&e.sourceData&&(0,O.jsx)(F$,{sourceData:e.sourceData}),e.note&&(0,O.jsx)(R$,{artifact:e.note,notebookId:e.note.notebookId,className:`mt-4`}),e.imageUrl&&(0,O.jsx)(`div`,{className:`mt-4 rounded-lg overflow-hidden`,children:(0,O.jsx)(`img`,{src:e.imageUrl,alt:`Post attachment`,className:`w-full max-h-96 object-cover`})}),(0,O.jsxs)(`div`,{className:`flex items-center justify-between mt-4 pt-4 border-t border-border`,children:[(0,O.jsx)(`div`,{className:`flex items-center gap-1 flex-wrap`,children:I$.map(n=>{let r=s.find(e=>e.emoji===n),i=r?.count||0,a=r?.hasReacted||!1,o=!!(t&&t.id);return(0,O.jsxs)(M,{variant:a?`secondary`:`ghost`,size:`sm`,className:`h-8 px-2 gap-1`,onClick:()=>ie(n),disabled:!o,"data-testid":`button-reaction-${n}-${e.id}`,children:[(0,O.jsx)(`span`,{children:n}),i>0&&(0,O.jsx)(`span`,{className:`text-xs`,children:i})]},n)})}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsxs)(M,{variant:`ghost`,size:`sm`,className:`gap-1`,onClick:()=>i(!r),"data-testid":`button-comment-${e.id}`,children:[(0,O.jsx)(wo,{className:`w-4 h-4`}),(0,O.jsx)(`span`,{className:`text-xs`,children:e.commentCount})]}),(0,O.jsxs)(wK,{children:[(0,O.jsx)(TK,{asChild:!0,children:(0,O.jsx)(M,{variant:`ghost`,size:`sm`,className:`gap-1`,"data-testid":`button-share-${e.id}`,children:(0,O.jsx)(Wo,{className:`w-4 h-4`})})}),(0,O.jsxs)(OK,{className:`sm:max-w-md`,children:[(0,O.jsxs)(kK,{children:[(0,O.jsx)(jK,{children:`Share post`}),(0,O.jsx)(MK,{children:`Share this insight with your team`})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(Xf,{readOnly:!0,value:`${window.location.origin}/posts/${e.id}`,className:`flex-1`,"data-testid":`input-share-link`}),(0,O.jsx)(M,{size:`icon`,onClick:b,"data-testid":`button-copy-link`,children:f?(0,O.jsx)(Oa,{className:`w-4 h-4`}):(0,O.jsx)(Ba,{className:`w-4 h-4`})})]})]})]}),e.viewCount!=null&&e.viewCount>0&&(0,O.jsxs)(`span`,{className:`text-xs text-muted-foreground flex items-center gap-1`,children:[(0,O.jsx)(Ja,{className:`w-3 h-3`}),e.viewCount>=1e3?`${(e.viewCount/1e3).toFixed(1)}k`:e.viewCount,` `,`views`]})]})]}),r&&(0,O.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,O.jsxs)(`form`,{onSubmit:ne,className:`flex items-start gap-3`,children:[(0,O.jsxs)(j$,{className:`h-8 w-8 shrink-0`,children:[(0,O.jsx)(M$,{src:t?.avatar||void 0}),(0,O.jsx)(N$,{className:`bg-primary text-primary-foreground text-xs`,children:t?.displayName?.charAt(0)||`?`})]}),(0,O.jsxs)(`div`,{className:`flex-1 flex gap-2`,children:[(0,O.jsx)(Xf,{type:`text`,value:a,onChange:e=>o(e.target.value),placeholder:`Write a comment...`,maxLength:500,className:`flex-1`,"data-testid":`input-comment-${e.id}`}),(0,O.jsx)(M,{type:`submit`,size:`sm`,disabled:!a.trim()||T.isPending,"data-testid":`button-submit-comment-${e.id}`,children:T.isPending?(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin`}):`Post`})]})]}),w.isLoading?(0,O.jsx)(`div`,{className:`flex items-center justify-center py-4`,children:(0,O.jsx)(vo,{className:`w-5 h-5 animate-spin text-muted-foreground`})}):w.isError?(0,O.jsxs)(`div`,{className:`text-center py-4`,children:[(0,O.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load comments.`}),(0,O.jsx)(M,{variant:`ghost`,size:`sm`,onClick:()=>w.refetch(),className:`mt-2`,children:`Try again`})]}):w.data?.comments.length===0?(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground text-center py-2`,children:`No comments yet. Be the first to comment!`}):(0,O.jsx)(`div`,{className:`space-y-3`,children:w.data?.comments.map(e=>
487(0,O.jsx)(z$,{comment:e,isOwn:e.user.id===t?.id,onDelete:()=>re(e.id),isDeleting:g===e.id},e.id))})]})]})]})})})}function R$({artifact:e,notebookId:t,className:n}){let{toast:r}=ln(),[i,a]=(0,c.useState)(!1),[o,s]=(0,c.useState)(!1),l=(e=>{switch(e){case`audio`:return co;case`pdf`:return to;default:return ba}})(e.type),u=!!t&&!o,d=async()=>{if(t&&!i){if(o){r({title:`Access restricted`,description:`You don't have permission to open this notebook.`,variant:`destructive`});return}a(!0);try{(await yf(`GET`,`/api/notebooks/${t}/access-check`)).hasAccess?window.open(`/notebooks/${t}`,`_blank`,`noopener,noreferrer`):(s(!0),r({title:`Access restricted`,description:`You don't have permission to open this notebook.`,variant:`destructive`}))}catch{r({title:`Error`,description:`Could not check notebook access. Please try again.`,variant:`destructive`})}finally{a(!1)}}};return(0,O.jsx)(`div`,{className:j(`rounded-lg bg-muted/50 p-4 group relative`,o&&`opacity-60`,u&&!i&&`cursor-pointer hover-elevate`,i&&`cursor-wait opacity-80`,n),onClick:u||o?d:void 0,role:t?`button`:void 0,tabIndex:t?0:void 0,onKeyDown:t?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d())}:void 0,"data-testid":`link-notebook-preview-${e.id}`,children:(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,O.jsx)(`div`,{className:`w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center shrink-0`,children:i?(0,O.jsx)(vo,{className:`w-5 h-5 text-primary animate-spin`,"data-testid":`spinner-notebook-access-check-${e.id}`}):o?(0,O.jsx)(bo,{className:`w-5 h-5 text-muted-foreground`,"data-testid":`icon-notebook-locked-${e.id}`}):(0,O.jsx)(l,{className:`w-5 h-5 text-primary`})}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:e.title}),o&&(0,O.jsxs)(qf,{variant:`secondary`,className:`text-xs`,children:[(0,O.jsx)(bo,{className:`w-3 h-3 mr-1`}),`Restricted`]})]}),e.content&&(0,O.jsx)(`p`,{className:j(`text-xs text-muted-foreground mt-1`,o?`line-clamp-1`:`line-clamp-2`),children:e.content}),o&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,"data-testid":`text-notebook-access-denied-${e.id}`,children:`You don't have permission to open this notebook.`})]}),t&&(0,O.jsx)(`div`,{className:j(`flex items-center shrink-0`,o?`visible`:`invisible group-hover:visible`),children:o?(0,O.jsx)(bo,{className:`w-4 h-4 text-muted-foreground`}):(0,O.jsx)(Ka,{className:`w-4 h-4 text-muted-foreground`})})]})})}function z$({comment:e,isOwn:t,onDelete:n,isDeleting:r}){let i=e.createdAt?m$(new Date(e.createdAt),{addSuffix:!1}):``;return(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,"data-testid":`comment-${e.id}`,children:[(0,O.jsxs)(j$,{className:`h-7 w-7 shrink-0`,children:[(0,O.jsx)(M$,{src:e.user.avatar||void 0}),(0,O.jsx)(N$,{className:`bg-muted text-xs`,children:e.user.displayName.charAt(0)})]}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`font-medium text-sm`,children:e.user.displayName}),(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:i})]}),t&&(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`h-6 w-6`,onClick:n,disabled:r,"data-testid":`button-delete-comment-${e.id}`,children:r?(0,O.jsx)(vo,{className:`w-3 h-3 animate-spin`}):(0,O.jsx)(rs,{className:`w-3 h-3 text-muted-foreground hover:text-destructive`})})]}),(0,O.jsx)(`p`,{className:`text-sm text-foreground/90 mt-0.5`,children:e.content})]})]})}function B$(e=`all`,t){let n=new URLSearchParams;return e!==`all`&&n.set(`filter`,e),Ef(`/api/posts${n.toString()?`?${n.toString()}`:``}`,{queryOptions:t})}function V$(){return Df(`/api/posts`,{invalidate:[`/api/posts`]})}function H$({note:e,onRemove:t}){let n=e.content?e.content.slice(0,150)+(e.content.length>150?`...`:``):`No content`;return(0,O.jsxs)(`div`,{className:`relative flex items-start gap-3 p-3 bg-muted rounded-lg border`,children:[(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`absolute top-2 right-2 h-6 w-6`,onClick:t,"data-testid":`button-remove-attachment`,children:(0,O.jsx)(ds,{className:`h-4 w-4`})}),(0,O.jsx)(`div`,{className:`flex-shrink-0 p-2 bg-background rounded`,children:(0,O.jsx)(to,{className:`h-5 w-5 text-muted-foreground`})}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0 pr-8`,children:[(0,O.jsx)(`p`,{className:`font-medium text-sm truncate`,children:e.title||`Untitled Note`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-2 mt-1`,children:n})]})]})}var U$=Object.defineProperty,W$=(e,t)=>U$(e,`name`,{value:t,configurable:!0});function G$(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}W$(G$,`useStateMachine`);var K$=`ScrollArea`,[q$,Zie]=An(K$),[J$,Y$]=q$(K$),X$=c.forwardRef(W$(function(e,t){let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,l]=c.useState(null),[u,d]=c.useState(null),[f,p]=c.useState(null),[m,h]=c.useState(null),[g,_]=c.useState(null),[v,y]=c.useState(0),[b,x]=c.useState(0),[S,C]=c.useState(!1),[w,T]=c.useState(!1),E=En(t,l),ee=UK(i);return(0,O.jsx)(J$,{scope:n,type:r,dir:ee,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:d,content:f,onContentChange:p,scrollbarX:m,onScrollbarXChange:h,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:g,onScrollbarYChange:_,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeight
487Change:x,children:(0,O.jsx)(lr.div,{dir:ee,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":v+`px`,"--radix-scroll-area-corner-height":b+`px`,...e.style}})})},`ScrollArea`)),Z$=`ScrollAreaViewport`,Q$=c.forwardRef(W$(function(e,t){let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=Y$(Z$,n),s=En(t,c.useRef(null),o.onViewportChange);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)($$,{nonce:i}),(0,O.jsx)(lr.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,O.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})},`ScrollAreaViewport`)),$$=c.memo(W$(function({nonce:e}){return(0,O.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:e})},`ScrollAreaViewportStyle`),(e,t)=>e.nonce===t.nonce),e1=`ScrollAreaScrollbar`,t1=c.forwardRef(W$(function(e,t){let{forceMount:n,...r}=e,i=Y$(e1,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return c.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,O.jsx)(n1,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,O.jsx)(r1,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,O.jsx)(i1,{...r,ref:t,forceMount:n}):i.type===`always`?(0,O.jsx)(a1,{...r,ref:t,"data-state":`visible`}):null},`ScrollAreaScrollbar`)),n1=c.forwardRef(W$(function(e,t){let{forceMount:n,...r}=e,i=Y$(e1,e.__scopeScrollArea),[a,o]=c.useState(!1);return c.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=W$(()=>{window.clearTimeout(t),o(!0)},`handlePointerEnter`),r=W$(()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)},`handlePointerLeave`);return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,O.jsx)(Lr,{present:n||a,children:(0,O.jsx)(i1,{"data-state":a?`visible`:`hidden`,...r,ref:t})})},`ScrollAreaScrollbarHover`)),r1=c.forwardRef(W$(function(e,t){let{forceMount:n,...r}=e,i=Y$(e1,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=T1(()=>l(`SCROLL_END`),100),[s,l]=G$(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return c.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>l(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,l]),c.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=W$(()=>{let r=e[t];n!==r&&(l(`SCROLL`),o()),n=r},`handleScroll`);return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,l,o]),(0,O.jsx)(Lr,{present:n||s!==`hidden`,children:(0,O.jsx)(a1,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:k(e.onPointerEnter,()=>l(`POINTER_ENTER`)),onPointerLeave:k(e.onPointerLeave,()=>l(`POINTER_LEAVE`))})})},`ScrollAreaScrollbarScroll`)),i1=c.forwardRef(W$(function(e,t){let n=Y$(e1,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=c.useState(!1),s=e.orientation===`horizontal`,l=T1(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return E1(n.viewport,l),E1(n.content,l),(0,O.jsx)(Lr,{present:r||a,children:(0,O.jsx)(a1,{"data-state":a?`visible`:`hidden`,...i,ref:t})})},`ScrollAreaScrollbarAuto`)),a1=c.forwardRef(W$(function(e,t){let{orientation:n=`vertical`,...r}=e,i=Y$(e1,e.__scopeScrollArea),a=c.useRef(null),o=c.useRef(0),[s,l]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=v1(s.viewport,s.content),d={...r,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:W$(e=>a.current=e,`onThumbChange`),onThumbPointerUp:W$(()=>o.current=0,`onThumbPointerUp`),onThumbPointerDown:W$(e=>o.current=e,`onThumbPointerDown`)};function f(e,t){return b1(e,o.current,s,t)}return W$(f,`getScrollPosition`),n===`horizontal`?(0,O.jsx)(o1,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=x1(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}}
487,onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=f(e,i.dir))}}):n===`vertical`?(0,O.jsx)(s1,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=x1(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=f(e))}}):null},`ScrollAreaScrollbarVisible`)),o1=c.forwardRef(W$(function(e,t){let{sizes:n,onSizesChange:r,...i}=e,a=Y$(e1,e.__scopeScrollArea),[o,s]=c.useState(),l=c.useRef(null),u=En(t,l,a.onScrollbarXChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,O.jsx)(u1,{"data-orientation":`horizontal`,...i,ref:u,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":y1(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),C1(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:_1(o.paddingLeft),paddingEnd:_1(o.paddingRight)}})}})},`ScrollAreaScrollbarX`)),s1=c.forwardRef(W$(function(e,t){let{sizes:n,onSizesChange:r,...i}=e,a=Y$(e1,e.__scopeScrollArea),[o,s]=c.useState(),l=c.useRef(null),u=En(t,l,a.onScrollbarYChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,O.jsx)(u1,{"data-orientation":`vertical`,...i,ref:u,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":y1(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),C1(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:
487a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:_1(o.paddingTop),paddingEnd:_1(o.paddingBottom)}})}})},`ScrollAreaScrollbarY`)),[c1,l1]=q$(e1),u1=c.forwardRef(W$(function(e,t){let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...p}=e,m=Y$(e1,n),[h,g]=c.useState(null),_=En(t,g),v=c.useRef(null),y=c.useRef(``),b=m.viewport,x=r.content-r.viewport,S=pr(d),C=pr(l),w=T1(f,10);function T(e){if(v.current){let t=e.clientX-v.current.left,n=e.clientY-v.current.top;u({x:t,y:n})}}return W$(T,`handleDragScroll`),c.useEffect(()=>{let e=W$(e=>{let t=e.target;h?.contains(t)&&S(e,x)},`handleWheel`);return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[b,h,x,S]),c.useEffect(C,[r,C]),E1(h,w),E1(m.content,w),(0,O.jsx)(c1,{scope:n,scrollbar:h,hasThumb:i,onThumbChange:pr(a),onThumbPointerUp:pr(o),onThumbPositionChange:C,onThumbPointerDown:pr(s),children:(0,O.jsx)(lr.div,{...p,ref:_,style:{position:`absolute`,...p.style},onPointerDown:k(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),v.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,m.viewport&&(m.viewport.style.scrollBehavior=`auto`),T(e))}),onPointerMove:k(e.onPointerMove,T),onPointerUp:k(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,m.viewport&&(m.viewport.style.scrollBehavior=``),v.current=null})})})},`ScrollAreaScrollbarImpl`)),d1=`ScrollAreaThumb`,f1=c.forwardRef(W$(function(e,t){let{forceMount:n,...r}=e,i=l1(d1,e.__scopeScrollArea);return(0,O.jsx)(Lr,{present:n||i.hasThumb,children:(0,O.jsx)(p1,{ref:t,...r})})},`ScrollAreaThumb`)),p1=c.forwardRef(W$(function(e,t){let{__scopeScrollArea:n,style:r,...i}=e,a=Y$(d1,n),o=l1(d1,n),{onThumbPositionChange:s}=o,l=En(t,o.onThumbChange),u=c.useRef(void 0),d=T1(()=>{u.current&&=(u.current(),void 0)},100);return c.useEffect(()=>{let e=a.viewport;if(e){let t=W$(()=>{if(d(),!u.current){let t=w1(e,s);u.current=t,s()}},`handleScroll`);return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,d,s]),(0,O.jsx)(lr.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:l,style:{width:`var(--radix-scroll-area-thumb-width)`,he
487ight:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:k(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:k(e.onPointerUp,o.onThumbPointerUp)})},`ScrollAreaThumbImpl`)),m1=`ScrollAreaCorner`,h1=c.forwardRef(W$(function(e,t){let n=Y$(m1,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,O.jsx)(g1,{...e,ref:t}):null},`ScrollAreaCorner`)),g1=c.forwardRef(W$(function(e,t){let{__scopeScrollArea:n,...r}=e,i=Y$(m1,n),[a,o]=c.useState(0),[s,l]=c.useState(0),u=!!(a&&s),{onCornerWidthChange:d,onCornerHeightChange:f}=i;return E1(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),l(e)}),E1(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),c.useEffect(()=>()=>{d(0),f(0)},[d,f]),u?(0,O.jsx)(lr.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null},`ScrollAreaCornerImpl`));function _1(e){return e?parseInt(e,10):0}W$(_1,`toInt`);function v1(e,t){let n=e/t;return isNaN(n)?0:n}W$(v1,`getThumbRatio`);function y1(e){let t=v1(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}W$(y1,`getThumbSize`);function b1(e,t,n,r=`ltr`){let i=y1(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return S1([c,l],d)(e)}W$(b1,`getScrollPositionFromPointer`);function x1(e,t,n=`ltr`){let r=y1(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=WY(e,n===`ltr`?[0,o]:[o*-1,0]);return S1([0,o],[0,s])(c)}W$(x1,`getThumbOffsetFromScroll`);function S1(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}W$(S1,`linearScale`);function C1(e,t){return e>0&&e<t}W$(C1,`isScrollingWithinScrollbarBounds`);var w1=W$((e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return W$((function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)}),`loop`)(),()=>window.cancelAnimationFrame(r)},`addUnlinkedScrollListener`);function T1(e,t){let n=pr(e),r=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),c.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}W$(T1,`useDebounceCallback`);function E1(e,t){let n=pr(t);jr(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}W$(E1,`useResizeObserver`);var D1=X$,O1=Q$,k1=h1,A1=c.forwardRef(({className:e,children:t,...n},r)=>(0,O.jsxs)(D1,{ref:r,className:j(`relative overflow-hidden`,e),...n,children:[(0,O.jsx)(O1,{className:`h-full w-full rounded-[inherit]`,children:t}),(0,O.jsx)(j1,{}),(0,O.jsx)(k1,{})]}));A1.displayName=D1.displayName;var j1=c.forwardRef(({className:e,orientation:t=`vertical`,...n},r)=>(0,O.jsx)(t1,{ref:r,orientation:t,className:j(`flex touch-none select-none transition-colors`,t===`vertical`&&`h-full w-2.5 border-l border-l-transparent p-[1px]`,t===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent p-[1px]`,e),...n,children:(0,O.jsx)(f1,{className:`relative flex-1 rounded-full bg-border`})}));j1.displayName=t1.displayName;function M1(e,t){return Ef(e?`/api/workspaces/${e}/notebooks`:null,{queryOptions:t})}function N1(e){return Df(e?`/api/workspaces/${e}/notebooks`:``,{invalidate:e?[`/api/workspaces/${e}/notebooks`]:[],mutationOptions:{onMutate:()=>{if(!e)throw Error(`workspaceId is required to create a notebook`)}}})}function P1(e,t){return Ef(e?`/api/notebooks/${e}`:null,{queryOptions:t})}function F1(e){return Of(e?`/api/notebooks/${e}`:``,{invalidate:e?[`/api/notebooks/${e}`]:[],mutationOptions:{onMutate:()=>{if(!e)throw Error(`notebookId is required to update a notebook`)}}})}function I1(e,t){return Df(t?`/api/notebooks/${t}
487/pin`:``,{invalidate:e?[`/api/workspaces/${e}/notebooks`]:[],mutationOptions:{onMutate:()=>{if(!e||!t)throw Error(`workspaceId and notebookId are required to pin a notebook`)}}})}function L1(e,t){return kf(t?`/api/notebooks/${t}/pin`:``,{invalidate:e?[`/api/workspaces/${e}/notebooks`]:[],mutationOptions:{onMutate:()=>{if(!e||!t)throw Error(`workspaceId and notebookId are required to unpin a notebook`)}}})}function R1(e,t){return kf(t?`/api/notebooks/${t}`:``,{invalidate:e?[`/api/workspaces/${e}/notebooks`]:[],mutationOptions:{onMutate:()=>{if(!e||!t)throw Error(`workspaceId and notebookId are required to delete a notebook`)}}})}function z1(e){return Of(e?`/api/notebooks/${e}/source-settings`:``,{invalidate:e?[`/api/notebooks/${e}`]:[],mutationOptions:{onMutate:()=>{if(!e)throw Error(`notebookId is required to update source settings`)}}})}function B1(e,t){return Ef(e?`/api/notebooks/${e}/notes`:null,{queryOptions:t})}function V1(e){return Df(()=>{if(!e)throw Error(`notebookId is required to create a note`);return`/api/notebooks/${e}/notes`},{invalidate:e?[`/api/notebooks/${e}/notes`]:[]})}function H1(e){return kf(e=>`/api/notes/${e.noteId}`,{invalidate:e?[`/api/notebooks/${e}/notes`]:[]})}function U1({open:e,onClose:t,onSelect:n}){let{activeWorkspaceId:r}=Tf(),[i,a]=(0,c.useState)(``),[o,s]=(0,c.useState)(new Set),{data:l,isLoading:u}=M1(r),d=(l?.notebooks??[]).filter(e=>e.title.toLowerCase().includes(i.toLowerCase())),f=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},p=e=>{n(e)};return(0,O.jsx)(wK,{open:e,onOpenChange:e=>{e||(a(``),s(new Set),t())},children:(0,O.jsxs)(OK,{className:`max-w-md`,children:[(0,O.jsx)(kK,{children:(0,O.jsx)(jK,{children:`Attach Notebook`})}),(0,O.jsxs)(`div`,{className:`relative`,children:[(0,O.jsx)(Ho,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground`}),(0,O.jsx)(Xf,{placeholder:`Search notebooks...`,value:i,onChange:e=>a(e.target.value),className:`pl-9`,"data-testid":`input-search-notebooks`})]}),(0,O.jsx)(A1,{className:`h-[300px] pr-4`,children:u?(0,O.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,O.jsx)(vo,{className:`h-6 w-6 animate-spin text-muted-foreground`})}):d.length===0?(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-center`,children:[(0,O.jsx)(xa,{className:`h-10 w-10 text-muted-foreground mb-2`}),(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:i?`No notebooks found`:`No notebooks yet`})]}):(0,O.jsx)(`div`,{className:`space-y-1`,children:d.map(e=>(0,O.jsx)(W1,{notebook:e,isExpanded:o.has(e.id),onToggle:()=>f(e.id),onSelectNote:p},e.id))})}),(0,O.jsx)(`div`,{className:`flex justify-end`,children:(0,O.jsx)(M,{variant:`outline`,onClick:t,"data-testid":`button-cancel-picker`,children:`Cancel`})})]})})}function W1({notebook:e,isExpanded:t,onToggle:n,onSelectNote:r}){let{data:i,isLoading:a}=B1(t?e.id:void 0),o=i?.notes??[];return(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`button`,{className:`flex items-center gap-2 w-full p-2 rounded hover:bg-muted text-left`,onClick:n,"data-testid":`notebook-item-${e.id}`,children:[t?(0,O.jsx)(ka,{className:`h-4 w-4 text-muted-foreground`}):(0,O.jsx)(ja,{className:`h-4 w-4 text-muted-foreground`}),(0,O.jsx)(xa,{className:`h-4 w-4`}),(0,O.jsx)(`span`,{className:`font-medium truncate`,children:e.title})]}),t&&(0,O.jsx)(`div`,{className:`ml-6 space-y-1`,children:a?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 p-2 text-muted-foreground`,children:[(0,O.jsx)(vo,{className:`h-3 w-3 animate-spin`}),(0,O.jsx)(`span`,{className:`text-xs`,children:`Loading notes...`})]}):o.length===0?(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground p-2`,children:`No notes in this notebook`}):o.map(e=>(0,O.jsxs)(`button`,{className:`flex items-center gap-2 w-full p-2 rounded hover:bg-muted text-left`,onClick:()=>r(e),"data-testid":`note-item-${e.id}`,children:[(0,O.jsx)(to,{className:`h-4 w-4 text-muted-foreground`}),(0,O.jsx)(`span`,{className:`text-sm truncate`,children:e.title||`Untitled Note`})]},e.id))})]})}function G1({onPostCreated:e}){let{user:t}
487=Zd(),{toast:n}=ln(),[r,i]=(0,c.useState)(``),[a,o]=(0,c.useState)(null),[s,l]=(0,c.useState)(!1),u=V$(),d=()=>{i(``),o(null),n({title:`Post created`,description:`Your post has been shared.`}),e?.()},f=()=>{n({title:`Error`,description:`Failed to create post. Please try again.`,variant:`destructive`})},p=()=>{r.trim()&&u.mutate({content:r.trim(),artifactId:a?.id},{onSuccess:d,onError:f})};return t?(0,O.jsxs)(`div`,{className:`bg-card rounded-lg border p-4 mb-6`,"data-testid":`post-composer`,children:[(0,O.jsxs)(`div`,{className:`flex gap-3`,children:[(0,O.jsxs)(j$,{className:`h-10 w-10`,children:[(0,O.jsx)(M$,{src:t.avatar??void 0}),(0,O.jsx)(N$,{children:t.displayName?.slice(0,2).toUpperCase()??`U`})]}),(0,O.jsxs)(`div`,{className:`flex-1 space-y-3`,children:[(0,O.jsx)(FY,{placeholder:`Share an insight or update...`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),u.isPending||p())},maxLength:1e3,className:`min-h-[80px] resize-none`,"data-testid":`input-post-content`}),a&&(0,O.jsx)(H$,{note:a,onRemove:()=>{o(null)}}),(0,O.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,O.jsx)(`div`,{className:`flex gap-2`,children:(0,O.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{l(!0)},"data-testid":`button-attach-notebook`,children:[(0,O.jsx)(Mo,{
487className:`h-4 w-4 mr-2`}),`Attach Notebook`]})}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[r.length,`/1000`]}),(0,O.jsx)(M,{onClick:p,disabled:!r.trim()||u.isPending,size:`sm`,"data-testid":`button-submit-post`,children:u.isPending?`Posting...`:`Post`})]})]})]})]}),s&&(0,O.jsx)(U1,{open:s,onClose:()=>l(!1),onSelect:e=>{o(e),l(!1)}})]}):null}var K1=Object.defineProperty,q1=(e,t)=>K1(e,`name`,{value:t,configurable:!0}),J1=`Tabs`,[Y1,Qie]=An(J1,[sq]),X1=sq(),[Z1,Q1]=Y1(J1),$1=c.forwardRef(q1(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=UK(s),[d,f]=Zr({prop:r,onChange:i,defaultProp:a??``,caller:J1});return(0,O.jsx)(Z1,{scope:n,baseId:Cc(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,O.jsx)(lr.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),e0=`TabsList`,t0=c.forwardRef(q1(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=Q1(e0,n),o=X1(n);return(0,O.jsx)(yq,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,O.jsx)(lr.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),n0=`TabsTrigger`,r0=c.forwardRef(q1(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Q1(n0,n),s=X1(n),c=o0(o.baseId,r),l=s0(o.baseId,r),u=r===o.value;return(0,O.jsx)(bq,{asChild:!0,...s,focusable:!i,active:u,children:(0,O.jsx)(lr.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:k(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:k(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:k(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),i0=`TabsContent`,a0=c.forwardRef(q1(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Q1(i0,n),l=o0(s.baseId,r),u=s0(s.baseId,r),d=r===s.value,f=c.useRef(d);return c.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,O.jsx)(Lr,{present:i||d,children:({present:n})=>(0,O.jsx)(lr.div,{"data-state":d?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function o0(e,t){return`${e}-trigger-${t}`}q1(o0,`makeTriggerId`);function s0(e,t){return`${e}-content-${t}`}q1(s0,`makeContentId`);var c0=$1,l0=t0,u0=r0,d0=a0,f0=c0,p0=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(l0,{ref:n,className:j(`inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground`,e),...t}));p0.displayName=l0.displayName;var m0=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(u0,{ref:n,className:j(`inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm`,e),...t}));m0.displayName=u0.displayName;var h0=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(d0,{ref:n,className:j(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));h0.displayName=d0.displayName;var g0=[`cycle-of-motivation-index`,`recognition-outcomes`,`recognition-program-health`,`recognition-retention-signal`];function _0(){let[e,t]=(0,c.useState)(`all`),{data:n,isLoading:r}=B$(e),i=n?.posts??[];return(0,O.jsxs)(`div`,{className:`py-6 px-6`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold mb-6`,"data-testid":`text-home-title`,children:`Home`}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-10`,children:[(0,O.jsx)(`section`,{className:`lg:col-span-7`,"data-testid":`dive-panel`,children:(0,O.jsx)(GZ,{dives:g0})}),(0,O.jsxs)(`section`,{className:`lg:col-span-3 space-y-4`,"data-testid":`feed-panel`,children:[(0,O.jsx)(`div`,{className:`flex justify-end`,children:(0,O.jsx)(f0,{value:e,onValueChange:e=>t(e),children:(0,O.jsxs)(p0,{children:[(0,O.jsx)(m0,{value:`all`,"data-testid":`tab-all`,children:`All`}),(0,O.jsx)(m0,{value:`following`,"data-testid":`tab-following`,children:`Following`}),(0,O.jsx)(m0,{value:`trending`,"data-testid":`tab-trending`,children:`Trending`})]})})}),(0,O.jsx)(G1,{}),r?(0,O.jsx)(`div`,{className:`space-y-4`,children:[1,2,3].map(e=>(0,O.jsx)(v0,{},e))}):i&&i.length>0?(0,O.jsx)(`div`,{className:`space-y-4`,children:i.map(e=>(0,O.jsx)(L$,{post:e},e.id))}):(0,O.jsx)(y0,{})]})]})]})}function v0(){return(0,O.jsxs)(`div`,{className:`border rounded-lg p-6 space-y-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,O.jsx)(_h,{className:`h-10 w-10 rounded-full`}),(0,O.jsxs)(`div`,{className:`space-y-2 flex-1`,children:[(0,O.jsx)(_h,{className:`h-4 w-32`}),(0,O.jsx)(_h,{className:`h-3 w-48`})]})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(_h,{className:`h-4 w-full`}),(0,O.jsx)(_h,{className:`h-4 w-3/4`}),(0,O.jsx)(_h,{className:`h-4 w-1/2`})]}),(0,O.jsxs)(`div`,{className:`flex gap-2`,children:[(0,O.jsx)(_h,{className:`h-8 w-16`}),(0,O.jsx)(_h,{className:`h-8 w-16`}),(0,O.jsx)(_h,{className:`h-8 w-16`})]})]})}function y0(){return(0,O.jsxs)(`div`,{className:`text-center py-16`,"data-testid":`empty-feed`,children:[(0,O.jsx)(`div`,{className:`w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center`,children:(0,O.jsx)(`svg`,{className:`w-8 h-8 text-muted-foreground`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,O.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z`})})}),(0,O.jsx)(`h3`,{className:`text-lg font-medium mb-2`,children:`No posts yet`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground max-w-sm mx-auto`,children:`Start by creating a notebook and sharing your AI-powered insights with your team.`}),(0,O.jsx)(_e,{href:`/notebooks/new`,children:(0,O.jsxs)(M,{className:`mt-4 gap-2`,"data-testid":`button-create-first-notebook`,children:[(0,O.jsx)(Yo,{className:`w-4 h-4`}),`Create your first notebook`]})})]})}function b0(){let[e,t]=(0,c.useState)(``),[n,r]=(0,c.useState)(!1);return(0,O.jsxs)(`div`,{className:`p-6`,children:[(0,O.jsxs)(`div`,{className:`mb-8`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold mb-4`,"data-testid":`text-search-title`,children:`Search`}),(0,O.jsx)(`form`,{onSubmit:t=>{t.preventDefault(),e.trim()&&r(!0)},children:(0,O.jsxs)(`div`,{className:`relative`,children:[(0,O.jsx)(Ho,{className:`absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground`}),(0,O.jsx)(Xf,{type:`search`,placeholder:`Search notebooks, artifacts, people, and more...`,value:e,onCh
487ange:e=>t(e.target.value),className:`pl-12 h-12 text-base`,"data-testid":`input-search`})]})})]}),n?(0,O.jsx)(x0,{query:e}):(0,O.jsx)(C0,{onSearch:t})]})}function x0({query:e}){return(0,O.jsxs)(f0,{defaultValue:`all`,className:`w-full`,children:[(0,O.jsxs)(p0,{className:`mb-6`,children:[(0,O.jsx)(m0,{value:`all`,"data-testid":`tab-search-all`,children:`All`}),(0,O.jsx)(m0,{value:`notebooks`,"data-testid":`tab-search-notebooks`,children:`Notebooks`}),(0,O.jsx)(m0,{value:`artifacts`,"data-testid":`tab-search-artifacts`,children:`Artifacts`}),(0,O.jsx)(m0,{value:`people`,"data-testid":`tab-search-people`,children:`People`})]}),(0,O.jsx)(h0,{value:`all`,children:(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`text-sm text-muted-foreground mb-4`,children:[`Results for "`,e,`"`]}),(0,O.jsx)(S0,{type:`notebook`,title:`Q4 Recognition Analysis`,description:`Analysis of employee recognition patterns in Q4`,meta:`Updated 2 days ago`}),(0,O.jsx)(S0,{type:`artifact`,title:`Manager Training Insights Summary`,description:`Key findings from manager training effectiveness analysis`,meta:`Created 1 week ago`}),(0,O.jsx)(S0,{type:`user`,title:`Casey Winters`,description:`Co-founder at SuperMe`,meta:`12 insights shared`})]})}),(0,O.jsxs)(h0,{value:`notebooks`,children:[(0,O.jsxs)(`div`,{className:`text-sm text-muted-foreground mb-4`,children:[`Notebooks matching "`,e,`"`]}),(0,O.jsx)(S0,{type:`notebook`,title:`Q4 Recognition Analysis`,description:`Analysis of employee recognition patterns in Q4`,meta:`Updated 2 days ago`})]}),(0,O.jsxs)(h0,{value:`artifacts`,children:[(0,O.jsxs)(`div`,{className:`text-sm text-muted-foreground mb-4`,children:[`Artifacts matching "`,e,`"`]}),(0,O.jsx)(S0,{type:`artifact`,title:`Manager Training Insights Summary`,description:`Key findings from manager training effectiveness analysis`,meta:`Created 1 week ago`})]}),(0,O.jsxs)(h0,{value:`people`,children:[(0,O.jsxs)(`div`,{className:`text-sm text-muted-foreground mb-4`,children:[`People matching "`,e,`"`]}),(0,O.jsx)(S0,{type:`user`,title:`Casey Winters`,description:`Co-founder at SuperMe`,meta:`12 insights shared`})]})]})}function S0({type:e,title:t,description:n,meta:r}){return(0,O.jsx)(Bf,{className:`hover-elevate cursor-pointer`,"data-testid":`search-result-${t.toLowerCase().replace(/\s/g,`-`)}`,children:(0,O.jsx)(Wf,{className:`p-4`,children:(0,O.jsxs)(`div`,{className:`flex items-start gap-4`,children:[e===`user`?(0,O.jsx)(j$,{className:`h-10 w-10`,children:(0,O.jsx)(N$,{className:`bg-muted`,children:t.charAt(0)})}):(0,O.jsx)(`div`,{className:`w-10 h-10 rounded-lg bg-muted flex items-center justify-center text-muted-foreground`,children:(()=>{switch(e){case`notebook`:return(0,O.jsx)(ba,{className:`w-5 h-5`});case`artifact`:return(0,O.jsx)(to,{className:`w-5 h-5`});case`user`:return null;case`topic`:return(0,O.jsx)(so,{className:`w-5 h-5`})}})()}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:t}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground mt-0.5`,children:n}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-2`,children:r})]})]})})})}function C0({onSearch:e}){return(0,O.jsxs)(`div`,{className:`space-y-8`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{className:`text-sm font-medium mb-4`,children:`Recent Searches`}),(0,O.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:[`recognition trends Q4`,`manager effectiveness`,`department benchmarks`,`employee engagement`].map(t=>(0,O.jsxs)(M,{variant:`outline`,size:`sm`,onClick:()=>e(t),"data-testid":`recent-search-${t.replace(/\s/g,`-`)}`,children:[(0,O.jsx)(Ho,{className:`w-3 h-3 mr-2`}),t]},t))})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{className:`text-sm font-medium mb-4`,children:`Trending Topics`}),(0,O.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[{title:`Recognition Patterns`,count:234},{title:`Remote Work Insights`,count:189},{title:`Manager Training`,count:156},{title:`Engagement Metrics`,count:134}].map(t=>(0,O.jsx)(`button`,{onClick:()=>e(t.title),className:`text-left p-4 rounded-lg border border-border hover-elevate`,"data-testid":`trending-${t.title.toLowerCase().replace(/\s/g,`-`)}`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(so,{className:`w-5 h-5 text-muted-foreground`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:t.title}),(0,O.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[t.count,` inquiries`]})]})]})},t.title))})]})]})}var w0=[{id:`1`,type:`reaction`,user:{name:`Casey Winters`},content:`reacted to your insight "Q4 Recognition Trends"`,timestamp:new Date(Date.now()-18e5),read:!1},{id:`2`,type:`comment`,user:{name:`Austin Hay`},content:`commented on your post about recognition patterns`,timestamp:new Date(Date.now()-72e5),read:!1},{id:`3`,type:`follow`,user:{name:`Sunny Patneedi`},content:`started following you`,timestamp:new Date(Date.now()-18e6),read:!0},{id:`4`,type:`share`,user:{name:`Siddharth Gupta`},content:`shared your artifact "Manager Effectiveness Report"`,timestamp:new Date(Date.now()-864e5),read:!0},{id:`5`,type:`mention`,user:{name:`Bharath Jayaram`},content:`mentioned you in a comment`,timestamp:new Date(Date.now()-1728e5),read:!0}];function T0(){let[e,t]=(0,c.useState)(w0),n=e.filter(e=>!e.read).length,r=()=>{t(e=>e.map(e=>({...e,read:!0})))},i=e=>{t(t=>t.map(t=>
487t.id===e?{...t,read:!0}:t))};return(0,O.jsxs)(`div`,{className:`p-6`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between mb-6`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold`,"data-testid":`text-inbox-title`,children:`Inbox`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:n>0?`${n} unread notifications`:`All caught up!`})]}),n>0&&(0,O.jsxs)(M,{variant:`outline`,size:`sm`,onClick:r,className:`gap-2`,"data-testid":`button-mark-all-read`,children:[(0,O.jsx)(Da,{className:`w-4 h-4`}),`Mark all as read`]})]}),(0,O.jsxs)(f0,{defaultValue:`all`,className:`w-full`,children:[(0,O.jsxs)(p0,{className:`mb-6`,children:[(0,O.jsxs)(m0,{value:`all`,"data-testid":`tab-inbox-all`,children:[`All`,n>0&&(0,O.jsx)(qf,{variant:`secondary`,className:`ml-2 text-xs`,children:n})]}),(0,O.jsx)(m0,{value:`unread`,"data-testid":`tab-inbox-unread`,children:`Unread`}),(0,O.jsx)(m0,{value:`mentions`,"data-testid":`tab-inbox-mentions`,children:`Mentions`})]}),(0,O.jsx)(h0,{value:`all`,children:(0,O.jsx)(E0,{notifications:e,onMarkAsRead:i})}),(0,O.jsx)(h0,{value:`unread`,children:(0,O.jsx)(E0,{notifications:e.filter(e=>!e.read),onMarkAsRead:i})}),(0,O.jsx)(h0,{value:`mentions`,children:(0,O.jsx)(E0,{notifications:e.filter(e=>e.type===`mention`),onMarkAsRead:i})})]})]})}function E0({notifications:e,onMarkAsRead:t}){return e.length===0?(0,O.jsxs)(`div`,{className:`text-center py-16`,"data-testid":`empty-notifications`,children:[(0,O.jsx)(`div`,{className:`w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center`,children:(0,O.jsx)(ya,{className:`w-8 h-8 text-muted-foreground`})}),(0,O.jsx)(`h3`,{className:`text-lg font-medium mb-2`,children:`No notifications`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`You're all caught up! Check back later.`})]}):(0,O.jsx)(`div`,{className:`space-y-2`,children:e.map(e=>(0,O.jsx)(D0,{notification:e,onMarkAsRead:()=>t(e.id)},e.id))})}function D0({notification:e,onMarkAsRead:t}){let n=()=>{switch(e.type){case`comment`:return(0,O.jsx)(wo,{className:`w-4 h-4`});case`reaction`:return(0,O.jsx)(lo,{className:`w-4 h-4`});case`follow`:return(0,O.jsx)(ls,{className:`w-4 h-4`});case`share`:return(0,O.jsx)(Wo,{className:`w-4 h-4`});case`mention`:return(0,O.jsx)(ya,{className:`w-4 h-4`})}},r=()=>{switch(e.type){case`comment`:return`text-blue-500 bg-blue-500/10`;case`reaction`:return`text-rose-500 bg-rose-500/10`;case`follow`:return`text-emerald-500 bg-emerald-500/10`;case`share`:return`text-violet-500 bg-violet-500/10`;case`mention`:return`text-amber-500 bg-amber-500/10`}},i=m$(e.timestamp,{addSuffix:!0});return(0,O.jsx)(Bf,{className:j(`hover-elevate cursor-pointer`,!e.read&&`border-l-2 border-l-primary`),onClick:t,"data-testid":`notification-${e.id}`,children:(0,O.jsx)(Wf,{className:`p-4`,children:(0,O.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,O.jsxs)(`div`,{className:`relative`,children:[(0,O.jsxs)(j$,{className:`h-10 w-10`,children:[(0,O.jsx)(M$,{src:e.user.avatar}),(0,O.jsx)(N$,{className:`bg-muted`,children:e.user.name.charAt(0)})]}),(0,O.jsx)(`div`,{className:j(`absolute -bottom-1 -right-1 w-5 h-5 rounded-full flex items-center justify-center`,r()),children:n()})]}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsxs)(`p`,{className:`text-sm`,children:[(0,O.jsx)(`span`,{className:`font-medium`,children:e.user.name}),` `,(0,O.jsx)(`span`,{className:`text-muted-foreground`,children:e.content})]}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:i})]}),!e.read&&(0,O.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-primary shrink-0 mt-2`})]})})})}function O0(e){return e?e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`:``}function k0(e){if(!e)return``;let t=Math.floor(e/60),n=e%60;return`${t}:${String(n).padStart(2,`0`)}`}function A0(){let{data:e,isLoading:t,refetch:n}=Ef(`/api/artifacts`),r=e?.artifacts||[],i=r.reduce((e,t)=>{let n=t.type||`other`;return e[n]||(e[n]=[]),e[n].push(t),e},{}),a=i.pdf||[];return(0,O.jsxs)(`div`,{className:`p-4 sm:p-6`,children:[(0,O.jsxs)(`div`,{className:`mb-6 sm:mb-8`,children:[(0,O.jsx)(`h1`,{className:`text-xl sm:text-2xl font-semibold`,"data-testid":`text-artifacts-title`,children:`Artifacts`}),(0,O.jsx)(`p`,{className:`text-xs sm:text-sm text-muted-foreground mt-1`,children:`Your saved PDF exports and audio briefings`})]}),(0,O.jsxs)(f0,{defaultValue:`all`,className:`w-full`,children:[(0,O.jsxs)(p0,{className:`mb-4 sm:mb-6 flex-wrap h-auto gap-1`,children:[(0,O.jsxs)(m0,{value:`all`,"data-testid":`tab-all`,className:`text-xs sm:text-sm`,children:[`All (`,r.length,`)`]}),(0,O.jsxs)(m0,{value:`pdf`,"data-testid":`tab-pdf`,className:`text-xs sm:text-sm`,children:[`PDF (`,a.length,`)`]}),(0,O.jsxs)(m0,{value:`audio`,"data-testid":`tab-audio`,className:`text-xs sm:text-sm`,children:[`Audio (`,i.audio?.length||0,`)`]})]}),(0,O.jsx)(h0,{value:`all`,children:t?(0,O.jsx)(j0,{loading:!0}):r.length>0?(0,O.jsx)(j0,{artifacts:r,onDeleted:n}):(0,O.jsx)(P0,{})}),(0,O.jsx)(h0,{value:`pdf`,children:t?(0,O.jsx)(j0,{loading:!0}):a.length>0?(0,O.jsx)(j0,{artifacts:a,onDeleted:n}):(0,O.jsx)(P0,{type:`pdf`})}),(0,O.jsx)(h0,{value:`audio`,children:t?(0,O.jsx)(j0,{loading:!0}):(i.audio?.length??0)>0?(0,O.jsx)(j0,{artifacts:i.audio,onDeleted:n}):(0,O.jsx)(P0,{type:`audio`})})]})]})}function j0({artifacts:e,loading:t,onDeleted:n}){return t?(0,O.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4`,children:[1,2,3,4,5,6].map(e=>(0,O.jsx)(N0,{},e))}):(0,O.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4`,children:e?.map(e=>(0,O.jsx)(M0,{artifact:e,onDeleted:n},e.id))})}function M0({artifact:e,onDeleted:t}){let{toast:n}=ln(),r=H1(e.notebookId||void 0),i=e=>{switch(e){case`audio`:return co;case`pdf`:return to;default:return ba}},a=e=>{switch(e){case`audio`:return`text-violet-500 bg-violet-500/10`;case`pdf`:return`text-red-500 bg-red-500/10`;default:return`text-primary bg-primary/10`}},o=i(e.type),s=a(e.type),c=e.createdAt?m$(new Date(e.createdAt),{addSuffix:!0}):``,l=()=>{if(e.artifactUrl){let t=window.open(e.artifactUrl,`_blank`);t&&(t.opener=null)}};return(0,O.jsxs)(Bf,{className:`hover:shadow-md transition-shadow`,"data-testid":`artifact-card-${e.id}`,children:[(0,O.jsx)(Vf,{className:`pb-2 sm:pb-3`,children:(0,O.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 sm:gap-3 min-w-0 flex-1`,children:[(0,O.jsx)(`div`,{className:`w-9 h-9 sm:w-10 sm:h-10 rounded-lg flex items-center justify-center shrink-0 ${s}`,children:(0,O.jsx)(o,{className:`w-4 h-4 sm:w-5 sm:h-5`})}),(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(`h3`,{className:`font-medium text-sm truncate`,title:e.title,children:e.title}),(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5 mt-1 flex-wrap`,children:[(0,O.jsx)(qf,{variant:`secondary`,className:`text-[10px] sm:text-xs capitalize`,children:e.type}),e.artifactSize&&(0,O.jsxs)(`span`,{className:`text-[10px] sm:text-xs text-muted-foreground flex items-center gap-0.5`,children:[(0,O.jsx)(oo,{className:`w-3 h-3`}),O0(e.artifactSize)]}),e.type===`audio`&&e.artifactDuration&&(0,O.jsxs)(`span`,{className:`text-[10px] sm:text-xs text-muted-foreground flex items-center gap-0.5`,children:[(0,O.jsx)(za,{className:`w-3 h-3`}),k0(e.artifactDuration)]})]})]})]}),(0,O.jsxs)(wY,{children:[(0,O.jsx)(TY,{asChild:!0,children:(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`h-8 w-8 shrink-0`,"data-testid":`button-artifact-menu-${e.id}`,children:(0,O.jsx)(Ga,{className:`w-4 h-4`})})}),(0,O.jsxs)(kY,{align:`end`,className:`w-44`,children:[e.artifactUrl&&(0,O.jsxs)(AY,{onClick:l,children:[(0,O.jsx)(Ua,{className:`w-4 h-4 mr-2`}),`Download`]}),e.artifactUrl&&(0,O.jsxs)(AY,{onClick:l,children:[(0,O.jsx)(Ka,{className:`w-4 h-4 mr-2`}),`Open in new tab`]}),(0,O.jsx)(PY,{}),(0,O.jsxs)(AY,{className:`text-destructive focus:text-destructive`,onClick:async()=>{try{await r.mutateAsync({noteId:e.id}),n({title:`Deleted`,description:`Artifact deleted successfully`}),t?.()}catch{n({title:`Error`,description:`Failed to delete artifact`,variant:`destructive`})}},disabled:r.isPending,children:[(0,O.jsx)(rs,{className:`w-4 h-4 mr-2`}),`Delete`]})]})]})]})}),(0,O.jsxs)(Wf,{className:`pt-0`,children:[e.type===`audio`&&e.artifactUrl&&(0,O.jsx)(`div`,{className:`mb-3`,children:(0,O.jsx)(`audio`,{controls:!0,src:e.artifactUrl,className:`w-full h-10`,preload:`metadata`})}),e.type!==`audio`&&e.content&&(0,O.jsx)(`p`,{className:`text-xs sm:text-sm text-muted-foreground line-clamp-2 mb-3`,children:e.content}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] sm:text-xs text-muted-foreground`,children:[(0,O.jsx)(wa,{className:`w-3 h-3`}),(0,O.jsx)(`span`,{children:c})]})]})]})}function N0(){return(0,O.jsxs)(Bf,{children:[(0,O.jsx)(Vf,{className:`pb-3`,children:(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,O.jsx)(_h,{className:`w-10 h-10 rounded-lg`}),(0,O.jsxs)(`div`,{className:`flex-1`,children:[(0,O.jsx)(_h,{className:`h-4 w-3/4`}),(0,O.jsx)(_h,{className:`h-5 w-16 mt-2 rounded-full`})]})]})}),(0,O.jsxs)(Wf,{children:[(0,O.jsx)(_h,{className:`h-4 w-full`}),(0,O.jsx)(_h,{className:`h-4 w-2/3 mt-2`}),(0,O.jsx)(_h,{className:`h-3 w-24 mt-4`})]})]})}function P0({type:e}){return(0,O.jsxs)(`div`,{className:`text-center py-12 sm:py-16`,"data-testid":`empty-artifacts`,children:[(0,O.jsx)(`div`,{className:`w-14 h-14 sm:w-16 sm:h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center`,children:(0,O.jsx)(Yo,{className:`w-7 h-7 sm:w-8 sm:h-8 text-muted-foreground`})}),(0,O.jsx)(`h3`,{className:`text-base sm:text-lg font-medium mb-2`,children:`No artifacts yet`}),(0,O.jsx)(`p`,{className:`text-xs sm:text-sm text-muted-foreground max-w-sm mx-auto px-4`,children:(()=>{switch(e){case`audio`:return`Generate audio briefings from your notebook
487notes using 'Save Audio Artifact'`;case`pdf`:return`Save PDF exports from your notebook notes using 'Save PDF Artifact'`;default:return`Save notes as PDF or audio artifacts from your notebooks. They'll appear here for easy access.`}})()}),(0,O.jsx)(_e,{href:`/notebooks`,children:(0,O.jsx)(M,{variant:`outline`,className:`mt-6`,children:`Open a notebook`})})]})}var F0=Object.defineProperty,I0=(e,t)=>F0(e,`name`,{value:t,configurable:!0}),[L0,$ie]=An(`AlertDialog`,[Lm]),R0=Lm(),z0=I0(e=>{let{__scopeAlertDialog:t,...n}=e,r=R0(t);return(0,O.jsx)(Bm,{...r,...n,modal:!0})},`AlertDialog`),B0=c.forwardRef(I0(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=R0(n);return(0,O.jsx)(Hm,{...i,...r,ref:t})},`AlertDialogTrigger`)),V0=I0(e=>{let{__scopeAlertDialog:t,...n}=e,r=R0(t);return(0,O.jsx)(Km,{...r,...n})},`AlertDialogPortal`),H0=c.forwardRef(I0(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=R0(n);return(0,O.jsx)(Jm,{...i,...r,ref:t})},`AlertDialogOverlay`)),[U0,W0]=L0(`AlertDialogContent`),G0=c.forwardRef(I0(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=R0(n),o=En(t,c.useRef(null)),s=c.useRef(null);return(0,O.jsx)(U0,{scope:n,cancelRef:s,children:(0,O.jsx)(Qm,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:k(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),K0=c.forwardRef(I0(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=R0(n);return(0,O.jsx)(rh,{...i,...r,ref:t})},`AlertDialogTitle`)),q0=c.forwardRef(I0(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=R0(n);return(0,O.jsx)(ah,{...i,...r,ref:t})},`AlertDialogDescription`)),J0=c.forwardRef(I0(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=R0(n);return(0,O.jsx)(sh,{...i,...r,ref:t})},`AlertDialogAction`)),Y0=`AlertDialogCancel`,X0=c.forwardRef(I0(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=W0(Y0,n),a=R0(n),o=En(t,i);return(0,O.jsx)(sh,{...a,...r,ref:o})},`AlertDialogCancel`)),Z0=z0,eae=B0,Q0=V0,$0=H0,e2=G0,t2=J0,n2=X0,r2=K0,i2=q0,a2=Z0,o2=eae,s2=Q0,c2=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)($0,{className:j(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));c2.displayName=$0.displayName;var l2=c.forwardRef(({className:e,...t},n)=>(0,O.jsxs)(s2,{children:[(0,O.jsx)(c2,{}),(0,O.jsx)(e2,{ref:n,className:j(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...t})]}));l2.displayName=e2.displayName;var u2=({className:e,...t})=>(0,O.jsx)(`div`,{className:j(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});u2.displayName=`AlertDialogHeader`;var d2=({className:e,...t})=>(0,O.jsx)(`div`,{className:j(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});d2.displayName=`AlertDialogFooter`;var f2=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(r2,{ref:n,className:j(`text-lg font-semibold`,e),...t}));f2.displayName=r2.displayName;var p2=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(i2,{ref:n,className:j(`text-sm text-muted-foreground`,e),...t}));p2.displayName=i2.displayName;var m2=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(t2,{ref:n,className:j(ff(),e),...t}));m2.displayName=t2.displayName;var h2=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(n2,{ref:n,className:j(ff({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));h2.displayName=n2.displayName;function g2(e){return{pinned:e.filter(e=>e.isPinned),rest:e.filter(e=>!e.isPinned)}}function _2(){let{toast:e}=ln(),[,t]=de(),{activeWorkspaceId:n,loading:r}=Tf(),{data:i,isLoading:a}=M1(n),o=i?.notebooks??[],{pinned:s,rest:c}=g2(o),{mutateAsync:l,isPending:u}=N1(n);return(0,O.jsxs)(`div`,{className:`p-4 container mx-auto`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between mb-6`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h1`,{className:`text-xl`,"data-testid":`text-notebooks-title`,children:`My Notebooks`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Your AI-powered research workspace`})]}),(0,O.jsxs)(M,{className:`gap-2 rounded-lg`,"data-testid":`button-create-notebook`,disabled:u||r||!n,onClick:async()=>{try{let{notebook:n}=await l({title:`Untitled Notebook`,description:``});e({title:`Notebook created`,description:`Your new notebook is ready to use.`}),t(`/notebooks/${n.id}`)}catch(t){console.error(t),e({title:`Error`,variant:`destructive`,description:`Failed to create notebook. Please try again.`})}},children:[u?(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin`}
487):(0,O.jsx)(Io,{className:`w-4 h-4`}),u?`Creating Notebook...`:`Create Notebook`]})]}),a?(0,O.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:[1,2,3].map(e=>(0,O.jsx)(y2,{},e))}):o&&o.length>0?(0,O.jsxs)(O.Fragment,{children:[s.length>0&&(0,O.jsxs)(`div`,{className:`mb-6`,"data-testid":`section-pinned-notebooks`,children:[(0,O.jsx)(`h2`,{className:`text-sm text-muted-foreground mb-3`,children:`Pinned`}),(0,O.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:s.map(e=>(0,O.jsx)(v2,{notebook:e,workspaceId:n},e.id))})]}),(0,O.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:c.map(e=>(0,O.jsx)(v2,{notebook:e,workspaceId:n},e.id))})]}):(0,O.jsx)(b2,{})]})}function v2({notebook:e,workspaceId:t}){let{toast:n}=ln(),{user:r}=Zd(),[i,a]=(0,c.useState)(!1),[o,s]=(0,c.useState)(!1),[l,u]=(0,c.useState)(!1),d=e.updatedAt?m$(new Date(e.updatedAt),{addSuffix:!0}):``,f=typeof window<`u`&&window.matchMedia(`(hover: hover)`).matches,p=!f||o||l,m=r?.id===e.createdByUserId,{mutateAsync:h,isPending:g}=I1(t,e.id),{mutateAsync:_,isPending:v}=L1(t,e.id),{mutateAsync:y,isPending:b}=R1(t,e.id),x=g||v,S=async()=>{try{await y(),n({title:`Notebook deleted`,description:`"${e.title}" has been removed.`}),a(!1)}catch(e){console.error(e),n({title:`Error`,variant:`destructive`,description:`Failed to delete notebook. Please try again.`})}};return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(Bf,{className:`group relative cursor-pointer h-full flex flex-col bg-background shadow-none hover:border-primary/50 focus-within:border-primary/50 transition-all duration-300`,"data-testid":`notebook-card-${e.id}`,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||s(!1)},children:[(0,O.jsxs)(Vf,{className:`pb-3`,children:[(0,O.jsxs)(`div`,{className:`flex min-h-8 items-center justify-between`,children:[(0,O.jsx)(ba,{className:`w-5 h-5 text-primary`}),(0,O.jsxs)(`div`,{className:`relative z-10 flex items-center gap-1`,children:[e.isPublic&&(0,O.jsxs)(qf,{variant:`secondary`,className:`gap-1 text-xs`,children:[(0,O.jsx)(io,{className:`w-3 h-3`}),`Shared`]}),p&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(zd,{children:[(0,O.jsx)(Bd,{asChild:!0,children:(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:j(`h-8 w-8 touch-manipulation`,!f&&`opacity-60`,e.isPinned&&`text-primary`),disabled:x,onClick:async()=>{try{await(e.isPinned?_():h())}catch(t){console.error(t),n({title:`Error`,variant:`destructive`,description:`Failed to ${e.isPinned?`unpin`:`pin`} notebook. Please try again.`})}},"aria-label":e.isPinned?`Unpin notebook`:`Pin notebook`,"data-testid":`button-pin-notebook-${e.id}`,children:(0,O.jsx)(Po,{className:j(`w-4 h-4`,e.isPinned&&`fill-current`)})})}),(0,O.jsx)(Vd,{children:e.isPinned?`Unpin`:`Pin`})]}),m&&(0,O.jsxs)(wY,{onOpenChange:u,children:[(0,O.jsx)(TY,{asChild:!0,children:(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:j(`h-8 w-8 touch-manipulation`,!f&&`opacity-60`),"aria-label":`Notebook options`,"data-testid":`button-notebook-menu-${e.id}`,children:(0,O.jsx)(Wa,{className:`w-4 h-4`})})}),(0,O.jsx)(kY,{align:`end`,className:`w-44`,children:(0,O.jsxs)(AY,{className:`text-destructive focus:text-destructive`,onSelect:()=>a(!0),children:[(0,O.jsx)(rs,{className:`w-4 h-4 mr-2`}),`Delete`]})})]})]})]})]}),(0,O.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,O.jsx)(Hf,{className:`text-base font-medium truncate`,children:(0,O.jsx)(_e,{href:`/notebooks/${e.id}`,className:`after:absolute after:inset-0 after:content-[''] focus-visible:outline-none`,children:e.title})})})]}),(0,O.jsx)(Wf,{className:`flex-1`,children:e.description&&(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground line-clamp-2`,children:e.description})}),(0,O.jsxs)(Gf,{className:`pt-0 flex items-center justify-between gap-4 text-xs text-muted-foreground`,children:[(0,O.jsx)(`span`,{children:d}),(0,O.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,O.jsx)(To,{className:`w-3 h-3`}),(0,O.jsx)(`span`,{children:e.messageCount||0})]})]})]}),m&&(0,O.jsx)(a2,{open:i,onOpenChange:e=>!e&&a(!1),children:(0,O.jsxs)(l2,{onClick:e=>e.stopPropagation(),children:[(0,O.jsxs)(u2,{children:[(0,O.jsxs)(f2,{children:[`Delete "`,e.title,`"?`]}),(0,O.jsx)(p2,{children:`This notebook and its chat history will be removed for everyone who has access to it.`})]}),(0,O.jsxs)(d2,{children:[(0,O.jsx)(h2,{disabled:b,children:`Cancel`}),(0,O.jsxs)(m2,{className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,disabled:b,onClick:e=>{e.preventDefault(),e.stopPropagation(),S()},"data-testid":`button-delete-notebook-${e.id}`,children:[b?(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin`}):null,b?`Deleting...`:`Delete`]})]})]})})]})}function y2(){return(0,O.jsxs)(Bf,{className:`h-full flex flex-col`,children:[(0,O.jsx)(Vf,{className:`pb-3`,children:(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,O.jsx)(_h,{className:`w-10 h-10 rounded-lg`}),(0,O.jsx)(_h,{className:`h-5 flex-1`})]})}),(0,O.jsxs)(Wf,{className:`flex-1`,children:[(0,O.jsx)(_h,{className:`h-4 w-full`}
487),(0,O.jsx)(_h,{className:`h-4 w-3/4 mt-2`})]}),(0,O.jsxs)(Gf,{className:`pt-0 justify-between`,children:[(0,O.jsx)(_h,{className:`h-3 w-20`}),(0,O.jsx)(_h,{className:`h-3 w-10`})]})]})}function b2(){return(0,O.jsxs)(`div`,{className:`text-center py-16`,"data-testid":`empty-notebooks`,children:[(0,O.jsx)(`div`,{className:`w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center`,children:(0,O.jsx)(ba,{className:`w-8 h-8 text-muted-foreground`})}),(0,O.jsx)(`h3`,{className:`text-lg font-medium mb-2`,children:`No notebooks yet`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground max-w-sm mx-auto mb-6`,children:`Create your first notebook to start exploring your data with AI-powered insights.`}),(0,O.jsx)(_e,{href:`/notebooks/new`,children:(0,O.jsxs)(M,{className:`gap-2`,children:[(0,O.jsx)(Io,{className:`w-4 h-4`}),`Create your first notebook`]})})]})}var x2=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,S2=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,C2=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function w2(e,t){if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){T2(e);return}return t}function T2(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function E2(e,t={}){if(typeof e!=`string`)return e;if(e[0]===`"`&&e[e.length-1]===`"`&&e.indexOf(`\\`)===-1)return e.slice(1,-1);let n=e.trim();if(n.length<=9)switch(n.toLowerCase()){case`true`:return!0;case`false`:return!1;case`undefined`:return;case`null`:return null;case`nan`:return NaN;case`infinity`:return 1/0;case`-infinity`:return-1/0}if(!C2.test(e)){if(t.strict)throw SyntaxError(`[destr] Invalid JSON`);return e}try{if(x2.test(e)||S2.test(e)){if(t.strict)throw Error(`[destr] Possible prototype pollution`);return JSON.parse(e,w2)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}String.fromCharCode;var D2=/#/g,O2=/&/g,k2=/\//g,A2=/=/g,j2=/\+/g,M2=/%5e/gi,N2=/%60/gi,P2=/%7c/gi,F2=/%20/gi;function I2(e){return encodeURI(``+e).replace(P2,`|`)}function L2(e){return I2(typeof e==`string`?e:JSON.stringify(e)).replace(j2,`%2B`).replace(F2,`+`).replace(D2,`%23`).replace(O2,`%26`).replace(N2,"`").replace(M2,`^`).replace(k2,`%2F`)}function R2(e){return L2(e).replace(A2,`%3D`)}function z2(e=``){try{return decodeURIComponent(``+e)}catch{return``+e}}function B2(e){return z2(e.replace(j2,` `))}function V2(e){return z2(e.replace(j2,` `))}function H2(e=``){let t=Object.create(null);e[0]===`?`&&(e=e.slice(1));for(let n of e.split(`&`)){let e=n.match(/([^=]+)=?(.*)/)||[];if(e.length<2)continue;let r=B2(e[1]);if(r===`__proto__`||r===`constructor`)continue;let i=V2(e[2]||``);t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}return t}function U2(e,t){return(typeof t==`number`||typeof t==`boolean`)&&(t=String(t)),t?Array.isArray(t)?t.map(t=>`${R2(e)}=${L2(t)}`).join(`&`):`${R2(e)}=${L2(t)}`:R2(e)}function W2(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>U2(t,e[t])).filter(Boolean).join(`&`)}var G2=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,K2=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,q2=/^([/\\]\s*){2,}[^/\\]/,J2=/\/$|\/\?|\/#/,Y2=/^\.?\//;function X2(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?G2.test(e):K2.test(e)||(t.acceptRelative?q2.test(e):!1)}function Z2(e=``,t){return t?J2.test(e):e.endsWith(`/`)}function Q2(e=``,t){if(!t)return(Z2(e)?e.slice(0,-1):e)||`/`;if(!Z2(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function $2(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(Z2(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function e4(e,t){if(n4(t)||X2(e))return e;let n=Q2(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return i4(n,e)}function t4(e,t){let n=o4(e);return n.search=W2({...H2(n.search),...t}),c4(n)}function n4(e){return!e||e===`/`}function r4(e){return e&&e!==`/`}function i4(e,...t){let n=e||``;
vendor: 9,875 bytes, lines 487-491
487for(let e of t.filter(e=>r4(e)))if(n){let t=e.replace(Y2,``);n=$2(n)+t}else n=e;return n}var a4=Symbol.for(`ufo:protocolRelative`);function o4(e=``,t){let n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){let[,e,t=``]=n;return{protocol:e.toLowerCase(),pathname:t,href:e+t,auth:``,host:``,search:``,hash:``}}if(!X2(e,{acceptRelative:!0}))return t?o4(t+e):s4(e);let[,r=``,i,a=``]=e.replace(/\\/g,`/`).match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,o=``,s=``]=a.match(/([^#/?]*)(.*)?/)||[];r===`file:`&&(s=s.replace(/\/(?=[A-Za-z]:)/,``));let{pathname:c,search:l,hash:u}=s4(s);return{protocol:r.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):``,host:o,pathname:c,search:l,hash:u,[a4]:!r}}function s4(e=``){let[t=``,n=``,r=``]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function c4(e){let t=e.pathname||``,n=e.search?(e.search.startsWith(`?`)?``:`?`)+e.search:``,r=e.hash||``,i=e.auth?e.auth+`@`:``,a=e.host||``;return(e.protocol||e[a4]?(e.protocol||``)+`//`:``)+i+a+t+n+r}var l4=class extends Error{constructor(e,t){super(e,t),this.name=`FetchError`,t?.cause&&!this.cause&&(this.cause=t.cause)}};function u4(e){let t=e.error?.message||e.error?.toString()||``,n=e.request?.method||e.options?.method||`GET`,r=e.request?.url||String(e.request)||`/`,i=new l4(`${`[${n}] ${JSON.stringify(r)}`}: ${e.response?`${e.response.status} ${e.response.statusText}`:`<no response>`}${t?` ${t}`:``}`,e.error?{cause:e.error}:void 0);for(let t of[`request`,`options`,`response`])Object.defineProperty(i,t,{get(){return e[t]}});for(let[t,n]of[[`data`,`_data`],[`status`,`status`],[`statusCode`,`status`],[`statusText`,`statusText`],[`statusMessage`,`statusText`]])Object.defineProperty(i,t,{get(){return e.response&&e.response[n]}});return i}var d4=new Set(Object.freeze([`PATCH`,`POST`,`PUT`,`DELETE`]));function f4(e=`GET`){return d4.has(e.toUpperCase())}function p4(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}var m4=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]),h4=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function g4(e=``){if(!e)return`json`;let t=e.split(`;`).shift()||``;return h4.test(t)?`json`:t===`text/event-stream`?`stream`:m4.has(t)||t.startsWith(`text/`)?`text`:`blob`}function _4(e,t,n,r){let i=v4(t?.headers??e?.headers,n?.headers,r),a;return(n?.query||n?.params||t?.params||t?.query)&&(a={...n?.params,...n?.query,...t?.params,...t?.query}),{...n,...t,query:a,params:a,headers:i}}function v4(e,t,n){if(!t)return new n(e);let r=new n(t);if(e)for(let[t,i]of Symbol.iterator in e||Array.isArray(e)?e:new n(e))r.set(t,i);return r}async function y4(e,t){if(t){if(Array.isArray(t))for(let n of t)await n(e);else await t(e)}}var b4=new Set([408,409,425,429,500,502,503,504]),x4=new Set([101,204,205,304]);function S4(e={}){let{fetch:t=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:r=globalThis.AbortController}=e;async function i(e){let t=e.error&&e.error.name===`AbortError`&&!e.options.timeout||!1;if(e.options.retry!==!1&&!t){let t;t=typeof e.options.retry==`number`?e.options.retry:+!f4(e.options.method);let n=e.response&&e.response.status||500;if(t>0&&(Array.isArray(e.options.retryStatusCodes)?e.options.retryStatusCodes.includes(n):b4.has(n))){let n=typeof e.options.retryDelay==`function`?e.options.retryDelay(e):e.options.retryDelay||0;return n>0&&await new Promise(e=>setTimeout(e,n)),a(e.request,{...e.options,retry:t-1})}}let n=u4(e);throw Error.captureStackTrace&&Error.captureStackTrace(n,a),n}let a=async function(a,o={}){let s={request:a,options:_4(a,o,e.defaults,n),response:void 0,error:void 0};if(s.options.method&&(s.options.method=s.options.method.toUpperCase()),s.options.onRequest&&(await y4(s,s.options.onRequest),s.options.headers instanceof n||(s.options.headers=new n(s.options.headers||{}))),typeof s.request==`string`&&(s.options.baseURL&&(s.request=e4(s.request,s.options.baseURL)),s.options.query&&(s.request=t4(s.request,s.options.query),delete s.options.query),`query`in s.options&&delete s.options.query,`params`in s.options&&delete s.options.params),s.options.body&&f4(s.options.method)){if(p4(s.options.body)){let e=s.options.headers.get(`content-type`);typeof s.options.body!=`string`&&(s.options.body=e===`application/x-www-form-urlencoded`?new URLSearchParams(s.options.body).toString():JSON.stringify(s.options.body)),e||s.options.headers.set(`content-type`,`application/json`),s.options.headers.has(`accept`)||s.options.headers.set(`accept`,`application/json`)}else(`pipeTo`in s.options.body&&typeof s.options.body.pipeTo==`function`||typeof s.options.body.pipe==`function`)&&(`duplex`in s.options||(s.options.duplex=`half`))}let c;if(!s.options.signal&&s.options.timeout){let e=new r;c=setTimeout(()=>{let t=Error(`[TimeoutError]: The operation was aborted due to timeout`);t.name=`TimeoutError`,t.code=23,e.abort(t)},s.options.timeout),s.options.signal=e.signal}try{s.response=await t(s.request,s.options)}catch(e){return s.error=e,s.options.onRequestError&&await y4(s,s.options.onRequestError),await i(s)}finally{c&&clearTimeout(c)}if((s.response.body||s.response._bodyInit)&&!x4.has(s.response.status)&&s.options.method!==`HEAD`){let e=(s.options.parseResponse?`json`:s.options.responseType)||g4(s.response.headers.get(`content-type`)||``);switch(e){case`json`:{let e=await s.response.text(),t=s.options.parseResponse||E2;s.response._data=t(e);break}case`stream`:s.response._data=s.response.body||s.response._bodyInit;break;default:s.response._data=await s.response[e]()}}return s.options.onResponse&&await y4(s,s.options.onResponse),!s.options.ignoreResponseError&&s.response.status>=400&&s.response.status<600?(s.options.onResponseError&&await y4(s,s.options.onResponseError),await i(s)):s.response},o=async function(e,t){return(await a(e,t))._data};return o.raw=a,o.native=(...e)=>t(...e),o.create=(t={},n={})=>S4({...e,...n,defaults:{...e.defaults,...n.defaults,...t}}),o}var C4=(function(){if(typeof globalThis<`u`)return globalThis;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`unable to locate global object`)})(),w4=C4.fetch?(...e)=>C4.fetch(...e):()=>Promise.reject(Error(`[ofetch] global.fetch is not supported!`)),T4=C4.Headers,E4=C4.AbortController,D4=S4({fetch:w4,Headers:T4,AbortController:E4});async function O4(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}function k4(e){let t=[],n=``,r=!1,i,a,o,s,c,l=0,u=!1;function d(e){let r=A4(n);i=r.data??i,a=r.id??a,o=r.event??o,s=r.retry??s,u&&(typeof i==`string`&&t.push({id:a,data:i,event:o??`message`,retry:s}),a=void 0,i=void 0,o=void 0,s=void 0,l=e),n=``}for(let t=0;t<e.length;t++){let i=e[t];switch(i){case`\r`:u=c===` 488`||c===`\r`,r=!0,d(e[t+1]===` 489`?t+2:t+1);break;case` 490`:if(r){r=!1;break}u=c===` 491`,d(t+1);break;default:n+=i}c=i}return{messages:t,leftoverData:e.substring(l)}}function A4(e){if(e.startsWith(`data:`))return{data:e.substring(5).trim()};if(e.startsWith(`id:`))return{id:e.substring(3).trim()};if(e.startsWith(`event:`))return{event:e.substring(6).trim()};if(e.startsWith(`retry:`)){let t=Number(e.substring(6).trim());if(!Number.isNaN(t))return Number.isInteger(t)?{retry:t}:{retry:Math.round(t)}}return{}}async function j4(e,t,n){let r=t.getReader(),i;for(;!e.signal.aborted&&!(i=await r.read()).done;)n(i.value)}var M4=`text/event-stream`,N4=`last-event-id`,P4=class{url;lastEventId;options;retryCount=0;retryInterval=0;maxRetryCount;maxRetryInterval;fetch;timeoutDurationMs;timeout;constructor(e,t={}){this.url=e,this.options=t,this.maxRetryCount=t.maxRetryCount,this.maxRetryInterval=t.maxRetryInterval??3e4,this.fetch=S4({fetch:t.fetch})??D4,this.timeoutDurationMs=t.timeout}async _handleRetry(e,t){if(this.retryCount++,typeof this.maxRetryCount==`number`&&this.retryCount>=this.maxRetryCount){e._emitEvent({type:`error`,reason:`max retry count reached`});return}this.retryInterval===0?this.retryInterval=2:this.retryInterval>0&&(this.retryInterval*=2,this.retryInterval>=this.maxRetryInterval&&(this.retryInterval=this.maxRetryInterval)),await O4(this.retryInterval),e._abortController.abort(),e._abortController=new AbortController,await this._handleConnection(e,t)}async _handleConnection(e,t){let n,r=e._abortController.signal;if(typeof this.options.headers==`function`){let e=this.options.headers();n=`then`in e&&typeof e.then==`function`?new Headers(await e.then(e=>e)):new Headers(e)}else n=new Headers(this.options.headers??{});typeof n.get(`accept`)!=`string`&&n.set(`accept`,M4),typeof this.lastEventId==`string`&&n.set(N4,this.lastEventId);let i,a={...this.options,method:this.options.method??`get`,responseType:`stream`,headers:n,signal:r,retry:!1,onRequest:n=>{if(!(e.signal.aborted||r.aborted)&&!F4(n.error))return t.onRequest?.(n)},onRequestError:async n=>{if(!(e.signal.aborted||r.aborted)&&!F4(n.error))return t.onRequestError?.(n)},onResponse:async e=>(i=e,L4(e,t)),onResponseError:async e=>{if(!r.aborted&&!F4(e.error))throw e.error===void 0&&(e.error=new l4(`${e.response.status} ${e.response.statusText}`)),await t.onResponseError?.(e),e.error}};try{this.timeoutDurationMs&&(this.timeout=setTimeout(()=>{e._emitEvent({type:`error`,reason:`Timeout of ${this.timeoutDurationMs}ms exceeded`})},this.timeoutDurationMs));let n=await this.fetch.raw(this.url,a);clearTimeout(this.timeout),this.timeout=void 0,this.retryCount=0,this.retryInterval=0;let r=new TextDecoder,o=``,s=n.body;if(!s){let e=Error(`Expected response body to contain ReadableStream`);throw i.response=n,i.error=e,await t.onResponseError?.(i),e}await j4(e,s,e=>{let n=k4(o+r.decode(e,{stream:!0}));o=n.leftoverData??``;
491for(let e of n.messages)typeof e.id==`string`&&e.id.length>0&&(this.lastEventId=e.id),t.onMessage(e)})}catch(n){return r.aborted||e.signal.aborted||F4(n)?void 0:this._handleRetry(e,t)}if(!(e.signal.aborted||r.aborted)){if(this.options.retryStrategy===`on-error`){e._emitEvent({type:`end-of-stream`,reason:`Stream has ended`});return}return this._handleRetry(e,t)}}listen(e){let t=new I4(new AbortController,n=>{if(n===void 0){this._handleConnection(t,e);return}this._handleConnection(t,{...e,...n})});return this._handleConnection(t,e),t}};function F4(e){return e instanceof DOMException&&e.name===`AbortError`}var I4=class{didAbort=!1;_abortController;_connect;constructor(e,t){this._abortController=e??new AbortController,this._connect=t}abort(e){this._emitEvent({type:`manual`,reason:e})}reconnect(e){this.didAbort=!1,this._abortController.abort(),this._abortController=new AbortController,this._connect?.(e)}_abortHook;_emitEvent(e){this.didAbort||(this.didAbort=!0,this._abortHook?.(e),this._abortController.abort(e.reason))}onAbort(e){this._abortHook=e}get signal(){return this._abortController.signal}};async function L4(e,t){if(typeof t.onResponse==`function`&&await t.onResponse(e),!e.response.ok)return;let n=e.response.headers.get(`Content-Type`);if(typeof n!=`string`||!n.includes(`text/event-stream`)){let r=Error(`Expected server to response with Content-Type: '${M4}'. Got '${n}'`);throw e.error=r,typeof t.onResponseError==`function`&&await t.onResponseError(e),r}}var R4=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},z4=(e=>e?R4(e):R4),B4=e=>e;function V4(e,t=B4){let n=c.useSyncExternalStore(e.subscribe,c.useCallback(()=>t(e.getState()),[e,t]),c.useCallback(()=>t(e.getInitialState()),[e,t]));return c.useDebugValue(n),n}var H4=e=>{let t=z4(e),n=e=>V4(t,e);return Object.assign(n,t),n},U4=(e=>e?H4(e):H4),W4={messages:[],notebookId:null,messageToSend:``,isSending:!1,streamingMessageId:null,currentStep:null,timeline:[],activeToolCall:null,_streamedContent:``,_abortController:null},G4=U4((e,t)=>({...W4,setNotebookId:t=>e({notebookId:t}),setMessages:t=>e({messages:t}),setMessageToSend:t=>e({messageToSend:t}),addMessage:t=>e(e=>({messages:[...e.messages,t]})),updateMessage:(t,n)=>e(e=>({messages:e.messages.map(e=>e.id===t?{...e,...n,versions:n.versions??e.versions}:e)})),appendToContent:(n,r)=>{let i=t()._streamedContent+r;e({_streamedContent:i}),e(e=>({messages:e.messages.map(e=>e.id===n?{...e,versions:[{id:e.versions?.[0]?.id||lc(),content:i}]}:e)}))},startSending:t=>e({isSending:!0,streamingMessageId:t,currentStep:`starting`,timeline:[],_streamedContent:``}),setStreamingMessageId:t=>e({streamingMessageId:t}),setStreamState:n=>{t().streamingMessageId&&e({currentStep:n.step,timeline:n.timeline,activeToolCall:n.toolCall??null})},setActiveToolCall:t=>e({activeToolCall:t}),finishSending:()=>e({isSending:!1,streamingMessageId:null,currentStep:null,timeline:[],activeToolCall:null,_streamedContent:``}),setAbortController:t=>e({_abortController:t}),abort:()=>{t()._abortController?.abort(),e({_abortController:null})},reset:()=>{t().abort(),e(W4)}}));function K4(e){return Ef(e?`/api/notebooks/${e}/chat/messages`:null)}var q4={RUN_STARTED:`run_started`,STATE:`state`,TEXT_CHUNK:`text_chunk`,RUN_FINISHED:`run_finished`,RUN_ERROR:`run_error`,TOOL_START:`tool_start`,TOOL_ARGS:`tool_args`,TOOL_END:`tool_end`,TOOL_UPDATE:`tool_update`,REPORT_COMPLETED:`report_completed`,REPORT_ERROR:`report_error`};function J4(){let{toast:e}=ln(),{id:t}=le(),n=G4(e=>e.messages),r=G4(e=>e.timeline),i=G4(e=>e.isSending),a=G4(e=>e.currentStep),o=G4(e=>e.messageToSend),s=G4(e=>e.activeToolCall),l=G4(e=>e.streamingMessageId),u=G4(e=>e.abort),d=G4(e=>e.reset),f=G4(e=>e.addMessage),p=G4(e=>e.setMessages),m=G4(e=>e.startSending),h=G4(e=>e.finishSending),g=G4(e=>e.updateMessage),_=G4(e=>e.appendToContent),v=G4(e=>e.setStreamState),y=G4(e=>e.setMessageToSend),b=G4(e=>e.setActiveToolCall),x=G4(e=>e.setAbortController),S=G4(e=>e.setStreamingMessageId),{data:C=[],refetch:w,isLoading:T}=K4(t);(0,c.useEffect)(()=>{C.length>0&&p(C)},[C,p]),(0,c.useEffect)(()=>()=>d(),[t,d]);let E=(0,c.useCallback)((e,n,r,i)=>{let a={id:e,role:n,status:r,notebookId:t,title:null,userId:null,tools:[],sources:[],passages:[],graphs:[],clients:[],createdAt:new Date,versions:[{id:lc(),content:i}],evalData:null};f(a),y(``)},[t,f,y]),ee=(0,c.useCallback)((t,n,r)=>{switch(t.type!==q4.TEXT_CHUNK&&Hd.info(`Stream event:`,t),t.type){case q4.RUN_STARTED:S(t.assistantMessageId),G4.setState(e=>({messages:e.messages.map(e=>e.id===n?{...e,id:t.assistantMessageId}:e)}));break;case q4.STATE:v(t.data);break;case q4.TEXT_CHUNK:{let e=G4.getState().streamingMessageId;e&&t.data.content&&_(e,t.data.content);break}case q4.TOOL_START:b({tool:t.tool,status:`executing`});break;case q4.TOOL_ARGS:b({tool:t.tool,status:`executing`,args:t.args});break;case q4.TOOL_END:b({tool:t.tool,status:`complete`,result:t.result});break;case q4.TOOL_UPDATE:{let e=G4.getState().activeToolCall;if(!e||!e.result)break;b({...e,result:{...e.result,...t.patch}});break}case q4.RUN_FINISHED:{let e=G4.getState().streamingMessageId;e&&g(e,t.message),r&&g(r,{status:`completed`}),h(),u();break}case q4.RUN_ERROR:{let n=G4.getState().streamingMessageId;n&&g(n,{status:`failed`,versions:[{id:lc(),content:t.message||`An error occurred`}]}),h(),u(),w(),e({title:`Error`,description:t.message||`Failed to process message`,variant:`destructive`});break}}},[S,h,u,w,_,e,g,v,b]);
491return{messages:n,loading:T,isSendingMessage:i,streamingMessageId:l,currentStep:a,timeline:r,messageToSend:o,activeToolCall:s,sendMessage:(0,c.useCallback)((n,r)=>{try{if(G4.getState().isSending||!n.trim()||!t)return;let i=lc();E(i,`user`,`processing`,n);let a=lc();E(a,`assistant`,`processing`,``),m(a);let o=gf(),s=new P4(`/api/notebooks/${t}/chat-stream`,{credentials:`include`,maxRetryCount:0,method:`post`,headers:{"Content-Type":`application/json`,...o?{"x-csrf-token":o}:{}},body:JSON.stringify({question:n,selectedSourceIds:r?.selectedSourceIds,includeCoreInsights:r?.includeCoreInsights??!0})}).listen({onMessage(e){try{let t=JSON.parse(e.data);typeof t==`string`&&(t=JSON.parse(t)),ee(t,a,i)}catch(e){Hd.error(`Failed to parse SSE message:`,e)}},onResponseError(){h(),u(),w(),e({title:`Error`,description:`Connection lost. Please try again.`,variant:`destructive`})}});x(s)}catch(e){Hd.error(`Failed to send message:`,e)}},[t,m,ee,h,u,x,w,e,E]),refetchMessages:w,setMessageToSend:y}}function Y4(e,t){return Ef(e?`/api/sources/${e}`:null,{queryOptions:t})}function X4(e){return Of(`/api/sources`,{invalidate:e?[`/api/sources/${e}`,`/api/notebooks/${e}/sources`]:[]})}function Z4(e){return Of(t=>{if(!e)throw Error(`notebookId is required to toggle source active state`);return`/api/notebooks/${e}/sources/${t.sourceId}`},{invalidate:e?[`/api/sources/${e}`]:[]})}function Q4(e){return kf(e=>`/api/sources/${e.sourceId}`,{invalidate:e?[`/api/sources/${e}`,`/api/notebooks/${e}/sources`]:[]})}function $4(e){return Df(()=>{if(!e)throw Error(`notebookId is required to upload a document`);return`/api/notebooks/${e}/sources`},{invalidate:e?[`/api/sources/${e}`,`/api/notebooks/${e}/sources`]:[]})}var e3;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(e3||={});var t3;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(t3||={});var n3=e3.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),r3=e=>{switch(typeof e){case`undefined`:return n3.undefined;case`string`:return n3.string;case`number`:return Number.isNaN(e)?n3.nan:n3.number;case`boolean`:return n3.boolean;case`function`:return n3.function;case`bigint`:return n3.bigint;case`symbol`:return n3.symbol;case`object`:return Array.isArray(e)?n3.array:e===null?n3.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?n3.promise:typeof Map<`u`&&e instanceof Map?n3.map:typeof Set<`u`&&e instanceof Set?n3.set:typeof Date<`u`&&e instanceof Date?n3.date:n3.object;default:return n3.unknown}},Q=e3.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),i3=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,`$1:`),a3=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>
vendor: 29,490 bytes, line 491
491{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,e3.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};a3.create=e=>new a3(e);var o3=(e,t)=>{let n;switch(e.code){case Q.invalid_type:n=e.received===n3.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case Q.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,e3.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:n=`Unrecognized key(s) in object: ${e3.joinValues(e.keys,`, `)}`;break;case Q.invalid_union:n=`Invalid input`;break;case Q.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${e3.joinValues(e.options)}`;break;case Q.invalid_enum_value:n=`Invalid enum value. Expected ${e3.joinValues(e.options)}, received '${e.received}'`;break;case Q.invalid_arguments:n=`Invalid function arguments`;break;case Q.invalid_return_type:n=`Invalid function return type`;break;case Q.invalid_date:n=`Invalid date`;break;case Q.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:e3.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case Q.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case Q.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case Q.custom:n=`Invalid input`;break;case Q.invalid_intersection_types:n=`Intersection results could not be merged`;break;case Q.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Q.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,e3.assertNever(e)}return{message:n}},s3=o3;function c3(e){s3=e}function l3(){return s3}var u3=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},d3=[];function f3(e,t){let n=l3(),r=u3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===o3?void 0:o3].filter(e=>!!e)});e.common.issues.push(r)}var p3=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return m3;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return m3;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},m3=Object.freeze({status:`aborted`}),h3=e=>({status:`dirty`,value:e}),g3=e=>({status:`valid`,value:e}),_3=e=>e.status===`aborted`,v3=e=>e.status===`dirty`,y3=e=>e.status===`valid`,b3=e=>typeof Promise<`u`&&e instanceof Promise,x3;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(x3||={});var S3=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},C3=(e,t)=>{if(y3(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new a3(e.common.issues);return this._error=t,this._error}}};function w3(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var T3=class{get description(){return this._def.description}_getType(e){return r3(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:r3(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new p3,ctx:{common:e.parent.common,data:e.data,parsedType:r3(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(b3(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:r3(e)};return C3(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:r3(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return y3(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>y3(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:r3(e)},r=this._parse({data:e,path:n.path,parent:n});return C3(n,await(b3(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:Q.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new O6({schema:this,typeName:z6.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return k6.create(this,this._def)}nullable(){return A6.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return l6.create(this)}promise(){return D6.create(this,this._def)}or(e){return f6.create([this,e],this._def)}and(e){return g6.create(this,e,this._def)}transform(e){return new O6({...w3(this._def),schema:this,typeName:z6.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new j6({...w3(this._def),innerType:this,defaultValue:t,typeName:z6.ZodDefault})}brand(){return new P6({typeName:z6.ZodBranded,type:this,...w3(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new M6({...w3(this._def),innerType:this,catchValue:t,typeName:z6.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return F6.create(this,e)}readonly(){return I6.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},E3=/^c[^\s-]{8,}$/i,D3=/^[0-9a-z]+$/,O3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,k3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,A3=/^[a-z0-9_-]{21}$/i,j3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,M3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,N3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,P3=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,F3,I3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,L3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,R3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,z3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,B3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,V3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,H3=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,U3=RegExp(`^${H3}$`);function W3(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function G3(e){return RegExp(`^${W3(e)}$`)}function K3(e){let t=`${H3}T${W3(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function q3(e,t){return!((t!==`v4`&&t||!I3.test(e))&&(t!==`v6`&&t||!R3.test(e)))}function J3(e,t){if(!j3.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function Y3(e,t){return!((t!==`v4`&&t||!L3.test(e))&&(t!==`v6`&&t||!z3.test(e)))}var X3=class e extends T3{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==n3.string){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.string,received:t.parsedType}),m3}let t=new p3,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),f3(n,{code:Q.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),f3(n,{code:Q.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?f3(n,{code:Q.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&f3(n,{code:Q.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)N3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`email`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)F3||=new RegExp(P3,`u`),F3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`emoji`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)k3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`uuid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)A3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`nanoid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)E3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`cuid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)D3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`cuid2`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)O3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`ulid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),f3(n,{validation:`url`,code:Q.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`regex`,code:Q.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),f3(n,{code:Q.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),f3(n,{code:Q.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),f3(n,{code:Q.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?K3(r).test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{code:Q.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?U3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{code:Q.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?G3(r).test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{code:Q.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?M3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`duration`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?q3(e.data,r.version)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`ip`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?J3(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`jwt`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?Y3(e.data,r.version)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`cidr`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?B3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`base64`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?V3.test(e.data)||(n=this._getOrReturnCtx(e,n),f3(n,{validation:`base64url`,code:Q.invalid_string,message:r.message}),t.dirty()):e3.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:Q.invalid_string,...x3.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...x3.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...x3.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...x3.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...x3.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...x3.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...x3.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...x3.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...x3.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...x3.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...x3.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...x3.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...x3.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...x3.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...x3.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...x3.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...x3.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...x3.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...x3.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...x3.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...x3.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...x3.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...x3.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...x3.errToObj(t)})}nonempty(e){return this.min(1,x3.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};X3.create=e=>new X3({checks:[],typeName:z6.ZodString,coerce:e?.coerce??!1,...w3(e)});function Z3(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var Q3=class e extends T3{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==n3.number){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.number,received:t.parsedType}),m3}let t,n=new p3;for(let r of this._def.checks)r.kind===`int`?e3.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),f3(t,{code:Q.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),f3(t,{code:Q.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),f3(t,{code:Q.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?Z3(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),f3(t,{code:Q.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),f3(t,{code:Q.not_finite,message:r.message}),n.dirty()):e3.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,x3.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,x3.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,x3.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,x3.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:x3.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:x3.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:x3.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:x3.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:x3.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:x3.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:x3.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:x3.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:x3.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:x3.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&e3.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};Q3.create=e=>new Q3({checks:[],typeName:z6.ZodNumber,coerce:e?.coerce||!1,...w3(e)});var $3=class e extends T3{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==n3.bigint)return this._getInvalidInput(e);let t,n=new p3;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),f3(t,{code:Q.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),f3(t,{code:Q.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),f3(t,{code:Q.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):e3.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.bigint,received:t.parsedType}),m3}gte(e,t){return this.setLimit(`min`,e,!0,x3.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,x3.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,x3.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,x3.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:x3.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:x3.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:x3.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:x3.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:x3.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:x3.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};$3.create=e=>new $3({checks:[],typeName:z6.ZodBigInt,coerce:e?.coerce??!1,...w3(e)});var e6=class extends T3{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==n3.boolean){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.boolean,received:t.parsedType}),m3}return g3(e.data)}};e6.create=e=>new e6({typeName:z6.ZodBoolean,coerce:e?.coerce||!1,...w3(e)});var t6=class e extends T3{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==n3.date){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.date,received:t.parsedType}),m3}if(Number.isNaN(e.data.getTime()))return f3(this._getOrReturnCtx(e),{code:Q.invalid_date}),m3;let t=new p3,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),f3(n,{code:Q.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),f3(n,{code:Q.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):e3.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:x3.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:x3.toString(t)})}
vendor: 20,764 bytes, line 491
491get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};t6.create=e=>new t6({checks:[],coerce:e?.coerce||!1,typeName:z6.ZodDate,...w3(e)});var n6=class extends T3{_parse(e){if(this._getType(e)!==n3.symbol){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.symbol,received:t.parsedType}),m3}return g3(e.data)}};n6.create=e=>new n6({typeName:z6.ZodSymbol,...w3(e)});var r6=class extends T3{_parse(e){if(this._getType(e)!==n3.undefined){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.undefined,received:t.parsedType}),m3}return g3(e.data)}};r6.create=e=>new r6({typeName:z6.ZodUndefined,...w3(e)});var i6=class extends T3{_parse(e){if(this._getType(e)!==n3.null){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.null,received:t.parsedType}),m3}return g3(e.data)}};i6.create=e=>new i6({typeName:z6.ZodNull,...w3(e)});var a6=class extends T3{constructor(){super(...arguments),this._any=!0}_parse(e){return g3(e.data)}};a6.create=e=>new a6({typeName:z6.ZodAny,...w3(e)});var o6=class extends T3{constructor(){super(...arguments),this._unknown=!0}_parse(e){return g3(e.data)}};o6.create=e=>new o6({typeName:z6.ZodUnknown,...w3(e)});var s6=class extends T3{_parse(e){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.never,received:t.parsedType}),m3}};s6.create=e=>new s6({typeName:z6.ZodNever,...w3(e)});var c6=class extends T3{_parse(e){if(this._getType(e)!==n3.undefined){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.void,received:t.parsedType}),m3}return g3(e.data)}};c6.create=e=>new c6({typeName:z6.ZodVoid,...w3(e)});var l6=class e extends T3{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==n3.array)return f3(t,{code:Q.invalid_type,expected:n3.array,received:t.parsedType}),m3;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(f3(t,{code:e?Q.too_big:Q.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(f3(t,{code:Q.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(f3(t,{code:Q.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new S3(t,e,t.path,n)))).then(e=>p3.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new S3(t,e,t.path,n)));return p3.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:x3.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:x3.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:x3.toString(n)}})}nonempty(e){return this.min(1,e)}};l6.create=(e,t)=>new l6({type:e,minLength:null,maxLength:null,exactLength:null,typeName:z6.ZodArray,...w3(t)});function u6(e){if(e instanceof d6){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=k6.create(u6(r))}return new d6({...e._def,shape:()=>t})}return e instanceof l6?new l6({...e._def,type:u6(e.element)}):e instanceof k6?k6.create(u6(e.unwrap())):e instanceof A6?A6.create(u6(e.unwrap())):e instanceof _6?_6.create(e.items.map(e=>u6(e))):e}var d6=class e extends T3{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=e3.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==n3.object){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.object,received:t.parsedType}),m3}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof s6&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new S3(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof s6){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(f3(n,{code:Q.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new S3(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>p3.mergeObjectSync(t,e)):p3.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return x3.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:x3.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:z6.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of e3.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of e3.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return u6(this)}partial(t){let n={};for(let e of e3.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of e3.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof k6;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return w6(e3.objectKeys(this.shape))}};d6.create=(e,t)=>new d6({shape:()=>e,unknownKeys:`strip`,catchall:s6.create(),typeName:z6.ZodObject,...w3(t)}),d6.strictCreate=(e,t)=>new d6({shape:()=>e,unknownKeys:`strict`,catchall:s6.create(),typeName:z6.ZodObject,...w3(t)}),d6.lazycreate=(e,t)=>new d6({shape:e,unknownKeys:`strip`,catchall:s6.create(),typeName:z6.ZodObject,...w3(t)});var f6=class extends T3{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new a3(e.ctx.common.issues));return f3(t,{code:Q.invalid_union,unionErrors:n}),m3}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new a3(e));return f3(t,{code:Q.invalid_union,unionErrors:i}),m3}}get options(){return this._def.options}};f6.create=(e,t)=>new f6({options:e,typeName:z6.ZodUnion,...w3(t)});var p6=e=>e instanceof S6?p6(e.schema):e instanceof O6?p6(e.innerType()):e instanceof C6?[e.value]:e instanceof T6?e.options:e instanceof E6?e3.objectValues(e.enum):e instanceof j6?p6(e._def.innerType):e instanceof r6?[void 0]:e instanceof i6?[null]:e instanceof k6?[void 0,...p6(e.unwrap())]:e instanceof A6?[null,...p6(e.unwrap())]:e instanceof P6||e instanceof I6?p6(e.unwrap()):e instanceof M6?p6(e._def.innerType):[],m6=class e extends T3{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==n3.object)return f3(t,{code:Q.invalid_type,expected:n3.object,received:t.parsedType}),m3;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(f3(t,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),m3)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=p6(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:z6.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...w3(r)})}};function h6(e,t){let n=r3(e),r=r3(t);if(e===t)return{valid:!0,data:e};if(n===n3.object&&r===n3.object){let n=e3.objectKeys(t),r=e3.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=h6(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===n3.array&&r===n3.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=h6(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}return n===n3.date&&r===n3.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var g6=class extends T3{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(_3(e)||_3(r))return m3;let i=h6(e.value,r.value);return i.valid?((v3(e)||v3(r))&&t.dirty(),{status:t.value,value:i.data}):(f3(n,{code:Q.invalid_intersection_types}),m3)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};g6.create=(e,t,n)=>new g6({left:e,right:t,typeName:z6.ZodIntersection,...w3(n)});var _6=class e extends T3{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==n3.array)return f3(n,{code:Q.invalid_type,expected:n3.array,received:n.parsedType}),m3;if(n.data.length<this._def.items.length)return f3(n,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),m3;!this._def.rest&&n.data.length>this._def.items.length&&(f3(n,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new S3(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>p3.mergeArray(t,e)):p3.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};_6.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new _6({items:e,typeName:z6.ZodTuple,rest:null,...w3(t)})};var v6=class e extends T3{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==n3.object)return f3(n,{code:Q.invalid_type,expected:n3.object,received:n.parsedType}),m3;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new S3(n,e,n.path,e)),value:a._parse(new S3(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?p3.mergeObjectAsync(t,r):p3.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof T3?new e({keyType:t,valueType:n,typeName:z6.ZodRecord,...w3(r)}):new e({keyType:X3.create(),valueType:t,typeName:z6.ZodRecord,...w3(n)})}},y6=class extends T3{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==n3.map)return f3(n,{code:Q.invalid_type,expected:n3.map,received:n.parsedType}),m3;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new S3(n,e,n.path,[a,`key`])),value:i._parse(new S3(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return m3;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return m3;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};y6.create=(e,t,n)=>new y6({valueType:t,keyType:e,typeName:z6.ZodMap,...w3(n)});var b6=class e extends T3{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==n3.set)return f3(n,{code:Q.invalid_type,expected:n3.set,received:n.parsedType}),m3;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(f3(n,{code:Q.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(f3(n,{code:Q.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return m3;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new S3(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:x3.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:x3.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};b6.create=(e,t)=>new b6({valueType:e,minSize:null,maxSize:null,typeName:z6.ZodSet,...w3(t)});var x6=class e extends T3{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==n3.function)return f3(t,{code:Q.invalid_type,expected:n3.function,received:t.parsedType}),m3;function n(e,n){return u3({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l3(),o3].filter(e=>!!e),issueData:{code:Q.invalid_arguments,argumentsError:n}})}function r(e,n){return u3({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l3(),o3].filter(e=>!!e),issueData:{code:Q.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof D6){let e=this;return g3(async function(...t){let o=new a3([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return g3(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new a3([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new a3([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:_6.create(t).rest(o6.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||_6.create([]).rest(o6.create()),returns:n||o6.create(),typeName:z6.ZodFunction,...w3(r)})}},S6=class extends T3{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};S6.create=(e,t)=>new S6({getter:e,typeName:z6.ZodLazy,...w3(t)});var C6=class extends T3{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return f3(t,{received:t.data,code:Q.invalid_literal,expected:this._def.value}),m3}return{status:`valid`,value:e.data}}get value(){return this._def.value}};C6.create=(e,t)=>new C6({value:e,typeName:z6.ZodLiteral,...w3(t)});function w6(e,t){return new T6({values:e,typeName:z6.ZodEnum,...w3(t)})}var T6=class e extends T3{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return f3(t,{expected:e3.joinValues(n),received:t.parsedType,code:Q.invalid_type}),m3}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return f3(t,{received:t.data,code:Q.invalid_enum_value,options:n}),m3}return g3(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};T6.create=w6;var E6=class extends T3{_parse(e){let t=e3.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==n3.string&&n.parsedType!==n3.number){let e=e3.objectValues(t);return f3(n,{expected:e3.joinValues(e),received:n.parsedType,code:Q.invalid_type}),m3}if(this._cache||=new Set(e3.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=e3.objectValues(t);return f3(n,{received:n.data,code:Q.invalid_enum_value,options:e}),m3}return g3(e.data)}get enum(){return this._def.values}};E6.create=(e,t)=>new E6({values:e,typeName:z6.ZodNativeEnum,...w3(t)});var D6=class extends T3{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==n3.promise&&t.common.async===!1?(f3(t,{code:Q.invalid_type,expected:n3.promise,received:t.parsedType}),m3):g3((t.parsedType===n3.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};D6.create=(e,t)=>new D6({type:e,typeName:z6.ZodPromise,...w3(t)});var O6=class extends T3{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===z6.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{f3(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return m3;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?m3:r.status===`dirty`||t.value===`dirty`?h3(r.value):r});{if(t.value===`aborted`)return m3;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?m3:r.status===`dirty`||t.value===`dirty`?h3(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?m3:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?m3:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!y3(e))return m3;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>y3(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):m3)}e3.assertNever(r)}};
vendor: 4,850 bytes, line 491
491O6.create=(e,t,n)=>new O6({schema:e,typeName:z6.ZodEffects,effect:t,...w3(n)}),O6.createWithPreprocess=(e,t,n)=>new O6({schema:t,effect:{type:`preprocess`,transform:e},typeName:z6.ZodEffects,...w3(n)});var k6=class extends T3{_parse(e){return this._getType(e)===n3.undefined?g3(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};k6.create=(e,t)=>new k6({innerType:e,typeName:z6.ZodOptional,...w3(t)});var A6=class extends T3{_parse(e){return this._getType(e)===n3.null?g3(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};A6.create=(e,t)=>new A6({innerType:e,typeName:z6.ZodNullable,...w3(t)});var j6=class extends T3{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===n3.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};j6.create=(e,t)=>new j6({innerType:e,typeName:z6.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...w3(t)});var M6=class extends T3{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return b3(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new a3(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new a3(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};M6.create=(e,t)=>new M6({innerType:e,typeName:z6.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...w3(t)});var N6=class extends T3{_parse(e){if(this._getType(e)!==n3.nan){let t=this._getOrReturnCtx(e);return f3(t,{code:Q.invalid_type,expected:n3.nan,received:t.parsedType}),m3}return{status:`valid`,value:e.data}}};N6.create=e=>new N6({typeName:z6.ZodNaN,...w3(e)});var tae=Symbol(`zod_brand`),P6=class extends T3{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},F6=class e extends T3{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?m3:e.status===`dirty`?(t.dirty(),h3(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?m3:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:z6.ZodPipeline})}},I6=class extends T3{_parse(e){let t=this._def.innerType._parse(e),n=e=>(y3(e)&&(e.value=Object.freeze(e.value)),e);return b3(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};I6.create=(e,t)=>new I6({innerType:e,typeName:z6.ZodReadonly,...w3(t)});function L6(e,t){let n=typeof e==`function`?e(t):typeof e==`string`?{message:e}:e;return typeof n==`string`?{message:n}:n}function R6(e,t={},n){return e?a6.create().superRefine((r,i)=>{let a=e(r);if(a instanceof Promise)return a.then(e=>{if(!e){let e=L6(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}});if(!a){let e=L6(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}}):a6.create()}var nae={object:d6.lazycreate},z6;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(z6||={});var rae=(e,t={message:`Input not instance of ${e.name}`})=>R6(t=>t instanceof e,t),B6=X3.create,V6=Q3.create,iae=N6.create,aae=$3.create,H6=e6.create,oae=t6.create,sae=n6.create,cae=r6.create,U6=i6.create,W6=a6.create,lae=o6.create,uae=s6.create,dae=c6.create,G6=l6.create,K6=d6.create,fae=d6.strictCreate,q6=f6.create,pae=m6.create,mae=g6.create,hae=_6.create,J6=v6.create,gae=y6.create,_ae=b6.create,vae=x6.create,yae=S6.create,bae=C6.create,Y6=T6.create,xae=E6.create,S
491ae=D6.create,X6=O6.create,Cae=k6.create,wae=A6.create,Tae=O6.createWithPreprocess,Eae=F6.create,Dae=()=>B6().optional(),Oae=()=>V6().optional(),kae=()=>H6().optional(),Aae={string:(e=>X3.create({...e,coerce:!0})),number:(e=>Q3.create({...e,coerce:!0})),boolean:(e=>e6.create({...e,coerce:!0})),bigint:(e=>$3.create({...e,coerce:!0})),date:(e=>t6.create({...e,coerce:!0}))},jae=m3,Mae=e({BRAND:()=>tae,DIRTY:()=>h3,EMPTY_PATH:()=>d3,INVALID:()=>m3,NEVER:()=>jae,OK:()=>g3,ParseStatus:()=>p3,Schema:()=>T3,ZodAny:()=>a6,ZodArray:()=>l6,ZodBigInt:()=>$3,ZodBoolean:()=>e6,ZodBranded:()=>P6,ZodCatch:()=>M6,ZodDate:()=>t6,ZodDefault:()=>j6,ZodDiscriminatedUnion:()=>m6,ZodEffects:()=>O6,ZodEnum:()=>T6,ZodError:()=>a3,ZodFirstPartyTypeKind:()=>z6,ZodFunction:()=>x6,ZodIntersection:()=>g6,ZodIssueCode:()=>Q,ZodLazy:()=>S6,ZodLiteral:()=>C6,ZodMap:()=>y6,ZodNaN:()=>N6,ZodNativeEnum:()=>E6,ZodNever:()=>s6,ZodNull:()=>i6,ZodNullable:()=>A6,ZodNumber:()=>Q3,ZodObject:()=>d6,ZodOptional:()=>k6,ZodParsedType:()=>n3,ZodPipeline:()=>F6,ZodPromise:()=>D6,ZodReadonly:()=>I6,ZodRecord:()=>v6,ZodSchema:()=>T3,ZodSet:()=>b6,ZodString:()=>X3,ZodSymbol:()=>n6,ZodTransformer:()=>O6,ZodTuple:()=>_6,ZodType:()=>T3,ZodUndefined:()=>r6,ZodUnion:()=>f6,ZodUnknown:()=>o6,ZodVoid:()=>c6,addIssueToContext:()=>f3,any:()=>W6,array:()=>G6,bigint:()=>aae,boolean:()=>H6,coerce:()=>Aae,custom:()=>R6,date:()=>oae,datetimeRegex:()=>K3,defaultErrorMap:()=>o3,discriminatedUnion:()=>pae,effect:()=>X6,enum:()=>Y6,function:()=>vae,getErrorMap:()=>l3,getParsedType:()=>r3,instanceof:()=>rae,intersection:()=>mae,isAborted:()=>_3,isAsync:()=>b3,isDirty:()=>v3,isValid:()=>y3,late:()=>nae,lazy:()=>yae,literal:()=>bae,makeIssue:()=>u3,map:()=>gae,nan:()=>iae,nativeEnum:()=>xae,never:()=>uae,null:()=>U6,nullable:()=>wae,number:()=>V6,object:()=>K6,objectUtil:()=>t3,oboolean:()=>kae,onumber:()=>Oae,optional:()=>Cae,ostring:()=>Dae,pipeline:()=>Eae,preprocess:()=>Tae,promise:()=>Sae,quotelessJson:()=>i3,record:()=>J6,set:()=>_ae,setErrorMap:()=>c3,strictObject:()=>fae,string:()=>B6,symbol:()=>sae,transformer:()=>X6,tuple:()=>hae,undefined:()=>cae,union:()=>q6,unknown:()=>lae,util:()=>e3,void:()=>dae}),$=Symbol.for(`drizzle:entityKind`);function Z6(e,t){if(!e||typeof e!=`object`)return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,$))throw Error(`Class "${t.name??`<unknown>`}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if($ in n&&n[$]===t[$])return!0;n=Object.getPrototypeOf(n)}return!1}var Q6=class{constructor(e,t){this.table=e,this.config=t,this.name=t.name,this.keyAsName=t.keyAsName,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.onUpdateFn=t.onUpdateFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType,this.generated=t.generated,this.generatedIdentity=t.generatedIdentity}static[$]=`Column`;name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!==`byDefault`}},Nae=class{static[$]=`ColumnBuilder`;config;constructor(e,t,n){this.config={name:e,keyAsName:e===``,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:t,columnType:n,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(e){return this.config.default=e,this.config.hasDefault=!0,this}$defaultFn(e){return this.config.defaultFn=e,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===``&&(this.config.name=e)}},$6=Symbol.for(`drizzle:Name`),Pae=class{static[$]=`PgForeignKeyBuilder`;reference;
491_onUpdate=`no action`;_onDelete=`no action`;constructor(e,t){this.reference=()=>{let{name:t,columns:n,foreignColumns:r}=e();return{name:t,columns:n,foreignTable:r[0].table,foreignColumns:r}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.onDelete)}onUpdate(e){return this._onUpdate=e===void 0?`no action`:e,this}onDelete(e){return this._onDelete=e===void 0?`no action`:e,this}build(e){return new Fae(e,this)}},Fae=class{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static[$]=`PgForeignKey`;reference;onUpdate;onDelete;getName(){let{name:e,columns:t,foreignColumns:n}=this.reference(),r=t.map(e=>e.name),i=n.map(e=>e.name),a=[this.table[$6],...r,n[0].table[$6],...i];return e??`${a.join(`_`)}_fk`}};function Iae(e,...t){return e(...t)}function Lae(e,t){return`${e[$6]}_${t.join(`_`)}_unique`}function e8(e,t,n){for(let r=t;r<e.length;r++){let i=e[r];if(i===`\\`){r++;continue}if(i===`"`)return[e.slice(t,r).replace(/\\/g,``),r+1];if(!n&&(i===`,`||i===`}`))return[e.slice(t,r).replace(/\\/g,``),r]}return[e.slice(t).replace(/\\/g,``),e.length]}function t8(e,t=0){let n=[],r=t,i=!1;for(;r<e.length;){let a=e[r];if(a===`,`){(i||r===t)&&n.push(``),i=!0,r++;continue}if(i=!1,a===`\\`){r+=2;continue}if(a===`"`){let[t,i]=e8(e,r+1,!0);n.push(t),r=i;continue}if(a===`}`)return[n,r+1];if(a===`{`){let[t,i]=t8(e,r+1);n.push(t),r=i;continue}let[o,s]=e8(e,r,!1);n.push(o),r=s}return[n,r]}function Rae(e){let[t]=t8(e,1);return t}function n8(e){return`{${e.map(e=>Array.isArray(e)?n8(e):typeof e==`string`?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:`${e}`).join(`,`)}}`}var r8=class extends Nae{foreignKeyConfigs=[];static[$]=`PgColumnBuilder`;array(e){return new Bae(this.config.name,this,e)}references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e,t){return this.config.isUnique=!0,this.config.uniqueName=e,this.config.uniqueType=t?.nulls,this}generatedAlwaysAs(e){return this.config.generated={as:e,type:`always`,mode:`stored`},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,actions:r})=>Iae((n,r)=>{let i=new Pae(()=>{let t=n();return{columns:[e],foreignColumns:[t]}});return r.onUpdate&&i.onUpdate(r.onUpdate),r.onDelete&&i.onDelete(r.onDelete),i.build(t)},n,r))}buildExtraConfigColumn(e){return new zae(e,this.config)}},i8=class extends Q6{constructor(e,t){t.uniqueName||=Lae(e,[t.name]),super(e,t),this.table=e}static[$]=`PgColumn`},zae=class extends i8{static[$]=`ExtraConfigColumn`;getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??`asc`,nulls:this.config.nulls??`last`,opClass:this.config.opClass};defaultConfig={order:`asc`,nulls:`last`,opClass:void 0};asc(){return this.indexConfig.order=`asc`,this}desc(){return this.indexConfig.order=`desc`,this}nullsFirst(){return this.indexConfig.nulls=`first`,this}nullsLast(){return this.indexConfig.nulls=`last`,this}op(e){return this.indexConfig.opClass=e,this}},a8=class{static[$]=`IndexedColumn`;constructor(e,t,n,r){this.name=e,this.keyAsName=t,this.type=n,this.indexConfig=r}name;keyAsName;type;indexConfig},Bae=class extends r8{static[$]=`PgArrayBuilder`;constructor(e,t,n){super(e,`array`,`PgArray`),this.config.baseBuilder=t,this.config.size=n}build(e){let t=this.config.baseBuilder.build(e);return new Vae(e,this.config,t)}},Vae=class e extends i8{constructor(e,t,n,r){super(e,t),this.baseColumn=n,this.range=r,this.size=t.size}size;static[$]=`PgArray`;getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size==`number`?this.size:``}]`}mapFromDriverValue(e){return typeof e==`string`&&(e=Rae(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(t,n=!1){let r=t.map(t=>t===null?null:Z6(this.baseColumn,e)?this.baseColumn.mapToDriverValue(t,!0):this.baseColumn.mapToDriverValue(t));return n?r:n8(r)}},Hae=class extends r8{static[$]=`PgEnumObjectColumnBuilder`;constructor(e,t){super(e,`string`,`PgEnumObjectColumn`),this.config.enum=t}build(e){return new Uae(e,this.config)}},Uae=class extends i8{static[$]=`PgEnumObjectColumn`;enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}},o8=Symbol.for(`drizzle:isPgEnum`);function Wae(e){return!!e&&typeof e==`function`&&o8 in e&&e[o8]===!0}var Gae=class extends r8{static[$]=`PgEnumColumnBuilder`;constructor(e,t){super(e,`string`,`PgEnumColumn`),this.config.enum=t}build(e){return new Kae(e,this.config)}},Kae=class extends i8{static[$]=`PgEnumColumn`;enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}};function s8(e,t){return Array.isArray(t)?qae(e,[...t],void 0):Jae(e,t,void 0)}function qae(e,t,n){let r=Object.assign(e=>new Gae(e??``,r),{enumName:e,enumValues:t,schema:n,[o8]:!0});return r}function Jae(e,t,n){let r=Object.assign(e=>new Hae(e??``,r),{enumName:e,enumValues:Object.values(t),schema:n,[o8]:!0});return r}var c8=class{static[$]=`Subquery`;
491constructor(e,t,n,r=!1,i=[]){this._={brand:`Subquery`,sql:e,selectedFields:t,alias:n,isWith:r,usedTables:i}}},Yae={startActiveSpan(e,t){return t()}},l8=Symbol.for(`drizzle:ViewBaseConfig`),u8=Symbol.for(`drizzle:Schema`),d8=Symbol.for(`drizzle:Columns`),f8=Symbol.for(`drizzle:ExtraConfigColumns`),p8=Symbol.for(`drizzle:OriginalName`),m8=Symbol.for(`drizzle:BaseName`),h8=Symbol.for(`drizzle:IsAlias`),g8=Symbol.for(`drizzle:ExtraConfigBuilder`),_8=Symbol.for(`drizzle:IsDrizzleTable`),v8=class{static[$]=`Table`;static Symbol={Name:$6,Schema:u8,OriginalName:p8,Columns:d8,ExtraConfigColumns:f8,BaseName:m8,IsAlias:h8,ExtraConfigBuilder:g8};[$6];[p8];[u8];[d8];[f8];[m8];[h8]=!1;[_8]=!0;[g8]=void 0;constructor(e,t,n){this[$6]=this[p8]=e,this[u8]=t,this[m8]=n}};function y8(e){return typeof e==`object`&&!!e&&_8 in e}function Xae(e){return e!=null&&typeof e.getSQL==`function`}function Zae(e){let t={sql:``,params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||=[],t.typings.push(...n.typings));return t}var b8=class{static[$]=`StringChunk`;value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new x8([this])}},x8=class e{constructor(e){this.queryChunks=e;for(let t of e)if(Z6(t,v8)){let e=t[v8.Symbol.Schema];this.usedTables.push(e===void 0?t[v8.Symbol.Name]:e+`.`+t[v8.Symbol.Name])}}static[$]=`SQL`;decoder=C8;shouldInlineParams=!1;usedTables=[];append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return Yae.startActiveSpan(`drizzle.buildSQL`,t=>{let n=this.buildQueryFromSourceParams(this.queryChunks,e);return t?.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(t,n){let r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:i,escapeName:a,escapeParam:o,prepareTyping:s,inlineParams:c,paramStartIndex:l}=r;return Zae(t.map(t=>{if(Z6(t,b8))return{sql:t.value.join(``),params:[]};if(Z6(t,S8))return{sql:a(t.value),params:[]};if(t===void 0)return{sql:``,params:[]};if(Array.isArray(t)){let e=[new b8(`(`)];for(let[n,r]of t.entries())e.push(r),n<t.length-1&&e.push(new b8(`, `));return e.push(new b8(`)`)),this.buildQueryFromSourceParams(e,r)}if(Z6(t,e))return this.buildQueryFromSourceParams(t.queryChunks,{...r,inlineParams:c||t.shouldInlineParams});if(Z6(t,v8)){let e=t[v8.Symbol.Schema],n=t[v8.Symbol.Name];return{sql:e===void 0||t[h8]?a(n):a(e)+`.`+a(n),params:[]}}if(Z6(t,Q6)){let e=i.getColumnCasing(t);if(n.invokeSource===`indexes`)return{sql:a(e),params:[]};let r=t.table[v8.Symbol.Schema];return{sql:t.table[h8]||r===void 0?a(t.table[v8.Symbol.Name])+`.`+a(e):a(r)+`.`+a(t.table[v8.Symbol.Name])+`.`+a(e),params:[]}}if(Z6(t,Qae)){let e=t[l8].schema,n=t[l8].name;return{sql:e===void 0||t[l8].isAlias?a(n):a(e)+`.`+a(n),params:[]}}if(Z6(t,T8)){if(Z6(t.value,D8))return{sql:o(l.value++,t),params:[t],typings:[`none`]};let n=t.value===null?null:t.encoder.mapToDriverValue(t.value);if(Z6(n,e))return this.buildQueryFromSourceParams([n],r);if(c)return{sql:this.mapInlineParam(n,r),params:[]};let i=[`none`];return s&&(i=[s(t.encoder)]),{sql:o(l.value++,n),params:[n],typings:i}}return Z6(t,D8)?{sql:o(l.value++,t),params:[t],typings:[`none`]}:Z6(t,e.Aliased)&&t.fieldAlias!==void 0?{sql:a(t.fieldAlias),params:[]}:Z6(t,c8)?t._.isWith?{sql:a(t._.alias),params:[]}:this.buildQueryFromSourceParams([new b8(`(`),t._.sql,new b8(`) `),new S8(t._.alias)],r):Wae(t)?t.schema?{sql:a(t.schema)+`.`+a(t.enumName),params:[]}:{sql:a(t.enumName),params:[]}:Xae(t)?t.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([t.getSQL()],r):this.buildQueryFromSourceParams([new b8(`(`),t.getSQL(),new b8(`)`)],r):c?{sql:this.mapInlineParam(t,r),params:[]}:{sql:o(l.value++,t),params:[t],typings:[`none`]}}))}mapInlineParam(e,{escapeString:t}){if(e===null)return`null`;if(typeof e==`number`||typeof e==`boolean`)return e.toString();if(typeof e==`string`)return t(e);if(typeof e==`object`){let n=e.toString();return t(n===`[object Object]`?JSON.stringify(e):n)}throw Error(`Unexpected param value: `+e)}getSQL(){return this}as(t){return t===void 0?this:new e.Aliased(this,t)}mapWith(e){return this.decoder=typeof e==`function`?{mapFromDriverValue:e}:e,this}inlineParams(){return this.shouldInlineParams=!0,this}if(e){return e?this:void 0}},S8=class{constructor(e){this.value=e}static[$]=`Name`;brand;getSQL(){return new x8([this])}},C8={mapFromDriverValue:e=>e},w8={mapToDriverValue:e=>e};({...C8,...w8});var T8=class{constructor(e,t=w8){this.value=e,this.encoder=t}static[$]=`Param`;brand;getSQL(){return new x8([this])}};function E8(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!==``)&&n.push(new b8(e[0]));for(let[r,i]of t.entries())n.push(i,new b8(e[r+1]));return new x8(n)}(e=>{function t(){return new x8([])}e.empty=t;function n(e){return new x8(e)}e.fromList=n;function r(e){return new x8([new b8(e)])}e.raw=r;function i(e,t){let n=[];for(let[r,i]of e.entries())r>0&&t!==void 0&&n.push(t),n.push(i);return new x8(n)}e.join=i;function a(e){return new S8(e)}e.identifier=a;function o(e){return new D8(e)}e.placeholder=o;function s(e,t){return new T8(e,t)}e.param=s})(E8||={}),(e=>{class t{constructor(e,t){this.sql=e,this.fieldAlias=t}static[$]=`SQL.Aliased`;isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(x8||={});var D8=class{constructor(e){this.name=e}static[$]=`Placeholder`;getSQL(){return new x8([this])}},O8=Symbol.for(`drizzle:IsDrizzleView`),Qae=class{static[$]=`View`;[l8];[O8]=!0;
491constructor({name:e,schema:t,selectedFields:n,query:r}){this[l8]={name:e,originalName:e,schema:t,selectedFields:n,query:r,isExisting:!r,isAlias:!1}}getSQL(){return new x8([this])}};function $ae(e){return typeof e==`object`&&!!e&&O8 in e}Q6.prototype.getSQL=function(){return new x8([this])},v8.prototype.getSQL=function(){return new x8([this])},c8.prototype.getSQL=function(){return new x8([this])};function eoe(e){return e[v8.Symbol.Columns]}function toe(e){return e[l8].selectedFields}function k8(e,t){return{name:typeof e==`string`&&e.length>0?e:``,config:typeof e==`object`?e:t}}typeof TextDecoder>`u`||new TextDecoder;var A8=class extends r8{static[$]=`PgIntColumnBaseBuilder`;generatedAlwaysAsIdentity(e){if(e){let{name:t,...n}=e;this.config.generatedIdentity={type:`always`,sequenceName:t,sequenceOptions:n}}else this.config.generatedIdentity={type:`always`};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(e){if(e){let{name:t,...n}=e;this.config.generatedIdentity={type:`byDefault`,sequenceName:t,sequenceOptions:n}}else this.config.generatedIdentity={type:`byDefault`};return this.config.hasDefault=!0,this.config.notNull=!0,this}},noe=class extends A8{static[$]=`PgBigInt53Builder`;constructor(e){super(e,`number`,`PgBigInt53`)}build(e){return new roe(e,this.config)}},roe=class extends i8{static[$]=`PgBigInt53`;getSQLType(){return`bigint`}mapFromDriverValue(e){return typeof e==`number`?e:Number(e)}},ioe=class extends A8{static[$]=`PgBigInt64Builder`;constructor(e){super(e,`bigint`,`PgBigInt64`)}build(e){return new aoe(e,this.config)}},aoe=class extends i8{static[$]=`PgBigInt64`;getSQLType(){return`bigint`}mapFromDriverValue(e){return BigInt(e)}};function ooe(e,t){let{name:n,config:r}=k8(e,t);return r.mode===`number`?new noe(n):new ioe(n)}var soe=class extends r8{static[$]=`PgBigSerial53Builder`;constructor(e){super(e,`number`,`PgBigSerial53`),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new coe(e,this.config)}},coe=class extends i8{static[$]=`PgBigSerial53`;getSQLType(){return`bigserial`}mapFromDriverValue(e){return typeof e==`number`?e:Number(e)}},loe=class extends r8{static[$]=`PgBigSerial64Builder`;constructor(e){super(e,`bigint`,`PgBigSerial64`),this.config.hasDefault=!0}build(e){return new uoe(e,this.config)}},uoe=class extends i8{static[$]=`PgBigSerial64`;getSQLType(){return`bigserial`}mapFromDriverValue(e){return BigInt(e)}};function doe(e,t){let{name:n,config:r}=k8(e,t);return r.mode===`number`?new soe(n):new loe(n)}var foe=class extends r8{static[$]=`PgBooleanBuilder`;constructor(e){super(e,`boolean`,`PgBoolean`)}build(e){return new poe(e,this.config)}},poe=class extends i8{static[$]=`PgBoolean`;getSQLType(){return`boolean`}};function j8(e){return new foe(e??``)}var moe=class extends r8{static[$]=`PgCharBuilder`;constructor(e,t){super(e,`string`,`PgChar`),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new hoe(e,this.config)}},hoe=class extends i8{static[$]=`PgChar`;length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?`char`:`char(${this.length})`}};function goe(e,t={}){let{name:n,config:r}=k8(e,t);return new moe(n,r)}var _oe=class extends r8{static[$]=`PgCidrBuilder`;constructor(e){super(e,`string`,`PgCidr`)}build(e){return new voe(e,this.config)}},voe=class extends i8{static[$]=`PgCidr`;getSQLType(){return`cidr`}};function yoe(e){return new _oe(e??``)}var boe=class extends r8{static[$]=`PgCustomColumnBuilder`;constructor(e,t,n){super(e,`custom`,`PgCustomColumn`),this.config.fieldConfig=t,this.config.customTypeParams=n}build(e){return new xoe(e,this.config)}},xoe=class extends i8{static[$]=`PgCustomColumn`;sqlName;mapTo;mapFrom;constructor(e,t){super(e,t),this.sqlName=t.customTypeParams.dataType(t.fieldConfig),this.mapTo=t.customTypeParams.toDriver,this.mapFrom=t.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(e){return typeof this.mapFrom==`function`?this.mapFrom(e):e}mapToDriverValue(e){return typeof this.mapTo==`function`?this.mapTo(e):e}};function Soe(e){return(t,n)=>{let{name:r,config:i}=k8(t,n);return new boe(r,i,e)}}var M8=class extends r8{static[$]=`PgDateColumnBaseBuilder`;defaultNow(){return this.default(E8`now()`)}},Coe=class extends M8{static[$]=`PgDateBuilder`;constructor(e){super(e,`date`,`PgDate`)}build(e){return new woe(e,this.config)}},woe=class extends i8{static[$]=`PgDate`;getSQLType(){return`date`}mapFromDriverValue(e){return typeof e==`string`?new Date(e):e}mapToDriverValue(e){return e.toISOString()}},Toe=class extends M8{static[$]=`PgDateStringBuilder`;constructor(e){super(e,`string`,`PgDateString`)}build(e){return new Eoe(e,this.config)}},Eoe=class extends i8{static[$]=`PgDateString`;getSQLType(){return`date`}mapFromDriverValue(e){return typeof e==`string`?e:e.toISOString().slice(0,-14)}};function Doe(e,t){let{name:n,config:r}=k8(e,t);return r?.mode===`date`?new Coe(n):new Toe(n)}var Ooe=class extends r8{static[$]=`PgDoublePrecisionBuilder`;constructor(e){super(e,`number`,`PgDoublePrecision`)}build(e){return new koe(e,this.config)}},koe=class extends i8{static[$]=`PgDoublePrecision`;getSQLType(){return`double precision`}mapFromDriverValue(e){return typeof e==`string`?Number.parseFloat(e):e}};function Aoe(e){return new Ooe(e??``)}var joe=class extends r8{static[$]=`PgInetBuilder`;constructor(e){super(e,`string`,`PgInet`)}build(e){return new Moe(e,this.config)}},Moe=class extends i8{static[$]=`PgInet`;getSQLType(){return`inet`}};function Noe(e){return new joe(e??``)}var Poe=class extends A8{static[$]=`PgIntegerBuilder`;constructor(e){super(e,`number`,`PgInteger`)}build(e){return new Foe(e,this.config)}},Foe=class extends i8{static[$]=`PgInteger`;getSQLType(){return`integer`}mapFromDriverValue(e){return typeof e==`string`?Number.parseInt(e):e}};function N8(e){return new Poe(e??``)}var Ioe=class extends r8{static[$]=`PgIntervalBuilder`;constructor(e,t){super(e,`string`,`PgInterval`),this.config.intervalConfig=t}build(e){return new Loe(e,this.config)}},Loe=class extends i8{static[$]=`PgInterval`;fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){return`interval${this.fields?` ${this.fields}`:``}${this.precision?`(${this.precision})`:``}`}};function Roe(e,t={}){let{name:n,config:r}=k8(e,t);return new Ioe(n,r)}var zoe=class extends r8{static[$]=`PgJsonBuilder`;constructor(e){super(e,`json`,`PgJson`)}build(e){return new Boe(e,this.config)}},Boe=class extends i8{static[$]=`PgJson`;constructor(e,t){super(e,t)}getSQLType(){return`json`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}};function P8(e){return new zoe(e??``)}var Voe=class extends r8{static[$]=`PgJsonbBuilder`;constructor(e){super(e,`json`,`PgJsonb`)}build(e){return new Hoe(e,this.config)}},Hoe=class extends i8{static[$]=`PgJsonb`;constructor(e,t){super(e,t)}getSQLType(){return`jsonb`}
491mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}};function F8(e){return new Voe(e??``)}var Uoe=class extends r8{static[$]=`PgLineBuilder`;constructor(e){super(e,`array`,`PgLine`)}build(e){return new Woe(e,this.config)}},Woe=class extends i8{static[$]=`PgLine`;getSQLType(){return`line`}mapFromDriverValue(e){let[t,n,r]=e.slice(1,-1).split(`,`);return[Number.parseFloat(t),Number.parseFloat(n),Number.parseFloat(r)]}mapToDriverValue(e){return`{${e[0]},${e[1]},${e[2]}}`}},Goe=class extends r8{static[$]=`PgLineABCBuilder`;constructor(e){super(e,`json`,`PgLineABC`)}build(e){return new Koe(e,this.config)}},Koe=class extends i8{static[$]=`PgLineABC`;getSQLType(){return`line`}mapFromDriverValue(e){let[t,n,r]=e.slice(1,-1).split(`,`);return{a:Number.parseFloat(t),b:Number.parseFloat(n),c:Number.parseFloat(r)}}mapToDriverValue(e){return`{${e.a},${e.b},${e.c}}`}};function qoe(e,t){let{name:n,config:r}=k8(e,t);return!r?.mode||r.mode===`tuple`?new Uoe(n):new Goe(n)}var Joe=class extends r8{static[$]=`PgMacaddrBuilder`;constructor(e){super(e,`string`,`PgMacaddr`)}build(e){return new Yoe(e,this.config)}},Yoe=class extends i8{static[$]=`PgMacaddr`;getSQLType(){return`macaddr`}};function Xoe(e){return new Joe(e??``)}var Zoe=class extends r8{static[$]=`PgMacaddr8Builder`;constructor(e){super(e,`string`,`PgMacaddr8`)}build(e){return new Qoe(e,this.config)}},Qoe=class extends i8{static[$]=`PgMacaddr8`;getSQLType(){return`macaddr8`}};function $oe(e){return new Zoe(e??``)}var ese=class extends r8{static[$]=`PgNumericBuilder`;constructor(e,t,n){super(e,`string`,`PgNumeric`),this.config.precision=t,this.config.scale=n}build(e){return new tse(e,this.config)}},tse=class extends i8{static[$]=`PgNumeric`;precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return typeof e==`string`?e:String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},nse=class extends r8{static[$]=`PgNumericNumberBuilder`;constructor(e,t,n){super(e,`number`,`PgNumericNumber`),this.config.precision=t,this.config.scale=n}build(e){return new rse(e,this.config)}},rse=class extends i8{static[$]=`PgNumericNumber`;precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return typeof e==`number`?e:Number(e)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}},ise=class extends r8{static[$]=`PgNumericBigIntBuilder`;constructor(e,t,n){super(e,`bigint`,`PgNumericBigInt`),this.config.precision=t,this.config.scale=n}build(e){return new ase(e,this.config)}},ase=class extends i8{static[$]=`PgNumericBigInt`;precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?`numeric`:`numeric(${this.precision})`}};function ose(e,t){let{name:n,config:r}=k8(e,t),i=r?.mode;return i===`number`?new nse(n,r?.precision,r?.scale):i===`bigint`?new ise(n,r?.precision,r?.scale):new ese(n,r?.precision,r?.scale)}var sse=class extends r8{static[$]=`PgPointTupleBuilder`;constructor(e){super(e,`array`,`PgPointTuple`)}build(e){return new cse(e,this.config)}},cse=class extends i8{static[$]=`PgPointTuple`;getSQLType(){return`point`}mapFromDriverValue(e){if(typeof e==`string`){let[t,n]=e.slice(1,-1).split(`,`);return[Number.parseFloat(t),Number.parseFloat(n)]}return[e.x,e.y]}mapToDriverValue(e){return`(${e[0]},${e[1]})`}},lse=class extends r8{static[$]=`PgPointObjectBuilder`;constructor(e){super(e,`json`,`PgPointObject`)}build(e){return new use(e,this.config)}},use=class extends i8{static[$]=`PgPointObject`;getSQLType(){return`point`}mapFromDriverValue(e){if(typeof e==`string`){let[t,n]=e.slice(1,-1).split(`,`);return{x:Number.parseFloat(t),y:Number.parseFloat(n)}}return e}mapToDriverValue(e){return`(${e.x},${e.y})`}};function dse(e,t){let{name:n,config:r}=k8(e,t);return!r?.mode||r.mode===`tuple`?new sse(n):new lse(n)}function fse(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(Number.parseInt(e.slice(n,n+2),16));return new Uint8Array(t)}function I8(e,t){let n=new DataView(new ArrayBuffer(8));for(let r=0;r<8;r++)n.setUint8(r,e[t+r]);return n.getFloat64(0,!0)}function L8(e){let t=fse(e),n=0,r=t[n];n+=1;let i=new DataView(t.buffer),a=i.getUint32(n,r===1);if(n+=4,a&536870912&&(i.getUint32(n,r===1),n+=4),(a&65535)==1){let e=I8(t,n);n+=8;let r=I8(t,n);return n+=8,[e,r]}throw Error(`Unsupported geometry type`)}var pse=class extends r8{static[$]=`PgGeometryBuilder`;constructor(e){super(e,`array`,`PgGeometry`)}build(e){return new mse(e,this.config)}},mse=class extends i8{static[$]=`PgGeometry`;getSQLType(){return`geometry(point)`}mapFromDriverValue(e){return L8(e)}mapToDriverValue(e){return`point(${e[0]} ${e[1]})`}},hse=class extends r8{static[$]=`PgGeometryObjectBuilder`;constructor(e){super(e,`json`,`PgGeometryObject`)}build(e){return new gse(e,this.config)}},gse=class extends i8{static[$]=`PgGeometryObject`;getSQLType(){return`geometry(point)`}mapFromDriverValue(e){let t=L8(e);return{x:t[0],y:t[1]}}mapToDriverValue(e){return`point(${e.x} ${e.y})`}};function _se(e,t){let{name:n,config:r}=k8(e,t);return!r?.mode||r.mode===`tuple`?new pse(n):new hse(n)}var vse=class extends r8{static[$]=`PgRealBuilder`;constructor(e,t){super(e,`number`,`PgReal`),this.config.length=t}build(e){return new yse(e,this.config)}},yse=class extends i8{static[$]=`PgReal`;constructor(e,t){super(e,t)}getSQLType(){return`real`}mapFromDriverValue=e=>typeof e==`string`?Number.parseFloat(e):e};function bse(e){return new vse(e??``)}var xse=class extends r8{static[$]=`PgSerialBuilder`;constructor(e){super(e,`number`,`PgSerial`),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new Sse(e,this.config)}},Sse=class extends i8{static[$]=`PgSerial`;getSQLType(){return`serial`}};function Cse(e){return new xse(e??``)}var wse=class extends A8{static[$]=`PgSmallIntBuilder`;constructor(e){super(e,`number`,`PgSmallInt`)}build(e){return new Tse(e,this.config)}},Tse=class extends i8{static[$]=`PgSmallInt`;getSQLType(){return`smallint`}mapFromDriverValue=e=>typeof e==`string`?Number(e):e};function Ese(e){return new wse(e??``)}var Dse=class extends r8{static[$]=`PgSmallSerialBuilder`;constructor(e){super(e,`number`,`PgSmallSerial`),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new Ose(e,this.config)}},Ose=class extends i8{static[$]=`PgSmallSerial`;
491getSQLType(){return`smallserial`}};function kse(e){return new Dse(e??``)}var Ase=class extends r8{static[$]=`PgTextBuilder`;constructor(e,t){super(e,`string`,`PgText`),this.config.enumValues=t.enum}build(e){return new jse(e,this.config)}},jse=class extends i8{static[$]=`PgText`;enumValues=this.config.enumValues;getSQLType(){return`text`}};function R8(e,t={}){let{name:n,config:r}=k8(e,t);return new Ase(n,r)}var Mse=class extends M8{constructor(e,t,n){super(e,`string`,`PgTime`),this.withTimezone=t,this.precision=n,this.config.withTimezone=t,this.config.precision=n}static[$]=`PgTimeBuilder`;build(e){return new Nse(e,this.config)}},Nse=class extends i8{static[$]=`PgTime`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`time${this.precision===void 0?``:`(${this.precision})`}${this.withTimezone?` with time zone`:``}`}};function Pse(e,t={}){let{name:n,config:r}=k8(e,t);return new Mse(n,r.withTimezone??!1,r.precision)}var Fse=class extends M8{static[$]=`PgTimestampBuilder`;constructor(e,t,n){super(e,`date`,`PgTimestamp`),this.config.withTimezone=t,this.config.precision=n}build(e){return new Ise(e,this.config)}},Ise=class extends i8{static[$]=`PgTimestamp`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`timestamp${this.precision===void 0?``:` (${this.precision})`}${this.withTimezone?` with time zone`:``}`}mapFromDriverValue(e){return typeof e==`string`?new Date(this.withTimezone?e:e+`+0000`):e}mapToDriverValue=e=>e.toISOString()},Lse=class extends M8{static[$]=`PgTimestampStringBuilder`;constructor(e,t,n){super(e,`string`,`PgTimestampString`),this.config.withTimezone=t,this.config.precision=n}build(e){return new Rse(e,this.config)}},Rse=class extends i8{static[$]=`PgTimestampString`;withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`timestamp${this.precision===void 0?``:`(${this.precision})`}${this.withTimezone?` with time zone`:``}`}mapFromDriverValue(e){if(typeof e==`string`)return e;let t=e.toISOString().slice(0,-1).replace(`T`,` `);if(this.withTimezone){let n=e.getTimezoneOffset();return`${t}${n<=0?`+`:`-`}${Math.floor(Math.abs(n)/60).toString().padStart(2,`0`)}`}return t}};function z8(e,t={}){let{name:n,config:r}=k8(e,t);return r?.mode===`string`?new Lse(n,r.withTimezone??!1,r.precision):new Fse(n,r?.withTimezone??!1,r?.precision)}var zse=class extends r8{static[$]=`PgUUIDBuilder`;constructor(e){super(e,`string`,`PgUUID`)}defaultRandom(){return this.default(E8`gen_random_uuid()`)}build(e){return new Bse(e,this.config)}},Bse=class extends i8{static[$]=`PgUUID`;getSQLType(){return`uuid`}};function Vse(e){return new zse(e??``)}var Hse=class extends r8{static[$]=`PgVarcharBuilder`;constructor(e,t){super(e,`string`,`PgVarchar`),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new Use(e,this.config)}},Use=class extends i8{static[$]=`PgVarchar`;length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?`varchar`:`varchar(${this.length})`}};function B8(e,t={}){let{name:n,config:r}=k8(e,t);return new Hse(n,r)}var Wse=class extends r8{static[$]=`PgBinaryVectorBuilder`;constructor(e,t){super(e,`string`,`PgBinaryVector`),this.config.dimensions=t.dimensions}build(e){return new Gse(e,this.config)}},Gse=class extends i8{static[$]=`PgBinaryVector`;dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}};function Kse(e,t){let{name:n,config:r}=k8(e,t);return new Wse(n,r)}var qse=class extends r8{static[$]=`PgHalfVectorBuilder`;constructor(e,t){super(e,`array`,`PgHalfVector`),this.config.dimensions=t.dimensions}build(e){return new Jse(e,this.config)}},Jse=class extends i8{static[$]=`PgHalfVector`;dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(`,`).map(e=>Number.parseFloat(e))}};function Yse(e,t){let{name:n,config:r}=k8(e,t);return new qse(n,r)}var Xse=class extends r8{static[$]=`PgSparseVectorBuilder`;constructor(e,t){super(e,`string`,`PgSparseVector`),this.config.dimensions=t.dimensions}build(e){return new Zse(e,this.config)}},Zse=class extends i8{static[$]=`PgSparseVector`;dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}}
491;function Qse(e,t){let{name:n,config:r}=k8(e,t);return new Xse(n,r)}var $se=class extends r8{static[$]=`PgVectorBuilder`;constructor(e,t){super(e,`array`,`PgVector`),this.config.dimensions=t.dimensions}build(e){return new ece(e,this.config)}},ece=class extends i8{static[$]=`PgVector`;dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(`,`).map(e=>Number.parseFloat(e))}};function V8(e,t){let{name:n,config:r}=k8(e,t);return new $se(n,r)}function tce(){return{bigint:ooe,bigserial:doe,boolean:j8,char:goe,cidr:yoe,customType:Soe,date:Doe,doublePrecision:Aoe,inet:Noe,integer:N8,interval:Roe,json:P8,jsonb:F8,line:qoe,macaddr:Xoe,macaddr8:$oe,numeric:ose,point:dse,geometry:_se,real:bse,serial:Cse,smallint:Ese,smallserial:kse,text:R8,time:Pse,timestamp:z8,uuid:Vse,varchar:B8,bit:Kse,halfvec:Yse,sparsevec:Qse,vector:V8}}var H8=Symbol.for(`drizzle:PgInlineForeignKeys`),U8=Symbol.for(`drizzle:EnableRLS`),W8=class extends v8{static[$]=`PgTable`;static Symbol=Object.assign({},v8.Symbol,{InlineForeignKeys:H8,EnableRLS:U8});[H8]=[];[U8]=!1;[v8.Symbol.ExtraConfigBuilder]=void 0;[v8.Symbol.ExtraConfigColumns]={}};function nce(e,t,n,r,i=e){let a=new W8(e,r,i),o=typeof t==`function`?t(tce()):t,s=Object.fromEntries(Object.entries(o).map(([e,t])=>{let n=t;n.setName(e);let r=n.build(a);return a[H8].push(...n.buildForeignKeys(r,a)),[e,r]})),c=Object.fromEntries(Object.entries(o).map(([e,t])=>{let n=t;return n.setName(e),[e,n.buildExtraConfigColumn(a)]})),l=Object.assign(a,s);return l[v8.Symbol.Columns]=s,l[v8.Symbol.ExtraConfigColumns]=c,n&&(l[W8.Symbol.ExtraConfigBuilder]=n),Object.assign(l,{enableRLS:()=>(l[W8.Symbol.EnableRLS]=!0,l)})}var G8=(e,t,n)=>nce(e,t,n,void 0),K8={INT8_MIN:-128,INT8_MAX:127,INT8_UNSIGNED_MAX:255,INT16_MIN:-32768,INT16_MAX:32767,INT16_UNSIGNED_MAX:65535,INT24_MIN:-8388608,INT24_MAX:8388607,INT24_UNSIGNED_MAX:16777215,INT32_MIN:-2147483648,INT32_MAX:2147483647,INT32_UNSIGNED_MAX:4294967295,INT48_MIN:-0x800000000000,INT48_MAX:0x7fffffffffff,INT48_UNSIGNED_MAX:0xffffffffffff,INT64_MIN:-9223372036854775808n,INT64_MAX:9223372036854775807n,INT64_UNSIGNED_MAX:18446744073709551615n};function q8(e,t){return t.includes(e.columnType)}function rce(e){return`enumValues`in e&&Array.isArray(e.enumValues)&&e.enumValues.length>0}var ice=q6([q6([B6(),V6(),H6(),U6()]),J6(W6()),G6(W6())]),ace=R6(e=>e instanceof Buffer);function J8(e,t){let n=t?.zodInstance??Mae,r=t?.coerce??{},i;return rce(e)&&(i=e.enumValues.length?n.enum(e.enumValues):n.string()),i||(q8(e,[`PgGeometry`,`PgPointTuple`])?i=n.tuple([n.number(),n.number()]):q8(e,[`PgGeometryObject`,`PgPointObject`])?i=n.object({x:n.number(),y:n.number()}):q8(e,[`PgHalfVector`,`PgVector`])?(i=n.array(n.number()),i=e.dimensions?i.length(e.dimensions):i):q8(e,[`PgLine`])?i=n.tuple([n.number(),n.number(),n.number()]):q8(e,[`PgLineABC`])?i=n.object({a:n.number(),b:n.number(),c:n.number()}):q8(e,[`PgArray`])?(i=n.array(J8(e.baseColumn,n)),i=e.size?i.length(e.size):i):e.dataType===`array`?i=n.array(n.any()):e.dataType===`number`?i=oce(e,n,r):e.dataType===`bigint`?i=sce(e,n,r):e.dataType===`boolean`?i=r===!0||r.boolean?n.coerce.boolean():n.boolean():e.dataType===`date`?i=r===!0||r.date?n.coerce.date():n.date():e.dataType===`string`?i=cce(e,n,r):e.dataType===`json`?i=ice:e.dataType===`custom`?i=n.any():e.dataType===`buffer`&&(i=ace)),i||=n.any(),i}function oce(e,t,n){let r=e.getSQLType().includes(`unsigned`),i,a,o=!1;q8(e,[`MySqlTinyInt`,`SingleStoreTinyInt`])?(i=r?0:K8.INT8_MIN,a=r?K8.INT8_UNSIGNED_MAX:K8.INT8_MAX,o=!0):q8(e,[`PgSmallInt`,`PgSmallSerial`,`MySqlSmallInt`,`SingleStoreSmallInt`])?(i=r?0:K8.INT16_MIN,a=r?K8.INT16_UNSIGNED_MAX:K8.INT16_MAX,o=!0):q8(e,[`PgReal`,`MySqlFloat`,`MySqlMediumInt`,`SingleStoreMediumInt`,`SingleStoreFloat`])?(i=r?0:K8.INT24_MIN,a=r?K8.INT24_UNSIGNED_MAX:K8.INT24_MAX,o=q8(e,[`MySqlMediumInt`,`SingleStoreMediumInt`])):q8(e,[`PgInteger`,`PgSerial`,`MySqlInt`,`SingleStoreInt`])?(i=r?0:K8.INT32_MIN,a=r?K8.INT32_UNSIGNED_MAX:K8.INT32_MAX,o=!0):q8(e,[`PgDoublePrecision`,`MySqlReal`,`MySqlDouble`,`SingleStoreReal`,`SingleStoreDouble`,`SQLiteReal`])?(i=r?0:K8.INT48_MIN,a=r?K8.INT48_UNSIGNED_MAX:K8.INT48_MAX):q8
491(e,[`PgBigInt53`,`PgBigSerial53`,`MySqlBigInt53`,`MySqlSerial`,`SingleStoreBigInt53`,`SingleStoreSerial`,`SQLiteInteger`])?(r||=q8(e,[`MySqlSerial`,`SingleStoreSerial`]),i=r?0:-(2**53-1),a=2**53-1,o=!0):q8(e,[`MySqlYear`,`SingleStoreYear`])?(i=1901,a=2155,o=!0):(i=-(2**53-1),a=2**53-1);let s=n===!0||n?.number?t.coerce.number():t.number();return s=s.min(i).max(a),o?s.int():s}function sce(e,t,n){let r=e.getSQLType().includes(`unsigned`),i=r?0n:K8.INT64_MIN,a=r?K8.INT64_UNSIGNED_MAX:K8.INT64_MAX;return(n===!0||n?.bigint?t.coerce.bigint():t.bigint()).min(i).max(a)}function cce(e,t,n){if(q8(e,[`PgUUID`]))return t.string().uuid();let r,i,a=!1;q8(e,[`PgVarchar`,`SQLiteText`])?r=e.length:q8(e,[`MySqlVarChar`,`SingleStoreVarChar`])?r=e.length??K8.INT16_UNSIGNED_MAX:q8(e,[`MySqlText`,`SingleStoreText`])&&(r=e.textType===`longtext`?K8.INT32_UNSIGNED_MAX:e.textType===`mediumtext`?K8.INT24_UNSIGNED_MAX:e.textType===`text`?K8.INT16_UNSIGNED_MAX:K8.INT8_UNSIGNED_MAX),q8(e,[`PgChar`,`MySqlChar`,`SingleStoreChar`])&&(r=e.length,a=!0),q8(e,[`PgBinaryVector`])&&(i=/^[01]+$/,r=e.dimensions);let o=n===!0||n?.string?t.coerce.string():t.string();return o=i?o.regex(i):o,r&&a?o.length(r):r?o.max(r):o}function Y8(e){return y8(e)?eoe(e):toe(e)}function X8(e,t,n,r){let i={};for(let[a,o]of Object.entries(e)){if(!Z6(o,Q6)&&!Z6(o,x8)&&!Z6(o,x8.Aliased)&&typeof o==`object`){i[a]=X8(y8(o)||$ae(o)?Y8(o):o,t[a]??{},n,r);continue}let e=t[a];if(e!==void 0&&typeof e!=`function`){i[a]=e;continue}let s=Z6(o,Q6)?o:void 0,c=s?J8(s,r):W6(),l=typeof e==`function`?e(c):c;n.never(s)||(i[a]=l,s&&(n.nullable(s)&&(i[a]=i[a].nullable()),n.optional(s)&&(i[a]=i[a].optional())))}return K6(i)}var lce={never:e=>e?.generated?.type===`always`||e?.generatedIdentity?.type===`always`,optional:e=>!e.notNull||e.notNull&&e.hasDefault,nullable:e=>!e.notNull},Z8=(e,t)=>X8(Y8(e),t??{},lce),uce=class{constructor(e,t){this.name=e,this.value=t}static[$]=`PgCheckBuilder`;brand;build(e){return new dce(e,this)}},dce=class{constructor(e,t){this.table=e,this.name=t.name,this.value=t.value}static[$]=`PgCheck`;name;value};function fce(e,t){return new uce(e,t)}var Q8=class{constructor(e,t){this.unique=e,this.name=t}static[$]=`PgIndexBuilderOn`;on(...e){return new $8(e.map(e=>{if(Z6(e,x8))return e;e=e;let t=new a8(e.name,!!e.keyAsName,e.columnType,e.indexConfig);return e.indexConfig=JSON.parse(JSON.stringify(e.defaultConfig)),t}),this.unique,!1,this.name)}onOnly(...e){return new $8(e.map(e=>{if(Z6(e,x8))return e;e=e;let t=new a8(e.name,!!e.keyAsName,e.columnType,e.indexConfig);return e.indexConfig=e.defaultConfig,t}),this.unique,!0,this.name)}using(e,...t){return new $8(t.map(e=>{if(Z6(e,x8))return e;e=e;let t=new a8(e.name,!!e.keyAsName,e.columnType,e.indexConfig);return e.indexConfig=JSON.parse(JSON.stringify(e.defaultConfig)),t}),this.unique,!0,this.name,e)}},$8=class{static[$]=`PgIndexBuilder`;config;constructor(e,t,n,r,i=`btree`){this.config={name:r,columns:e,unique:t,only:n,method:i}}concurrently(){return this.config.concurrently=!0,this}with(e){return this.config.with=e,this}where(e){return this.config.where=e,this}build(e){return new pce(this.config,e)}},pce=class{static[$]=`PgIndex`;config;constructor(e,t){this.config={...e,table:t}}};function e5(e){return new Q8(!1,e)}function t5(e){return new Q8(!0,e)}var n5=[`sales`,`hr_people`,`roster`,`financial`,`product`,`research`,`policy`,`survey`,`other`],r5={sales:`Sales`,hr_people:`HR / People`,roster:`Roster`,financial:`Financial`,product:`Product`,research:`Research`,policy:`Policy`,survey:`Survey`,other:`Other`};Z8(G8(`vocabulary`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),term:R8(`term`).notNull().unique(),definition:R8(`definition`).notNull(),createdAt:z8(`created_at`).defaultNow(),updatedAt:z8(`updated_at`).defaultNow()})).omit({id:!0,createdAt:!0,updatedAt:!0}),G8(`session`,{sid:B8(`sid`).primaryKey(),sess:P8(`sess`).notNull(),expire:z8(`expire`).notNull()},e=>[e5(`IDX_session_expire`).on(e.expire)]);var i5=G8(`users`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),username:R8(`username`).notNull().unique(),email:R8(`email`),roles:R8(`roles`),authProvider:R8(`auth_provider`).default(`oidc`).notNull(),xcelClientId:B8(`xcel_client_id`),workspaceId:B8(`workspace_id`).references(()=>a5.id,{onDelete:`set null`}),firstName:R8(`first_name`),lastName:R8(`last_name`),displayName:R8(`display_name`).notNull(),avatar:R8(`avatar`),joinedAt:z8(`joined_at`).defaultNow(),lastLoginAt:z8(`last_login_at`)},e=>[e5(`users_workspace_id_idx`).on(e.workspaceId)]);Z8(i5).omit({id:!0}),Z8(G8(`user_client_selections`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),userId:B8(`user_id`).notNull().references(()=>i5.id,{onDelete:`cascade`}),maslowTenantId:B8(`maslow_tenant_id`).notNull(),createdAt:z8(`created_at`).defaultNow().notNull()},e=>[t5(`user_client_selections_user_maslow_tenant_unique_idx`).on(e.userId,e.maslowTenantId),e5(`user_client_selections_user_idx`).on(e.userId)])).omit({id:!0,createdAt:!0}),Z8(G8(`user_login_audit`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),sessionId:B8(`session_id`).notNull(),userId:B8(`user_id`).notNull().references(()=>i5.id,{onDelete:`cascade`}),authMethod:R8(`auth_method`).notNull(),oidcProvider:R8(`oidc_provider`),ipAddress:B8(`ip_address`,{length:45}),userAgent:R8(`user_agent`),metadata:F8(`metadata`).$type(),loginAt:z8(`login_at`,{withTimezone:!0}).notNull().defaultNow(),logoutAt:z8(`logout_at`,{withTimezone:!0}),sessionTimeoutAt:z8(`session_timeout_at`,{withTimezone:!0}),tokenExpiresAt:z8(`token_expires_at`,{withTimezone:!0})},e=>[e5(`user_login_audit_user_id_idx`).on(e.userId),e5(`user_login_audit_login_at_idx`).on(e.loginAt),e5(`user_login_audit_session_id_idx`).on(e.sessionId),e5(`user_login_audit_ip_address_idx`).on(e.ipAddress)])
491).omit({id:!0});var a5=G8(`workspaces`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),maslowTenantId:B8(`maslow_tenant_id`).unique(),maslowTenantName:R8(`maslow_tenant_name`).notNull()},e=>[e5(`workspaces_maslow_tenant_id_idx`).on(e.maslowTenantId)]);Z8(a5).omit({id:!0});var o5={includeProgramData:!0,includeMaslowCoreInsights:!0,includeMyData:!0},s5=G8(`notebooks`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),workspaceId:B8(`workspace_id`).notNull(),createdByUserId:B8(`created_by_user_id`).references(()=>i5.id,{onDelete:`set null`}),title:R8(`title`).notNull(),description:R8(`description`),isPublic:j8(`is_public`).default(!1).notNull(),sourceSettings:F8(`source_settings`).$type().notNull().default(o5),messageCount:N8(`message_count`).default(0),createdAt:z8(`created_at`).defaultNow(),updatedAt:z8(`updated_at`).defaultNow(),deletedAt:z8(`deleted_at`,{withTimezone:!0})},e=>[t5(`idx_notebooks_workspace_system_reports`).on(e.workspaceId).where(E8`${e.title} = '__system_reports__'`)]);Z8(s5).omit({id:!0,createdAt:!0,updatedAt:!0,messageCount:!0,sourceSettings:!0,deletedAt:!0}),Z8(G8(`notebook_members`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),notebookId:B8(`notebook_id`).notNull().references(()=>s5.id,{onDelete:`cascade`}),userId:B8(`user_id`).references(()=>i5.id,{onDelete:`set null`}),invitedByUserId:B8(`invited_by_user_id`).references(()=>i5.id,{onDelete:`set null`}),email:R8(`email`).notNull(),createdAt:z8(`created_at`,{withTimezone:!0}).defaultNow().notNull(),lastInviteSentAt:z8(`last_invite_sent_at`,{withTimezone:!0})},e=>[t5(`notebook_members_notebook_user_email_idx`).on(e.notebookId,e.userId,e.email),e5(`notebook_members_email_idx`).on(e.email),e5(`notebook_members_user_idx`).on(e.userId)])).omit({id:!0,createdAt:!0}),Z8(G8(`notebook_activity`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),notebookId:B8(`notebook_id`).notNull().references(()=>s5.id,{onDelete:`cascade`}),userId:B8(`user_id`).notNull().references(()=>i5.id,{onDelete:`cascade`}),activityType:R8(`activity_type`).$type().notNull(),metadata:F8(`metadata`).$type(),timestamp:z8(`timestamp`,{withTimezone:!0}).defaultNow().notNull()},e=>[e5(`notebook_activity_notebook_idx`).on(e.notebookId),e5(`notebook_activity_user_idx`).on(e.userId),e5(`notebook_activity_timestamp_idx`).on(e.timestamp)])).omit({id:!0,timestamp:!0}),Z8(G8(`notebook_pins`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),userId:B8(`user_id`).notNull().references(()=>i5.id,{onDelete:`cascade`}),notebookId:B8(`notebook_id`).notNull().references(()=>s5.id,{onDelete:`cascade`}),createdAt:z8(`created_at`,{withTimezone:!0}).defaultNow().notNull()},e=>[t5(`notebook_pins_user_notebook_unique_idx`).on(e.userId,e.notebookId),e5(`notebook_pins_user_idx`).on(e.userId)])).omit({id:!0,createdAt:!0});var mce=s8(`role`,[`user`,`assistant`]),hce=s8(`status`,[`processing`,`completed`,`failed`]);G8(`messages`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),notebookId:B8(`notebook_id`).notNull(),userId:B8(`user_id`).references(()=>i5.id,{onDelete:`set null`}),role:mce().notNull(),title:R8(`title`),status:hce().notNull().default(`processing`),versions:F8(`versions`).$type(),tools:F8(`tools`).$type().default([]),sources:F8(`sources`).$type().default([]),passages:F8(`passages`).$type().default([]),graphs:F8(`graphs`).$type().default([]),clients:F8(`clients`).$type().default([]),evalData:F8(`eval_data`).$type(),createdAt:z8(`created_at`).defaultNow()},e=>[e5(`messages_notebook_created_idx`).on(e.notebookId,e.createdAt)]),Z8(G8(`sources`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),workspaceId:B8(`workspace_id`),notebookId:B8(`notebook_id`),name:R8(`name`).notNull(),type:R8(`type`).notNull(),sourceType:R8(`source_type`).notNull().default(`document`),category:R8(`category`),description:R8(`description`),description_short:R8(`description_short`),description_detail:F8(`description_detail`).$type(),icon:R8(`icon`),markdownContent:R8(`markdown_content`),sourceMetadata:F8(`source_metadata`).$type(),status:R8(`status`).notNull().default(`pending`),isActive:j8(`is_active`).notNull().default(!0),isConnected:j8(`is_connected`).default(!1),chunkCount:N8(`chunk_count`),createdAt:z8(`created_at`).defaultNow(),updatedAt:z8(`updated_at`).defaultNow()},e=>[e5(`sources_workspace_idx`).on(e.workspaceId),e5(`sources_notebook_idx`).on(e.notebookId),e5(`sources_status_idx`).on(e.status),e5(`sources_workspace_type_idx`).on(e.workspaceId,e.sourceType),e5(`sources_category_idx`).on(e.category),fce(`sources_category_check`,E8.raw(`category IS NULL OR category IN (${n5.map(e=>`'${e}'`).join(`, `)})`))])).omit({id:!0,updatedAt:!0,createdAt:!0}),Z8(G8(`notebook_sources`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),sourceId:B8(`source_id`).notNull(),notebookId:B8(`notebook_id`).notNull(),addedBy:B8(`added_by`),toolParams:F8(`tool_params`),isActive:j8(`is_active`).default(!0),addedAt:z8(`added_at`).defaultNow()},e=>[e5(`notebook_sources_notebook_idx`).on(e.notebookId),e5(`notebook_sources_source_idx`).on(e.sourceId),t5(`notebook_sources_unique_idx`).on(e.notebookId,e.sourceId)])).omit({id:!0,addedAt:!0});var gce=Y6([`text`,`note`,`audio`,`pdf`,`report`]);Z8(G8(`notes`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),sourceNoteId:B8(`source_note_id`),notebookId:B8(`notebook_id`),userId:B8(`user_id`).notNull(),title:R8(`title`).notNull(),type:R8(`type`).$type().notNull(),content:R8(`content`),graphs:F8(`graphs`).$type().default([]),sourceReferences:F8(`source_references`).$type(),artifactUrl:R8(`artifact_url`),artifactMimeType:R8(`artifact_mime_type`),artifactSize:N8(`artifact_size`),artifactDuration:N8(`artifact_duration`),createdAt:z8(`created_at`).defaultNow()}),{type:gce}).omit({id:!0,createdAt:!0}),Z8(G8(`report_templates`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),workspaceId:B8(`workspace_id`).notNull().references(()=>a5.id,{onDelete:`cascade`}),createdBy:B8(`created_by`).notNull().references(()=>i5.id),name:R8(`name`).notNull(),description:R8(`description`),promptPattern:R8(`prompt_pattern`).notNull(),dataSources:F8(`data_sources`).$type().notNull().default([]),outputStructure:F8(`output_structure`).$type(),variables:F8(`variables`).$type(),lastRunBy:B8(`last_run_by`).references(()=>i5.id),lastRunAt:z8(`last_run_at`),createdAt:z8(`created_at`).defaultNow(),updatedAt:z8(`updated_at`).defaultNow()},e=>[e5(`report_templates_workspace_idx`).on(e.workspaceId),e5(`report_templates_created_by_idx`).on(e.createdBy)])).omit({id:!0,createdAt:!0,updatedAt:!0,lastRunAt:!0,lastRunBy:!0}),Z8(G8(`posts`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),userId:B8(`user_id`).notNull(),maslowTenantId:B8(`maslow_tenant_id`),artifactId:B8(`artifact_id`),content:R8(`content`).notNull(),imageUrl:R8(`image_url`),isAiGenerated:j8(`is_ai_generated`).default(!1),generationType:R8(`generation_type`).default(`user`),sourceData:F8(`source_data`).$type(),viewCount:N8(`view_count`).default(0),createdAt:z8(`created_at`).defaultNow()},e=>[e5(`posts_is_ai_generated_idx`).on(e.isAiGenerated),e5(`posts_maslow_tenant_id_idx`).on(e.maslowTenantId)])).omit({id:!0,createdAt:!0,viewCount:!0}),Z8(G8(`reactions`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),postId:B8(`post_id`).notNull(),userId:B8(`user_id`).notNull(),emoji:R8(`emoji`).notNull()},e=>[t5(`reactions_post_user_emoji_idx`).on(e.postId,e.userId,e.emoji)])).omit({id:!0}),Z8(G8(`comments`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),postId:B8(`post_id`).notNull(),userId:B8(`user_id`).notNull(),content:R8(`content`).notNull(),createdAt:z8(`created_at`).defaultNow()})).omit({id:!0,createdAt:!0}),Z8(G8(`follows`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),followerId:B8(`follower_id`).notNull(),followingId:B8(`following_id`).notNull(),createdAt:z8(`created_at`).defaultNow()},e=>[e5(`follows_follower_id_idx`).on(e.followerId),e5(`follows_following_id_idx`).on(e.followingId),t5(`follows_unique_idx`).on(e.followerId,e.followingId)])).omit({id:!0}),Z8(G8(`document_chunks`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),sourceId:B8(`source_id`).notNull(),chunkIndex:N8(`chunk_index`),content:R8(`content`).notNull(),embedding:V8(`embedding`,{dimensions:1536}),metadata:F8(`metadata`).$type(),createdAt:z8(`created_at`).defaultNow()},e=>[e5(`document_chunks_embedding_idx`).using(`hnsw`,e.embedding.op(`vector_cosine_ops`)),e5(`document_chunks_source_idx`).on(e.sourceId)])).omit({id:!0,createdAt:!0});var c5=G8(`core_documents`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),uploadedBy:B8(`uploaded_by`).references(()=>i5.id),filename:R8(`filename`).notNull(),sourcePath:R8(`source_path`).notNull(),mimeType:R8(`mime_type`).notNull(),fileSize:N8(`file_size`).notNull(),status:R8(`status`).notNull().default(`pending`),errorMessage:R8(`error_message`),chunkCount:N8(`chunk_count`).default(0),createdAt:z8(`created_at`).defaultNow(),updatedAt:z8(`updated_at`).defaultNow()});Z8(c5).omit({id:!0,createdAt:!0,updatedAt:!0}),Z8(G8(`core_document_chunks`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),coreDocumentId:B8(`core_document_id`).notNull().references(()=>c5.id,{onDelete:`cascade`}),chunkHash:B8(`chunk_hash`,{length:64}).notNull(),chunkIndex:N8(`chunk_index`).notNull(),content:R8(`content`).notNull(),embedding:V8(`embedding`,{dimensions:1536}),metadata:F8(`metadata`).$type(),createdAt:z8(`created_at`).defaultNow(),updatedAt:z8(`updated_at`).defaultNow()},e=>[t5(`core_document_chunks_hash_idx`).on(e.chunkHash),e5(`core_document_chunks_doc_id_idx`).on(e.coreDocumentId),e5(`core_document_chunks_embedding_idx`).using(`hnsw`,e.embedding.op(`vector_cosine_ops`))])).omit({id:!0,createdAt:!0,updatedAt:!0}),Z8(G8(`uploaded_files`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),sourceId:B8(`source_id`).notNull(),filename:R8(`filename`).notNull(),mimeType:R8(`mime_type`).notNull(),size:N8(`size`).notNull(),storagePath:R8(`storage_path`),content:R8(`content`),status:R8(`status`).notNull().default(`pending`),chunksCount:N8(`chunks_count`).default(0),createdAt:z8(`created_at`).defaultNow()})).omit({id:!0,createdAt:!0,chunksCount:!0}),Z8(G8(`system_settings`,{key:B8(`key`).primaryKey(),value:R8(`value`).notNull(),updatedAt:z8(`updated_at`,{withTimezone:!0}).notNull().defaultNow()})).omit({updatedAt:!0}),G8(`settings_audit_log`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),settingKey:B8(`setting_key`).notNull(),changedBy:B8(`changed_by`).references(()=>i5.id,{onDelete:`set null`}),oldValue:R8(`old_value`),newValue:R8(`new_value`).notNull(),changedAt:z8(`changed_at`,{withTimezone:!0}).notNull().defaultNow()});var _ce=s8(`usage_event_type`,[`chat_message`,`notebook_created`,`llm_call`,`threshold_exceeded`]);Z8(G8(`usage_events`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),userId:B8(`user_id`).references(()=>i5.id,{onDelete:`set null`}),notebookId:B8(`notebook_id`),eventType:_ce(`event_type`).notNull(),provider:R8(`provider`),model:R8(`model`),inputTokens:N8(`input_tokens`),outputTokens:N8(`output_tokens`),metadata:F8(`metadata`).$type(),createdAt:z8(`created_at`,{withTimezone:!0}).notNull().defaultNow()},e=>[e5(`usage_events_user_id_idx`).on(e.userId),e5(`usage_events_event_type_idx`).on(e.eventType),e5(`usage_events_created_at_idx`).on(e.createdAt),e5(`usage_events_provider_model_idx`).on(e.provider,e.model)])).omit({id:!0,createdAt:!0}),Z8(G8(`data_gap_events`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),userId:B8(`user_id`).references(()=>i5.id,{onDelete:`set null`}),notebookId:B8(`notebook_id`),query:R8(`query`).notNull(),classification:B8(`classification`,{length:32}).notNull(),agent:B8(`agent`,{length:16}),provider:R8(`provider`),model:R8(`model`),sourcesSearched:F8(`s
491ources_searched`).$type(),createdAt:z8(`created_at`,{withTimezone:!0}).notNull().defaultNow()},e=>[e5(`data_gap_events_user_id_idx`).on(e.userId),e5(`data_gap_events_classification_idx`).on(e.classification),e5(`data_gap_events_created_at_idx`).on(e.createdAt)])).omit({id:!0,createdAt:!0}),Z8(G8(`maslow_insights_dives`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),key:R8(`key`).notNull().unique(),diveId:R8(`dive_id`).notNull(),createdAt:z8(`created_at`).defaultNow()})).omit({id:!0,createdAt:!0}),Z8(G8(`internal_dives`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),key:R8(`key`).notNull().unique(),diveId:R8(`dive_id`).notNull(),createdAt:z8(`created_at`).defaultNow()})).omit({id:!0,createdAt:!0}),Z8(G8(`xcel_dives_admins`,{id:B8(`id`).primaryKey().default(E8`gen_random_uuid()`),username:R8(`username`).notNull().unique(),apiKeyHash:R8(`api_key_hash`).notNull(),createdAt:z8(`created_at`,{withTimezone:!0}).notNull().defaultNow()})).omit({id:!0,createdAt:!0});function vce(){let{id:e}=le(),{messageToSend:t,isSendingMessage:n,currentStep:r,setMessageToSend:i,sendMessage:a}=J4(),{data:o=[]}=Y4(e),{data:s}=P1(e),c=(s?.notebook.sourceSettings??o5).includeMyData?o.filter(e=>e.isActive).length:0,l=e=>{let t=e.text?.trim();t&&!n&&a(t)},u=n,d=n?r===`generating`?`streaming`:`submitted`:`ready`;return(0,O.jsx)(`div`,{className:`p-4 pt-0 relative z-20`,children:(0,O.jsxs)(_Z,{onSubmit:l,className:`relative !z-0 bg-secondary rounded-3xl`,children:[(0,O.jsx)(vZ,{children:(0,O.jsx)(yZ,{value:t,disabled:u,"data-testid":`input-chat-message`,placeholder:`Ask your question...`,onChange:e=>i(e.target.value)})}),(0,O.jsxs)(bZ,{children:[(0,O.jsx)(xZ,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground px-2`,children:[(0,O.jsx)(to,{className:`w-3 h-3`}),(0,O.jsxs)(`span`,{"data-testid":`text-active-sources-count`,children:[c,` `,c===1?`document`:`documents`]})]})}),(0,O.jsx)(SZ,{disabled:!t.trim()||u,status:d,"data-testid":`button-send-message`})]})]})})}function yce(){return(0,O.jsxs)(`div`,{className:`text-center py-16 h-full`,"data-testid":`empty-chat`,children:[(0,O.jsx)(`div`,{className:`w-16 h-16 mx-auto mb-4`,children:(0,O.jsx)(`img`,{src:`/maslow.svg`,alt:`Logo`,width:100,height:100})}),(0,O.jsx)(`h3`,{className:`text-xl lg:text-3xl font-medium mb-2`,children:`Welcome to Maslow AI Advisor`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground max-w-md mx-auto`,children:`I'm here to help you uncover insights in your recognition data, create AI-driven reports, and elevate your program.`})]})}var bce=new Map;function xce(e){return bce.get(e)}function Sce({toolCall:e,className:t}){if(!e)return null;let n=xce(e.tool);if(!n)return null;let r=n.component;return(0,O.jsx)(`div`,{className:t,children:(0,O.jsx)(r,{toolCall:e})})}var l5=(0,c.memo)(({status:e})=>{switch(e){case`completed`:return(0,O.jsx)(Fa,{className:`size-3`});case`active`:return(0,O.jsx)(yo,{className:`size-3 animate-spin`});case`error`:return(0,O.jsx)(Pa,{className:`size-3`});default:return(0,O.jsx)(Ra,{className:`size-2`})}});l5.displayName=`StepIcon`;var u5=(0,c.memo)(({steps:e,className:t,...n})=>e?.length?(0,O.jsx)(`div`,{className:j(`w-full rounded-xl bg-muted/50 px-3 py-2 text-xs`,t),...n,children:(0,O.jsx)(`div`,{className:`flex items-center w-full`,children:e.map((t,n)=>(0,O.jsxs)(`div`,{className:`flex items-center flex-1`,children:[(0,O.jsxs)(`div`,{className:j(`flex items-center gap-1.5 transition-all duration-300`,t.status===`completed`&&`text-emerald-600 dark:text-emerald-400`,t.status===`active`&&`text-blue-600 dark:text-blue-400`,t.status===`error`&&`text-red-600 dark:text-red-400`,t.status===`pending`&&`text-muted-foreground`),children:[(0,O.jsx)(`span`,{className:j(`flex items-center justify-center size-4 rounded-full transition-all duration-300`,t.status===`completed`&&`text-emerald-500`,t.status===`active`&&`text-blue-500`,t.status===`error`&&`text-red-500`,t.status===`pending`&&`text-muted-foreground`),children:(0,O.jsx)(l5,{status:t.status})}),(0,O.jsx)(`span`,{className:j(`whitespace-nowrap font-medium transition-opacity duration-300`,t.status===`pen
491ding`&&`opacity-50`),children:t.label})]}),n<e.length-1&&(0,O.jsx)(`span`,{className:j(`h-px w-full mx-3 bg-border/60`,t.status===`completed`&&`bg-emerald-500/40`,t.status===`active`&&`bg-blue-500/40`,t.status===`error`&&`bg-red-500/40`)})]},t.id))})}):null);u5.displayName=`Timeline`;var Cce=({clients:e,...t})=>{if(e.length===0)return null;let n=e.length;return(0,O.jsxs)(NU,{...t,children:[(0,O.jsxs)(PU,{count:n,children:[(0,O.jsxs)(`p`,{className:`font-medium`,children:[`Used `,n,` `,n===1?`client`:`clients`]}),(0,O.jsx)(ka,{className:`h-4 w-4`})]}),(0,O.jsx)(FU,{children:e.map((e,t)=>(0,O.jsx)(IU,{number:t+1,title:e.name,"data-testid":`message-client`},e.tenantId))})]})},wce={damping:.7,stiffness:.05,mass:1.25},Tce=70,Ece=1e3/60,Dce=350,d5=!1;globalThis.document?.addEventListener(`mousedown`,()=>{d5=!0}),globalThis.document?.addEventListener(`mouseup`,()=>{d5=!1}),globalThis.document?.addEventListener(`click`,()=>{d5=!1});var Oce=(e={})=>{let[t,n]=(0,c.useState)(!1),[r,i]=(0,c.useState)(e.initial!==!1),[a,o]=(0,c.useState)(!1),s=(0,c.useRef)(null);s.current=e;let l=(0,c.useCallback)(()=>{if(!d5)return!1;let e=window.getSelection();if(!e||!e.rangeCount)return!1;let t=e.getRangeAt(0);return t.commonAncestorContainer.contains(_.current)||_.current?.contains(t.commonAncestorContainer)},[]),u=(0,c.useCallback)(e=>{f.isAtBottom=e,i(e)},[]),d=(0,c.useCallback)(e=>{f.escapedFromLock=e,n(e)},[]),f=(0,c.useMemo)(()=>{let n;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return _.current?.scrollTop??0},set scrollTop(e){if(_.current){let{scrollBehavior:t}=getComputedStyle(_.current);t!==`auto`&&(_.current.style.scrollBehavior=`auto`),_.current.scrollTop=e,f.ignoreScrollToTop=_.current.scrollTop,t!==`auto`&&(_.current.style.scrollBehavior=t)}},get targetScrollTop(){return!_.current||!v.current?0:_.current.scrollHeight-1-_.current.clientHeight},get calculatedTargetScrollTop(){if(!_.current||!v.current)return 0;let{targetScrollTop:t}=this;if(!e.targetScrollTop)return t;if(n?.targetScrollTop===t)return n.calculatedScrollTop;let r=Math.max(Math.min(e.targetScrollTop(t,{scrollElement:_.current,contentElement:v.current}),t),0);return n={targetScrollTop:t,calculatedScrollTop:r},requestAnimationFrame(()=>{n=void 0}),r},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=Tce}}},[]),p=(0,c.useCallback)((e={})=>{typeof e==`string`&&(e={animation:e}),e.preserveScrollPosition||u(!0);let t=Date.now()+(Number(e.wait)||0),n=m5(s.current,e.animation),{ignoreEscapes:r=!1}=e,i,a=f.calculatedTargetScrollTop;e.duration instanceof Promise?e.duration.finally(()=>{i=Date.now()}):i=t+(e.duration??0);let o=async()=>{let e=new Promise(requestAnimationFrame).then(()=>{if(!f.isAtBottom)return f.animation=void 0,!1;let{scrollTop:c}=f,u=performance.now(),d=(u-(f.lastTick??u))/Ece;if(f.animation||={behavior:n,promise:e,ignoreEscapes:r},f.animation.behavior===n&&(f.lastTick=u),l()||t>Date.now())return o();if(c<Math.min(a,f.calculatedTargetScrollTop)){if(f.animation?.behavior===n){if(n===`instant`)return f.scrollTop=f.calculatedTargetScrollTop,o();f.velocity=(n.damping*f.velocity+n.stiffness*f.scrollDifference)/n.mass,f.accumulated+=f.velocity*d,f.scrollTop+=f.accumulated,f.scrollTop!==c&&(f.accumulated=0)}return o()}return i>Date.now()?(a=f.calculatedTargetScrollTop,o()):(f.animation=void 0,f.scrollTop<f.calculatedTargetScrollTop?p({animation:m5(s.current,s.current.resize),ignoreEscapes:r,duration:Math.max(0,i-Date.now())||void 0}):f.isAtBottom)});return e.then(e=>(requestAnimationFrame(()=>{f.animation||(f.lastTick=void 0,f.velocity=0)}),e))};return e.wait!==!0&&(f.animation=void 0),f.animation?.behavior===n?f.animation.promise:o()},[u,l,f]),m=(0,c.useCallback)(()=>{d(!0),u(!1)},[d,u]),h=(0,c.useCallback)(({target:e})=>{if(e!==_.current)return;let{scrollTop:t,ignoreScrollToTop:n}=f,{lastScrollTop:r=t}=f;f.lastScrollTop=t,f.ignoreScrollToTop=void 0,n&&n>t&&(r=n),o(f.isNearBottom),setTimeout(()=>{if(f.resizeDifference||t===n)return;if(l()){d(!0),u(!1);return}let e=t>r,i=t<r;if(f.animation?.ignoreEscapes){f.scrollTop=r;return}
491i&&(d(!0),u(!1)),e&&d(!1),!f.escapedFromLock&&f.isNearBottom&&u(!0)},1)},[d,u,l,f]),g=(0,c.useCallback)(({target:e,deltaY:t})=>{let n=e;for(;![`scroll`,`auto`].includes(getComputedStyle(n).overflow);){if(!n.parentElement)return;n=n.parentElement}n===_.current&&t<0&&_.current.scrollHeight>_.current.clientHeight&&!f.animation?.ignoreEscapes&&(d(!0),u(!1))},[d,u,f]),_=f5(e=>{_.current?.removeEventListener(`scroll`,h),_.current?.removeEventListener(`wheel`,g),e?.addEventListener(`scroll`,h,{passive:!0}),e?.addEventListener(`wheel`,g,{passive:!0})},[]),v=f5(e=>{if(f.resizeObserver?.disconnect(),f.resizeObserver=void 0,!e)return;let t;f.resizeObserver=new ResizeObserver(([e])=>{let{height:n}=e.contentRect,r=n-(t??n);if(f.resizeDifference=r,f.scrollTop>f.targetScrollTop&&(f.scrollTop=f.targetScrollTop),o(f.isNearBottom),r>=0){let e=m5(s.current,t?s.current.resize:s.current.initial);p({animation:e,wait:!0,preserveScrollPosition:!0,duration:e===`instant`?void 0:Dce})}else f.isNearBottom&&(d(!1),u(!0));t=n,requestAnimationFrame(()=>{setTimeout(()=>{f.resizeDifference===r&&(f.resizeDifference=0)},1)})}),f.resizeObserver?.observe(e)},[]);return{contentRef:v,scrollRef:_,scrollToBottom:p,stopScroll:m,isAtBottom:r||a,isNearBottom:a,escapedFromLock:t,state:f}};function f5(e,t){let n=(0,c.useCallback)(t=>(n.current=t,e(t)),t);return n}var p5=new Map;function m5(...e){let t={...wce},n=!1;for(let r of e){if(r===`instant`){n=!0;continue}typeof r==`object`&&(n=!1,t.damping=r.damping??t.damping,t.stiffness=r.stiffness??t.stiffness,t.mass=r.mass??t.mass)}let r=JSON.stringify(t);return p5.has(r)||p5.set(r,Object.freeze(t)),n?`instant`:p5.get(r)}var h5=(0,c.createContext)(null),kce=typeof window<`u`?c.useLayoutEffect:c.useEffect;function g5({instance:e,children:t,resize:n,initial:r,mass:i,damping:a,stiffness:o,targetScrollTop:s,contextRef:l,...u}){let d=(0,c.useRef)(null),f=Oce({mass:i,damping:a,stiffness:o,resize:n,initial:r,targetScrollTop:c.useCallback((e,t)=>(b?.targetScrollTop??s)?.(e,t)??e,[s])}),{scrollRef:p,contentRef:m,scrollToBottom:h,stopScroll:g,isAtBottom:_,escapedFromLock:v,state:y}=e??f,b=(0,c.useMemo)(()=>({scrollToBottom:h,stopScroll:g,scrollRef:p,isAtBottom:_,escapedFromLock:v,contentRef:m,state:y,get targetScrollTop(){return d.current},set targetScrollTop(e){d.current=e}}),[h,_,m,p,g,v,y]);return(0,c.useImperativeHandle)(l,()=>b,[b]),kce(()=>{p.current&&getComputedStyle(p.current).overflow===`visible`&&(p.current.style.overflow=`auto`)},[]),c.createElement(h5.Provider,{value:b},c.createElement(`div`,{...u},typeof t==`function`?t(b):t))}(function(e){function t({children:e,scrollClassName:t,...n}){let r=_5();return c.createElement(`div`,{ref:r.scrollRef,style:{height:`100%`,width:`100%`,scrollbarGutter:`stable both-edges`},className:t},c.createElement(`div`,{...n,ref:r.contentRef},typeof e==`function`?e(r):e))}e.Content=t})(g5||={});function _5(){let e=(0,c.useContext)(h5);if(!e)throw Error(`use-stick-to-bottom component context must be used within a StickToBottom component`);return e}var v5=({className:e,...t})=>(0,O.jsx)(g5,{className:j(`relative flex-1 overflow-y-hidden`,e),initial:`smooth`,resize:`smooth`,role:`log`,...t}),y5=({className:e,...t})=>(0,O.jsx)(g5.Content,{className:j(`flex flex-col gap-8 p-4`,e),...t}),Ace=({className:e,...t})=>{let{isAtBottom:n,scrollToBottom:r}=_5(),i=(0,c.useCallback)(()=>{r()},[r]);return!n&&(0,O.jsx)(M,{className:j(`absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full`,e),onClick:i,size:`icon`,type:`button`,variant:`outline`,...t,children:(0,O.jsx)(fa,{className:`size-4`})})},jce=[],Mce=[],Nce=[],Pce=[],Fce=()=>{let{id:e}=le(),{messages:t,streamingMessageId:n,currentStep:r,timeline:i,loading:a}=J4();return a?(0,O.jsx)(v5,{className:`relative size-full`,children:(0,O.jsx)(y5,{children:(0,O.jsxs)(`div`,{className:`flex items-center justify-center gap-2 text-sm text-muted-foreground h-[60vh]`,children:[(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin`}),(0,O.jsx)(`span`,{children:`Loading messages...`})]})})}):t.length===0?(0,O.jsx)(yce,{}):(0,O.jsxs)(v5,{className:`relative size-full`,children:[(0,O.jsx)(y5,{children:t.map(t=>{let a=t.id===n,o=t.versions?.[0]?.content&&t.versions[0].content.length>0,s=t.sources&&t.sources.length>0,c=t.tools&&t.tools.length>0;return(0,O.jsx)(`div`,{"data-testid":t.role===`user`?`chat-message-user`:`chat-message-agent`,children:(0,O.jsx)(mU,{defaultBranch:0,children:(0,O.jsx)(hU,{children:(0,O.jsx)(uU,{from:t.role,children:(0,O.jsxs)(`div`,{className:`w-full`,children:[(0,O.jsx)(Cce,{clients:t.clients??Pce}),s&&t.sources&&(0,O.jsxs)(NU,{children:[(0,O.jsx)(PU,{count:t.sources.length}),(0,O.jsx)(FU,{children:t.sources.map((e,t)=>(0,O.jsx)(IU,{number:t+1,title:e.name},`${e.name}-${t}`))})]}),a&&t.role===`assistant`&&i.length>0&&(0,O.jsx)(u5,{steps:i,className:`mb-3`}),c&&t.tools?.map((e,n)=>(0,O.jsx)(Sce,{className:`mb-3`,toolCall:{tool:e.tool,status:`complete`,result:e}},`${t.id}-tool-${n}`)),(0,O.jsx)(dU,{children:(0,O.jsx)(TH,{passages:t.passages??jce,sources:t.sources??Mce,children:(0,O.jsx)(NH,{graphs:t.graphs??Nce,isStreaming:a,children:(0,O.jsx)(gU,{children:t.ver
491sions?.[0]?.content??``})})})}),a&&o&&r===`generating`&&(0,O.jsx)(`span`,{className:`inline-block w-2 h-4 bg-primary animate-pulse ml-0.5`}),t.role===`assistant`&&t.status===`completed`&&o&&e&&(0,O.jsx)(Ice,{title:t.title,content:t.versions?.[0]?.content||``,messageId:t.id,notebookId:e})]})},t.id)})})},t.id)})}),(0,O.jsx)(Ace,{})]})},Ice=({title:e,content:t,messageId:n,notebookId:r})=>{let{toast:i}=ln(),{user:a}=Zd(),[o,s]=(0,c.useState)(!1),l=V1(r);return(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mt-3`,children:[(0,O.jsxs)(M,{size:`sm`,variant:`outline`,onClick:async()=>{try{if(!a?.id)return;await l.mutateAsync({title:e||`Untitled Note`,type:`text`,sourceMessageId:n}),i({title:`Saved`,description:`Response saved to notes`})}catch{i({title:`Error`,description:`Failed to save note`,variant:`destructive`})}},disabled:l.isPending,className:`rounded-full`,"data-testid":`button-save-to-note`,children:[(0,O.jsx)(Po,{className:`w-3.5 h-3.5`}),`Save to note`]}),(0,O.jsx)(M,{variant:`ghost`,size:`sm`,className:`rounded-full`,onClick:async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3)}catch{i({title:`Error`,description:`Failed to copy to clipboard`,variant:`destructive`})}},children:o?(0,O.jsx)(Oa,{className:`w-3.5 h-3.5`}):(0,O.jsx)(Ba,{className:`w-3.5 h-3.5`})})]})},Lce=Object.defineProperty,b5=(e,t)=>Lce(e,`name`,{value:t,configurable:!0}),x5=`Switch`,[Rce,zce]=An(x5),[Bce,S5]=Rce(x5);function C5(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[p,m]=Zr({prop:n,defaultProp:i??!1,onChange:l,caller:x5}),[h,g]=c.useState(null),[_,v]=c.useState(null),y=c.useRef(!1),[b,x]=c.useReducer(e=>e+1,0),S={checked:p,setChecked:m,disabled:a,control:h,setControl:g,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:y,userInteractionCount:b,onUserInteraction:x,required:u,defaultChecked:i,isFormControl:!h||!!o||!!h.closest(`form`),bubbleInput:_,setBubbleInput:v};return(0,O.jsx)(Bce,{scope:t,...S,children:T5(f)?f(S):r})}b5(C5,`SwitchProvider`);var Vce=`SwitchTrigger`,Hce=c.forwardRef(b5(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:p,onUserInteraction:m,isFormControl:h,bubbleInput:g}=S5(Vce,e),_=En(r,d),v=c.useRef(l);return c.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=b5(()=>f(v.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,f]),(0,O.jsx)(lr.button,{type:`button`,role:`switch`,"aria-checked":l,"aria-required":u,"data-state":E5(l),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:_,onClick:k(t,e=>{m(),f(e=>!e),g&&h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())})})},`SwitchTrigger`)),w5=c.forwardRef(b5(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,O.jsx)(C5,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Hce,{...d,ref:t,__scopeSwitch:n}),e&&(0,O.jsx)(Kce,{__scopeSwitch:n})]})})},`Switch`)),Uce=`SwitchThumb`,Wce=c.forwardRef(b5(function(e,t){let{__scopeSwitch:n,...r}=e,i=S5(Uce,n);return(0,O.jsx)(lr.span,{"data-state":E5(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),Gce=`SwitchBubbleInput`,Kce=c.forwardRef(b5(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:l,required:u,disabled:d,name:f,value:p,form:m,bubbleInput:h,setBubbleInput:g}=S5(Gce,e),_=En(r,g),v=Ru(i),y=c.useRef(!1),b=c.useRef(s),x=c.useRef(o);c.useEffect(()=>{let e=h;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==x.current;x.current=o;let i=b.current!==s;b.current=s;let c=!(r&&a.current);if(i&&n){y.current=!r;let t=new Event(`click`,{bubbles:c});n.call(e,s),e.dispatchEvent(t),y.current=!1}},[h,s,a,o]);let S=c.useRef(s);return(0,O.jsx)(lr.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:l??S.current,required:u,disabled:d,name:f,value:p,form:m,...n,tabIndex:-1,ref:_,onClick:k(t,e=>{y.current&&e.stopPropagation()}),style:{...n.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function T5(e){return typeof e==`function`}b5(T5,`isFunction`);function E5(e){return e?`checked`:`unchecked`}b5(E5,`getState`);var D5=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(w5,{className:j(`peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...t,ref:n,children:(0,O.jsx)(Wce,{className:j(`pointer-events-none block h-4 w-4 roun
491ded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0`)})}));D5.displayName=w5.displayName;function qce(e){return Df(e?`/api/notebooks/${e}/share`:``,{invalidate:e?[`/api/notebooks/${e}`,`/api/notebooks/${e}/members`]:[],mutationOptions:{onMutate:()=>{if(!e)throw Error(`notebookId is required to share a notebook`)}}})}function Jce(e){return kf(e?`/api/notebooks/${e}/share`:``,{invalidate:e?[`/api/notebooks/${e}`,`/api/notebooks/${e}/members`]:[],mutationOptions:{onMutate:()=>{if(!e)throw Error(`notebookId is required to unshare a notebook`)}}})}function Yce(e,t){return Ef(e?`/api/notebooks/${e}/members`:null,{queryOptions:t})}function Xce(e){return Df(e?`/api/notebooks/${e}/members`:``,{invalidate:e?[`/api/notebooks/${e}/members`]:[],mutationOptions:{onMutate:()=>{if(!e)throw Error(`notebookId is required to invite to a notebook`)}}})}function Zce(e){return kf(e?t=>`/api/notebooks/${e}/members/${t.memberId}`:()=>``,{invalidate:e?[`/api/notebooks/${e}/members`]:[],mutationOptions:{onMutate:()=>{if(!e)throw Error(`notebookId is required to remove a member`)}}})}function Qce(e){return Df(e?t=>`/api/notebooks/${e}/members/${t.memberId}/resend`:()=>``,{invalidate:e?[`/api/notebooks/${e}/members`]:[],mutationOptions:{onMutate:()=>{if(!e)throw Error(`notebookId is required to resend invite`)}}})}function $ce(e,t,n){return Ef(e&&t&&t.length>=2?`/api/workspaces/${e}/users/search?q=${encodeURIComponent(t)}`:null,{queryOptions:n})}var ele=Object.defineProperty,O5=(e,t)=>ele(e,`name`,{value:t,configurable:!0}),k5=`Popover`,[A5,tle]=An(k5,[Uu]),j5=Uu(),[nle,M5]=A5(k5),rle=O5(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=j5(t),l=c.useRef(null),[u,d]=c.useState(!1),[f,p]=Zr({prop:r,defaultProp:i??!1,onChange:a,caller:k5});return(0,O.jsx)(td,{...s,children:(0,O.jsx)(nle,{scope:t,contentId:Cc(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:c.useCallback(()=>d(!0),[]),onCustomAnchorRemove:c.useCallback(()=>d(!1),[]),modal:o,children:n})})},`Popover`),ile=`PopoverTrigger`,ale=c.forwardRef(O5(function(e,t){let{__scopePopover:n,...r}=e,i=M5(ile,n),a=j5(n),o=En(t,i.triggerRef),s=(0,O.jsx)(lr.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":I5(i.open),...r,ref:o,onClick:k(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,O.jsx)(nd,{asChild:!0,...a,children:s})},`PopoverTrigger`)),N5=`PopoverPortal`,[ole,sle]=A5(N5,{forceMount:void 0}),cle=O5(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=M5(N5,t);return(0,O.jsx)(ole,{scope:t,forceMount:n,children:(0,O.jsx)(Lr,{present:n||a.open,children:(0,O.jsx)(Nr,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),P5=`PopoverContent`,lle=c.forwardRef(O5(function(e,t){let n=sle(P5,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=M5(P5,e.__scopePopover);return(0,O.jsx)(Lr,{present:r||a.open,children:a.modal?(0,O.jsx)(dle,{...i,ref:t}):(0,O.jsx)(fle,{...i,ref:t})})},`PopoverContent`)),ule=Pn(`PopoverContent.RemoveScroll`),dle=c.forwardRef(O5(function(e,t){let n=M5(P5,e.__scopePopover),r=c.useRef(null),i=En(t,r),a=c.useRef(!1);return c.useEffect(()=>{let e=r.current;if(e)return Mm(e)},[]),(0,O.jsx)(Cm,{as:ule,allowPinchZoom:!0,children:(0,O.jsx)(F5,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:k(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:k(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:k(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),fle=c.forwardRef(O5(function(e,t){let n=M5(P5,e.__scopePopover),r=c.useRef(!1),i=c.useRef(!1);return(0,O.jsx)(F5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),F5=c.forwardRef(O5(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=M5(P5,n),p=j5(n);return Dp(),(0,O.jsx)(up,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,O.jsx)(xr,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,O.jsx)(rd,{"data-state":I5(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function I5(e){return e?`open`:`closed`}O5(I5,`getState`);var ple=rle,mle=ale,hle=cle,L5=lle,R5=ple,z5=mle,B5=c.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,O.jsx)(hle,{children:(0,O.jsx)(L5,{ref:i,align:t,sideOffset:n,className:j(`z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
491de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]`,e),...r})}));B5.displayName=L5.displayName;function gle({onInvite:e,isInviting:t,disabled:n}){let{activeWorkspaceId:r}=Tf(),[i,a]=(0,c.useState)(!1),[o,s]=(0,c.useState)(``),[l,u]=(0,c.useState)(null),d=(0,c.useRef)(null),{data:f,isLoading:p}=$ce(r||void 0,o),m=f?.users??[],h=e=>{s(e.displayName),u(e),a(!1),d.current?.focus()},g=t=>{t.preventDefault();let n=o.trim();n&&(l&&l.displayName===n?e(l.email,l.id):e(n,void 0),s(``),u(null),a(!1))},_=e=>{let t=e.target.value;s(t),l&&t!==l.displayName&&u(null),t.length>=2?a(!0):a(!1)},v=()=>{o.length>=2&&a(!0)},y=e=>{e.key===`Escape`&&a(!1)},b=e=>e.split(` `).map(e=>e[0]).join(``).toUpperCase().slice(0,2);(0,c.useEffect)(()=>{let e=e=>{d.current&&!d.current.contains(e.target)&&setTimeout(()=>a(!1),150)};if(i)return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[i]);let x=i&&o.length>=2,S=m.length>0;return(0,O.jsxs)(`form`,{onSubmit:g,className:`flex gap-2`,children:[(0,O.jsxs)(R5,{open:x,onOpenChange:a,children:[(0,O.jsx)(z5,{asChild:!0,children:(0,O.jsx)(`div`,{className:`flex-1 relative`,children:(0,O.jsx)(Xf,{ref:d,type:`text`,placeholder:`Enter email address`,value:o,onChange:_,onFocus:v,onKeyDown:y,disabled:n,autoComplete:`off`})})}),(0,O.jsx)(B5,{className:`p-0 w-[--radix-popover-trigger-width]`,align:`start`,onOpenAutoFocus:e=>e.preventDefault(),children:(0,O.jsx)(NK,{shouldFilter:!1,children:(0,O.jsx)(FK,{children:p?(0,O.jsx)(`div`,{className:`flex items-center justify-center py-4`,children:(0,O.jsx)(vo,{className:`h-4 w-4 animate-spin text-muted-foreground`})}):S?(0,O.jsx)(LK,{children:m.map(e=>(0,O.jsxs)(zK,{value:e.email,onSelect:()=>h(e),className:`cursor-pointer`,children:[(0,O.jsxs)(j$,{className:`h-8 w-8 mr-2`,children:[(0,O.jsx)(M$,{src:e.avatar??void 0}),(0,O.jsx)(N$,{className:`text-xs`,children:b(e.displayName)})]}),(0,O.jsxs)(`div`,{className:`flex flex-col`,children:[(0,O.jsx)(`span`,{className:`text-sm font-medium`,children:e.displayName}),(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.email})]})]},e.id))}):(0,O.jsxs)(IK,{children:[(0,O.jsx)(`span`,{className:`text-muted-foreground`,children:`No users found`}),o.includes(`@`)&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:`Press Invite to send to this email`})]})})})})]}),(0,O.jsxs)(M,{type:`submit`,size:`sm`,disabled:t||!o.trim()||n,children:[t?(0,O.jsx)(vo,{className:`h-4 w-4 animate-spin`}):(0,O.jsx)(So,{className:`h-4 w-4`}),(0,O.jsx)(`span`,{className:`ml-2`,children:`Invite`})]})]})}function _le({notebook:e,open:t,onClose:n}){let{toast:r}=ln(),{data:i,isLoading:a}=Yce(e.id),o=i?.members??[],{mutateAsync:s,isPending:c}=qce(e.id),{mutateAsync:l,isPending:u}=Jce(e.id),{mutateAsync:d,isPending:f}=Xce(e.id),{mutateAsync:p}=Zce(e.id),{mutateAsync:m}=Qce(e.id),h=async()=>{try{e.isPublic?(await l(),r({title:`Notebook is now private`,description:`Only you and invited members can access it.`})):(await s(),r({title:`Notebook shared with workspace`,description:`All workspace members can now view this notebook.`}))}catch{r({title:`Error`,description:`Failed to update sharing settings.`,variant:`destructive`})}},g=async(e,t)=>{try{await d({email:e,userId:t}),r({title:`Invitation sent`,description:`Sent invitation to ${e}`})}catch{r({title:`Error`,description:`Failed to send invitation.`,variant:`destructive`})}},_=async(e,t)=>{try{await p({memberId:e}),r({title:`Member removed`,description:`${t} has been removed from the notebook.`})}catch{r({title:`Error`,description:`Failed to remove member.`,variant:`destructive`})}},v=async(e,t)=>{try{await m({memberId:e}),r({title:`Invitation resent`,description:`Resent invitation to ${t}`})}catch{r({title:`Error`,description:`Failed to resend invitation.`,variant:`destructive`})}},y=e=>e.split(` `).map(e=>e[0]).join(``).toUpperCase().slice(0,2);return(0,O.jsx)(wK,{open:t,onOpenChange:e=>!e&&n(),children:(0,O.jsxs)(OK,{className:`sm:max-w-md`,children:[(0,O.jsxs)(kK,{children:[(0,O.jsxs)(jK,{children:[`Share "`,e.title,`"`]}),(0,O.jsx)(MK,{children:`Control who can access this notebook.`})]}),(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border p-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[e.isPublic?(0,O.jsx)(io,{className:`h-5 w-5 text-blue-500`}):(0,O.jsx)(bo,{className:`h-5 w-5 text-muted-foreground`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:e.isPublic?`Shared with workspace`:`Private`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.isPublic?`All workspace members can view`:`Only you and invited members`})]})]}),(0,O.jsx)(D5,{checked:e.isPublic,onCheckedChange:h,disabled:c||u})]}),(0,O.jsx)(ip,{}),(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,O.jsx)(us,{className:`h-4 w-4 text-muted-foreground`}),(0,O.jsx)(`span`,{className:`text-sm font-medium`,children:`Invite people`})]}),(0,O.jsx)(gle,{onInvite:g,isInviting:f})]}),(a||o.length>0)&&(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`p`,{className:`text-sm font-medium mb-2`,children:[`Members`,!a&&` (${o.length})`]}),(0,O.jsx)(`div`,{className:`space-y-2 max-h-48 overflow-y-auto`,children:a?(0,O.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,O.jsx)(vo,{className:`h-5 w-5 animate-spin text-muted-foreground`})}):o.map(e=>(0,O.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsxs)(j$,{className:`h-8 w-8`,children:[(0,O.jsx)(M$,{src:e.user?.avatar??void 0}),(0,O.jsx)(N$,{className:`text-xs`,children:e.user?y(e.user.displayName):(e.email[0]??``).toUpperCase()})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:e.user?.displayName??e.email}),e.user&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.email}),!e.user&&(0,O.jsx)(`p`,{className:`text-xs text-amber-600`,children:`Pending invitation`})]})]}),(0,O.jsxs)(wY,{children:[(0,O.jsx)(TY,{asChild:!0,children:(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`h-8 w-8`,children:(0,O.jsx)(Ga,{className:`h-4 w-4`})})}),(0,O.jsxs)(kY,{align:`end`,children:[!e.user&&(0,O.jsxs)(AY,{onClick:()=>v(e.id,e.email),children:[(0,O.jsx)(Ro,{className:`mr-2 h-4 w-4`}),`Resend invitation`]}),(0,O.jsxs)(AY,{className:`text-destructive focus:text-destructive`,onClick:()=>_(e.id,e.email),children:[(0,O.jsx)(rs,{className:`mr-2 h-4 w-4`}),`Remove`]})]})]})]},e.id))})]})]})]})})}function vle({notebook:e,showStatus:t=!0}
491){let[n,r]=(0,c.useState)(!1);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t&&e.isPublic&&(0,O.jsxs)(qf,{variant:`secondary`,className:`gap-1`,children:[(0,O.jsx)(io,{className:`h-3 w-3`}),`Shared`]}),(0,O.jsxs)(M,{variant:`outline`,size:`sm`,onClick:()=>r(!0),className:`gap-2`,children:[(0,O.jsx)(Wo,{className:`h-4 w-4`}),`Share`]})]}),(0,O.jsx)(_le,{notebook:e,open:n,onClose:()=>r(!1)})]})}function yle({value:e,onSave:t,className:n,inputClassName:r,textClassName:i,placeholder:a=`Enter text...`,disabled:o=!1,"data-testid":s}){let[l,u]=(0,c.useState)(!1),[d,f]=(0,c.useState)(e),[p,m]=(0,c.useState)(!1),h=(0,c.useRef)(null);(0,c.useEffect)(()=>{f(e)},[e]),(0,c.useEffect)(()=>{l&&h.current&&(h.current.focus(),h.current.select())},[l]);let g=async()=>{if(d.trim()===``){f(e),u(!1);return}if(d===e){u(!1);return}m(!0);try{await t(d),u(!1)}catch(t){console.error(`Failed to save:`,t),f(e)}finally{m(!1)}},_=()=>{f(e),u(!1)};return l?(0,O.jsxs)(`div`,{className:j(`flex items-center gap-2`,n),children:[(0,O.jsx)(Xf,{ref:h,value:d,onChange:e=>f(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),g()):e.key===`Escape`&&(e.preventDefault(),_())},placeholder:a,disabled:p,className:j(`h-9 border-2 border-primary focus-visible:ring-0`,r),"data-testid":s?`${s}-input`:void 0}),(0,O.jsx)(M,{size:`sm`,variant:`ghost`,onClick:g,disabled:p,className:`h-9 w-9 p-0 hover:bg-accent`,"aria-label":`Save`,"data-testid":s?`${s}-save`:void 0,children:(0,O.jsx)(Oa,{className:`h-4 w-4`})}),(0,O.jsx)(M,{size:`sm`,variant:`ghost`,onClick:_,disabled:p,className:`h-9 w-9 p-0 hover:bg-accent`,"aria-label":`Cancel`,"data-testid":s?`${s}-cancel`:void 0,children:(0,O.jsx)(ds,{className:`h-4 w-4`})})]}):(0,O.jsxs)(`button`,{type:`button`,className:j(`group inline-flex items-center gap-2 text-left bg-transparent border-none cursor-pointer hover:bg-accent/50 rounded px-2 py-1 transition-colors`,o&&`cursor-not-allowed opacity-50`,n),onClick:()=>u(!0),disabled:o,"data-testid":s,children:[(0,O.jsx)(`span`,{className:j(`text-lg`,i),children:e}),!o&&(0,O.jsx)(No,{className:`ml-auto h-4 w-4 shrink-0 text-muted-foreground transition-colors group-hover:text-foreground`,"aria-hidden":`true`,"data-testid":s?`${s}-edit-icon`:void 0})]})}function V5({notebook:e}){let{user:t}=Zd(),{toast:n}=ln(),r=t?.id===e.createdByUserId,{mutateAsync:i}=F1(e.id);return(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col h-full`,children:[(0,O.jsxs)(`div`,{className:`h-12 px-4 py-4 flex items-center justify-between border-b border-border/50`,children:[(0,O.jsx)(yle,{value:e.title,onSave:async e=>{try{await i({title:e}),n({title:`Title updated`,description:`Notebook title has been updated successfully.`})}catch(e){throw console.error(`Failed to update title:`,e),n({title:`Error`,variant:`destructive`,description:`Failed to update notebook title. Please try again.`}),e}},disabled:!r,className:`flex-1`,"data-testid":`text-notebook-title`}),r&&(0,O.jsx)(vle,{notebook:e})]}),(0,O.jsx)(Fce,{}),(0,O.jsx)(vce,{})]})}var H5={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`]},U5=[],W5={allowDangerousHtml:!0},ble=/^(https?|ircs?|mailto|xmpp)$/i,xle=[{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:`className`,id:`remove-classname`},{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 G5(e){let t=Sle(e),n=Cle(e);return wle(t.runSync(t.parse(n),n),e)}function Sle(e){let t=e.rehypePlugins||U5,n=e.remarkPlugins||U5,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...W5}:W5;return YL().use(AI).use(n).use(xL,r).use(t)}function Cle(e){let t=e.children||``,n=new VL;return typeof t==`string`?n.value=t:``+t,n}function wle(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Tle;for(let e of xle)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return qh(e,l),lI(e,{Fragment:O.Fragment,components:i,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in H5)if(Object.hasOwn(H5,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=H5[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Tle(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ble.test(e.slice(0,t))?e:``}
491var Ele=[CV,qV],Dle={samp:sU,ins:AH,...zV},Ole=[];function kle({content:e,graphs:t}){return(0,O.jsx)(NH,{graphs:t??Ole,isStreaming:!1,children:(0,O.jsx)(G5,{remarkPlugins:Ele,components:Dle,children:e})})}function Ale(e,t){if(!e)return t;let n=e.match(/filename\*=UTF-8''([^;]+)/i);if(n?.[1])try{return decodeURIComponent(n[1])}catch{return t}let r=e.match(/filename="?([^"]+)"?/i);return r?.[1]?r[1]:t}function jle(e,t){let n=window.URL.createObjectURL(e),r=document.createElement(`a`);return r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),n}function Mle(){return Yt({mutationFn:async({noteIds:e})=>{let t=await bf(`POST`,`/api/export/pdf`,{data:{noteIds:e}}),n=await t.blob(),r=`maslow-notes-${new Date().toISOString().split(`T`)[0]}.pdf`,i=Ale(t.headers.get(`content-disposition`),r);return{filename:i,url:jle(n,i)}}})}function Nle(){let[e,t]=(0,c.useState)(null),[n,r]=(0,c.useState)(null),i=Yt({mutationFn:async e=>yf(`POST`,`/api/export/audio`,{data:e}),onSuccess:(e,n)=>{t(e.jobId),r(n.noteId)}}),a=Ef(e?`/api/export/audio/${e}`:null,{queryKey:[`audio-export-status`,e],queryOptions:{refetchInterval:e=>e.state.data?.status===`processing`&&2e3}}),o=()=>{t(null),r(null)},s=i.isPending||a.data?.status===`processing`;return{startExport:i.mutateAsync,isStarting:i.isPending,startError:i.error,activeJobId:e,activeNoteId:n,status:a.data,statusError:a.error,isPolling:a.isFetching,isProcessing:s,reset:o}}function Ple(){let e=Nt();return Yt({mutationFn:async e=>yf(`POST`,`/api/artifacts/pdf`,{data:e}),onSuccess:()=>{e.invalidateQueries({queryKey:[`/api/artifacts`]})}})}function Fle(){let e=Nt(),[t,n]=(0,c.useState)(null),[r,i]=(0,c.useState)(null),a=Yt({mutationFn:async e=>yf(`POST`,`/api/artifacts/audio`,{data:e}),onSuccess:(e,t)=>{n(e.jobId),i(t.noteId)}}),o=Ef(t?`/api/artifacts/audio/${t}`:null,{queryKey:[`audio-artifact-status`,t],queryOptions:{refetchInterval:t=>{let n=t.state.data;return n?.status===`complete`?(e.invalidateQueries({queryKey:[`/api/artifacts`]}),!1):n?.status===`processing`&&2e3}}}),s=()=>{n(null),i(null)},l=a.isPending||o.data?.status===`processing`,u=l;return{mutateAsync:a.mutateAsync,isStarting:a.isPending,startError:a.error,activeJobId:t,activeNoteId:r,status:o.data,statusError:o.error,isPolling:o.isFetching,isProcessing:l,isPending:u,reset:s}}function Ile(e){if(!e||Number.isNaN(e)||e<=0)return null;let t=Math.floor(e/60),n=e%60;return`${t}:${String(n).padStart(2,`0`)}`}function Lle({src:e,filename:t=`audio-briefing.mp3`,durationSeconds:n}){let r=Ile(n);return(0,O.jsxs)(`div`,{className:`space-y-2 sm:space-y-3 rounded-xl border border-border bg-gradient-to-br from-primary/5 to-primary/10 p-3 sm:p-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`div`,{className:`w-8 h-8 rounded-lg bg-primary/20 flex items-center justify-center flex-shrink-0`,children:(0,O.jsx)(co,{className:`w-4 h-4 text-primary`})}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsx)(`p`,{className:`text-xs sm:text-sm font-medium truncate`,children:`Audio Briefing`}),r?(0,O.jsx)(`p`,{className:`text-[10px] sm:text-xs text-muted-foreground`,children:r}):null]})]}),(0,O.jsx)(`div`,{className:`rounded-lg overflow-hidden bg-background/50`,children:(0,O.jsx)(`audio`,{controls:!0,src:e,className:`w-full h-10 sm:h-12`,preload:`metadata`})}),(0,O.jsx)(M,{asChild:!0,variant:`outline`,size:`sm`,className:`w-full sm:w-auto gap-2 h-9 touch-manipulation`,children:(0,O.jsxs)(`a`,{href:e,download:t,children:[(0,O.jsx)(Ua,{className:`w-4 h-4`}),`Download MP3`]})})]})}var Rle=Object.defineProperty,K5=(e,t)=>Rle(e,`name`,{value:t,configurable:!0}),q5=`Checkbox`,[zle,Ble]=An(q5),[Vle,J5]=zle(q5);function Y5(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[p,m]=Zr({prop:n,defaultProp:i??!1,onChange:l,caller:q5}),[h,g]=c.useState(null),[_,v]=c.useState(null),y=c.useRef(!1),[b,x]=c.useReducer(e=>e+1,0),S=!h||!!o||!!h.closest(`form`),C={checked:p,disabled:a,setChecked:m,control:h,setControl:g,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:y,userInteractionCount:b,onUserInteraction:x,required:u,defaultChecked:!Q5(i)&&i,isFormControl:S,bubbleInput:_,setBubbleInput:v};return(0,O.jsx)(Vle,{scope:t,...C,children:Z5(f)?f(C):r})}
491K5(Y5,`CheckboxProvider`);var Hle=`CheckboxTrigger`,Ule=c.forwardRef(K5(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:l,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:p,onUserInteraction:m,isFormControl:h,bubbleInput:g}=J5(Hle,e),_=En(i,d),v=c.useRef(l);return c.useEffect(()=>{let e=a?.form;if(e){let t=K5(()=>f(v.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,f]),(0,O.jsx)(lr.button,{type:`button`,role:`checkbox`,"aria-checked":Q5(l)?`mixed`:l,"aria-required":u,"data-state":$5(l),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:_,onKeyDown:k(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:k(n,e=>{m(),f(e=>Q5(e)?!0:!e),g&&h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())})})},`CheckboxTrigger`)),X5=c.forwardRef(K5(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,O.jsx)(Y5,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Ule,{...d,ref:t,__scopeCheckbox:n}),e&&(0,O.jsx)(qle,{__scopeCheckbox:n})]})})},`Checkbox`)),Wle=`CheckboxIndicator`,Gle=c.forwardRef(K5(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=J5(Wle,n);return(0,O.jsx)(Lr,{present:r||Q5(a.checked)||a.checked===!0,children:(0,O.jsx)(lr.span,{"data-state":$5(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),Kle=`CheckboxBubbleInput`,qle=c.forwardRef(K5(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:l,required:u,disabled:d,name:f,value:p,form:m,bubbleInput:h,setBubbleInput:g}=J5(Kle,e),_=En(r,g),v=Ru(i),y=c.useRef(!1),b=c.useRef(s),x=c.useRef(o);c.useEffect(()=>{let e=h;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==x.current;x.current=o;let i=b.current!==s;b.current=s;let c=!(r&&a.current);if(i&&n){y.current=!r;let t=new Event(`click`,{bubbles:c});e.indeterminate=Q5(s),n.call(e,!Q5(s)&&s),e.dispatchEvent(t),y.current=!1}},[h,s,a,o]);let S=c.useRef(!Q5(s)&&s);return(0,O.jsx)(lr.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:l??S.current,required:u,disabled:d,name:f,value:p,form:m,...n,tabIndex:-1,ref:_,onClick:k(t,e=>{y.current&&e.stopPropagation()}),style:{...n.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function Z5(e){return typeof e==`function`}K5(Z5,`isFunction`);function Q5(e){return e===`indeterminate`}K5(Q5,`isIndeterminate`);function $5(e){return Q5(e)?`indeterminate`:e?`checked`:`unchecked`}K5($5,`getState`);var e7=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(X5,{ref:n,className:j(`peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground`,e),...t,children:(0,O.jsx)(Gle,{className:j(`flex items-center justify-center text-current`),children:(0,O.jsx)(Oa,{className:`h-4 w-4`})})}));e7.displayName=X5.displayName;var Jle=Object.defineProperty,t7=c.forwardRef(((e,t)=>Jle(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,O.jsx)(lr.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),Yle=oa(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),n7=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(t7,{ref:n,className:j(Yle(),e),...t}));n7.displayName=t7.displayName;var Xle=Object.defineProperty,r7=(e,t)=>Xle(e,`name`,{value:t,configurable:!0}
491),i7=`Progress`,a7=100,[Zle,Qle]=An(i7),[$le,eue]=Zle(i7),tue=c.forwardRef(r7(function(e,t){let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=o7,...o}=e;(i||i===0)&&!l7(i)&&console.error(d7(`${i}`,`Progress`));let s=l7(i)?i:a7;r!==null&&!u7(r,s)&&console.error(f7(`${r}`,`Progress`));let c=u7(r,s)?r:null,l=c7(c)?a(c,s):void 0;return(0,O.jsx)($le,{scope:n,value:c,max:s,children:(0,O.jsx)(lr.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":c7(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":s7(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})},`Progress`)),nue=`ProgressIndicator`,rue=c.forwardRef(r7(function(e,t){let{__scopeProgress:n,...r}=e,i=eue(nue,n);return(0,O.jsx)(lr.div,{"data-state":s7(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})},`ProgressIndicator`));function o7(e,t){return`${Math.round(e/t*100)}%`}r7(o7,`defaultGetValueLabel`);function s7(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}r7(s7,`getProgressState`);function c7(e){return typeof e==`number`}r7(c7,`isNumber`);function l7(e){return c7(e)&&!isNaN(e)&&e>0}r7(l7,`isValidMaxNumber`);function u7(e,t){return c7(e)&&!isNaN(e)&&e<=t&&e>=0}r7(u7,`isValidValueNumber`);function d7(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${a7}\`.`}r7(d7,`getInvalidMaxError`);function f7(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 492 - a positive number 493 - less than the value passed to \`max\` (or ${a7} if no \`max\` prop is set) 494 - \`null\` or \`undefined\` if the progress is indeterminate. 495 496Defaulting to \`null\`.`}r7(f7,`getInvalidValueError`);var p7=tue,iue=rue,m7=c.forwardRef(({className:e,value:t,...n},r)=>(0,O.jsx)(p7,{ref:r,className:j(`relative h-4 w-full overflow-hidden rounded-full bg-secondary`,e),...n,children:(0,O.jsx)(iue,{className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(t||0)}%)`}})}));m7.displayName=p7.displayName;var aue=[{id:`audio`,title:`Audio Overview`,icon:ga,color:`text-red-800`,bgColor:`bg-red-800/20`},{id:`reports`,title:`Reports`,icon:to,color:`text-blue-800`,bgColor:`bg-blue-800/20`},{id:`visual`,title:`Visual`,icon:Ta,color:`text-purple-800`,bgColor:`bg-purple-800/20`,disabled:!0},{id:`slidedeck`,title:`Slide Deck`,icon:Lo,color:`text-amber-500`,bgColor:`bg-amber-500/20`,disabled:!0}];function h7(e){return e.type!==`audio`&&!!e.content?.trim()}function g7(e,t){if(!(e instanceof Error)||!e.message)return t;let n=e.message.match(/^\d{3}:\s*(\{[\s\S]+\})$/);if(n?.[1])try{let e=JSON.parse(n[1]);if(typeof e.error==`string`&&e.error.trim())return e.error;if(typeof e.message==`string`&&e.message.trim())return e.message}catch{}return e.message}function oue({item:e,onClick:t,compact:n}){let r=e.icon,i=e.disabled;return(0,O.jsxs)(zd,{children:[(0,O.jsx)(Bd,{asChild:!0,children:(0,O.jsx)(Bf,{className:j(`transition-all relative border-0 touch-manipulation`,e.bgColor,i?`opacity-40 cursor-not-allowed`:`cursor-pointer hover:shadow-md active:scale-[0.98]`),onClick:i?void 0:t,"data-testid":`studio-card-${e.id}`,children:(0,O.jsxs)(Wf,{className:j(`flex items-center justify-center min-w-0`,n?`p-3 flex-row gap-2`:`p-4 flex-col`),children:[(0,O.jsx)(r,{className:j(`flex-shrink-0`,e.color,n?`w-4 h-4`:`w-5 h-5 mb-1`)}),(0,O.jsx)(`span`,{className:j(`font-medium truncate text-center block`,e.color,n?`text-xs`:`text-sm w-full`),title:e.title,children:e.title})]})})}),(0,O.jsx)(Vd,{side:`bottom`,className:`text-xs`,children:i?`Coming Soon`:e.title})]})}function sue(){return(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center text-center p-4 sm:p-6 py-12 sm:py-16 gap-2 sm:gap-3 bg-background/80`,children:[(0,O.jsx)(`div`,{className:`w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-muted flex items-center justify-center`,children:(0,O.jsx)(Qo,{className:`w-5 h-5 sm:w-6 sm:h-6 text-muted-foreground`})}),(0,O.jsxs)(`div`,{className:`text-muted-foreground space-y-1`,children:[(0,O.jsx)(`p`,{className:`font-medium text-sm sm:text-base`,children:`No saved notes`}),(0,O.jsx)(`p`,{className:`text-xs sm:text-sm max-w-[200px]`,children:`Save responses from chat to keep them here`})]})]})}function cue(e){switch(e){case`audio`:return(0,O.jsx)(ga,{className:`w-4 h-4`});case`pdf`:return(0,O.jsx)(to,{className:`w-4 h-4`});case`report`:return(0,O.jsx)(Ta,{className:`w-4 h-4`});default:return(0,O.jsx)(Qo,{className:`w-4 h-4`})}}function lue({note:e,isSelectMode:t,isSelected:n,onOpen:r,onDelete:i,onExportPdf:a,onExportAudio:o,onSavePdfArtifact:s,onSaveAudioArtifact:c,isDeleting:l,isExporting:u,isSavingPdf:d,isSavingAudio:f,onToggleSelected:p}){let m=cue(e.type),h=e.createdAt?m$(new Date(e.createdAt),{addSuffix:!1}):``,g=e.type!==`audio`&&!!e.content?.trim(),_=!!(l||u||d||f);return(0,O.jsxs)(`div`,{onClick:()=>
496{if(t){p(!n);return}r()},"data-testid":`note-item-${e.id}`,className:j(`w-full flex items-center gap-2 sm:gap-3 px-2 sm:px-3 py-2.5 sm:py-3 rounded-lg transition-colors text-left group touch-manipulation cursor-pointer`,t?`hover:bg-muted/60 active:bg-muted/70`:`hover:bg-muted/50 active:bg-muted/70`,n?`bg-muted/60`:``),children:[t?(0,O.jsx)(e7,{checked:n,onCheckedChange:e=>p(e===!0),onClick:e=>e.stopPropagation(),"aria-label":`Select ${e.title}`,className:`h-5 w-5`}):null,(0,O.jsx)(`div`,{className:`w-8 h-8 sm:w-9 sm:h-9 rounded-lg bg-muted flex items-center justify-center flex-shrink-0`,children:m}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium truncate leading-tight`,children:e.title}),(0,O.jsxs)(`p`,{className:`text-[11px] sm:text-xs text-muted-foreground mt-0.5`,children:[h,` ago`]})]}),t?null:(0,O.jsxs)(wY,{children:[(0,O.jsx)(TY,{asChild:!0,onClick:e=>{e.stopPropagation()},children:(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`h-8 w-8 flex-shrink-0 opacity-60 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity touch-manipulation`,children:(0,O.jsx)(Wa,{className:`w-4 h-4`})})}),(0,O.jsxs)(kY,{align:`end`,className:`w-52`,children:[(0,O.jsxs)(AY,{onClick:r,children:[(0,O.jsx)(to,{className:`w-4 h-4 mr-2`}),`View note`]}),(0,O.jsx)(PY,{}),(0,O.jsxs)(AY,{onClick:a,disabled:_,children:[u?(0,O.jsx)(vo,{className:`w-4 h-4 mr-2 animate-spin`}):(0,O.jsx)($a,{className:`w-4 h-4 mr-2`}),`Download PDF`]}),g&&(0,O.jsxs)(AY,{onClick:o,disabled:_,children:[(0,O.jsx)(ga,{className:`w-4 h-4 mr-2`}),`Download Audio`]}),(0,O.jsx)(PY,{}),(0,O.jsxs)(AY,{onClick:s,disabled:_,children:[d?(0,O.jsx)(vo,{className:`w-4 h-4 mr-2 animate-spin`}):(0,O.jsx)(Yo,{className:`w-4 h-4 mr-2`}),`Save PDF Artifact`]}),g&&(0,O.jsxs)(AY,{onClick:c,disabled:_,children:[f?(0,O.jsx)(vo,{className:`w-4 h-4 mr-2 animate-spin`}):(0,O.jsx)(Yo,{className:`w-4 h-4 mr-2`}),`Save Audio Artifact`]}),(0,O.jsx)(PY,{}),(0,O.jsxs)(AY,{className:`text-destructive focus:text-destructive`,onClick:i,disabled:_,children:[l?(0,O.jsx)(vo,{className:`w-4 h-4 mr-2 animate-spin`}):(0,O.jsx)(rs,{className:`w-4 h-4 mr-2`}),`Delete note`]})]})]})]})}function uue({note:e,onBack:t,onDelete:n,onExportPdf:r,onExportAudio:i,onSavePdfArtifact:a,onSaveAudioArtifact:o,onDismissAudioState:s,isDeleting:c,isExportingPdf:l,isExportingAudio:u,isSavingPdfArtifact:d,isSavingAudioArtifact:f,audioStatus:p}){let m=e.createdAt?m$(new Date(e.createdAt),{addSuffix:!1}):``,h=h7(e);return(0,O.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 h-12 border-b border-border/50 flex-shrink-0`,children:[(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`h-9 w-9 sm:h-8 sm:w-8 touch-manipulation`,onClick:t,children:(0,O.jsx)(pa,{className:`w-4 h-4`})}),(0,O.jsxs)(`div`,{className:`flex items-center gap-1 sm:gap-1.5 text-xs sm:text-sm text-muted-foreground min-w-0 flex-1`,children:[(0,O.jsx)(`span`,{className:`hidden sm:inline`,children:`Studio`}),(0,O.jsx)(ja,{className:`w-3 h-3 hidden sm:block`}),(0,O.jsx)(`span`,{className:`text-foreground truncate`,children:e.title})]}),(0,O.jsxs)(wY,{children:[(0,O.jsx)(TY,{asChild:!0,children:(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`h-9 w-9 sm:h-8 sm:w-8 flex-shrink-0 touch-manipulation`,children:(0,O.jsx)(Wa,{className:`w-4 h-4`})})}),(0,O.jsxs)(kY,{align:`end`,className:`w-56`,children:[(0,O.jsxs)(AY,{onClick:r,disabled:l||c,children:[l?(0,O.jsx)(vo,{className:`w-4 h-4 mr-2 animate-spin`}):(0,O.jsx)($a,{className:`w-4 h-4 mr-2`}),`Download PDF`]}),h&&(0,O.jsxs)(AY,{onClick:i,disabled:u||c,children:[u?(0,O.jsx)(vo,{className:`w-4 h-4 mr-2 animate-spin`}):(0,O.jsx)(ga,{className:`w-4 h-4 mr-2`}),`Download Audio`]}),(0,O.jsx)(PY,{}),(0,O.jsxs)(AY,{onClick:a,disabled:d||c,children:[d?(0,O.jsx)(vo,{className:`w-4 h-4 mr-2 animate-spin`}):(0,O.jsx)(Yo,{className:`w-4 h-4 mr-2`}),`Save PDF Artifact`]}),h&&(0,O.jsxs)(AY,{onClick:o,disabled:f||c,children:[f?(0,O.jsx)(vo,{className:`w-4 h-4 mr-2 animate-spin`}):(0,O.jsx)(Yo,{className:`w-4 h-4 mr-2`}),`Save Audio Artifact`]}),(0,O.jsx)(PY,{}),(0,O.jsxs)(AY,{className:`text-destructive focus:text-destructive`,onClick:n,disabled:c,
496children:[(0,O.jsx)(rs,{className:`w-4 h-4 mr-2`}),`Delete note`]})]})]})]}),(0,O.jsx)(A1,{className:`flex-1`,children:(0,O.jsxs)(`div`,{className:`p-3 sm:p-4 space-y-3 sm:space-y-4`,children:[(0,O.jsx)(`div`,{className:`hidden sm:block`,children:(0,O.jsx)(`h2`,{className:`text-lg font-medium leading-tight`,children:e.title})}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,O.jsx)(`span`,{className:`inline-flex items-center px-2 py-1 rounded-md bg-muted text-[10px] sm:text-xs text-muted-foreground`,children:`View only`}),(0,O.jsxs)(`span`,{className:`text-[10px] sm:text-xs text-muted-foreground`,children:[m,` ago`]})]}),h&&p?.status===`processing`?(0,O.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-border bg-muted/20 p-3`,children:[(0,O.jsx)(`p`,{className:`text-xs sm:text-sm font-medium`,children:`Generating audio...`}),(0,O.jsx)(m7,{value:p.progress,className:`h-1.5 sm:h-2`}),(0,O.jsxs)(`p`,{className:`text-[10px] sm:text-xs text-muted-foreground`,children:[p.progress,`%`]})]}):null,h&&p?.status===`failed`?(0,O.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-destructive/40 bg-destructive/5 p-3`,children:[(0,O.jsx)(`p`,{className:`text-xs sm:text-sm font-medium text-destructive`,children:`Audio export failed`}),(0,O.jsx)(`p`,{className:`text-[10px] sm:text-xs text-muted-foreground line-clamp-2`,children:p.error}),(0,O.jsx)(M,{variant:`outline`,size:`sm`,onClick:s,className:`h-7 text-xs`,children:`Dismiss`})]}):null,h&&p?.status===`complete`?(0,O.jsx)(Lle,{src:p.url,durationSeconds:p.durationSeconds,filename:`${e.title||`audio-briefing`}.mp3`}):null,(0,O.jsx)(`div`,{className:`prose prose-sm dark:prose-invert max-w-none prose-p:text-sm prose-headings:text-base sm:prose-headings:text-lg prose-p:leading-relaxed`,children:(0,O.jsx)(kle,{content:e.content||``,graphs:e.graphs})})]})})]})}function due({workspaceId:e,notebookId:t,onBack:n,onNoteCreated:r}){let[i,a]=(0,c.useState)(`list`),[o,s]=(0,c.useState)(null),[l,u]=(0,c.useState)({}),[d,f]=(0,c.useState)([]),[p,m]=(0,c.useState)(``),[h,g]=(0,c.useState)(``),[_,v]=(0,c.useState)(null),[y,b]=(0,c.useState)(null),x=(0,c.useRef)(null),{data:S,isLoading:C}=Ef(`/api/workspaces/${e}/report-templates`),w=S?.templates??[];(0,c.useEffect)(()=>()=>{x.current?.abort()},[]);let T=(0,c.useCallback)((n,r)=>{let i=n??o;if(!i)return;let s=r??l;a(`running`),m(``),f([]),g(``);let c=gf(),u=new P4(`/api/report-templates/${i.id}/run`,{credentials:`include`,maxRetryCount:0,method:`post`,headers:{"Content-Type":`application/json`,...c?{"x-csrf-token":c}:{}},body:JSON.stringify({variables:s,workspaceId:e,notebookId:t})});x.current=u.listen({onMessage(e){try{let n=JSON.parse(e.data);switch(typeof n==`string`&&(n=JSON.parse(n)),n.type){case q4.STATE:n.data?.timeline&&f(n.data.timeline);break;case q4.TEXT_CHUNK:m(e=>e+(n.text||n.data||``));break;case q4.RUN_FINISHED:break;case q4.RUN_ERROR:x.current?.abort(),a(`error`),g(n.error||n.message||`Report generation failed`);break;case q4.REPORT_COMPLETED:x.current?.abort(),a(`completed`),v(n.noteId?String(n.noteId):null),b(n.noteTitle||null),Xt.invalidateQueries({queryKey:[`/api/notebooks/${t}/notes`]});break;case q4.REPORT_ERROR:x.current?.abort(),a(`error`),g(n.error||`Report generation failed`)}}catch{}},onResponseError({response:e}){a(`error`),g(`Connection error (${e.status})`)}})},[o,l,e,t]),E=e=>{s(e);let t={};if(e.variables)for(let n of e.variables)n.defaultValue&&(t[n.name]=n.defaultValue);u(t),e.variables&&e.variables.length>0?a(`variables`):(a(`running`),T(e,t))},ee=()=>{x.current?.abort(),a(`error`),g(`Report cancelled`)},D=()=>{a(`variables`),m(``),f([]),g(``)},te=()=>{x.current?.abort(),a(`list`),s(null),u({}),m(``),f([]),g(``),v(null),b(null)},ne=o?.variables??[],re=ne.length>0,ie=ne.every(e=>!e.required||l[e.name]);return i===`list`?(0,O.jsxs)(`div`,{className:`flex flex-col h-full`,"data-testid":`studio-report-templates`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 h-12 border-b border-border/50 flex-shrink-0`,children:[(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`h-9 w-9 sm:h-8 sm:w-8 touch-manipulation`,onClick:n,"data-testid":`button-reports-back`,children:(0,O.jsx)(pa,{className:`w-4 h-4`})}),(0,O.jsxs)(`div`,{className:`flex items-center gap-1 sm:gap-1.5 text-xs sm:text-sm text-muted-foreground min-w-0 flex-1`,children:[(0,O.jsx)(`span`,{className:`hidden sm:inline`,children:`Studio`}),(0,O.jsx)(ja,{className:`w-3 h-3 hidden sm:block`}),(0,O.jsx)(`span`,{className:`text-foreground`,children:`Reports`})]})]}),(0,O.jsx)(A1,{className:`flex-1`,children:(0,O.jsx)(`div`,{className:`p-3 sm:p-4 space-y-2`,children:C?(0,O.jsx)(`div`,{className:`flex items-center justify-center py-8 sm:py-12`,children:(0,O.jsx)(`div`,{className:`w-5 h-5 border-2 border-primary border-t-transparent roun
496ded-full animate-spin`})}):w.length===0?(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center text-center p-4 sm:p-6 py-12 sm:py-16 gap-2 sm:gap-3 bg-background/80`,"data-testid":`empty-report-templates`,children:[(0,O.jsx)(`div`,{className:`w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-muted flex items-center justify-center`,children:(0,O.jsx)(to,{className:`w-5 h-5 sm:w-6 sm:h-6 text-muted-foreground`})}),(0,O.jsxs)(`div`,{className:`text-muted-foreground space-y-1`,children:[(0,O.jsx)(`p`,{className:`font-medium text-sm sm:text-base`,"data-testid":`text-no-templates`,children:`No report templates`}),(0,O.jsx)(`p`,{className:`text-xs sm:text-sm max-w-[220px]`,children:`Ask your admin to create report templates for this workspace`})]})]}):w.map(e=>(0,O.jsx)(Bf,{className:`cursor-pointer hover:shadow-md active:scale-[0.98] transition-all border touch-manipulation`,onClick:()=>E(e),"data-testid":`report-template-card-${e.id}`,children:(0,O.jsx)(Wf,{className:`p-3 sm:p-4`,children:(0,O.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium truncate`,"data-testid":`text-template-name-${e.id}`,children:e.name}),e.description&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1 line-clamp-2`,children:e.description})]}),(0,O.jsx)(Fo,{className:`w-4 h-4 text-muted-foreground flex-shrink-0 mt-0.5`})]})})},e.id))})})]}):i===`variables`?(0,O.jsxs)(`div`,{className:`flex flex-col h-full`,"data-testid":`studio-report-variables`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 h-12 border-b border-border/50 flex-shrink-0`,children:[(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`h-9 w-9 sm:h-8 sm:w-8 touch-manipulation`,onClick:te,"data-testid":`button-variables-back`,children:(0,O.jsx)(pa,{className:`w-4 h-4`})}),(0,O.jsxs)(`div`,{className:`flex items-center gap-1 sm:gap-1.5 text-xs sm:text-sm text-muted-foreground min-w-0 flex-1`,children:[(0,O.jsx)(`span`,{className:`hidden sm:inline`,children:`Reports`}),(0,O.jsx)(ja,{className:`w-3 h-3 hidden sm:block`}),(0,O.jsx)(`span`,{className:`text-foreground truncate`,children:o?.name})]})]}),(0,O.jsx)(A1,{className:`flex-1`,children:(0,O.jsxs)(`div`,{className:`p-3 sm:p-4 space-y-4`,children:[o?.description&&(0,O.jsx)(`p`,{className:`text-xs sm:text-sm text-muted-foreground`,children:o.description}),re?ne.map(e=>(0,O.jsxs)(`div`,{className:`space-y-1`,children:[(0,O.jsxs)(n7,{htmlFor:`studio-var-${e.name}`,className:`text-sm`,children:[e.label,e.required&&(0,O.jsx)(`span`,{className:`text-destructive ml-1`,children:`*`})]}),e.type===`select`&&e.options?(0,O.jsxs)(nZ,{value:l[e.name]||``,onValueChange:t=>u(n=>({...n,[e.name]:t})),children:[(0,O.jsx)(iZ,{"data-testid":`select-studio-var-${e.name}`,children:(0,O.jsx)(rZ,{placeholder:`Select ${e.label}...`})}),(0,O.jsx)(sZ,{children:e.options.map(e=>(0,O.jsx)(lZ,{value:e,children:e},e))})]}):e.type===`date`?(0,O.jsx)(Xf,{id:`studio-var-${e.name}`,type:`date`,value:l[e.name]||``,onChange:t=>u(n=>({...n,[e.name]:t.target.value})),"data-testid":`input-studio-var-${e.name}`}):(0,O.jsx)(Xf,{id:`studio-var-${e.name}`,value:l[e.name]||``,onChange:t=>u(n=>({...n,[e.name]:t.target.value})),placeholder:e.defaultValue||`Enter ${e.label}`,"data-testid":`input-studio-var-${e.name}`})]},e.name)):(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground py-2`,children:`This template has no variables. Click Run Report to generate.`})]})}),(0,O.jsxs)(`div`,{className:`p-3 sm:p-4 border-t border-border/50 flex items-center justify-end gap-2`,children:[(0,O.jsx)(M,{variant:`outline`,size:`default`,onClick:te,"data-testid":`button-studio-run-cancel`,children:`Cancel`}),(0,O.jsxs)(M,{size:`default`,onClick:()=>T(),disabled:!ie,"data-testid":`button-studio-run-report`,children:[(0,O.jsx)(to,{className:`w-4 h-4 mr-1`}),`Run Report`]})]})]}):i===`running`?(0,O.jsxs)(`div`,{className:`flex flex-col h-full`,"data-testid":`studio-report-running`,children:[(0,O.jsx)(`div`,{className:`flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 h-12 border-b border-border/50 flex-shrink-0`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-1 sm:gap-1.5 text-xs sm:text-sm text-muted-foreground min-w-0 flex-1 pl-2`,children:[(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin text-primary flex-shrink-0`}),(0,O.jsx)(`span`,{className:`text-foreground truncate`,"data-testid":`text-report-generating`,children:`Generating report...`})]})}),(0,O.jsx)(A1,{className:`flex-1`,children:(0,O.jsxs)(`div`,{className:`p-3 sm:p-4 space-y-4`,children:[(0,O.jsx)(`div`,{className:`space-y-2`,children:d.length>0?d.map(e=>(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[e.status===`active`&&(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin text-primary`}),e.status===`completed`&&(0,O.jsx)(Ia,{className:`w-4 h-4 text-green-500`}
496),e.status===`pending`&&(0,O.jsx)(`div`,{className:`w-4 h-4 rounded-full border-2 border-muted`}),e.status===`error`&&(0,O.jsx)(Pa,{className:`w-4 h-4 text-destructive`}),(0,O.jsx)(`span`,{className:e.status===`active`?`font-medium`:e.status===`completed`?`text-muted-foreground`:``,children:e.label})]},e.id)):(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin text-primary`}),(0,O.jsx)(`span`,{children:`Starting report generation...`})]})}),p&&(0,O.jsx)(`div`,{className:`max-h-48 overflow-y-auto border rounded-md p-3 text-sm bg-muted/30`,children:(0,O.jsx)(`pre`,{className:`whitespace-pre-wrap font-sans`,children:p})})]})}),(0,O.jsx)(`div`,{className:`p-3 sm:p-4 border-t border-border/50 flex items-center justify-end`,children:(0,O.jsxs)(M,{variant:`outline`,size:`default`,onClick:ee,"data-testid":`button-studio-cancel-report`,children:[(0,O.jsx)(La,{className:`w-4 h-4 mr-1`}),`Cancel`]})})]}):i===`completed`?(0,O.jsxs)(`div`,{className:`flex flex-col h-full`,"data-testid":`studio-report-completed`,children:[(0,O.jsx)(`div`,{className:`flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 h-12 border-b border-border/50 flex-shrink-0`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-1 sm:gap-1.5 text-xs sm:text-sm text-muted-foreground min-w-0 flex-1 pl-2`,children:[(0,O.jsx)(Ia,{className:`w-4 h-4 text-green-500 flex-shrink-0`}),(0,O.jsx)(`span`,{className:`text-foreground`,"data-testid":`text-report-complete`,children:`Report Complete`})]})}),(0,O.jsx)(A1,{className:`flex-1`,children:(0,O.jsxs)(`div`,{className:`p-3 sm:p-4 space-y-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3 p-4 bg-muted/30 rounded-md`,"data-testid":`status-report-success`,children:[(0,O.jsx)(Ia,{className:`w-6 h-6 text-green-500 flex-shrink-0`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:`Report generated successfully`}),y&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,"data-testid":`text-completed-note-title`,children:y})]})]}),p&&(0,O.jsx)(`div`,{className:`max-h-48 overflow-y-auto border rounded-md p-3 text-sm bg-muted/30`,children:(0,O.jsx)(`pre`,{className:`whitespace-pre-wrap font-sans`,children:p})})]})}),(0,O.jsxs)(`div`,{className:`p-3 sm:p-4 border-t border-border/50 flex items-center justify-end gap-2`,children:[(0,O.jsx)(M,{variant:`outline`,size:`default`,onClick:te,"data-testid":`button-studio-report-back`,children:`Back to Templates`}),_&&(0,O.jsxs)(M,{size:`default`,onClick:()=>r(_),"data-testid":`button-studio-view-report`,children:[(0,O.jsx)(to,{className:`w-4 h-4 mr-1`}),`View Report`]})]})]}):i===`error`?(0,O.jsxs)(`div`,{className:`flex flex-col h-full`,"data-testid":`studio-report-error`,children:[(0,O.jsx)(`div`,{className:`flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 h-12 border-b border-border/50 flex-shrink-0`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-1 sm:gap-1.5 text-xs sm:text-sm text-muted-foreground min-w-0 flex-1 pl-2`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4 text-destructive flex-shrink-0`}),(0,O.jsx)(`span`,{className:`text-foreground`,"data-testid":`text-report-failed`,children:`Report Failed`})]})}),(0,O.jsx)(A1,{className:`flex-1`,children:(0,O.jsx)(`div`,{className:`p-3 sm:p-4 space-y-4`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3 p-4 bg-destructive/10 rounded-md`,"data-testid":`status-report-error`,children:[(0,O.jsx)(Pa,{className:`w-6 h-6 text-destructive flex-shrink-0`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:`Report generation failed`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,"data-testid":`text-error-message`,children:h})]})]})})}),(0,O.jsxs)(`div`,{className:`p-3 sm:p-4 border-t border-border/50 flex items-center justify-end gap-2`,children:[(0,O.jsx)(M,{variant:`outline`,size:`default`,onClick:te,"data-testid":`button-studio-error-back`,children:`Back to Templates`}),(0,O.jsx)(M,{size:`default`,onClick:D,"data-testid":`button-studio-retry-report`,children:`Retry`})]})]}):null}function _7({notebookId:e,workspaceId:t}){let{toast:n}=ln(),[r,i]=(0,c.useState)(null),[a,o]=(0,c.useState)(!1),[s,l]=(0,c.useState)(!1),[u,d]=(0,c.useState)(new Set),[f,p]=(0,c.useState)(new Set),[m,h]=(0,c.useState)(new Set),[g,_]=(0,c.useState)(new Set),[v,y]=(0,c.useState)(new Set),{data:b,isLoading:x}=B1(e),S=H1(e),C=Mle(),w=Nle(),T=Ple(),E=Fle(),ee=(b?.notes||[]).filter(e=>e.type!==`pdf`&&e.type!==`audio`),D=ee.find(e=>e.id===r),te=u.size,ne=(0,c.useRef)(``),re=(0,c.useRef)(``),ie=(0,c.useRef)([]);(0,c.useEffect)(()=>()=>{for(let e of ie.current)window.URL.revokeObjectURL(e)},[]);let ae=e=>{if(ie.current.push(e),ie.current.length>10){let e=ie.current.shift();e&&window.URL.revokeObjectURL(e)}};(0,c.useEffect)(()=>
496{if(!w.activeJobId||!w.status||w.status.status===`processing`)return;let e=`${w.activeJobId}:${w.status.status}`;ne.current!==e&&(w.status.status===`complete`?n({title:`Audio briefing ready`,description:(0,O.jsxs)(`span`,{children:[`Your audio briefing is ready.`,` `,(0,O.jsx)(`a`,{href:w.status.url,download:!0,className:`underline`,children:`Download link`})]})}):w.status.status===`failed`&&n({title:`Audio export failed`,description:w.status.error,variant:`destructive`}),ne.current=e)},[w.activeJobId,w.status,n]);let{activeNoteId:oe}=E;(0,c.useEffect)(()=>{if(!E.activeJobId||!E.status||E.status.status===`processing`)return;let e=`${E.activeJobId}:${E.status.status}`;re.current!==e&&(E.status.status===`complete`?(n({title:`Audio artifact saved`,description:`Your audio briefing has been saved to Artifacts.`}),y(e=>{let t=new Set(e);return t.delete(oe??``),t})):E.status.status===`failed`&&(n({title:`Save failed`,description:E.status.error,variant:`destructive`}),y(e=>{let t=new Set(e);return t.delete(oe??``),t})),re.current=e)},[E.activeJobId,E.status,oe,n]);let se=e=>{if(e===`reports`){o(!0);return}if(e!==`audio`)return;let t=ee.find(e=>h7(e));if(!t){n({title:`No eligible notes`,description:`Create or save a text-based note to generate an audio briefing.`});return}i(t.id)},ce=e=>{s||i(e)},le=()=>{i(null)},ue=async()=>{if(r)try{await S.mutateAsync({noteId:r}),i(null),n({title:`Deleted`,description:`Note deleted successfully`})}catch(e){n({title:`Error`,description:g7(e,`Failed to delete note`),variant:`destructive`})}},de=async()=>{if(r)try{let e=await C.mutateAsync({noteIds:[r]});ae(e.url),n({title:`PDF downloaded`,description:(0,O.jsxs)(`span`,{children:[`Your note export is ready.`,` `,(0,O.jsx)(`a`,{href:e.url,download:e.filename,className:`underline`,children:`Download link`})]})})}catch(e){n({title:`PDF export failed`,description:g7(e,`Failed to generate PDF export`),variant:`destructive`})}},fe=async()=>{if(r)try{await w.startExport({noteId:r})}catch(e){n({title:`Audio export failed`,description:g7(e,`Failed to start audio export`),variant:`destructive`})}},pe=()=>{w.reset(),ne.current=``},me=()=>{l(!0),d(new Set)},he=()=>{l(!1),d(new Set)},ge=(e,t)=>{d(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})},_e=async()=>{if(te!==0)try{let e=await C.mutateAsync({noteIds:Array.from(u)});ae(e.url),n({title:`PDF downloaded`,description:(0,O.jsxs)(`span`,{children:[te,` note`,te>1?`s`:``,` exported successfully.`,` `,(0,O.jsx)(`a`,{href:e.url,download:e.filename,className:`underline`,children:`Download link`})]})}),he()}catch(e){n({title:`Batch export failed`,description:g7(e,`Failed to export selected notes`),variant:`destructive`})}},ve=async e=>{p(t=>new Set(t).add(e));try{await S.mutateAsync({noteId:e}),n({title:`Deleted`,description:`Note deleted successfully`})}catch(e){n({title:`Error`,description:g7(e,`Failed to delete note`),variant:`destructive`})}finally{p(t=>{let n=new Set(t);return n.delete(e),n})}},ye=async e=>{h(t=>new Set(t).add(e));try{let t=await C.mutateAsync({noteIds:[e]});ae(t.url),n({title:`PDF downloaded`,description:(0,O.jsxs)(`span`,{children:[`Note exported successfully.`,` `,(0,O.jsx)(`a`,{href:t.url,download:t.filename,className:`underline`,children:`Download link`})]})})}catch(e){n({title:`PDF export failed`,description:g7(e,`Failed to generate PDF export`),variant:`destructive`})}finally{h(t=>{let n=new Set(t);return n.delete(e),n})}},be=async e=>{try{await w.startExport({noteId:e}),n({title:`Generating audio`,description:`Audio briefing is being generated. Check the note detail for progress.`})}catch(e){n({title:`Audio export failed`,description:g7(e,`Failed to start audio export`),variant:`destructive`})}},xe=async e=>{_(t=>new Set(t).add(e));try{await T.mutateAsync({noteId:e}),n({title:`PDF artifact saved`,description:`Your PDF has been saved to Artifacts.`})}catch(e){n({title:`Save failed`,description:g7(e,`Failed to save PDF artifact`),variant:`destructive`})}finally{_(t=>{let n=new Set(t);return n.delete(e),n})}},Se=async e=>{y(t=>new Set(t).add(e));try{await E.mutateAsync({noteId:e})}catch(t){n({title:`Save failed`,description:g7(t,`Failed to start audio artifact generation`),variant:`destructive`}),y(t=>{let n=new Set(t);return n.delete(e),n})}},Ce=r&&w.activeNoteId===r?w.status:void 0;return a?(0,O.jsx)(`aside`,{className:`flex flex-col h-full overflow-hidden relative`,children:(0,O.jsx)(due,{workspaceId:t,notebookId:e,onBack:()=>o(!1),onNoteCreated:e=>{o(!1),i(e)}})}):D?(0,O.jsx)(`aside`,{className:`flex flex-col h-full overflow-hidden relative`,children:(0,O.jsx)(uue,{note:D,onBack:le,onDelete:ue,onExportPdf:de,onExportAudio:fe,onSavePdfArtifact:()=>xe(D.id),onSaveAudioArtifact:()=>Se(D.id),onDismissAudioState:pe,isDeleting:S.isPending,isExportingPdf:C.isPending,isExportingAudio:w.isProcessing&&w.activeNoteId===D.id,isSavingPdfArtifact:g.has(D.id)&&T.isPending,isSavingAudioArtifact:v.has(D.id)&&E.isProcessing,audioStatus:Ce})}):(0,O.jsxs)(`aside`,{className:`flex flex-col h-full overflow-hidden relative`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-1 sm:gap-2 px-2 sm:px-4 py-2 h-12 border-b border-border/50 flex-shrink-0`,children:[(0,O.jsx)(`h3`,{className:`text-base sm:text-lg font-medium`,children:`Studio`}),s?(0,O.jsxs)(`div`,{className:`flex items-center gap-1 sm:gap-2`,children:[(0,O.jsxs)(M,{variant:`outline`,size:`sm`,className:`gap-1 sm:gap-2 h-8 px-2 sm:px-3 touch-manipulation`,onClick:_e,disabled:te===0||C.isPending,children:[C.isPending?(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin`}):(0,O.jsx)($a,{className:`w-4 h-4`}),(0,O.jsx)(`span`,{className:`hidden sm:inline`,children:`PDF`}),(0,O.jsxs)(`span`,{className:`text-xs`,children:[`(`,te,`)`]})]}),(0,O.jsx)(M,{variant:`ghost`,size:`icon`,onClick:he,className:`h-8 w-8 touch-manipulation`,children:(0,O.jsx)(ds,{className:`w-4 h-4`})})]}):(0,O.jsxs)(M,{variant:`ghost`,size:`sm`,onClick:me,className:`h-8 px-2 sm:px-3 touch-manipulation`,children:[(0,O.jsx)(Xo,{className:`w-4 h-4 sm:mr-1`}),(0,O.jsx)(`span`,{className:`hidden sm:inline`,children:`Select`})]})]}),(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto overflow-x-hidden min-w-0`,children:(0,O.jsxs)(`div`,{className:`space-y-4 sm:sp
496ace-y-6 pb-16 sm:pb-20`,children:[(0,O.jsx)(`div`,{className:`p-3 sm:p-4 pb-0 grid grid-cols-1 lg:grid-cols-2 gap-2 sm:gap-3`,children:aue.map(e=>(0,O.jsx)(`div`,{className:j(e.disabled&&`hidden lg:block`),children:(0,O.jsx)(oue,{item:e,onClick:()=>se(e.id),compact:!1})},e.id))}),(0,O.jsxs)(`div`,{className:`px-1 sm:px-2 pt-3 sm:pt-4 border-t border-border/50 space-y-2 sm:space-y-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between px-2 sm:px-3`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wide`,children:`Saved Notes`}),s&&te>0?(0,O.jsxs)(`span`,{className:`text-xs text-primary font-medium`,children:[te,` selected`]}):ee.length>0?(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:ee.length}):null]}),x?(0,O.jsx)(`div`,{className:`flex items-center justify-center py-8 sm:py-12`,children:(0,O.jsx)(`div`,{className:`w-5 h-5 border-2 border-primary border-t-transparent rounded-full animate-spin`})}):ee.length===0?(0,O.jsx)(sue,{}):(0,O.jsx)(`div`,{className:`space-y-0.5 sm:space-y-1`,children:ee.map(e=>(0,O.jsx)(lue,{note:e,isSelectMode:s,isSelected:u.has(e.id),onOpen:()=>ce(e.id),onDelete:()=>ve(e.id),onExportPdf:()=>ye(e.id),onExportAudio:()=>be(e.id),onSavePdfArtifact:()=>xe(e.id),onSaveAudioArtifact:()=>Se(e.id),isDeleting:f.has(e.id),isExporting:m.has(e.id),isSavingPdf:g.has(e.id),isSavingAudio:v.has(e.id),onToggleSelected:t=>ge(e.id,t)},e.id))})]})]})})]})}function fue({notebookId:e,open:t,onClose:n}){let{toast:r}=ln(),i=(0,c.useRef)(null),[a,o]=(0,c.useState)(!1),[s,l]=(0,c.useState)(null),[u,d]=(0,c.useState)(``),[f,p]=(0,c.useState)(``),[m,h]=(0,c.useState)(``),{mutateAsync:g,isPending:_}=$4(e),v=()=>{l(null),d(``),p(``),h(``),i.current&&(i.current.value=``)},y=!!s&&u.trim().length>0&&f!==``&&!_,b=e=>{l(e);let t=e.name.lastIndexOf(`.`),n=t>0?e.name.slice(0,t):e.name;u.trim().length===0&&d(n)};return(0,O.jsx)(wK,{open:t,onOpenChange:e=>{e||(v(),n())},children:(0,O.jsxs)(OK,{className:`lg:max-w-[60vw] max-h-[80vh] rounded-3xl flex flex-col`,children:[(0,O.jsxs)(kK,{className:`space-y-6`,children:[(0,O.jsx)(jK,{className:`sr-only`,children:`Upload a document`}),(0,O.jsx)(Fee,{})]}),(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto space-y-6 min-h-0`,children:s?(0,O.jsxs)(`div`,{className:`border rounded-3xl p-6 space-y-4`,"data-testid":`upload-metadata-form`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,O.jsx)(to,{className:`w-8 h-8 text-primary shrink-0 mt-0.5`}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsx)(`p`,{className:`font-medium truncate`,children:s.name}),(0,O.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(s.size/1024).toFixed(1),` KB`]})]}),(0,O.jsx)(M,{type:`button`,variant:`ghost`,size:`sm`,onClick:v,disabled:_,"aria-label":`Remove selected file`,"data-testid":`button-clear-pending-file`,children:(0,O.jsx)(ds,{className:`w-4 h-4`})})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{htmlFor:`upload-name`,children:`Name`}),(0,O.jsx)(Xf,{id:`upload-name`,value:u,onChange:e=>d(e.target.value),placeholder:`e.g. Q1 policy`,disabled:_,maxLength:50,"data-testid":`upload-name`})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{id:`upload-category-label`,children:`Category`}),(0,O.jsx)(`div`,{role:`radiogroup`,"aria-labelledby":`upload-category-label`,className:`flex flex-wrap gap-2`,"data-testid":`upload-category`,children:n5.map(e=>{let t=f===e;return(0,O.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":t,onClick:()=>p(e),disabled:_,"data-testid":`upload-category-${e}`,className:`px-3 py-1.5 rounded-full border text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 disabled:cursor-not-allowed ${t?`bg-primary text-primary-foreground border-primary`:`bg-background hover:bg-muted/60 border-input`}`,children:r5[e]},e)})})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{htmlFor:`upload-description`,children:`Description (optional)`}),(0,O.jsx)(FY,{id:`upload-description`,value:m,onChange:e=>h(e.target.value),placeholder:`What's in this document?`,disabled:_,maxLength:300,rows:3,"data-testid":`upload-description`})]}),(0,O.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,O.jsx)(M,{type:`button`,variant:`outline`,onClick:v,disabled:_,children:`Cancel`}),(0,O.jsxs)(M,{type:`button`,onClick:async()=>
496{if(y&&s){r({title:`Uploading document`});try{let e=new FormData;e.append(`file`,s),e.append(`name`,u.trim()),e.append(`category`,f),m.trim().length>0&&e.append(`description`,m.trim()),await g(e),r({title:`Document uploaded`,description:`${u.trim()} is being processed`}),v(),n()}catch{r({title:`Upload failed`,description:`Failed to upload document. Please try again.`,variant:`destructive`})}}},disabled:!y,"data-testid":`button-submit-upload`,children:[_?(0,O.jsx)(vo,{className:`w-4 h-4 mr-2 animate-spin`}):(0,O.jsx)(os,{className:`w-4 h-4 mr-2`}),`Upload`]})]})]}):(0,O.jsx)(`div`,{className:`border-2 border-dashed rounded-3xl p-8 min-h-48 flex items-center justify-center text-center transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${a?`border-primary bg-primary/5`:`hover:border-primary/60`}`,role:`button`,tabIndex:0,"aria-label":`Upload a file â drag and drop or click to browse`,onClick:()=>i.current?.click(),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i.current?.click())},onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),o(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),o(!1)},onDrop:e=>{e.preventDefault(),e.stopPropagation(),o(!1);let t=e.dataTransfer.files?.[0];t&&b(t)},"data-testid":`dropzone-file-upload`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`input`,{type:`file`,ref:i,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&b(t)},disabled:_,"data-testid":`input-file-upload`,accept:`.pdf,.txt,.md,.docx,.csv`}),(0,O.jsx)(os,{className:`w-12 h-12 mx-auto mb-3 text-primary`}),(0,O.jsx)(`p`,{className:`font-semibold text-lg`,children:`Drag & drop or choose a file`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Supported: PDF, TXT, Markdown, DOCX, CSV (50MB max)`})]})})})]})})}function pue(e){return!!e&&n5.includes(e)}function mue({open:e,source:t,notebookId:n,onClose:r}){let{toast:i}=ln(),{mutateAsync:a,isPending:o}=X4(n),[s,l]=(0,c.useState)(``),[u,d]=(0,c.useState)(``),[f,p]=(0,c.useState)(``);(0,c.useEffect)(()=>{t&&(l(t.name),d(pue(t.category)?t.category:``),p(t.description??``))},[t]);let m=!!t&&s.trim().length>0&&u!==``&&!o;return(0,O.jsx)(wK,{open:e,onOpenChange:e=>{e||r()},children:(0,O.jsxs)(OK,{className:`lg:max-w-[30vw] rounded-3xl overflow-hidden flex flex-col`,children:[(0,O.jsxs)(kK,{children:[(0,O.jsx)(jK,{children:`Edit source`}),(0,O.jsx)(MK,{children:`Update the name, category, or description for this source.`})]}),(0,O.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),t&&m)try{await a({sourceId:t.id,name:s.trim(),category:u,...f.trim().length>0?{description:f.trim()}:{}}),i({title:`Source updated`,description:`"${s.trim()}" saved`}),r()}catch{i({title:`Error`,description:`Failed to update source. Please try again.`,variant:`destructive`})}},className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{htmlFor:`edit-source-name`,children:`Name`}),(0,O.jsx)(Xf,{id:`edit-source-name`,value:s,onChange:e=>l(e.target.value),placeholder:`Source name`,disabled:o,autoFocus:!0,maxLength:50,"data-testid":`edit-source-name`})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{htmlFor:`edit-source-category`,children:`Category`}),(0,O.jsxs)(nZ,{value:u,onValueChange:e=>d(e),disabled:o,children:[(0,O.jsx)(iZ,{id:`edit-source-category`,"data-testid":`edit-source-category`,children:(0,O.jsx)(rZ,{placeholder:`Select a category`})}),(0,O.jsx)(sZ,{children:n5.map(e=>(0,O.jsx)(lZ,{value:e,children:r5[e]},e))})]})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{htmlFor:`edit-source-description`,children:`Description (optional)`}),(0,O.jsx)(FY,{id:`edit-source-description`,value:f,onChange:e=>p(e.target.value),placeholder:`What's in this document?`,disabled:o,maxLength:300,rows:4,"data-testid":`edit-source-description`})]}),(0,O.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,O.jsx)(M,{type:`button`,variant:`outline`,onClick:r,disabled:o,children:`Cancel`}),(0,O.jsxs)(M,{type:`submit`,disabled:!m,children:[o?(0,O.jsx)(vo,{className:`w-4 h-4 mr-2 animate-spin`}):null,`Save`]})]})]})]})})}var hue=(e,t)=>
496{let n=t===`failed`?`text-red-500`:t===`ready`?`text-green-500`:void 0,r=`!h-5 !w-5 group-hover:hidden`;return e.startsWith(`audio/`)?(0,O.jsx)(Ya,{className:`${r} ${n??`text-yellow-500`}`}):e.includes(`spreadsheet`)||e.includes(`excel`)||e.includes(`csv`)?(0,O.jsx)(eo,{className:`${r} ${n??`text-purple-500`}`}):e.includes(`markdown`)||e.includes(`code`)||e.startsWith(`text/`)?(0,O.jsx)(Qa,{className:`${r} ${n??`text-orange-500`}`}):e===`application/pdf`?(0,O.jsx)(to,{className:`${r} ${n??`text-red-500`}`}):(0,O.jsx)(to,{className:`${r} ${n??`text-gray-500`}`})};function v7({notebookId:e}){let{toast:t}=ln(),n=(0,c.useRef)(null),[r,i]=(0,c.useState)(!1),[a,o]=(0,c.useState)(0),[s,l]=(0,c.useState)(null),[u,d]=(0,c.useState)(null),[f,p]=(0,c.useState)(null),{mutateAsync:m}=Z4(e),{mutateAsync:h}=Q4(e),{data:g=[]}=Y4(e,{refetchInterval:e=>e.state.data?.some(e=>e.status===`processing`||e.status===`pending`)?1e4:!1}),{data:_}=P1(e),{mutate:v}=z1(e),y=_?.notebook.sourceSettings??o5,b=async(e,t)=>{try{l(e),await m({sourceId:e,isActive:!t})}finally{l(null)}},x=e=>{v({...y,[e]:!y[e]})},S=(0,c.useMemo)(()=>g.filter(e=>e.sourceType===`document`),[g]);return(0,c.useEffect)(()=>{let e=n.current;if(!e)return;let t=new ResizeObserver(e=>{for(let t of e)o(t.contentRect.width)});return t.observe(e),()=>{t.disconnect()}},[]),(0,O.jsxs)(`aside`,{ref:n,className:`flex flex-col h-full overflow-hidden`,children:[(0,O.jsx)(`div`,{className:`flex items-center justify-between gap-2 px-4 py-2 h-12 border-b border-border/50 flex-shrink-0`,children:(0,O.jsx)(`h3`,{className:`text-lg`,children:`Sources`})}),(0,O.jsx)(A1,{className:`flex-1 min-h-0`,children:(0,O.jsxs)(`div`,{className:`p-4 space-y-4`,children:[(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between px-1 text-sm`,children:[(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Connections`}),(0,O.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[Number(y.includeProgramData)+Number(y.includeMaslowCoreInsights),`/`,2,` active`]})]}),(0,O.jsxs)(`div`,{className:`space-y-1`,children:[(0,O.jsx)(y7,{icon:(0,O.jsx)(Ha,{className:`h-5 w-5 shrink-0 text-primary/80`}),label:`Program Data`,testId:`connection-program-data`,title:`Program Data (MotherDuck SQL)`,checked:!0,alwaysOn:!0}),(0,O.jsx)(y7,{icon:(0,O.jsx)(Ha,{className:`h-5 w-5 shrink-0 text-primary/80`}),label:`Industry Data`,testId:`built-in-core-insights-panel-item`,title:`Industry Data (RAG)`,checked:y.includeMaslowCoreInsights,onToggle:()=>x(`includeMaslowCoreInsights`)})]})]}),(0,O.jsx)(`div`,{className:`w-full`,children:(0,O.jsxs)(M,{size:`lg`,variant:`outline`,className:`gap-1 rounded-full w-full`,onClick:()=>i(!0),"data-testid":`button-add-source`,children:[(0,O.jsx)(Io,{className:`w-4 h-4`}),`Upload documents`]})}),(0,O.jsx)(y7,{icon:(0,O.jsx)(no,{className:`h-5 w-5 shrink-0 text-primary/80`}),label:`My Data`,testId:`connection-my-data`,title:`My Data (uploaded documents)`,checked:y.includeMyData,onToggle:()=>x(`includeMyData`)}),S.length===0?(0,O.jsx)(gue,{}):(0,O.jsx)(_ue,{label:`Uploaded documents`,onToggle:b,togglingId:s,sources:S,activeCount:S.filter(e=>e.isActive).length,disabled:!y.includeMyData,panelWidth:a,onEdit:d,onDelete:p,showMetadata:!0})]})}),(0,O.jsx)(fue,{notebookId:e,open:r,onClose:()=>i(!1)}),(0,O.jsx)(mue,{open:!!u,source:u,notebookId:e,onClose:()=>d(null)}),(0,O.jsx)(a2,{open:!!f,onOpenChange:e=>!e&&p(null),children:(0,O.jsxs)(l2,{children:[(0,O.jsxs)(u2,{children:[(0,O.jsx)(f2,{children:`Remove source`}),(0,O.jsxs)(p2,{children:[`Are you sure you want to remove "`,f?.name,`"? This action cannot be undone.`]})]}),(0,O.jsxs)(d2,{children:[(0,O.jsx)(h2,{children:`Cancel`}),(0,O.jsx)(m2,{onClick:async()=>{if(f)try{await h({sourceId:f.id}),t({title:`Source removed`,description:`"${f.name}" has been removed`}),p(null)}catch{t({title:`Error`,description:`Failed to remove source. Please try again.`,variant:`destructive`})}},className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:`Remove`})]})]})})]})}function y7({icon:e,label:t,testId:n,title:r,checked:i,onToggle:a,alwaysOn:o}){return(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-md p-1 text-muted-foreground hover:bg-muted/50`,"data-testid":n,title:r,children:[e,(0,O.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-sm`,children:t}),!o&&(0,O.jsx)(D5,{checked:i,onCheckedChange:()=>a?.(),className:`flex-shrink-0`,"data-testid":`toggle-${n}`})]})}function gue(){return(0,O.jsxs)(`div`,{className:`flex flex-col items-center h-[60vh] justify-center text-center p-6 gap-3 bg-background/80`,children:[(0,O.jsx)(to,{className:`w-6 h-6 text-muted-foreground`}),(0,O.jsx)(`div`,{className:`text-muted-foreground`,children:(0,O.jsx)(`p`,{className:`font-medium`,children:`Saved documents will appear here`})})]})}function _ue({label:e,sources:t,activeCount:n,togglingId:r,panelWidth:i,showMetadata:a,disabled:o,onToggle:s,onEdit:c,onDelete:l}){return(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between text-sm px-1`,children:[(0,O.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,O.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:e})}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:o?`disconnected`:`${n}/${t.length} active`})]}),(0,O.jsx)(`div`,{className:`space-y-1`,children:t.map(e=>(0,O.jsx)(bue,{source:e,isToggling:r===e.id,onToggle:()=>s(e.id,e.isActive),panelWidth:i,onEdit:c,onDelete:l,showMetadata:a},e.id))})]})}function vue(e){return e?e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`:``}function yue(e){return e?e===`application/pdf`?`PDF`:e.includes(`spreadsheet`)||e.includes(`excel`)||e.includes(`csv`)?`Spreadsheet`:e===`text/plain`?`Text`:e===`text/markdown`?`Markdown`:e.includes(`word`)?`Word`:e.startsWith(`audio/`)?`Audio`:`File`:`File`}function bue({source:e,onToggle:t,isToggling:n,panelWidth:r,showMetadata:i,onEdit:a,onDelete:o}){let s=e.status===`failed`,c=e.status===`processing`||e.status===`pen
496ding`,l=r>0?Math.max(100,r-95):void 0,u=e.sourceMetadata,d=vue(u?.size),f=yue(u?.mimeType),p=e.createdAt?m$(new Date(e.createdAt),{addSuffix:!0}):``;return(0,O.jsxs)(`div`,{className:`group flex items-center gap-1.5 hover:bg-muted/50 cursor-pointer p-1.5 rounded-md`,"data-testid":`source-item-${e.id}`,children:[(0,O.jsxs)(wY,{children:[(0,O.jsx)(TY,{asChild:!0,children:(0,O.jsxs)(M,{size:`icon`,variant:`ghost`,className:`h-6 w-6 flex-shrink-0 hover:bg-transparent`,onClick:e=>e.stopPropagation(),children:[hue(e.sourceMetadata?.mimeType||``,e.status),(0,O.jsx)(Wa,{className:`h-4 w-4 text-muted-foreground hidden group-hover:block`})]})}),(0,O.jsxs)(kY,{align:`start`,children:[(0,O.jsxs)(AY,{onClick:()=>a(e),children:[(0,O.jsx)(No,{className:`mr-2 h-4 w-4`}),`Edit source`]}),(0,O.jsxs)(AY,{onClick:()=>o(e),children:[(0,O.jsx)(rs,{className:`mr-2 h-4 w-4`}),`Remove source`]})]})]}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0 overflow-hidden`,style:l?{maxWidth:`${l}px`}:void 0,children:[(0,O.jsx)(`p`,{className:`truncate text-sm`,children:e.name}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground flex-wrap`,children:[c&&(0,O.jsxs)(`span`,{className:`flex items-center gap-1 text-yellow-500`,children:[(0,O.jsx)(vo,{className:`w-3 h-3 animate-spin`}),`Processing`]}),s&&(0,O.jsx)(`span`,{className:`text-red-500`,children:`Failed`}),!c&&!s&&i&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded bg-muted text-[10px] font-medium`,children:f}),d&&(0,O.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,O.jsx)(oo,{className:`w-3 h-3`}),d]}),p&&(0,O.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,O.jsx)(za,{className:`w-3 h-3`}),p]})]})]})]}),(0,O.jsx)(e7,{onCheckedChange:t,className:`h-4 w-4 flex-shrink-0`,checked:e.isActive??!1,"data-testid":`checkbox-source-${e.id}`,disabled:n||c||s})]})}var b7=(0,c.createContext)(null);b7.displayName=`PanelGroupContext`;var x7={group:`data-panel-group`,groupDirection:`data-panel-group-direction`,groupId:`data-panel-group-id`,panel:`data-panel`,panelCollapsible:`data-panel-collapsible`,panelId:`data-panel-id`,panelSize:`data-panel-size`,resizeHandle:`data-resize-handle`,resizeHandleActive:`data-resize-handle-active`,resizeHandleEnabled:`data-panel-resize-handle-enabled`,resizeHandleId:`data-panel-resize-handle-id`,resizeHandleState:`data-resize-handle-state`},S7=10,C7=c.useLayoutEffect,w7=c.useId,xue=typeof w7==`function`?w7:()=>null,Sue=0;function T7(e=null){let t=xue(),n=(0,c.useRef)(e||t||null);return n.current===null&&(n.current=``+Sue++),e??n.current}function E7({children:e,className:t=``,collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:a,id:o,maxSize:s,minSize:l,onCollapse:u,onExpand:d,onResize:f,order:p,style:m,tagName:h=`div`,...g}){let _=(0,c.useContext)(b7);if(_===null)throw Error(`Panel components must be rendered within a PanelGroup container`);let{collapsePanel:v,expandPanel:y,getPanelSize:b,getPanelStyle:x,groupId:S,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:T,resizePanel:E,unregisterPanel:ee}=_,D=T7(o),te=(0,c.useRef)({callbacks:{onCollapse:u,onExpand:d,onResize:f},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:l},id:D,idIsFromProps:o!==void 0,order:p});(0,c.useRef)({didLogMissingDefaultSizeWarning:!1}
vendor: 9,312 bytes, line 496
496),C7(()=>{let{callbacks:e,constraints:t}=te.current,a={...t};te.current.id=D,te.current.idIsFromProps=o!==void 0,te.current.order=p,e.onCollapse=u,e.onExpand=d,e.onResize=f,t.collapsedSize=n,t.collapsible=r,t.defaultSize=i,t.maxSize=s,t.minSize=l,(a.collapsedSize!==t.collapsedSize||a.collapsible!==t.collapsible||a.maxSize!==t.maxSize||a.minSize!==t.minSize)&&w(te.current,a)}),C7(()=>{let e=te.current;return T(e),()=>{ee(e)}},[p,D,T,ee]),(0,c.useImperativeHandle)(a,()=>({collapse:()=>{v(te.current)},expand:e=>{y(te.current,e)},getId(){return D},getSize(){return b(te.current)},isCollapsed(){return C(te.current)},isExpanded(){return!C(te.current)},resize:e=>{E(te.current,e)}}),[v,y,b,C,D,E]);let ne=x(te.current,i);return(0,c.createElement)(h,{...g,children:e,className:t,id:D,style:{...ne,...m},[x7.groupId]:S,[x7.panel]:``,[x7.panelCollapsible]:r||void 0,[x7.panelId]:D,[x7.panelSize]:parseFloat(``+ne.flexGrow).toFixed(1)})}var D7=(0,c.forwardRef)((e,t)=>(0,c.createElement)(E7,{...e,forwardedRef:t}));E7.displayName=`Panel`,D7.displayName=`forwardRef(Panel)`;var O7=null,Cue=!0,k7=-1,A7=null;function wue(e,t){if(t){let e=(t&B7)!==0,n=(t&V7)!==0,r=(t&H7)!==0,i=(t&U7)!==0;if(e)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}switch(e){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function Tue(){A7!==null&&(document.head.removeChild(A7),O7=null,A7=null,k7=-1)}function j7(e,t){if(!Cue)return;let n=wue(e,t);if(O7!==n){if(O7=n,A7===null&&(A7=document.createElement(`style`),document.head.appendChild(A7)),k7>=0){var r;(r=A7.sheet)==null||r.removeRule(k7)}k7=A7.sheet?.insertRule(`*{cursor: ${n} !important;}`)??-1}}function M7(e){return e.type===`keydown`}function N7(e){return e.type.startsWith(`pointer`)}function P7(e){return e.type.startsWith(`mouse`)}function F7(e){if(N7(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(P7(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function Eue(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}function Due(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function Oue(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:R7(e),b:R7(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;i9(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:L7(I7(n.a)),b:L7(I7(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var kue=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Aue(e){let t=getComputedStyle(z7(e)??e).display;return t===`flex`||t===`inline-flex`}function jue(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Aue(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||kue.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function I7(e){let t=e.length;for(;t--;){let n=e[t];if(i9(n,`Missing node`),jue(n))return n}return null}function L7(e){return e&&Number(getComputedStyle(e).zIndex)||0}function R7(e){let t=[];for(;e;)t.push(e),e=z7(e);return t}function z7(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var B7=1,V7=2,H7=4,U7=8,Mue=Eue()===`coarse`,W7=[],G7=!1,K7=new Map,q7=new Map,J7=new Set;function Nue(e,t,n,r,i){let{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},s=K7.get(a)??0;return K7.set(a,s+1),J7.add(o),n9(),function(){q7.delete(e),J7.delete(o);let t=K7.get(a)??1;if(K7.set(a,t-1),n9(),t===1&&K7.delete(a),W7.includes(o)){let e=W7.indexOf(o);e>=0&&W7.splice(e,1),e9(),i(`up`,!0,null)}}}function Pue(e){let{target:t}=e,{x:n,y:r}=F7(e);G7=!0,Q7({target:t,x:n,y:r}),n9(),W7.length>0&&(r9(`down`,e),e.preventDefault(),Z7(t)||e.stopImmediatePropagation())}function Y7(e){let{x:t,y:n}=F7(e);if(G7&&e.buttons===0&&(G7=!1,r9(`up`,e)),!G7){let{target:r}=e;Q7({target:r,x:t,y:n})}r9(`move`,e),e9(),W7.length>0&&e.preventDefault()}function X7(e){let{target:t}=e,{x:n,y:r}=F7(e);q7.clear(),G7=!1,W7.length>0&&(e.preventDefault(),Z7(t)||e.stopImmediatePropagation()),r9(`up`,e),Q7({target:t,x:n,y:r}),e9(),n9()}function Z7(e){let t=e;for(;t;){if(t.hasAttribute(x7.resizeHandle))return!0;t=t.parentElement}return!1}function Q7({target:e,x:t,y:n}){W7.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),J7.forEach(e=>{let{element:i,hitAreaMargins:a}=e,o=i.getBoundingClientRect(),{bottom:s,left:c,right:l,top:u}=o,d=Mue?a.coarse:a.fine;if(t>=c-d&&t<=l+d&&n>=u-d&&n<=s+d){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&Oue(r,i)>0){let e=r,t=!1;for(;e&&!e.contains(i);){if(Due(e.getBoundingClientRect(),o,!0)){t=!0;break}e=e.parentElement}if(t)return}W7.push(e)}})}function $7(e,t){q7.set(e,t)}function e9(){let e=!1,t=!1;W7.forEach(n=>{let{direction:r}=n;r===`horizontal`?e=!0:t=!0});let n=0;q7.forEach(e=>{n|=e}),e&&t?j7(`intersection`,n):e?j7(`horizontal`,n):t?j7(`vertical`,n):Tue()}var t9=new AbortController;function n9(){t9.abort(),t9=new AbortController;let e={capture:!0,signal:t9.signal};J7.size&&(G7?(W7.length>0&&K7.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`contextmenu`,X7,e),r.addEventListener(`pointerleave`,Y7,e),r.addEventListener(`pointermove`,Y7,e))}),window.addEventListener(`pointerup`,X7,e),window.addEventListener(`pointercancel`,X7,e)):K7.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`pointerdown`,Pue,e),r.addEventListener(`pointermove`,Y7,e))}))}function r9(e,t){J7.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,W7.includes(n),t)})}function Fue(){let[e,t]=(0,c.useState)(0);return(0,c.useCallback)(()=>t(e=>e+1),[])}function i9(e,t){if(!e)throw console.error(t),Error(t)}function a9(e,t,n=S7){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function o9(e,t,n=S7){return a9(e,t,n)===0}function s9(e,t,n){return a9(e,t,n)===0}function Iue(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(!s9(i,a,n))return!1}return!0}function c9({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];i9(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,maxSize:o=100,minSize:s=0}=r;if(a9(n,s)<0){if(a){let e=(i+s)/2;n=a9(n,e)<0?i:s}else n=s}return n=Math.min(o,n),n=parseFloat(n.toFixed(S7)),n}function l9({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(s9(e,0))return t;let o=[...t],[s,c]=r;i9(s!=null,`Invalid first pivot index`),i9(c!=null,`Invalid second pivot index`);let l=0;if(a===`keyboard`){{let r=e<0?c:s,i=n[r];i9(i,`Panel constraints not found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(i9(n!=null,`Previous layout not found for panel index ${r}`),s9(n,a)){let t=l-n;a9(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?s:c,i=n[r];i9(i,`No panel constraints found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(i9(n!=null,`Previous layout not found for panel index ${r}`),s9(n,l)){let t=n-a;a9(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?c:s,a=0;for(;;){let e=t[i];i9(e!=null,`Previous layout not found for panel index ${i}`);let o=c9({panelConstraints:n,panelIndex:i,size:100})-e;if(a+=o,i+=r,i<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-o:o}{let r=e<0?s:c;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(l),a=t[r];i9(a!=null,`Previous layout not found for panel index ${r}`);let s=a-i,c=c9({panelConstraints:n,panelIndex:r,size:s});if(!s9(a,c)&&(l+=a-c,o[r]=c,l.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(Iue(i,o))return i;{let r=e<0?c:s,i=t[r];i9(i!=null,`Previous layout not found for panel index ${r}`);let a=i+l,u=c9({panelConstraints:n,panelIndex:r,size:a});if(o[r]=u,!s9(u,a)){let t=a-u,r=e<0?c:s;for(;r>=0&&r<n.length;){let i=o[r];i9(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=c9({panelConstraints:n,panelIndex:r,size:a});if(s9(i,s)||(t-=s-i,o[r]=s),s9(t,0))break;e>0?r--:r++}}}return s9(o.reduce((e,t)=>t+e,0),100)?o:i}function Lue({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return i9(s!=null,`No pivot index found`),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:c=100,minSize:l=0}=n;t===s?(r=l,i=c):(a+=l,o+=c)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function u9(e,t=document){return Array.from(t.querySelectorAll(`[${x7.resizeHandleId}][data-panel-group-id="${e}"]`))}function d9(e,t,n=document){return u9(e,n).findIndex(e=>e.getAttribute(x7.resizeHandleId)===t)??null}function f9(e,t,n){let r=d9(e,t,n);return r==null?[-1,-1]:[r,r+1]}function p9(e,t=document){return t instanceof HTMLElement&&t?.dataset?.panelGroupId==e?t:t.querySelector(`[data-
496panel-group][data-panel-group-id="${e}"]`)||null}function m9(e,t=document){return t.querySelector(`[${x7.resizeHandleId}="${e}"]`)||null}function Rue(e,t,n,r=document){let i=m9(t,r),a=u9(e,r),o=i?a.indexOf(i):-1;return[n[o]?.id??null,n[o+1]?.id??null]}function zue({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:i,panelGroupElement:a,setLayout:o}){(0,c.useRef)({didWarnAboutMissingResizeHandle:!1}),C7(()=>{if(!a)return;let e=u9(n,a);for(let t=0;t<i.length-1;t++){let{valueMax:n,valueMin:a,valueNow:o}=Lue({layout:r,panelsArray:i,pivotIndices:[t,t+1]}),s=e[t];if(s!=null){let e=i[t];i9(e,`No panel data found for index "${t}"`),s.setAttribute(`aria-controls`,e.id),s.setAttribute(`aria-valuemax`,``+Math.round(n)),s.setAttribute(`aria-valuemin`,``+Math.round(a)),s.setAttribute(`aria-valuenow`,o==null?``:``+Math.round(o))}}return()=>{e.forEach((e,t)=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-valuemax`),e.removeAttribute(`aria-valuemin`),e.removeAttribute(`aria-valuenow`)})}},[n,r,i,a]),(0,c.useEffect)(()=>{if(!a)return;let e=t.current;i9(e,`Eager values not found`);let{panelDataArray:i}=e;i9(p9(n,a)!=null,`No group found for id "${n}"`);let s=u9(n,a);i9(s,`No resize handles found for group id "${n}"`);let c=s.map(e=>{let t=e.getAttribute(x7.resizeHandleId);i9(t,`Resize handle element has no handle id attribute`);let[s,c]=Rue(n,t,i,a);if(s==null||c==null)return()=>{};let l=e=>{if(!e.defaultPrevented)switch(e.key){case`Enter`:{e.preventDefault();let c=i.findIndex(e=>e.id===s);if(c>=0){let e=i[c];i9(e,`No panel data found for index ${c}`);let s=r[c],{collapsedSize:l=0,collapsible:u,minSize:d=0}=e.constraints;if(s!=null&&u){let e=l9({delta:s9(s,l)?d-l:l-s,initialLayout:r,panelConstraints:i.map(e=>e.constraints),pivotIndices:f9(n,t,a),prevLayout:r,trigger:`keyboard`});r!==e&&o(e)}}break}}};return e.addEventListener(`keydown`,l),()=>{e.removeEventListener(`keydown`,l)}});return()=>{c.forEach(e=>e())}},[a,e,t,n,r,i,o])}function h9(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function g9(e,t){let n=e===`horizontal`,{x:r,y:i}=F7(t);return n?r:i}function Bue(e,t,n,r,i){let a=n===`horizontal`,o=m9(t,i);i9(o,`No resize handle element found for id "${t}"`);let s=o.getAttribute(x7.groupId);i9(s,`Resize handle element has no group id attribute`);let{initialCursorPosition:c}=r,l=g9(n,e),u=p9(s,i);i9(u,`No group element found for id "${s}"`);let d=u.getBoundingClientRect(),f=a?d.width:d.height;return(l-c)/f*100}function Vue(e,t,n,r,i,a){if(M7(e)){let t=n===`horizontal`,r=0;r=e.shiftKey?100:i??10;let a=0;switch(e.key){case`ArrowDown`:a=t?0:r;break;case`ArrowLeft`:a=t?-r:0;break;case`ArrowRight`:a=t?r:0;break;case`ArrowUp`:a=t?0:-r;break;case`End`:a=100;break;case`Home`:a=-100}return a}return r==null?0:Bue(e,t,n,r,a)}function Hue({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let a=0;a<e.length;a++){let e=n[a];i9(e,`Panel constraints not found for index ${a}`);let{defaultSize:o}=e;o!=null&&(r++,t[a]=o,i-=o)}for(let a=0;a<e.length;a++){let o=n[a];i9(o,`Panel constraints not found for index ${a}`);let{defaultSize:s}=o;if(s!=null)continue;let c=e.length-r,l=i/c;r++,t[a]=l,i-=l}return t}function _9(e,t,n){t.forEach((t,r)=>{let i=e[r];i9(i,`Panel data not found for index ${r}`);let{callbacks:a,constraints:o,id:s}=i,{collapsedSize:c=0,collapsible:l}=o,u=n[s];if(u==null||t!==u){n[s]=t;let{onCollapse:e,onExpand:r,onResize:i}=a;i&&i(t,u),l&&(e||r)&&(r&&(u==null||o9(u,c))&&!o9(t,c)&&r(),e&&(u==null||!o9(u,c))&&o9(t,c)&&e())}})}function v9(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Uue({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:a=3}){let o=n[i],s;return s=o==null?e==null?`1`:e.toPrecision(a):r.length===1?`1`:o.toPrecision(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function Wue(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function y9(e){try{if(typeof localStorage<`u`)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>
vendor: 8,382 bytes, line 496
496{localStorage.setItem(e,t)};else throw Error(`localStorage not supported in this environment`)}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function b9(e){return`react-resizable-panels:${e}`}function x9(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(`,`)}function S9(e,t){try{let n=b9(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if(typeof e==`object`&&e)return e}}catch{}return null}function Gue(e,t,n){return(S9(e,n)??{})[x9(t)]??null}function Kue(e,t,n,r,i){let a=b9(e),o=x9(t),s=S9(e,i)??{};s[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(e){console.error(e)}}function C9({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!s9(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];i9(t!=null,`No layout data found for index ${e}`);let i=100/r*t;n[e]=i}let i=0;for(let e=0;e<t.length;e++){let r=n[e];i9(r!=null,`No layout data found for index ${e}`);let a=c9({panelConstraints:t,panelIndex:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!s9(i,0))for(let e=0;e<t.length;e++){let r=n[e];i9(r!=null,`No layout data found for index ${e}`);let a=r+i,o=c9({panelConstraints:t,panelIndex:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,s9(i,0)))break}return n}var que=100,w9={getItem:e=>(y9(w9),w9.getItem(e)),setItem:(e,t)=>{y9(w9),w9.setItem(e,t)}},T9={};function E9({autoSaveId:e=null,children:t,className:n=``,direction:r,forwardedRef:i,id:a=null,onLayout:o=null,keyboardResizeBy:s=null,storage:l=w9,style:u,tagName:d=`div`,...f}){let p=T7(a),m=(0,c.useRef)(null),[h,g]=(0,c.useState)(null),[_,v]=(0,c.useState)([]),y=Fue(),b=(0,c.useRef)({}),x=(0,c.useRef)(new Map),S=(0,c.useRef)(0),C=(0,c.useRef)({autoSaveId:e,direction:r,dragState:h,id:p,keyboardResizeBy:s,onLayout:o,storage:l}),w=(0,c.useRef)({layout:_,panelDataArray:[],panelDataArrayChanged:!1});(0,c.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,c.useImperativeHandle)(i,()=>({getId:()=>C.current.id,getLayout:()=>{let{layout:e}=w.current;return e},setLayout:e=>{let{onLayout:t}=C.current,{layout:n,panelDataArray:r}=w.current,i=C9({layout:e,panelConstraints:r.map(e=>e.constraints)});h9(n,i)||(v(i),w.current.layout=i,t&&t(i),_9(r,i,b.current))}}),[]),C7(()=>{C.current.autoSaveId=e,C.current.direction=r,C.current.dragState=h,C.current.id=p,C.current.onLayout=o,C.current.storage=l}),zue({committedValuesRef:C,eagerValuesRef:w,groupId:p,layout:_,panelDataArray:w.current.panelDataArray,setLayout:v,panelGroupElement:m.current}),(0,c.useEffect)(()=>{let{panelDataArray:t}=w.current;if(e){if(_.length===0||_.length!==t.length)return;let n=T9[e];n??(n=Wue(Kue,que),T9[e]=n);let r=[...t],i=new Map(x.current);n(e,r,i,_,l)}},[e,_,l]),(0,c.useEffect)(()=>{});let T=(0,c.useCallback)(e=>{let{onLayout:t}=C.current,{layout:n,panelDataArray:r}=w.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:o,pivotIndices:s}=k9(r,e,n);if(i9(o!=null,`Panel size not found for panel "${e.id}"`),!o9(o,a)){x.current.set(e.id,o);let c=l9({delta:O9(r,e)===r.length-1?o-a:a-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:`imperative-api`});v9(n,c)||(v(c),w.current.layout=c,t&&t(c),_9(r,c,b.current))}}},[]),E=(0,c.useCallback)((e,t)=>{let{onLayout:n}=C.current,{layout:r,panelDataArray:i}=w.current;if(e.constraints.collapsible){let a=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=k9(i,e,r),u=t??c;if(o9(s,o)){let t=x.current.get(e.id),o=t!=null&&t>=u?t:u,c=l9({delta:O9(i,e)===i.length-1?s-o:o-s,initialLayout:r,panelConstraints:a,pivotIndices:l,prevLayout:r,trigger:`imperative-api`});v9(r,c)||(v(c),w.current.layout=c,n&&n(c),_9(i,c,b.current))}}},[]),ee=(0,c.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{panelSize:r}=k9(n,e,t);return i9(r!=null,`Panel size not found for panel "${e.id}"`),r},[]),D=(0,c.useCallback)((e,t)=>{let{panelDataArray:n}=w.current,r=O9(n,e);return Uue({defaultSize:t,dragState:h,layout:_,panelData:n,panelIndex:r})},[h,_]),te=(0,c.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=k9(n,e,t);return i9(a!=null,`Panel size not found for panel "${e.id}"`),i===!0&&o9(a,r)},[]),ne=(0,c.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=k9(n,e,t);return i9(a!=null,`Panel size not found for panel "${e.id}"`),!i||a9(a,r)>0},[]),re=(0,c.useCallback)(e=>{let{panelDataArray:t}=w.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r}),w.current.panelDataArrayChanged=!0,y()},[y]);C7(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;let{autoSaveId:e,onLayout:t,storage:n}=C.current,{layout:r,panelDataArray:i}=w.current,a=null;if(e){let t=Gue(e,i,n);t&&(x.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}a??=Hue({panelDataArray:i});let o=C9({layout:a,panelConstraints:i.map(e=>e.constraints)});h9(r,o)||(v(o),w.current.layout=o,t&&t(o),_9(i,o,b.current))}}),C7(()=>{let e=w.current;return()=>{e.layout=[]}},[]);let ie=(0,c.useCallback)(e=>{let t=!1,n=m.current;return n&&window.getComputedStyle(n,null).getPropertyValue(`direction`)===`rtl`&&(t=!0),function(n){n.preventDefault();let r=m.current;if(!r)return()=>null;let{direction:i,dragState:a,id:o,keyboardResizeBy:s,onLayout:c}=C.current,{layout:l,panelDataArray:u}=w.current,{initialLayout:d}=a??{},f=f9(o,e,r),p=Vue(n,e,i,a,s,r),h=i===`horizontal`;h&&t&&(p=-p);let g=u.map(e=>e.constraints),_=l9({delta:p,initialLayout:d??l,panelConstraints:g,pivotIndices:f,prevLayout:l,trigger:M7(n)?`keyboard`:`mouse-or-touch`}),y=!v9(l,_);(N7(n)||P7(n))&&S.current!=p&&(S.current=p,!y&&p!==0?h?$7(e,p<0?B7:V7):$7(e,p<0?H7:U7):$7(e,0)),y&&(v(_),w.current.layout=_,c&&c(_),_9(u,_,b.current))}},[]),ae=(0,c.useCallback)((e,t)=>{let{onLayout:n}=C.current,{layout:r,panelDataArray:i}=w.current,a=i.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=k9(i,e,r);i9(o!=null,`Panel size not found for panel "${e.id}"`);let c=l9({delta:O9(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:`imperative-api`});v9(r,c)||(v(c),w.current.layout=c,n&&n(c),_9(i,c,b.current))},[]),oe=(0,c.useCallback)((e,t)=>{let{layout:n,panelDataArray:r}=w.current,{collapsedSize:i=0,collapsible:a}=t,{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:l=0}=e.constraints,{panelSize:u}=k9(r,e,n);u!=null&&(a&&s&&o9(u,i)?o9(i,o)||ae(e,o):u<l?ae(e,l):u>c&&ae(e,c))},[ae]),se=(0,c.useCallback)((e,t)=>{let{direction:n}=C.current,{layout:r}=w.current;if(!m.current)return;let i=m9(e,m.current);i9(i,`Drag handle element not found for id "${e}"`);let a=g9(n,t);g({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),ce=(0,c.useCallback)(()=>{g(null)},[]),le=(0,c.useCallback)(e=>{let{panelDataArray:t}=w.current,n=O9(t,e);n>=0&&(t.splice(n,1),delete b.current[e.id],w.current.panelDataArrayChanged=!0,y())},[y]),ue=(0,c.useMemo)(()=>({collapsePanel:T,direction:r,dragState:h,expandPanel:E,getPanelSize:ee,getPanelStyle:D,groupId:p,isPanelCollapsed:te,isPanelExpanded:ne,reevaluatePanelConstraints:oe,registerPanel:re,registerResizeHandle:ie,resizePanel:ae,startDragging:se,stopDragging:ce,unregisterPanel:le,panelGroupElement:m.current}),[T,h,r,E,ee,D,p,te,ne,oe,re,ie,ae,se,ce,le]),de={display:`flex`,flexDirection:r===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`};return(0,c.createElement)(b7.Provider,{value:ue},(0,c.createElement)(d,{...f,children:t,className:n,id:a,ref:m,style:{...de,...u},[x7.group]:``,[x7.groupDirection]:r,[x7.groupId]:p}))}var D9=(0,c.forwardRef)((e,t)=>(0,c.createElement)(E9,{...e,forwardedRef:t}));E9.displayName=`PanelGroup`,D9.displayName=`forwardRef(PanelGroup)`;function O9(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function k9(e,t,n){let r=O9(e,t),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:i}}function Jue({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){(0,c.useEffect)(()=>{if(e||n==null||r==null)return;let i=m9(t,r);
496if(i==null)return;let a=e=>{if(!e.defaultPrevented)switch(e.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:e.preventDefault(),n(e);break;case`F6`:{e.preventDefault();let n=i.getAttribute(x7.groupId);i9(n,`No group element found for id "${n}"`);let a=u9(n,r),o=d9(n,t,r);i9(o!==null,`No resize element found for id "${t}"`),a[e.shiftKey?o>0?o-1:a.length-1:o+1<a.length?o+1:0].focus();break}}};return i.addEventListener(`keydown`,a),()=>{i.removeEventListener(`keydown`,a)}},[r,e,t,n])}function A9({children:e=null,className:t=``,disabled:n=!1,hitAreaMargins:r,id:i,onBlur:a,onClick:o,onDragging:s,onFocus:l,onPointerDown:u,onPointerUp:d,style:f={},tabIndex:p=0,tagName:m=`div`,...h}){let g=(0,c.useRef)(null),_=(0,c.useRef)({onClick:o,onDragging:s,onPointerDown:u,onPointerUp:d});(0,c.useEffect)(()=>{_.current.onClick=o,_.current.onDragging=s,_.current.onPointerDown=u,_.current.onPointerUp=d});let v=(0,c.useContext)(b7);if(v===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:y,groupId:b,registerResizeHandle:x,startDragging:S,stopDragging:C,panelGroupElement:w}=v,T=T7(i),[E,ee]=(0,c.useState)(`inactive`),[D,te]=(0,c.useState)(!1),[ne,re]=(0,c.useState)(null),ie=(0,c.useRef)({state:E});C7(()=>{ie.current.state=E}),(0,c.useEffect)(()=>{if(n)re(null);else{let e=x(T);re(()=>e)}},[n,T,x]);let ae=r?.coarse??15,oe=r?.fine??5;(0,c.useEffect)(()=>{if(n||ne==null)return;let e=g.current;i9(e,`Element ref not attached`);let t=!1;return Nue(T,e,y,{coarse:ae,fine:oe},(e,n,r)=>{if(!n){ee(`inactive`);return}switch(e){case`down`:{ee(`drag`),t=!1,i9(r,`Expected event to be defined for "down" action`),S(T,r);let{onDragging:e,onPointerDown:n}=_.current;e?.(!0),n?.();break}case`move`:{let{state:e}=ie.current;t=!0,e!==`drag`&&ee(`hover`),i9(r,`Expected event to be defined for "move" action`),ne(r);break}case`up`:{ee(`hover`),C();let{onClick:e,onDragging:n,onPointerUp:r}=_.current;n?.(!1),r?.(),t||e?.();break}}})},[ae,y,n,oe,x,T,ne,S,C]),Jue({disabled:n,handleId:T,resizeHandler:ne,panelGroupElement:w});let se={touchAction:`none`,userSelect:`none`};return(0,c.createElement)(m,{...h,children:e,className:t,id:i,onBlur:()=>{te(!1),a?.()},onFocus:()=>{te(!0),l?.()},ref:g,role:`separator`,style:{...se,...f},tabIndex:p,[x7.groupDirection]:y,[x7.groupId]:b,[x7.resizeHandle]:``,[x7.resizeHandleActive]:E===`drag`?`pointer`:D?`keyboard`:void 0,[x7.resizeHandleEnabled]:!n,[x7.resizeHandleId]:T,[x7.resizeHandleState]:E})}A9.displayName=`PanelResizeHandle`;var Yue=({className:e,...t})=>(0,O.jsx)(D9,{className:j(`flex h-full w-full data-[panel-group-direction=vertical]:flex-col`,e),...t}),j9=D7,M9=({withHandle:e,className:t,...n})=>(0,O.jsx)(A9,{className:j(`relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90`,t),...n,children:e&&(0,O.jsx)(`div`,{className:`z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border`,children:(0,O.jsx)(ao,{className:`h-2.5 w-2.5`})})});function Xue({activeTab:e,onTabChange:t}){return(0,O.jsx)(`div`,{className:`flex items-center justify-center border-b border-border bg-background`,children:[{id:`sources`,label:`Sources`},{id:`chat`,label:`Chat`},{id:`studio`,label:`Studio`}].map(n=>(0,O.jsxs)(`button`,{onClick:()=>t(n.id),className:j(`relative px-6 py-3 text-sm font-medium transition-colors`,`hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e===n.id?`text-foreground`:`text-muted-foreground`),children:[n.label,e===n.id&&(0,O.jsx)(`span`,{className:`absolute bottom-0 left-0 right-0 h-0.5 bg-primary`})]},n.id))})}function Zue(){let{id:e}=le(),[t,n]=(0,c.useState)(`chat`),{data:r,isLoading:i}=P1(e),a=r?.notebook;return i?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`flex flex-col h-full md:hidden`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-center border-b border-border py-3 gap-8`,children:[(0,O.jsx)(_h,{className:`w-16 h-4`}),(0,O.jsx)(_h,{className:`w-12 h-4`}),(0,O.jsx)(_h,{className:`w-14 h-4`})]}
496),(0,O.jsx)(_h,{className:`flex-1 m-2 rounded-2xl`})]}),(0,O.jsxs)(`div`,{className:`hidden md:flex gap-4 h-full p-4`,children:[(0,O.jsx)(_h,{className:`w-[25%] h-full rounded-3xl`}),(0,O.jsx)(_h,{className:`w-[50%] h-full rounded-3xl`}),(0,O.jsx)(_h,{className:`w-[25%] h-full rounded-3xl`})]})]}):!a||!e?(0,O.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:`Notebook not found`})}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`flex flex-col h-[calc(100vh-56px)] md:hidden`,children:[(0,O.jsx)(Xue,{activeTab:t,onTabChange:n}),(0,O.jsxs)(`div`,{className:`flex-1 overflow-hidden bg-background`,children:[t===`sources`&&(0,O.jsx)(`div`,{className:`h-full`,children:(0,O.jsx)(v7,{notebookId:e})}),t===`chat`&&(0,O.jsx)(`div`,{className:`h-full`,children:(0,O.jsx)(V5,{notebook:a})}),t===`studio`&&(0,O.jsx)(`div`,{className:`h-full`,children:(0,O.jsx)(_7,{notebookId:e,workspaceId:a.workspaceId})})]})]}),(0,O.jsxs)(Yue,{direction:`horizontal`,className:`hidden md:flex max-h-[calc(100vh-56px)]`,children:[(0,O.jsx)(j9,{defaultSize:25,minSize:15,maxSize:35,className:`bg-background m-2 lg:m-4 mr-1 lg:mr-2 rounded-3xl border border-border`,children:(0,O.jsx)(v7,{notebookId:e})}),(0,O.jsx)(M9,{withHandle:!0,className:`bg-transparent`}),(0,O.jsx)(j9,{defaultSize:50,minSize:35,className:`bg-background my-2 lg:my-4 mx-1 lg:mx-2 rounded-3xl border border-border`,children:(0,O.jsx)(V5,{notebook:a})}),(0,O.jsx)(M9,{withHandle:!0,className:`bg-transparent`}),(0,O.jsx)(j9,{defaultSize:25,minSize:15,maxSize:35,className:`bg-background m-2 lg:m-4 ml-1 lg:ml-2 rounded-3xl border border-border`,children:(0,O.jsx)(_7,{notebookId:e,workspaceId:a.workspaceId})})]})]})}function Que(){let[,e]=de(),{activeWorkspaceId:t,loading:n}=Tf(),{mutateAsync:r}=N1(t),i=(0,c.useRef)(!1);return(0,c.useEffect)(()=>{n||!t||i.current||(i.current=!0,(async()=>{try{let{notebook:t}=await r({title:`Untitled Notebook`,description:``});e(`/notebooks/${t.id}`,{replace:!0})}catch(t){console.error(`Failed to create notebook:`,t),e(`/notebooks`,{replace:!0})}})())},[t,n,r,e]),(0,O.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,O.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,O.jsx)(vo,{className:`w-8 h-8 animate-spin text-primary`}),(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:`Creating notebook...`})]})})}var $ue=[{id:`maslow-core`,name:`Maslow Core`,description:`Industry insights powered by Maslow 1.0 data`,icon:Ha},{id:`participation-rate`,name:`Participation Rate`,description:`% of employees who gave or received recognition in a period`,icon:Ta},{id:`recognition-frequency`,name:`Recognition Frequency`,description:`Avg recognitions per user per month (12m)`,icon:za},{id:`manager-peer-ratio`,name:`Manager vs Peer Ratio`,description:`Ratio of manager vs peer recognitions`,icon:us},{id:`core-value-alignment`,name:`Core Value Alignment`,description:`Distribution by program type / values alignment`,icon:Ea},{id:`retention-correlation`,name:`Retention Correlation`,description:`Correlation of recognition activity with retention`,icon:is},{id:`non-participants`,name:`Non-Participants`,description:`Active users with zero gives/receives in a period`,icon:cs},{id:`users-with-points`,name:`Users with Points`,description:`Users with aggregated points and recognition counts`,icon:_a},{id:`recognitions-with-cogs`,name:`Recognitions with COGs`,description:`Recognition data with cost of goods sold`,icon:eo}],ede=[{id:`audio`,name:`Audio Overview`,icon:Eo},{id:`slides`,name:`Slides Overview`,icon:Do},{id:`visual`,name:`Visual`,icon:to},{id:`reports`,name:`Reports`,icon:to}];function tde(){let[e,t]=(0,c.useState)(``);return(0,O.jsxs)(`div`,{className:`flex h-full`,"data-testid":`workspace-container`,children:[(0,O.jsxs)(`div`,{className:`flex-1 flex`,children:[(0,O.jsxs)(`div`,{className:`w-80 border-r flex flex-col`,"data-testid":`sources-panel`,children:[(0,O.jsx)(`div`,{className:`p-4 border-b`,children:(0,O.jsx)(`h2`,{className:`font-semibold`,"data-testid":`text-sources-title`,children:`Connected S
496ources`})}),(0,O.jsx)(A1,{className:`flex-1`,children:(0,O.jsx)(`div`,{className:`p-2`,children:$ue.map(e=>(0,O.jsxs)(`div`,{className:`flex items-start gap-3 p-3 rounded-md hover-elevate cursor-pointer`,"data-testid":`source-item-${e.id}`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md shrink-0`,children:(0,O.jsx)(e.icon,{className:`w-4 h-4`})}),(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:e.name}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-2`,children:e.description})]})]},e.id))})})]}),(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col`,"data-testid":`chat-panel`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-b`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(Uo,{className:`w-4 h-4 text-muted-foreground`}),(0,O.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Notifications`})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Client:`}),(0,O.jsxs)(nZ,{defaultValue:`all`,children:[(0,O.jsx)(iZ,{className:`w-24 h-8`,"data-testid":`select-tenant`,children:(0,O.jsx)(rZ,{placeholder:`Select`})}),(0,O.jsxs)(sZ,{children:[(0,O.jsx)(lZ,{value:`all`,children:`All`}),(0,O.jsx)(lZ,{value:`acme`,children:`Acme Corp`}),(0,O.jsx)(lZ,{value:`globex`,children:`Globex`})]})]})]})]}),(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-8`,children:[(0,O.jsx)(`div`,{className:`w-20 h-20 mb-6 flex items-center justify-center`,children:(0,O.jsxs)(`svg`,{viewBox:`0 0 80 80`,className:`w-full h-full`,children:[(0,O.jsx)(`polygon`,{points:`40,10 70,60 10,60`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,className:`text-muted-foreground/30`}),(0,O.jsx)(`polygon`,{points:`40,20 60,55 20,55`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,className:`text-muted-foreground/30`}),(0,O.jsx)(`polygon`,{points:`40,30 50,50 30,50`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,className:`text-muted-foreground/30`})]})}),(0,O.jsx)(`h1`,{className:`text-2xl font-semibold mb-2`,"data-testid":`text-welcome-title`,children:`Welcome to Maslow AI Advisor`}),(0,O.jsx)(`p`,{className:`text-muted-foreground text-center max-w-md`,children:`I'm here to help you uncover insights in your recognition data, create AI-driven reports, and elevate your program.`})]}),(0,O.jsxs)(`div`,{className:`p-4 border-t`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,O.jsx)(Uo,{className:`w-4 h-4 text-muted-foreground`}),(0,O.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Notifications`}),(0,O.jsx)(`div`,{className:`ml-auto`,children:(0,O.jsx)(Uo,{className:`w-4 h-4 text-muted-foreground`})})]}),(0,O.jsxs)(`div`,{className:`relative`,children:[(0,O.jsx)(Xf,{placeholder:`Ask a question about your recognition program...`,value:e,onChange:e=>t(e.target.value),className:`pr-20`,"data-testid":`input-chat`}),(0,O.jsx)(M,{size:`sm`,className:`absolute right-1 top-1/2 -translate-y-1/2`,"data-testid":`button-send`,children:`Send`})]})]})]})]}),(0,O.jsxs)(`div`,{className:`w-72 border-l flex flex-col`,"data-testid":`studio-panel`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-b`,children:[(0,O.jsx)(`h2`,{className:`font-semibold`,"data-testid":`text-studio-title`,children:`Studio`}),(0,O.jsxs)(M,{variant:`ghost`,size:`sm`,className:`gap-1 text-xs`,"data-testid":`button-add-note`,children:[(0,O.jsx)(Io,{className:`w-3 h-3`}),`Note`]})]}),(0,O.jsx)(`div`,{className:`p-4`,children:(0,O.jsx)(`div`,{className:`grid grid-cols-2 gap-3`,children:ede.map(e=>(0,O.jsxs)(`div`,{className:`flex flex-col items-center gap-2 p-3 rounded-md border hover-elevate cursor-pointer`,"data-testid":`studio-type-${e.id}`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,O.jsx)(e.icon,{className:`w-4 h-4`}),(0,O.jsx)(No,{className:`w-3 h-3 text-muted-foreground`})]}),(0,O.jsx)(`span`,{className:`text-xs text-center`,children:e.name})]},e.id))})}),(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-6 mx-4 mb-4 border border-dashed rounded-md`,children:[(0,O.jsx)(`div`,{className:`w-10 h-10 rounded-full bg-muted flex items-center justify-center mb-4`,children:(0,O.jsx)(Io,{
496className:`w-5 h-5 text-muted-foreground`})}),(0,O.jsx)(`p`,{className:`font-medium text-sm text-center mb-1`,children:`Studio output will be saved here`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground text-center`,children:`After adding sources, click to add Audio Overview, Study Guide, Mind Map, and more!`})]})]})]})}var nde=oa(`relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground`,{variants:{variant:{default:`bg-background text-foreground`,destructive:`border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive`}},defaultVariants:{variant:`default`}}),N9=c.forwardRef(({className:e,variant:t,...n},r)=>(0,O.jsx)(`div`,{ref:r,role:`alert`,className:j(nde({variant:t}),e),...n}));N9.displayName=`Alert`;var rde=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`h5`,{ref:n,className:j(`mb-1 font-medium leading-none tracking-tight`,e),...t}));rde.displayName=`AlertTitle`;var P9=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{ref:n,className:j(`text-sm [&_p]:leading-relaxed`,e),...t}));P9.displayName=`AlertDescription`;async function ide(){let e=await fetch(`/api/connections/tables`,{credentials:`include`});if(!e.ok)throw Error(`Failed to fetch table info: ${e.statusText}`);return await e.json()}function ade(){return Jt({queryKey:[`connections-table-info`],queryFn:ide})}function ode(e){return e.split(/[_-]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function sde(){let{data:e,isLoading:t,error:n}=ade();return(0,O.jsx)(`div`,{className:`min-h-screen p-6 md:p-8`,children:(0,O.jsxs)(`div`,{className:`mx-auto container px-6 space-y-8`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,"data-testid":`text-page-title`,children:`Connections`}),(0,O.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Data sources that power your insights`})]}),(0,O.jsx)(Bf,{className:`border-border/60`,children:(0,O.jsxs)(Wf,{className:`pt-6`,children:[(0,O.jsxs)(`p`,{className:`font-medium text-foreground`,children:[`Live data sources`,` `,(0,O.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:`â your connected systems`})]}),(0,O.jsxs)(`ul`,{className:`mt-3 space-y-1.5 pl-4 text-sm text-muted-foreground [list-style:disc]`,children:[(0,O.jsx)(`li`,{children:`Used to calculate metrics, trends, and comparisons.`}),(0,O.jsx)(`li`,{children:`Powers numbers like counts, participation, and year-over-year changes.`}),(0,O.jsx)(`li`,{children:`If a data field is not in a connection, Maslow cannot reliably use it.`})]})]})}),(0,O.jsxs)(Bf,{children:[(0,O.jsxs)(Vf,{children:[(0,O.jsxs)(Hf,{className:`flex items-center gap-2 text-base`,children:[(0,O.jsx)(es,{className:`h-4 w-4`}),`Available tables`]}),(0,O.jsxs)(Uf,{children:[`Up to `,6,` tables from your connected data source`]})]}),(0,O.jsxs)(Wf,{className:`space-y-4`,children:[t&&(0,O.jsx)(`div`,{className:`space-y-3`,children:[...[,,,,,,]].map((e,t)=>(0,O.jsx)(_h,{className:`h-20 w-full rounded-lg`},t))}),n&&(0,O.jsxs)(N9,{variant:`destructive`,children:[(0,O.jsx)(Pa,{className:`h-4 w-4`}),(0,O.jsx)(P9,{children:`Failed to load table information.`})]}),!t&&!n&&(e||[]).length===0&&(0,O.jsx)(`p`,{className:`py-8 text-center text-sm text-muted-foreground`,children:`No tables available.`}),!t&&!n&&(e||[]).map(e=>(0,O.jsxs)(`div`,{"data-testid":`row-table-${e.tableName}`,className:`flex flex-col gap-3 rounded-lg border border-border/60 bg-muted/30 p-4 transition-colors hover:bg-muted/50`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,O.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-primary/10`,children:(0,O.jsx)(Ha,{className:`h-4 w-4 text-primary`})}),(0,O.jsx)(`div`,{className:`min-w-0`,children:(0,O.jsx)(`p`,{className:`font-medium leading-tight`,children:ode(e.tableName)})})]}),(0,O.jsxs)(`div`,{className:`flex shrink-0 gap-2`,children:[(0,O.jsxs)(qf,{variant:`secondary`,className:`font-normal`,children:[e.rowCount.toLocaleStr
496ing(),` rows`]}),(0,O.jsxs)(qf,{variant:`secondary`,className:`font-normal`,children:[e.columnCount,` cols`]})]})]}),(0,O.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[e.columns.slice(0,6).map(e=>(0,O.jsx)(qf,{variant:`outline`,className:`text-xs font-normal`,children:e},e)),e.columns.length>6&&(0,O.jsxs)(qf,{variant:`outline`,className:`text-xs font-normal`,children:[`+`,e.columns.length-6]})]})]},e.tableName))]})]})]})})}var cde={newTerm:``,newDefinition:``,editTerm:null,editTermValue:``,editDefinitionValue:``,isAddOpen:!1,isEditOpen:!1},lde=U4(e=>({...cde,setNewTerm:t=>e({newTerm:t}),setNewDefinition:t=>e({newDefinition:t}),setEditTermValue:t=>e({editTermValue:t}),setEditDefinitionValue:t=>e({editDefinitionValue:t}),setIsAddOpen:t=>e({isAddOpen:t}),setIsEditOpen:t=>e({isEditOpen:t}),startEdit:t=>e({editTerm:t,editTermValue:t.term,editDefinitionValue:t.definition,isEditOpen:!0}),clearEdit:()=>e({editTerm:null,editTermValue:``,editDefinitionValue:``,isEditOpen:!1}),resetAddForm:()=>e({newTerm:``,newDefinition:``})})),F9=`/api/vocabulary`,I9=[F9];async function ude(){return yf(`GET`,F9)}async function dde(e){return yf(`POST`,F9,{data:e})}async function fde(e){let{id:t,term:n,definition:r}=e;return yf(`PUT`,`${F9}/${t}`,{data:{term:n,definition:r}})}async function pde(e){let{id:t}=e;return yf(`DELETE`,`${F9}/${t}`)}function mde(){return Jt({queryKey:I9,queryFn:ude})}function hde(){let e=Nt();return Yt({mutationFn:dde,onSuccess:()=>{e.invalidateQueries({queryKey:I9})}})}function gde(){let e=Nt();return Yt({mutationFn:fde,onSuccess:()=>{e.invalidateQueries({queryKey:I9})}})}function _de(){let e=Nt();return Yt({mutationFn:pde,onSuccess:()=>{e.invalidateQueries({queryKey:I9})}})}function vde(){let{newTerm:e,newDefinition:t,editTerm:n,editTermValue:r,editDefinitionValue:i,isAddOpen:a,isEditOpen:o,setNewTerm:s,setNewDefinition:c,setEditTermValue:l,setEditDefinitionValue:u,setIsAddOpen:d,setIsEditOpen:f,startEdit:p,clearEdit:m,resetAddForm:h}=lde(),{toast:g}=ln(),{data:_,isLoading:v,isError:y}=mde(),b=_??[],x=hde(),S=gde(),C=_de(),w=x.isPending||S.isPending||C.isPending,T=async()=>{let n=e.trim(),r=t.trim();if(n&&r)try{await x.mutateAsync({term:n,definition:r}),g({title:`Vocabulary added`,description:`"${n}" is now available to the assistant.`}),h(),d(!1)}catch{g({title:`Add failed`,description:`We couldn't add that term. Please try again.`,variant:`destructive`})}},E=e=>{p(e)},ee=async()=>{if(!n)return;let e=r.trim(),t=i.trim();if(e&&t)try{await S.mutateAsync({id:n.id,term:e,definition:t}),g({title:`Vocabulary updated`,description:`Your changes have been saved.`}),m()}catch{g({title:`Update failed`,description:`We couldn't save your changes. Please try again.`,variant:`destructive`})}},D=async e=>{try{await C.mutateAsync({id:e}),g({title:`Vocabulary deleted`,description:`The term has been removed.`})}catch{g({title:`Delete failed`,description:`We couldn't remove that term. Please try again.`,variant:`destructive`})}};return(0,O.jsxs)(Bf,{className:`mt-8 overflow-hidden border border-border/70 bg-gradient-to-br from-muted/40 via-background to-muted/10`,children:[(0,O.jsxs)(Vf,{className:`pb-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base tracking-wide`,children:`Vocabulary`}),(0,O.jsx)(Uf,{className:`mt-1`,children:`Define global vocabulary terms to help Maslow interpret queries consistently.`})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(qf,{variant:`outline`,className:`border-border/60 bg-background/60 text-foreground/80`,children:`Global`}),(0,O.jsxs)(qf,{variant:`secondary`,className:`bg-muted/70`,children:[b.length,` `,b.length===1?`term`:`terms`]})]})]}),(0,O.jsx)(`div`,{className:`mt-3 text-xs text-muted-foreground`,children:`Tip: use short, consistent terms for better matching.`})]}),(0,O.jsx)(Wf,{className:`pt-0`,children:(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,O.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`Manage terms used to expand queries in the assistant.`}),(0,O.jsx)(M,{onClick:()=>d(!0),disabled:w,children:`Add vocabulary`})]}),(0,O.jsx)(`div`,{className:`overflow-hidden rounded-xl border border-border/60 bg-background/80`,children:v?(0,O.jsxs)(`div`,{className:`p-6 text-center`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:`Loading terms...`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:`Fetching the latest vocabulary.`})]}):y?(0,O.jsxs)(`div`,{className:`p-6 text-center`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:`Unable to load vocabulary`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:`Please refresh and try again.`})]}):b.length===0?(0,O.jsxs)(`div`,{className:`p-6 text-center`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:`No terms yet`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:`Use âAdd vocabularyâ to make a term available to the AI.`})]}):(0,O.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,O.jsx)(`thead`,{className:`bg-muted/40 text-xs uppercase tracking-wide text-muted-foreground`,children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{className:`text-left font-medium px-4 py-3 w-[240px]`,children:`Term`}),(0,O.jsx)(`th`,{className:`text-left font-medium px-4 py-3`,children:`Definition`}),(0,O.jsx)(`th`,{className:`text-right font-medium px-4 py-3 w-[120px]`,children:`Action`})]})}),(0,O.jsx)(`tbody`,{children:b.map(e=>(0,O.jsxs)(`tr`,{className:`border-t border-border/60`,children:[(0,O.jsx)(`td`,{className:`px-4 py-3 align-top`,children:(0,O.jsx)(`div`,{className:`font-medium text-foreground
496/90`,children:e.term})}),(0,O.jsx)(`td`,{className:`px-4 py-3 align-top`,children:(0,O.jsx)(`div`,{className:`text-muted-foreground`,children:e.definition})}),(0,O.jsx)(`td`,{className:`px-4 py-3 text-right align-top`,children:(0,O.jsxs)(wY,{children:[(0,O.jsx)(TY,{asChild:!0,children:(0,O.jsx)(M,{variant:`ghost`,size:`icon`,disabled:w,"aria-label":`Row actions`,children:(0,O.jsx)(Ga,{className:`h-4 w-4`})})}),(0,O.jsxs)(kY,{align:`end`,children:[(0,O.jsx)(AY,{onClick:()=>E(e),children:`Edit`}),(0,O.jsx)(AY,{onClick:()=>D(e.id),className:`text-destructive`,children:`Delete`})]})]})})]},e.id))})]})})]})}),(0,O.jsx)(wK,{open:a,onOpenChange:d,children:(0,O.jsxs)(OK,{className:`sm:max-w-[520px]`,children:[(0,O.jsxs)(kK,{children:[(0,O.jsx)(jK,{children:`Add vocabulary`}),(0,O.jsx)(MK,{children:`Add a term and definition that the assistant will expand in queries.`})]}),(0,O.jsxs)(`div`,{className:`grid gap-4 py-2`,children:[(0,O.jsxs)(`div`,{className:`grid gap-2`,children:[(0,O.jsx)(n7,{htmlFor:`vocab-term`,children:`Term`}),(0,O.jsx)(Xf,{id:`vocab-term`,value:e,onChange:e=>s(e.target.value),placeholder:`RIF`,disabled:w})]}),(0,O.jsxs)(`div`,{className:`grid gap-2`,children:[(0,O.jsx)(n7,{htmlFor:`vocab-definition`,children:`Definition`}),(0,O.jsx)(Xf,{id:`vocab-definition`,value:t,onChange:e=>c(e.target.value),placeholder:`Reduction in Force`,disabled:w})]})]}),(0,O.jsxs)(AK,{children:[(0,O.jsx)(M,{variant:`outline`,onClick:()=>d(!1),disabled:w,children:`Cancel`}),(0,O.jsx)(M,{onClick:T,disabled:w||!e.trim()||!t.trim(),children:`Add vocabulary`})]})]})}),(0,O.jsx)(wK,{open:o,onOpenChange:f,children:(0,O.jsxs)(OK,{className:`sm:max-w-[520px]`,children:[(0,O.jsxs)(kK,{children:[(0,O.jsx)(jK,{children:`Edit vocabulary`}),(0,O.jsx)(MK,{children:`Update the selected term and definition.`})]}),(0,O.jsxs)(`div`,{className:`grid gap-4 py-2`,children:[(0,O.jsxs)(`div`,{className:`grid gap-2`,children:[(0,O.jsx)(n7,{htmlFor:`edit-term`,children:`Term`}),(0,O.jsx)(Xf,{id:`edit-term`,value:r,onChange:e=>l(e.target.value),disabled:w})]}),(0,O.jsxs)(`div`,{className:`grid gap-2`,children:[(0,O.jsx)(n7,{htmlFor:`edit-definition`,children:`Definition`}),(0,O.jsx)(Xf,{id:`edit-definition`,value:i,onChange:e=>u(e.target.value),disabled:w})]})]}),(0,O.jsxs)(AK,{children:[(0,O.jsx)(M,{variant:`outline`,onClick:()=>f(!1),disabled:w,children:`Cancel`}),(0,O.jsx)(M,{onClick:ee,disabled:w||!r.trim()||!i.trim(),children:`Save changes`})]})]})})]})}function yde(){let{user:e}=Zd(),t=If(e?.roles,Af);return(0,O.jsxs)(`div`,{className:`p-6`,children:[(0,O.jsxs)(`div`,{className:`mb-8`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold`,"data-testid":`text-page-title`,children:`Settings`}),(0,O.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Manage your account and application preferences`})]}),(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsxs)(Bf,{"data-testid":`card-notifications`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(ya,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Notifications`}),(0,O.jsx)(Uf,{children:`Configure how you receive updates`})]})]})}),(0,O.jsxs)(Wf,{className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:`Email notifications`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Receive updates via email`})]}),(0,O.jsx)(D5,{"data-testid":`switch-email-notifications`})]}),(0,O.jsx)(ip,{}),(0,O.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:`Weekly digest`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Get a summary of insights each week`})]}),(0,O.jsx)(D5,{defaultChecked:!0,"data-testid":`switch-weekly-digest`})]})]})]}),(0,O.jsxs)(Bf,{"data-testid":`card-appearance`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(ko,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Appearance`}),(0,O.jsx)(Uf,{children:`Customize the look and feel`})]})]})}),(0,O.jsx)(Wf,{className:`space-y-4`,children:(0,O.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:`Dark mode`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Use dark theme across the app`})]}),(0,O.jsx)(D5,{"data-testid":`switch-dark-mode`})]})})]}),(0,O.jsxs)(Bf,{"data-testid":`card-api`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(fo,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`API Keys`}),(0,O.jsx)(Uf,{children:`Manage your API credentials`})]})]})}),(0,O.jsx)(Wf,{children:(0,O.jsx)(M,{variant:`outline`,"data-testid":`button-manage-keys`,children:`Manage API Keys`})})]}),t&&(0,O.jsx)(vde,{})]})]})}function bde(){let{login:e,loginWithPassword:t,isAuthenticated:n}=Zd(),[,r]=de(),[i,a]=(0,c.useState)(``),[o,s]=(0,c.useState)(``),[l,u]=(0,c.useState)(!1),[d,f]=(0,c.useState)(``),[p,m]=(0,c.useState)(!1);return(0,c.useEffect)(()=>
496{if(n){let e=sessionStorage.getItem(`redirectAfterLogin`);e?(sessionStorage.removeItem(`redirectAfterLogin`),r(e)):r(`/dashboard`)}},[n,r]),(0,c.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get(`error`);e.get(`session_expired`)===`true`||t===`session_expired`?f(`Your session has expired. Please log in again.`):t===`auth_failed`&&f(`Authentication failed. Please try again.`)},[]),(0,O.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background p-6`,children:(0,O.jsxs)(`div`,{className:`w-full max-w-md`,children:[(0,O.jsxs)(Bf,{className:`w-full max-w-md`,children:[(0,O.jsxs)(Vf,{className:`text-center`,children:[(0,O.jsx)(`div`,{className:`flex justify-center mb-3`,children:(0,O.jsx)(`img`,{src:`/maslow.svg`,alt:`Maslow Insights`,width:48,height:48})}),(0,O.jsxs)(Hf,{className:`text-2xl`,children:[`Maslow Insights`,(0,O.jsx)(`sup`,{className:`text-xs font-normal`,children:`â¢`})]}),(0,O.jsx)(Uf,{children:`Sign in to access your personalized insights`})]}),(0,O.jsxs)(Wf,{className:`space-y-6`,children:[(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsx)(`div`,{className:`flex items-center justify-center gap-2`,children:(0,O.jsx)(qf,{variant:`outline`,className:`text-xs`,children:`Recommended`})}),(0,O.jsxs)(M,{onClick:()=>e(),className:`w-full gap-2`,size:`lg`,disabled:p,children:[(0,O.jsx)(bo,{className:`w-4 h-4`}),`Login with SSO`]}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground text-center`,children:`Single sign-on via RewardStation IdentityServer`})]}),(0,O.jsxs)(`div`,{className:`relative`,children:[(0,O.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,O.jsx)(`span`,{className:`w-full border-t`})}),(0,O.jsx)(`div`,{className:`relative flex justify-center text-xs uppercase`,children:(0,O.jsx)(`span`,{className:`bg-background px-2 text-muted-foreground`,children:`Or continue with`})})]}),(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`text-center`,children:[(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:`RewardStation Account`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Sign in with your username and password`})]}),d&&(0,O.jsxs)(N9,{variant:`destructive`,children:[(0,O.jsx)(Pa,{className:`h-4 w-4`}),(0,O.jsx)(P9,{children:d})]}),(0,O.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),f(``),m(!0);try{let e=await t(i,o);if(e.success){let e=sessionStorage.getItem(`redirectAfterLogin`);e?(sessionStorage.removeItem(`redirectAfterLogin`),r(e)):r(`/dashboard`)}else f(e.error||`Authentication failed`)}catch{f(`An unexpected error occurred`)}finally{m(!1)}},className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{htmlFor:`username`,children:`Username`}),(0,O.jsx)(Xf,{id:`username`,type:`text`,placeholder:`Enter your username`,value:i,onChange:e=>a(e.target.value),required:!0,disabled:p})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{htmlFor:`password`,children:`Password`}),(0,O.jsxs)(`div`,{className:`relative`,children:[(0,O.jsx)(Xf,{id:`password`,type:l?`text`:`password`,placeholder:`Enter your password`,value:o,onChange:e=>s(e.target.value),required:!0,disabled:p,className:`pr-10`}),(0,O.jsx)(`button`,{type:`button`,className:`absolute right-0 top-1/2 -translate-y-1/2 px-3 text-muted-foreground hover:text-foreground`,onClick:()=>u(!l),disabled:p,children:l?(0,O.jsx)(qa,{className:`h-4 w-4`}):(0,O.jsx)(Ja,{className:`h-4 w-4`})})]})]}),(0,O.jsx)(M,{type:`submit`,className:`w-full`,size:`lg`,disabled:p,children:p?`Signing in...`:`Login with RewardStation Account`})]})]})]})]}),(0,O.jsxs)(`p`,{className:`mt-4 text-center text-sm text-muted-foreground`,children:[`Don't have an account?`,` `,(0,O.jsx)(`a`,{href:`https://meetings.hubspot.com/bforrestal/maslow-insights-intro-virtual-demo`,target:`_blank`,rel:`noopener noreferrer`,className:`underline underline-offset-4 hover:text-foreground`,children:`Book a demo`})]})]})})}function xde(){return(0,O.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,O.jsxs)(`div`,{className:`text-center`,children:[(0,O.jsx)(`div`,{className:`inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] mb-4`}),(0,O.jsx)(`p`,{className:`text-lg font-medium`,children:`Completing login...`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground mt-2`,children:`You'll be redirected automatically`})]})})}function L9(){return(0,O.jsx)(`div`,{className:`min-h-screen w-full flex items-center justify-center bg-gray-50`,children:(0,O.jsx)(Bf,{className:`w-full max-w-md mx-4`,children:(0,O.jsxs)(Wf,{className:`pt-6`,children:[(0,O.jsxs)(`div`,{className:`flex mb-4 gap-2`,children:[(0,O.jsx)(Pa,{className:`h-8 w-8 text-red-500`}),(0,O.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900`,children:`404 Page Not Found`})]}),(0,O.jsx)(`p`,{className:`mt-4 text-sm text-gray-600`,children:`Did you forget to add the page to the router?`})]})})})}var Sde=`100130`;function Cde(){let[e,t]=(0,c.useState)(!1),{availableTenants:n,selectedTenants:r,loading:i,toggleTenantSelection:a,selectAllTenants:o,resetToDefaultTenant:s,isXcelAdmin:l}=oee();return l?(0,O.jsxs)(R5,{open:e,onOpenChange:t,children:[(0,O.jsx)(z5,{asChild:!0,children:(0,O.jsxs)(M,{variant:`outline`,role:`combobox`,"aria-expanded":e,"aria-label":`Select clients`,className:`w-full justify-between`,disabled:i,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 truncate`,children:[(0,O.jsx)(qo,{className:`w-4 h-4 shrink-0 text-amber-500`}),(0,O.jsx)(`span`,{className:`truncate`,children:r.length===0?`Select clients...`:`${r.length} client${r.length>1?`s`:``} selected`})]}),(0,O.jsx)(Na,{className:`ml-auto h-4 w-4 shrink-0 opacity-50`})]})}),(0,O.jsx)(B5,{className:`w-[350px] p-0`,children:(0,O.jsxs)(NK,{children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-2 border-b`,children:[(0,O.jsxs)(M,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs`,onClick:()=>void s(),"aria-label":`Reset to default client`,children:[(0,O.jsx)(zo,{className:`w-3 h-3 mr-1`}),`Reset`]}),(0,O.jsxs)(M,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs`,onClick:()=>void o(),disabled:r.length===n.length,"aria-label":`Select all clients`,children:[(0,O.jsx)(_o,{className:`w-3 h-3 mr-1`}),`Select all`]})]}),(0,O.jsx)(PK,{placeholder:`Search clients...`}),(0,O.jsxs)(FK,{children:[(0,O.jsx)(IK,{children:`No client found.`}),r.length>0&&(0,O.jsx)(LK,{heading:`Selected Clients`,children:(0,O.jsx)(`div`,{className:`px-2 py-2 flex flex-wrap gap-1`,children:r.map(e=>{let t=r.length===1;return(0,O.jsxs)(qf,{variant:`secondary`,className:j(`px-2 py-1 transition-colors`,t?`opacity-60 cursor-not-allowed`:`cursor-pointer hover:bg-destructive hover:text-destructive-foreground`),onClick:n=>{n.stopPropagation(),t||a(e)},title:t?`At least one client must remain selected`:`Remove from selection`,children:[(0,O.jsx)(`span`,{className:`font-medium truncate max-w-[120px]`,children:e.name}),!t&&(0,O.jsx)(ds,{className:`ml-1 h-3 w-3`})]},e.tenantId)})})}),(0,O.jsx)(LK,{heading:`All clients`,children:n.map(e=>{let t=r.some(t=>t.tenantId===e.tenantId);return(0,O.jsxs)(zK,{onSelect:()=>{a(e)}
496,className:`cursor-pointer`,children:[(0,O.jsx)(Oa,{className:j(`mr-2 h-4 w-4`,t?`opacity-100`:`opacity-0`)}),(0,O.jsxs)(`div`,{className:`flex flex-col flex-1 min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5 min-w-0`,children:[(0,O.jsx)(`span`,{className:`font-medium truncate`,children:e.name}),e.tenantId===Sde&&(0,O.jsx)(qf,{variant:`default`,className:`shrink-0 px-1.5 py-0 text-[10px] leading-4`,children:`DEMO`})]}),(0,O.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`ID: `,e.tenantId]})]})]},e.tenantId)})})]})]})})]}):(0,O.jsx)(M,{variant:`outline`,className:`w-full justify-between`,disabled:!0,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-2 truncate`,children:[(0,O.jsx)(qo,{className:`w-4 h-4 shrink-0`}),(0,O.jsx)(`span`,{className:`truncate`,children:r.length>0?r[0].name:`No client assigned`})]})})}function wde(){let{theme:e,toggleTheme:t}=nf();return(0,O.jsxs)(`header`,{className:`h-14 border-b border-border flex items-center px-4 gap-4 bg-background sticky top-0 z-50`,children:[(0,O.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,O.jsx)(Th,{"data-testid":`button-sidebar-toggle`})}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2 ml-auto`,children:[(0,O.jsx)(`div`,{className:`w-[250px]`,children:(0,O.jsx)(Cde,{})}),(0,O.jsx)(M,{variant:`ghost`,size:`icon`,onClick:t,"data-testid":`button-theme-toggle`,children:e===`dark`?(0,O.jsx)($o,{className:`w-4 h-4`}):(0,O.jsx)(Oo,{className:`w-4 h-4`})})]})]})}function Tde(){let{open:e}
496=Sh(),[t]=de(),n=[{title:`My Notebooks`,url:`/notebooks`,icon:ba},{title:`Feed`,url:`/dashboard`,icon:Bo},{title:`Artifacts`,url:`/artifacts`,icon:Yo}],r=[{title:`Connections`,url:`/connections`,icon:go}];return(0,O.jsxs)(jh,{children:[(0,O.jsx)(M,{asChild:!0,size:e?`sm`:`icon`,"data-testid":`button-create-notebook`,className:j(`w-full gap-2 mb-2`,!e&&`w-8 h-8 p-0`),children:(0,O.jsxs)(_e,{href:`/notebooks/new`,children:[(0,O.jsx)(Io,{className:`h-4 w-4`}),e&&(0,O.jsx)(`span`,{children:`Create Notebook`})]})}),(0,O.jsx)(Nh,{children:n.map(e=>(0,O.jsx)(Ph,{children:(0,O.jsx)(Fh,{tooltip:e.title,asChild:!0,className:j(t===e.url&&`text-primary`),children:(0,O.jsxs)(_e,{href:e.url,children:[(0,O.jsx)(e.icon,{}),(0,O.jsx)(`span`,{children:e.title})]})})},e.title))}),(0,O.jsx)(Mh,{className:j(!e&&`hidden`),children:`Knowledge`}),(0,O.jsx)(Nh,{children:r.map(e=>(0,O.jsx)(Ph,{children:(0,O.jsx)(Fh,{tooltip:e.title,asChild:!0,className:j(t===e.url&&`text-primary`),children:(0,O.jsxs)(_e,{href:e.url,children:[(0,O.jsx)(e.icon,{}),(0,O.jsx)(`span`,{children:e.title})]})})},e.title))})]})}function Ede(){let{isMobile:e}=Sh(),{user:t,logout:n}=Zd(),[,r]=de(),i=e=>e?.trim()||``,a=i(t?.firstName),o=i(t?.lastName),s=i(t?.email),c=[a,o].filter(Boolean).join(` `)||t?.displayName||t?.username||`User`,l=(()=>{if(a&&o)return a.charAt(0)+o.charAt(0);if(a)return a.charAt(0);if(o)return o.charAt(0);let e=t?.displayName||t?.username||`U`,n=e.split(/\s+/);return n.length>=2?n[0].charAt(0)+n[1].charAt(0):e.charAt(0)})().toUpperCase();return(0,O.jsx)(Nh,{children:(0,O.jsx)(Ph,{children:(0,O.jsxs)(wY,{children:[(0,O.jsx)(TY,{asChild:!0,children:(0,O.jsxs)(Fh,{size:`lg`,"aria-label":`User menu`,className:`data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground`,children:[(0,O.jsxs)(j$,{className:`h-8 w-8 rounded-lg`,children:[(0,O.jsx)(M$,{src:t?.avatar||``,alt:c}),(0,O.jsx)(N$,{className:`rounded-lg`,children:l})]}),(0,O.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,O.jsx)(`span`,{className:`truncate font-semibold`,children:c}),(0,O.jsx)(`span`,{className:`truncate text-xs`,children:s})]}),(0,O.jsx)(Na,{className:`ml-auto size-4`})]})}),(0,O.jsxs)(kY,{className:`w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg`,side:e?`bottom`:`right`,align:`end`,sideOffset:4,children:[(0,O.jsx)(NY,{className:`p-0 font-normal`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-left text-sm`,children:[(0,O.jsxs)(j$,{className:`h-8 w-8 rounded-lg`,children:[(0,O.jsx)(M$,{src:t?.avatar||``,alt:c}),(0,O.jsx)(N$,{className:`rounded-lg`,children:l})]}),(0,O.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,O.jsx)(`span`,{className:`truncate font-semibold`,children:c}),(0,O.jsx)(`span`,{className:`truncate text-xs`,children:s})]})]})}),(0,O.jsx)(PY,{}),(0,O.jsx)(EY,{children:(0,O.jsxs)(AY,{onClick:()=>r(`/account`),children:[(0,O.jsx)(va,{}),`Account`]})}),(0,O.jsx)(PY,{}),(0,O.jsxs)(AY,{onClick:n,className:`text-destructive`,children:[(0,O.jsx)(xo,{}),`Log out`]})]})]})})})}function Dde({...e}){let{open:t,isMobile:n}=Sh(),[r]=de(),{user:i}=Zd(),a=Lf(i?.roles);return(0,O.jsxs)(wh,{collapsible:`icon`,...e,children:[(0,O.jsx)(Oh,{className:`space-y-1`,children:(0,O.jsx)(Pee,{})}),(0,O.jsx)(Ah,{children:(0,O.jsx)(Tde,{})}),(0,O.jsxs)(kh,{children:[(0,O.jsxs)(Nh,{children:[a&&(0,O.jsx)(Ph,{children:(0,O.jsx)(Fh,{tooltip:`Admin`,className:j(`w-full justify-start gap-3`,r.startsWith(`/admin`)&&`text-primary`),children:(0,O.jsx)(_e,{href:`/admin`,className:`w-full`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3 w-full`,"data-testid":`nav-admin`,children:[(0,O.jsx)(Ko,{className:`w-4 h-4`}),(0,O.jsx)(`span`,{className:j(!t&&!n&&`hidden`),children:`Admin`})]})})})}),(0,O.jsx)(Ph,{children:(0,O.jsx)(Fh,{tooltip:`Settings`,className:j(`w-full justify-start gap-3`,r===`/settings`&&`text-primary`),children:(0,O.jsx)(_e,{href:`/settings`,className:`w-full`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3 w-full`,"data-testid":`nav-settings`,children:[(0,O.jsx)(Uo,{className:`w-4 h-4`}),(0,O.jsx)(`span`,{className:j(!t&&!n&&`hidden`),children:`Settings`})]})})})})]}),(0,O.jsx)(Ede,{})]}),(0,O.jsx)(Eh,{})]})}function Ode({children:e}){return(0,O.jsxs)(Ch,{children:[(0,O.jsx)(Dde,{}),(0,O.jsx)(Dh,{children:(0,O.jsxs)(`div`,{className:`flex flex-col flex-1 min-w-0`,children:[(0,O.jsx)(wde,{}),(0,O.jsx)(`main`,{className:`flex-1 overflow-auto`,children:e})]})})]})}var kde=[{title:`System Settings`,url:`/admin/settings`,icon:Uo},{title:`Users`,url:`/admin/users`,icon:us},{title:`Workspaces`,url:`/admin/workspaces`,icon:Ca},{title:`Report Templates`,url:`/admin/reports`,icon:Xa},{title:`Usage Tracking`,url:`/admin/usage`,icon:Ta},{title:`Core Documents`,url:`/admin/core-documents`,icon:ba}];function Ade({...e}){let{open:t}=Sh(),[n]=de();return(0,O.jsxs)(wh,{collapsible:`icon`,...e,children:[(0,O.jsx)(Oh,{className:`space-y-1`,children:(0,O.jsx)(Nh,{children:(0,O.jsx)(Ph,{children:(0,O.jsx)(Fh,{size:`lg`,className:`pointer-events-none`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-1 bg-muted rounded-md`,children:(0,O.jsx)(Ko,{className:`w-4 h-4`})}),(0,O.jsx)(`span`,{className:j(`font-semibold text-sm`,!t&&`hidden`),children:`Admin`})]})})})})}),(0,O.jsx)(Ah,{children:(0,O.jsxs)(jh,{children:[(0,O.jsx)(Mh,{className:j(!t&&`hidden`),children:`Management`}),(0,O.jsx)(Nh,{children:kde.map(e=>(0,O.jsx)(Ph,{children:(0,O.jsx)(Fh,{tooltip:e.title,asChild:!0,className:j(n===e.url&&`text-primary`),"data-testid":`nav-admin-${e.url.split(`/`).pop()}`,children:(0,O.jsxs)(_e,{href:e.url,children:[(0,O.jsx)(e.icon,{}),(0,O.jsx)(`span`,{children:e.title})]})})}
496,e.title))})]})}),(0,O.jsx)(kh,{children:(0,O.jsx)(Nh,{children:(0,O.jsx)(Ph,{children:(0,O.jsx)(Fh,{tooltip:`Back to App`,asChild:!0,"data-testid":`nav-admin-back-to-app`,children:(0,O.jsxs)(_e,{href:`/dashboard`,children:[(0,O.jsx)(pa,{}),(0,O.jsx)(`span`,{children:`Back to App`})]})})})})}),(0,O.jsx)(Eh,{})]})}function jde(){return(0,O.jsx)(`div`,{className:`flex items-center justify-center min-h-screen p-6`,"data-testid":`admin-access-denied`,children:(0,O.jsx)(Bf,{className:`max-w-md w-full`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex flex-col items-center text-center space-y-4`,children:[(0,O.jsx)(`div`,{className:`p-3 bg-destructive/10 rounded-full`,children:(0,O.jsx)(Go,{className:`w-8 h-8 text-destructive`})}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(`h2`,{className:`text-xl font-semibold`,"data-testid":`text-access-denied-title`,children:`Access Denied`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`text-access-denied-message`,children:`You don't have permission to access the admin dashboard. This area is restricted to platform administrators.`})]}),(0,O.jsx)(M,{variant:`outline`,asChild:!0,"data-testid":`link-access-denied-back`,children:(0,O.jsxs)(_e,{href:`/dashboard`,children:[(0,O.jsx)(pa,{className:`w-4 h-4 mr-1`}),`Back to App`]})})]})})})})}function R9({children:e}){let{theme:t,toggleTheme:n}=nf(),{user:r,loading:i}=Zd();return i?(0,O.jsx)(`div`,{className:`flex items-center justify-center min-h-screen`,children:(0,O.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-primary`})}):!r||!Lf(r.roles)?(0,O.jsx)(jde,{}):(0,O.jsxs)(Ch,{children:[(0,O.jsx)(Ade,{}),(0,O.jsx)(Dh,{children:(0,O.jsxs)(`div`,{className:`flex flex-col flex-1 min-w-0`,children:[(0,O.jsxs)(`header`,{className:`h-14 border-b border-border flex items-center px-4 gap-4 bg-background sticky top-0 z-50`,children:[(0,O.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,O.jsx)(Th,{"data-testid":`button-admin-sidebar-toggle`})}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2 ml-auto`,children:[(0,O.jsx)(M,{variant:`ghost`,size:`sm`,asChild:!0,"data-testid":`link-back-to-app`,children:(0,O.jsxs)(_e,{href:`/dashboard`,children:[(0,O.jsx)(pa,{className:`w-4 h-4 mr-1`}),`Back to App`]})}),(0,O.jsx)(M,{variant:`ghost`,size:`icon`,onClick:n,"data-testid":`button-admin-theme-toggle`,children:t===`dark`?(0,O.jsx)($o,{className:`w-4 h-4`}):(0,O.jsx)(Oo,{className:`w-4 h-4`})})]})]}),(0,O.jsx)(`main`,{className:`flex-1 overflow-auto`,children:e})]})})]})}var Mde={openai:`OpenAI`,anthropic:`Anthropic`,google:`Google`,mistral:`Mistral`,meta:`Meta`,cohere:`Cohere`,huggingface:`Hugging Face`,aleph_alpha:`Aleph Alpha`,deepseek:`DeepSeek`,alibaba:`Alibaba`,yi:`01.AI`,microsoft:`Microsoft`,amazon:`Amazon`,unknown:`Unknown`};function z9(e){return Mde[e.toLowerCase()]??e.charAt(0).toUpperCase()+e.slice(1)}function B9(e){return e===`unknown`?`(model not recorded)`:e.startsWith(`gpt-`)?e.toUpperCase().replace(`GPT-`,`GPT-`):e.startsWith(`claude-`)?e.replace(`claude-`,`Claude `).replace(/-\d{8}$/,``).split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):e}function V9(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function Nde(){let[e,t]=(0,c.useState)(`30`),{data:n,isLoading:r,error:i}=Ef(e===`all`?`/api/user/usage`:`/api/user/usage?days=${e}`,{queryKey:[`/api/user/usage`,e],cache:{staleTime:6e4}});return(0,O.jsxs)(Bf,{"data-testid":`card-personal-usage`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center justify-between flex-wrap gap-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(fs,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Your Usage`}),(0,O.jsx)(Uf,{children:e===`7`?`Last 7 days`:e===`30`?`Last 30 days`:`All time`})]})]}),(0,O.jsx)(`div`,{className:`flex gap-1`,children:[`7`,`30`,`all`].map(n=>(0,O.jsx)(M,{variant:e===n?`default`:`outline`,size:`sm`,onClick:()=>t(n),"data-testid":`button-usage-range-${n}`,"aria-pressed":e===n,children:n===`7`?`7d`:n===`30`?`30d`:`All`},n))})]})}),(0,O.jsx)(Wf,{children:r?(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`text-usage-loading`,children:`Loading usage data...`}):i?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,"data-testid":`text-usage-error`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load usage data`})]}):n?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-4`,children:[(0,O.jsxs)(`div`,{className:`p-4 border rounded-md`,"data-testid":`stat-chat-messages`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,O.jsx)(To,{className:`w-4 h-4 text-muted-foreground`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Chat Messages`})]}),(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-chat-count`,children:n.usage.chatMessageCount})]}),(0,O.jsxs)(`div`,{className:`p-4 border rounded-md`,"data-testid":`stat-notebooks`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,O.jsx)(ba,{className:`w-4 h-4 text-muted-foreground`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Notebooks Created`})]}),(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-notebook-count`,children:n.usage.notebookCreatedCount})]}),(0,O.jsxs)(`div`,{className:`p-4 border rounded-md`,"data-testid":`stat-tokens`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,O.jsx)(fs,{className:`w-4 h-4 text-muted-foreground`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`AI Tokens Used`})]}),(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-token-count`,children:V9(n.usage.totalTokens)}),(0,O.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:[V9(n.usage.totalInputTokens),` in /`,` `,V9(n.usage.totalOutputTokens),` out`]}
496)]})]}),n.providerBreakdown&&n.providerBreakdown.length>0&&(0,O.jsxs)(`div`,{className:`mt-4 pt-4 border-t`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,O.jsx)(mo,{className:`w-4 h-4 text-muted-foreground`}),(0,O.jsx)(`p`,{className:`text-sm font-medium`,children:`By Model`})]}),(0,O.jsx)(`div`,{className:`space-y-2`,children:(()=>{let e=n.providerBreakdown.reduce((e,t)=>e+t.totalTokens,0);return n.providerBreakdown.map(t=>{let n=e>0?Math.round(t.totalTokens/e*100):0;return(0,O.jsxs)(`div`,{className:`space-y-1`,"data-testid":`account-provider-row-${t.provider}-${t.model}`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,O.jsx)(qf,{variant:`outline`,className:`text-xs shrink-0`,"data-testid":`account-badge-provider-${t.provider}`,children:z9(t.provider)}),(0,O.jsx)(`span`,{className:`text-sm truncate`,children:B9(t.model)})]}),(0,O.jsxs)(`span`,{className:`text-sm font-medium tabular-nums shrink-0`,"data-testid":`account-text-model-tokens-${t.provider}-${t.model}`,children:[V9(t.totalTokens),` (`,n,`%)`]})]}),(0,O.jsx)(`div`,{className:`h-1 bg-muted rounded-full overflow-hidden`,children:(0,O.jsx)(`div`,{className:`h-full bg-primary rounded-full transition-all`,style:{width:`${n}%`}})})]},`${t.provider}-${t.model}`)})})()})]})]}):null})]})}function Pde(e){if(!e)return`N/A`;let t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}h ${n%60}m`:n>0?`${n}m ${t%60}s`:`${t}s`}function H9(e){switch(e){case`mobile`:return(0,O.jsx)(Jo,{className:`w-4 h-4`});case`tablet`:return(0,O.jsx)(ts,{className:`w-4 h-4`});case`desktop`:return(0,O.jsx)(Do,{className:`w-4 h-4`});default:return(0,O.jsx)(po,{className:`w-4 h-4`})}}function Fde(){let{user:e}=Zd(),{data:t,isLoading:n,error:r}=Ef(`/api/user/login-history`),{data:i,isLoading:a,error:o}=Ef(`/api/user/active-sessions`),s=Df(e=>`/api/user/revoke-session/${e.sessionId}`,{invalidate:[`/api/user/active-sessions`,`/api/user/login-history`]}),c=e=>{window.confirm(`Are you sure you want to revoke this session? The user will be logged out from that device.`)&&s.mutate({sessionId:e})};return(0,O.jsxs)(`div`,{className:`p-6`,children:[(0,O.jsxs)(`div`,{className:`mb-8`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold`,"data-testid":`text-page-title`,children:`Account`}),(0,O.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`View your account activity and manage your sessions`})]}),(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsxs)(Bf,{"data-testid":`card-account-overview`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(da,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Account Overview`}),(0,O.jsx)(Uf,{children:`Your account information and activity summary`})]})]})}),(0,O.jsx)(Wf,{className:`space-y-4`,children:(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Username`}),(0,O.jsx)(`p`,{className:`font-medium`,children:e?.username})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Email`}),(0,O.jsx)(`p`,{className:`font-medium`,children:e?.email||`N/A`})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Display Name`}),(0,O.jsx)(`p`,{className:`font-medium`,children:e?.displayName})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Last Login`}),(0,O.jsx)(`p`,{className:`font-medium`,children:e?.lastLoginAt?d$(new Date(e.lastLoginAt),`PPpp`):`N/A`})]})]})})]}),(0,O.jsx)(Nde,{}),(0,O.jsxs)(Bf,{"data-testid":`card-active-sessions`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(qo,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Active Sessions`}),(0,O.jsx)(Uf,{children:`Devices and locations where you're currently signed in`})]})]}),i&&(0,O.jsxs)(qf,{variant:`secondary`,children:[i.count,` active`]})]})}),(0,O.jsx)(Wf,{children:a?(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading active sessions...`}):o?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load active sessions`})]}):i&&i.activeSessions.length>0?(0,O.jsx)(`div`,{className:`space-y-3`,children:i.activeSessions.map(e=>{let t=e.sessionId===i.currentSessionId;return(0,O.jsxs)(`div`,{className:`flex items-start justify-between p-3 border rounded-lg`,children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-3 flex-1`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md mt-0.5`,children:H9(e.metadata?.deviceType)}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,O.jsxs)(`p`,{className:`font-medium text-sm`,children:[e.metadata?.browserName||`Unknown Browser`,` on`,` `,e.metadata?.osName||`Unknown OS`]}),t&&(0,O.jsx)(qf,{variant:`default`,className:`text-xs`,children:`Current`})]}),(0,O.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:[e.ipAddress&&(0,O.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,O.jsx)(Co,{className:`w-3 h-3`}),(0,O.jsx)(`span`,{children:e.ipAddress})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,O.jsx)(za,{className:`w-3 h-3`}),(0,O.jsxs)(`span`,{children:[`Since `,d$(new Date(e.loginAt),`PPp`)]})]})]})]})]}),!t&&(0,O.jsx)(M,{variant:`ghost`,size:`sm`,onClick:()=>c(e.sessionId),disabled:s.isPending,className:`ml-2`,"aria-label":`Revoke session for ${e.metadata?.browserName||`Unknown Browser`} on ${e.metadata?.osName||`Unknown OS`}`,children:(0,O.jsx)(xo,{className:`w-4 h-4`})})]},e.id)})}):(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No active sessions foun
496d`})})]}),(0,O.jsxs)(Bf,{"data-testid":`card-login-history`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(za,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Login History`}),(0,O.jsx)(Uf,{children:`Your recent login activity (last 10 logins)`})]})]})}),(0,O.jsx)(Wf,{children:n?(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading login history...`}):r?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load login history`})]}):t&&t.loginHistory.length>0?(0,O.jsx)(`div`,{className:`space-y-3`,children:t.loginHistory.map((e,n)=>(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`flex items-start justify-between`,children:(0,O.jsxs)(`div`,{className:`flex items-start gap-3 flex-1`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md mt-0.5`,children:H9(e.metadata?.deviceType)}),(0,O.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,O.jsxs)(`p`,{className:`font-medium text-sm`,children:[e.metadata?.browserName||`Unknown Browser`,` on`,` `,e.metadata?.osName||`Unknown OS`]}),e.logoutAt&&(0,O.jsx)(qf,{variant:`outline`,className:`text-xs`,children:`Logged out`}),e.sessionTimeoutAt&&(0,O.jsx)(qf,{variant:`secondary`,className:`text-xs`,children:`Timed out`})]}),(0,O.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:[e.ipAddress&&(0,O.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,O.jsx)(Co,{className:`w-3 h-3`}),(0,O.jsx)(`span`,{children:e.ipAddress})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,O.jsx)(za,{className:`w-3 h-3`}),(0,O.jsx)(`span`,{children:d$(new Date(e.loginAt),`PPp`)})]}),e.metadata?.loginDurationMs&&(0,O.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,O.jsx)(da,{className:`w-3 h-3`}),(0,O.jsxs)(`span`,{children:[`Duration:`,` `,Pde(e.metadata.loginDurationMs)]})]})]})]})]})}),n<t.loginHistory.length-1&&(0,O.jsx)(ip,{className:`mt-3`})]},e.id))}):(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No login history found`})})]})]})]})}var U9=`100000`;function Ide(){let{toast:e}=ln(),t=Nt(),[n,r]=(0,c.useState)(U9),[i,a]=(0,c.useState)(!1),[o,s]=(0,c.useState)(!0),[l,u]=(0,c.useState)(``),d=(0,c.useRef)(``),{data:f,isLoading:p,error:m}=Ef(`/api/admin/settings`,{queryKey:[`/api/admin/settings`],cache:{staleTime:6e4}});(0,c.useEffect)(()=>{if(f?.settings){let e=f.settings.usage_token_warn_threshold||U9;r(e);let t=f.settings.pii_detection_enabled;s(t!==`false`);let n=f.settings.system_prompt||``;u(n),d.current=n,a(!1)}},[f]);let h=e=>{let t=e.replace(/[^0-9]/g,``);r(t);let n=f?.settings?.usage_token_warn_threshold||U9;a(t!==n)},g=Yt({mutationFn:async()=>yf(`PATCH`,`/api/admin/settings`,{data:{settings:{usage_token_warn_threshold:n||U9}}}),onSuccess:()=>{t.invalidateQueries({queryKey:[`/api/admin/settings`]}),a(!1),e({title:`Settings saved`,description:`Usage threshold has been updated.`})},onError:()=>{e({title:`Failed to save`,description:`Could not update settings. Please try again.`,variant:`destructive`})}}),_=Yt({mutationFn:async e=>yf(`PATCH`,`/api/admin/settings`,{data:{settings:{pii_detection_enabled:e?`true`:`false`}}}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:[`/api/admin/settings`]}),e({title:`Guardrail updated`,description:`PII Detection has been ${r?`enabled`:`disabled`}.`})},onError:()=>{s(e=>!e),e({title:`Failed to save`,description:`Could not update PII Detection setting. Please try again.`,variant:`destructive`})}}),v=e=>{s(e),_.mutate(e)},y=l!==d.current,b=Yt({mutationFn:async e=>yf(`PATCH`,`/api/admin/settings`,{data:{settings:{system_prompt:e}}}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:[`/api/admin/settings`]}),d.current=r,e({title:`System prompt saved`,description:`Changes will take effect on the next AI query.`})},onError:()=>{e({title:`Failed to save`,description:`Could not update system prompt. Please try again.`,variant:`destructive`})}}),x=()=>{u(d.current)},S=f?.meta?.system_prompt?.updatedAt,C=n?parseInt(n,10).toLocaleStr
496ing():`0`;return(0,O.jsxs)(`div`,{className:`p-6 container mx-auto`,children:[(0,O.jsxs)(`div`,{className:`mb-8`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold`,"data-testid":`text-admin-settings-title`,children:`System Settings`}),(0,O.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Configure platform-wide settings and feature toggles`})]}),(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsxs)(Bf,{"data-testid":`card-usage-thresholds`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(ro,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Usage Thresholds`}),(0,O.jsx)(Uf,{children:`Configure warning thresholds for usage monitoring`})]})]}),i&&(0,O.jsx)(qf,{variant:`outline`,"data-testid":`badge-unsaved`,children:`Unsaved Changes`})]})}),(0,O.jsx)(Wf,{className:`space-y-4`,children:m?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,"data-testid":`text-settings-error`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load settings`})]}):p?(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsx)(_h,{className:`h-5 w-48`}),(0,O.jsx)(_h,{className:`h-9 w-64`}),(0,O.jsx)(_h,{className:`h-4 w-full`})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`label`,{htmlFor:`token-threshold`,className:`text-sm font-medium`,children:`Daily per-user token warning threshold`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground mt-0.5 mb-2`,children:`Log a warning when a user exceeds this many tokens in a single day. This is for monitoring only and does not block usage.`}),(0,O.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,O.jsx)(Xf,{id:`token-threshold`,type:`text`,inputMode:`numeric`,value:n,onChange:e=>h(e.target.value),className:`w-48`,"data-testid":`input-token-threshold`}),(0,O.jsxs)(`span`,{className:`text-sm text-muted-foreground`,"data-testid":`text-threshold-formatted`,children:[C,` tokens / user / day`]})]})]}),(0,O.jsx)(ip,{}),(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Threshold exceedances are logged as events and visible in the Usage Tracking page.`}),(0,O.jsxs)(M,{size:`sm`,onClick:()=>g.mutate(),disabled:!i||g.isPending,"data-testid":`button-save-thresholds`,children:[g.isPending?(0,O.jsx)(Vo,{className:`w-4 h-4 mr-1.5 animate-pulse`}):(0,O.jsx)(Oa,{className:`w-4 h-4 mr-1.5`}),g.isPending?`Saving...`:`Save`]})]})]})})]}),(0,O.jsx)(Bf,{"data-testid":`card-llm-provider`,children:(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(Sa,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`LLM Provider`}),(0,O.jsx)(Uf,{children:`Controls which AI provider powers all agents (SQL, RAG, and routing)`})]})]})})}),(0,O.jsxs)(Bf,{"data-testid":`card-guardrails`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(Ko,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Guardrails`}),(0,O.jsx)(Uf,{children:`Content safety and output filtering controls`})]})]}),(0,O.jsx)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:(0,O.jsx)(qf,{variant:o?`default`:`outline`,"data-testid":`badge-pii-status`,children:o?`PII Protected`:`PII Unprotected`})})]})}),(0,O.jsx)(Wf,{className:`space-y-4`,children:m?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,"data-testid":`text-guardrails-error`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load guardrail settings`})]}):p?(0,O.jsx)(`div`,{className:`space-y-4`,children:(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,O.jsxs)(`div`,{className:`space-y-1.5 flex-1`,children:[(0,O.jsx)(_h,{className:`h-4 w-28`}),(0,O.jsx)(_h,{className:`h-4 w-full`})]}),(0,O.jsx)(_h,{className:`h-5 w-9 rounded-full shrink-0`})]})}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:`PII Detection`}),(0,O.jsx)(qf,{variant:`secondary`,"data-testid":`badge-pii-scope`,children:`SQL agent only`})]}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Prevent first name and last name from appearing in AI responses.`})]}),(0,O.jsx)(D5,{checked:o,onCheckedChange:v,disabled:_.isPending,"data-testid":`switch-pii-detection`})]}),(0,O.jsx)(ip,{}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,"data-testid":`guardrails-sql`,children:[(0,O.jsx)(`span`,{className:`w-10 text-xs font-medium text-muted-foreground`,children:`SQL`}),(0,O.jsxs)(qf,{variant:o?`default`:`outline`,children:[`PII `,o?`on`:`off`]}),(0,O.jsx)(qf,{variant:`default`,children:`Cash rewards on`}),(0,O.jsx)(qf,{variant:`default`,children:`Balance on`})]}),(0,O.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,"data-testid":`guardrails-rag`,children:[(0,O.jsx)(`span`,{className:`w-10 text-xs font-medium text-muted-foreground`,children:`RAG`}),(0,O.jsx)(qf,{variant:`default`,children:`PII on`}),(0,O.jsx)(qf,{variant:`default`,children:`Financial on`}),(0,O.jsx)(qf,{variant:`default`,children:`Cash rewards on`}),(0,O.jsx)(qf,{variant:`default`,children:`Balance on`})]})]})]})})]}),(0,O.jsxs)(Bf,{"data-testid":`card-system-prompt`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(to,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`System Prompt`}),(0,O.jsx)(Uf,{children:`The base instructions used by the AI assistant`})]})]}),y&&(0,O.jsx)(qf,{variant:`outline`,"data-testid":`badge-prompt-unsaved`,children:`Unsaved Changes`})]})}),(0,O.jsx)(Wf,{className:`space-y-4`,children:m?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,"data-testid":`text-prompt-error`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load system prompt`})]}):p?(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsx)(_h,{className:`h-[200px] w-full`}),(0,O.jsx)(_h,{className:`h-4 w-64`})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-900 dark:border-amber-900/40 dark:bg-amber-950/30 dark:text-amber-200`,"data-testid":`notice-system-prompt-inactive`,children:[(0,O.jsx)(uo,{className:`w-4 h-4 mt-0.5 shrink-0`}),(0,O.jsx)(`p`,{children:`Temporarily inactive â the RAG agent system prompt now lives in code. Edits here have no effect.`})]}),(0,O.jsx)(`label`,{htmlFor:`system-prompt`,className:`sr-only`,children:`System prompt`}
496),(0,O.jsx)(FY,{id:`system-prompt`,value:l,onChange:e=>u(e.target.value),className:`min-h-[200px] resize-y font-mono text-sm`,"data-testid":`textarea-system-prompt`,disabled:!0}),(0,O.jsxs)(`div`,{className:`flex items-start gap-2 text-sm text-muted-foreground`,children:[(0,O.jsx)(uo,{className:`w-4 h-4 mt-0.5 shrink-0`}),(0,O.jsx)(`p`,{children:`PII Detection rules are applied separately via the guardrail toggle above and do not need to be included in this prompt.`})]}),(0,O.jsx)(ip,{}),(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`text-prompt-last-modified`,children:S?`Last modified: ${new Date(S).toLocaleString()}`:`Using default prompt`}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[y&&(0,O.jsxs)(M,{size:`sm`,variant:`outline`,onClick:x,disabled:!0,"data-testid":`button-cancel-prompt`,children:[(0,O.jsx)(ds,{className:`w-4 h-4 mr-1.5`}),`Cancel`]}),(0,O.jsxs)(M,{size:`sm`,onClick:()=>b.mutate(l),disabled:!0,"data-testid":`button-save-prompt`,children:[(0,O.jsx)(Oa,{className:`w-4 h-4 mr-1.5`}),`Save`]})]})]})]})})]})]})]})}var W9=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`div`,{className:`relative w-full overflow-auto`,children:(0,O.jsx)(`table`,{ref:n,className:j(`w-full caption-bottom text-sm`,e),...t})}));W9.displayName=`Table`;var G9=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`thead`,{ref:n,className:j(`[&_tr]:border-b`,e),...t}));G9.displayName=`TableHeader`;var K9=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`tbody`,{ref:n,className:j(`[&_tr:last-child]:border-0`,e),...t}));K9.displayName=`TableBody`;var Lde=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`tfoot`,{ref:n,className:j(`border-t bg-muted/50 font-medium [&>tr]:last:border-b-0`,e),...t}));Lde.displayName=`TableFooter`;var q9=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`tr`,{ref:n,className:j(`border-b transition-colors data-[state=selected]:bg-muted`,e),...t}));q9.displayName=`TableRow`;var J9=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`th`,{ref:n,className:j(`h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));J9.displayName=`TableHead`;var Y9=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`td`,{ref:n,className:j(`p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));Y9.displayName=`TableCell`;var Rde=c.forwardRef(({className:e,...t},n)=>(0,O.jsx)(`caption`,{ref:n,className:j(`mt-4 text-sm text-muted-foreground`,e),...t}));Rde.displayName=`TableCaption`;function zde(e){if(!e)return`Never`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return`Just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<30?`${a}d ago`:t.toLocaleDateString()}function Bde(e){return e.split(` `).map(e=>e[0]).join(``).toUpperCase().slice(0,2)}function Vde({user:e}){return e.roles?(0,O.jsx)(P$,{roles:e.roles}):(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`No role`})}function Hde(){let{data:e,isLoading:t}=Ef(`/api/admin/users`),n=e?.users??[],r=n.length,i=n.filter(e=>Lf(e.roles)).length,a=n.filter(e=>e.lastLoginAt?Date.now()-new Date(e.lastLoginAt).getTime()<6048e5:!1).length;return(0,O.jsxs)(`div`,{className:`p-6 max-w-6xl`,children:[(0,O.jsxs)(`div`,{className:`mb-8`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold`,"data-testid":`text-admin-users-title`,children:`User Overview`}),(0,O.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`View and manage platform users`})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6`,children:[(0,O.jsx)(Bf,{"data-testid":`card-total-users`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(us,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-total-users-count`,children:t?(0,O.jsx)(_h,{className:`h-7 w-10`}):r}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Total Users`})]})]})})}),(0,O.jsx)(Bf,{"data-testid":`card-active-users`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(ss,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-active-users-count`,children:t?(0,O.jsx)(_h,{className:`h-7 w-10`}):a}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Active (7d)`})]})]})})}),(0,O.jsx)(Bf,{"data-testid":`card-admins`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(qo,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-admin-count`,children:t?(0,O.jsx)(_h,{className:`h-7 w-10`}):i}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Admins`})]})]})})})]}),(0,O.jsxs)(Bf,{"data-testid":`card-user-list`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(ls,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`User Directory`}),(0,O.jsx)(Uf,{children:`Browse and manage user accounts`})]})]})}),(0,O.jsx)(Wf,{children:t?(0,O.jsx)(`div`,{className:`space-y-3`,children:[1,2,3,4,5].map(e=>(0,O.jsx)(_h,{className:`h-12 w-full`},e))}):n.length===0?(0,O.jsx)(`div`,{className:`flex items-center justify-center py-12 text-sm text-muted-foreground`,"data-testid":`text-no-users`,children:`No users found.`}):(0,O.jsx)(`div`,{className:`overflow-x-auto`,children:(0,O.jsxs)(W9,{"data-testid":`table-users`,children:[(0,O.jsx)(G9,{children:(0,O.jsxs)(q9,{children:[(0,O.jsx)(J9,{children:`User`}),(0,O.jsx)(J9,{children:`Role`}),(0,O.jsx)(J9,{children:`Workspaces`}),(0,O.jsx)(J9,{children:`Last Active`})]})}),(0,O.jsx)(K9,{children:n.map(e=>(0,O.jsxs)(q9,{"data-testid":`row-user-${e.id}`,children:[(0,O.jsx)(Y9,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(j$,{className:`h-8 w-8`,children:(0,O.jsx)(N$,{className:`text-xs`,children:Bde(e.displayName||e.username)})}),(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(`p`,{className:`font-medium text-sm truncate`,"data-testid":`text-user-name-${e.id}`,children:e.displayName||e.username}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:e.username})]})]})}),(0,O.jsx)(Y9,{children:(0,O.jsx)(Vde,{user:e})}),(0,O.jsx)(Y9,{children:e.workspaces.length>0?(0,O.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.workspaces.map(t=>(0,O.jsx)(qf,{variant:`outline`,className:`text-xs`,"data-testid":`badge-workspace-${e.id}-${t.workspaceId}`,children:t.workspaceName},t.workspaceId))}):(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`None`})}),(0,O.jsx)(Y9,{children:(0,O.jsx)(`span`,{className:`text-sm text-muted-foreground`,"data-testid":`text-last-active-${e.id}`,children:zde(e.lastLoginAt)})})]},e.id))})]})})})]})]})}function Ude(){let{data:e,isLoading:t}=Ef(`/api/admin/workspaces`),n=e?.workspaces??[],r=n.length,i=n.reduce((e,t)=>
496e+t.memberCount,0);return(0,O.jsxs)(`div`,{className:`p-6 max-w-6xl`,children:[(0,O.jsxs)(`div`,{className:`mb-8`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold`,"data-testid":`text-admin-workspaces-title`,children:`Workspace Overview`}),(0,O.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Monitor and manage workspaces across the platform`})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6`,children:[(0,O.jsx)(Bf,{"data-testid":`card-total-workspaces`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(Ca,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-total-workspaces-count`,children:t?(0,O.jsx)(_h,{className:`h-7 w-10`}):r}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Total Workspaces`})]})]})})}),(0,O.jsx)(Bf,{"data-testid":`card-total-members`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(da,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-total-members-count`,children:t?(0,O.jsx)(_h,{className:`h-7 w-10`}):i}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Total Memberships`})]})]})})})]}),(0,O.jsxs)(Bf,{"data-testid":`card-workspace-list`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(no,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Workspace Directory`}),(0,O.jsx)(Uf,{children:`Browse and manage all workspaces`})]})]})}),(0,O.jsx)(Wf,{children:t?(0,O.jsx)(`div`,{className:`space-y-3`,children:[1,2,3,4,5].map(e=>(0,O.jsx)(_h,{className:`h-12 w-full`},e))}):n.length===0?(0,O.jsx)(`div`,{className:`flex items-center justify-center py-12 text-sm text-muted-foreground`,"data-testid":`text-no-workspaces`,children:`No workspaces found.`}):(0,O.jsx)(`div`,{className:`overflow-x-auto`,children:(0,O.jsxs)(W9,{"data-testid":`table-workspaces`,children:[(0,O.jsx)(G9,{children:(0,O.jsxs)(q9,{children:[(0,O.jsx)(J9,{children:`Workspace`}),(0,O.jsx)(J9,{children:`Members`}),(0,O.jsx)(J9,{children:`Notebooks`})]})}),(0,O.jsx)(K9,{children:n.map(e=>(0,O.jsxs)(q9,{"data-testid":`row-workspace-${e.id}`,children:[(0,O.jsx)(Y9,{children:(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(`p`,{className:`font-medium text-sm truncate`,"data-testid":`text-workspace-name-${e.id}`,children:e.tenantName??e.maslowTenantName}),e.maslowTenantId&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground truncate max-w-xs`,children:e.maslowTenantId})]})}),(0,O.jsx)(Y9,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(us,{className:`w-3.5 h-3.5 text-muted-foreground`}),(0,O.jsx)(`span`,{className:`text-sm`,"data-testid":`text-member-count-${e.id}`,children:e.memberCount})]})}),(0,O.jsx)(Y9,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(ba,{className:`w-3.5 h-3.5 text-muted-foreground`}),(0,O.jsx)(`span`,{className:`text-sm`,"data-testid":`text-notebook-count-${e.id}`,children:e.notebookCount})]})})]},e.id))})]})})})]})]})}function X9({template:e,workspaceId:t,onClose:n,onViewReport:r}){let[i,a]=(0,c.useState)(`variables`),[o,s]=(0,c.useState)(()=>{let t={};if(e.variables)for(let n of e.variables)n.defaultValue&&(t[n.name]=n.defaultValue);return t}),[l,u]=(0,c.useState)([]),[d,f]=(0,c.useState)(``),[p,m]=(0,c.useState)(``),[h,g]=(0,c.useState)(null),[_,v]=(0,c.useState)(null),y=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{y.current?.abort()},[]);let b=e.variables||[],x=b.length>0,S=b.every(e=>!e.required||o[e.name]),C=(0,c.useCallback)(()=>{a(`running`),f(``),u([]),m(``);
496let n=gf(),r=new P4(`/api/admin/report-templates/${e.id}/run`,{credentials:`include`,maxRetryCount:0,method:`post`,headers:{"Content-Type":`application/json`,...n?{"x-csrf-token":n}:{}},body:JSON.stringify({variables:o,workspaceId:t})}).listen({onMessage(e){try{let t=JSON.parse(e.data);switch(typeof t==`string`&&(t=JSON.parse(t)),t.type){case q4.STATE:t.data?.timeline&&u(t.data.timeline);break;case q4.TEXT_CHUNK:f(e=>e+(t.text||t.data||``));break;case q4.RUN_FINISHED:break;case q4.RUN_ERROR:y.current?.abort(),a(`error`),m(t.error||`Report generation failed`);break;case q4.REPORT_COMPLETED:y.current?.abort(),a(`completed`),g(t.noteId||null),v(t.noteTitle||null);break;case q4.REPORT_ERROR:y.current?.abort(),a(`error`),m(t.error||`Report generation failed`)}}catch{}},onResponseError({response:e}){a(`error`),m(`Connection error (${e.status})`)}});y.current=r},[e.id,o,t]),w=()=>{y.current?.abort(),n()};return(0,O.jsx)(wK,{open:!0,onOpenChange:w,children:(0,O.jsxs)(OK,{className:`max-w-lg`,"data-testid":`dialog-run-report`,children:[(0,O.jsxs)(kK,{children:[(0,O.jsx)(jK,{"data-testid":`text-run-report-title`,children:i===`completed`?`Report Complete`:`Run Report: ${e.name}`}),(0,O.jsxs)(MK,{children:[i===`variables`&&`Configure variables and run this report.`,i===`running`&&`Generating your report...`,i===`completed`&&`Your report has been generated and saved.`,i===`error`&&`There was a problem generating this report.`]})]}),i===`variables`&&(0,O.jsxs)(`div`,{className:`space-y-4 pt-2`,children:[x?b.map(e=>(0,O.jsxs)(`div`,{className:`space-y-1`,children:[(0,O.jsxs)(n7,{htmlFor:`var-${e.name}`,className:`text-sm`,children:[e.label,e.required&&(0,O.jsx)(`span`,{className:`text-destructive ml-1`,children:`*`})]}),e.type===`select`&&e.options?(0,O.jsxs)(nZ,{value:o[e.name]||``,onValueChange:t=>s(n=>({...n,[e.name]:t})),children:[(0,O.jsx)(iZ,{"data-testid":`select-run-var-${e.name}`,children:(0,O.jsx)(rZ,{placeholder:`Select ${e.label}...`})}),(0,O.jsx)(sZ,{children:e.options.map(e=>(0,O.jsx)(lZ,{value:e,children:e},e))})]}):e.type===`date`?(0,O.jsx)(Xf,{id:`var-${e.name}`,type:`date`,value:o[e.name]||``,onChange:t=>s(n=>({...n,[e.name]:t.target.value})),"data-testid":`input-run-var-${e.name}`}):(0,O.jsx)(Xf,{id:`var-${e.name}`,value:o[e.name]||``,onChange:t=>s(n=>({...n,[e.name]:t.target.value})),placeholder:e.defaultValue||`Enter ${e.label}`,"data-testid":`input-run-var-${e.name}`})]},e.name)):(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground py-2`,children:`This template has no variables. Click Run Report to generate.`}),(0,O.jsxs)(`div`,{className:`flex items-center justify-end gap-2 pt-2`,children:[(0,O.jsx)(M,{variant:`outline`,onClick:w,"data-testid":`button-run-cancel`,children:`Cancel`}),(0,O.jsxs)(M,{onClick:C,disabled:!S,"data-testid":`button-run-report`,children:[(0,O.jsx)(to,{className:`w-4 h-4 mr-1`}),`Run Report`]})]})]}),i===`running`&&(0,O.jsxs)(`div`,{className:`space-y-4 pt-2`,children:[(0,O.jsx)(`div`,{className:`space-y-2`,children:l.length>0?l.map(e=>(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[e.status===`active`&&(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin text-primary`}),e.status===`completed`&&(0,O.jsx)(Ia,{className:`w-4 h-4 text-green-500`}),e.status===`pending`&&(0,O.jsx)(`div`,{className:`w-4 h-4 rounded-full border-2 border-muted`}),e.status===`error`&&(0,O.jsx)(Pa,{className:`w-4 h-4 text-destructive`}),(0,O.jsx)(`span`,{className:e.status===`active`?`font-medium`:e.status===`completed`?`text-muted-foreground`:``,children:e.label})]},e.id)):(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin text-primary`}),(0,O.jsx)(`span`,{children:`Starting report generation...`})]})}),d&&(0,O.jsx)(`div`,{className:`max-h-48 overflow-y-auto border rounded-md p-3 text-sm bg-muted/30`,children:(0,O.jsx)(`pre`,{className:`whitespace-pre-wrap font-sans`,children:d})}),(0,O.jsx)(`div`,{className:`flex items-center justify-end pt-2`,children:(0,O.jsxs)(M,{variant:`outline`,onClick:()=>{y.current?.abort(),a(`error`),m(`Report cancelled by user`)},"data-testid":`button-cancel-report`,children:[(0,O.jsx)(La,{className:`w-4 h-4 mr-1`}),`Cancel`]})})]}),i===`completed`&&(0,O.jsxs)(`div`,{className:`space-y-4 pt-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3 p-4 bg-muted/30 rounded-md`,children:[(0,O.jsx)(Ia,{className:`w-6 h-6 text-green-500 flex-shrink-0`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:`Report generated successfully`}),_&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:_})]})]}),d&&(0,O.jsx)(`div`,{className:`max-h-48 overflow-y-auto border rounded-md p-3 text-sm bg-muted/30`,children:(0,O.jsx)(`pre`,{className:`whitespace-pre-wrap font-sans`,children:d})}),(0,O.jsxs)(`div`,{className:`flex items-center justify-end gap-2 pt-2`,children:[(0,O.jsx)(M,{variant:`outline`,onClick:w,"data-testid":`button-close-report`,children:`Close`}),h&&r&&(0,O.jsxs)(M,{onClick:()=>{y.current?.abort(),r(h)},"data-testid":`button-view-generated-report`,children:[(0,O.jsx)(Ja,{className:`w-4 h-4 mr-1`}),`View Report`]})]})]}),i===`error`&&(0,O.jsxs)(`div`,{className:`space-y-4 pt-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3 p-4 bg-destructive/10 rounded-md`,children:[(0,O.jsx)(Pa,{className:`w-6 h-6 text-destructive flex-shrink-0`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:`Report generation failed`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:p})]})]}),(0,O.jsxs)(`div`,{className:`flex items-center justify-end gap-2 pt-2`,children:[(0,O.jsx)(M,{variant:`outline`,onClick:w,"data-testid":`button-error-close`,children:`Close`}),(0,O.jsx)(M,{onClick:()=>a(`variables`),"data-testid":`button-retry-report`,children:`Retry`})]})]})]})})}function Z9(e){if(!e)return`Never`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return`Just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);if(r<24)return`${r}h ago`;let i=Math.floor(r/24);return i<30?`${i}d ago`:new Date(e).toLocaleDateString()}var Wde=[{value:`executive-summary`,label:`Executive Summary`},{value:`detailed-analysis`,label:`Detailed Analysis`},{value:`bullet-points`,label:`Bullet Points`},{value:`narrative`,label:`Narrative`}],Gde={name:``,description:``,promptPattern:``,dataSources:[],outputStructure:{},variables:[]};function Kde({initialData:e,workspaceId:t,onSave:n,onCancel:r,isSaving:i}){let[a,o]=(0,c.useState)(e),{data:s}
496=Ef(t?`/api/admin/workspaces/${t}/sources`:null),l=s?.sources||[],u=(e,t)=>{o(n=>({...n,[e]:t}))},d=e=>{let t=a.dataSources,n=t.includes(e)?t.filter(t=>t!==e):[...t,e];u(`dataSources`,n)},f=()=>{u(`variables`,[...a.variables,{name:``,label:``,type:`text`,required:!1}])},p=e=>{u(`variables`,a.variables.filter((t,n)=>n!==e))},m=(e,t,n)=>{let r=a.variables[e];if(!r)return;let i=[...a.variables];i[e]={...r,[t]:n},o(e=>({...e,variables:i}))},h=()=>{let e=a.outputStructure.sections||[];u(`outputStructure`,{...a.outputStructure,sections:[...e,``]})},g=e=>{let t=(a.outputStructure.sections||[]).filter((t,n)=>n!==e);u(`outputStructure`,{...a.outputStructure,sections:t})},_=(e,t)=>{let n=[...a.outputStructure.sections||[]];n[e]=t,u(`outputStructure`,{...a.outputStructure,sections:n})};return(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{htmlFor:`template-name`,children:`Name`}),(0,O.jsx)(Xf,{id:`template-name`,"data-testid":`input-template-name`,placeholder:`e.g., Weekly Engagement Report`,value:a.name,onChange:e=>u(`name`,e.target.value)})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{htmlFor:`template-description`,children:`Description`}),(0,O.jsx)(FY,{id:`template-description`,"data-testid":`textarea-template-description`,placeholder:`What does this report cover?`,value:a.description,onChange:e=>u(`description`,e.target.value),className:`min-h-[60px]`})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{htmlFor:`template-prompt`,children:`Prompt Pattern`}),(0,O.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Use `,`{{variableName}}`,` for runtime variables. Example: `,`{{dateRangeStart}}`,` to`,` `,`{{dateRangeEnd}}`]}),(0,O.jsx)(FY,{id:`template-prompt`,"data-testid":`textarea-template-prompt`,placeholder:`Analyze recognition trends from {{dateRangeStart}} to {{dateRangeEnd}}. Highlight top performers and engagement patterns.`,value:a.promptPattern,onChange:e=>u(`promptPattern`,e.target.value),className:`min-h-[120px] font-mono text-sm`})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{children:`Data Sources`}),(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Select which workspace data sources this report should query.`}),(0,O.jsx)(`div`,{className:`space-y-1 rounded-md border p-3`,"data-testid":`select-template-data-sources`,children:l.length===0?(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground py-1`,children:`No sources available in this workspace.`}):l.map(e=>{let t=a.dataSources.includes(e.id);return(0,O.jsxs)(`button`,{type:`button`,onClick:()=>d(e.id),className:`flex items-center gap-2 w-full rounded-md px-2 py-1.5 text-sm text-left hover-elevate`,"data-testid":`checkbox-source-${e.id}`,children:[(0,O.jsx)(`div`,{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border ${t?`bg-primary border-primary text-primary-foreground`:`border-muted-foreground/40`}`,children:t&&(0,O.jsx)(Oa,{className:`h-3 w-3`})}),(0,O.jsx)(Ha,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,O.jsx)(`span`,{className:`truncate`,children:e.name}),(0,O.jsx)(qf,{variant:`secondary`,className:`ml-auto text-xs no-default-active-elevate`,children:e.sourceType})]},e.id)})})]}),(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsx)(`h3`,{className:`text-sm font-medium`,children:`Output Structure`}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{children:`Tone`}),(0,O.jsxs)(nZ,{value:a.outputStructure.tone||``,onValueChange:e=>u(`outputStructure`,{...a.outputStructure,tone:e||void 0}),children:[(0,O.jsx)(iZ,{"data-testid":`select-template-tone`,children:(0,O.jsx)(rZ,{placeholder:`Select tone...`})}),(0,O.jsx)(sZ,{children:Wde.map(e=>(0,O.jsx)(lZ,{value:e.value,children:e.label},e.value))})]})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between flex-wrap gap-2`,children:[(0,O.jsx)(n7,{children:`Sections`}),(0,O.jsxs)(M,{size:`sm`,variant:`outline`,onClick:h,"data-testid":`button-add-section`,children:[(0,O.jsx)(Io,{
496className:`w-3 h-3 mr-1`}),`Add Section`]})]}),(a.outputStructure.sections||[]).map((e,t)=>(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(Xf,{value:e,onChange:e=>_(t,e.target.value),placeholder:`Section ${t+1} name`,"data-testid":`input-section-${t}`}),(0,O.jsx)(M,{size:`icon`,variant:`ghost`,onClick:()=>g(t),"data-testid":`button-remove-section-${t}`,children:(0,O.jsx)(ds,{className:`w-4 h-4`})})]},t))]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n7,{children:`Format Instructions`}),(0,O.jsx)(FY,{"data-testid":`textarea-format-instructions`,placeholder:`Additional formatting guidance for the report...`,value:a.outputStructure.formatInstructions||``,onChange:e=>u(`outputStructure`,{...a.outputStructure,formatInstructions:e.target.value||void 0}),className:`min-h-[60px]`})]})]}),(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between flex-wrap gap-2`,children:[(0,O.jsx)(`h3`,{className:`text-sm font-medium`,children:`Variables`}),(0,O.jsxs)(M,{size:`sm`,variant:`outline`,onClick:f,"data-testid":`button-add-variable`,children:[(0,O.jsx)(Io,{className:`w-3 h-3 mr-1`}),`Add Variable`]})]}),a.variables.map((e,t)=>(0,O.jsx)(`div`,{className:`p-4 border rounded-md space-y-3`,children:(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[(0,O.jsxs)(`div`,{className:`space-y-1`,children:[(0,O.jsx)(n7,{className:`text-xs`,children:`Name (for placeholder)`}),(0,O.jsx)(Xf,{value:e.name,onChange:e=>m(t,`name`,e.target.value),placeholder:`dateRangeStart`,className:`font-mono text-sm`,"data-testid":`input-variable-name-${t}`})]}),(0,O.jsxs)(`div`,{className:`space-y-1`,children:[(0,O.jsx)(n7,{className:`text-xs`,children:`Label (displayed to user)`}),(0,O.jsx)(Xf,{value:e.label,onChange:e=>m(t,`label`,e.target.value),placeholder:`Start Date`,"data-testid":`input-variable-label-${t}`})]}),(0,O.jsxs)(`div`,{className:`space-y-1`,children:[(0,O.jsx)(n7,{className:`text-xs`,children:`Type`}),(0,O.jsxs)(nZ,{value:e.type,onValueChange:e=>m(t,`type`,e),children:[(0,O.jsx)(iZ,{"data-testid":`select-variable-type-${t}`,children:(0,O.jsx)(rZ,{})}),(0,O.jsxs)(sZ,{children:[(0,O.jsx)(lZ,{value:`text`,children:`Text`}),(0,O.jsx)(lZ,{value:`date`,children:`Date`}),(0,O.jsx)(lZ,{value:`select`,children:`Select`})]})]})]}),(0,O.jsxs)(`div`,{className:`space-y-1`,children:[(0,O.jsx)(n7,{className:`text-xs`,children:`Default Value`}),(0,O.jsx)(Xf,{value:e.defaultValue||``,onChange:e=>m(t,`defaultValue`,e.target.value),placeholder:`Optional default`,"data-testid":`input-variable-default-${t}`})]}),e.type===`select`&&(0,O.jsxs)(`div`,{className:`sm:col-span-2 space-y-1`,children:[(0,O.jsx)(n7,{className:`text-xs`,children:`Options (comma-separated)`}),(0,O.jsx)(Xf,{value:(e.options||[]).join(`, `),onChange:e=>m(t,`options`,e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)),placeholder:`Option 1, Option 2, Option 3`,"data-testid":`input-variable-options-${t}`})]}),(0,O.jsxs)(`div`,{className:`sm:col-span-2 flex items-center justify-between flex-wrap gap-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(D5,{checked:e.required||!1,onCheckedChange:e=>m(t,`required`,e),"data-testid":`switch-variable-required-${t}`}),(0,O.jsx)(n7,{className:`text-xs`,children:`Required`})]}),(0,O.jsxs)(M,{size:`sm`,variant:`ghost`,onClick:()=>p(t),"data-testid":`button-remove-variable-${t}`,children:[(0,O.jsx)(rs,{className:`w-3 h-3 mr-1`}),`Remove`]})]})]})},t))]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-3 pt-4 border-t`,children:[(0,O.jsx)(M,{onClick:()=>n(a),disabled:!a.name||!a.promptPattern||i,"data-testid":`button-save-template`,children:i?`Saving...`:`Save Template`}),(0,O.jsx)(M,{variant:`outline`,onClick:r,"data-testid":`button-cancel-template`,children:`Cancel`})]})]})}function qde(){let{toast:e}=ln(),t=Nt(),[n,r]=(0,c.useState)(``),[i,a]=(0,c.useState)(null),[o,s]=(0,c.useState)(!1),[l,u]=(0,c.useState)(null),[d,f]=(0,c.useState)(null),[p,m]=(0,c.useState)(`templates`),[h,g]=(0,c.useState)(null),[_,v]=(0,c.useState)(null),{data:y,isLoading:b}=Ef(`/api/admin/workspaces`,{queryKey:[`/api/admin/workspaces`],cache:{staleTime:6e4}}),x=y?.workspaces??[],{data:S,isLoading:C}=Ef(`/api/admin/report-templates?workspaceId=${n}`,{queryKey:[`/api/admin/report-templates`,n],queryOptions:{enabled:!!n}}),w=S?.templates??[];(0,c.useEffect)(()=>{!n&&x.length>0&&r(x[0].id)},[x,n]);let T=Yt({mutationFn:e=>yf(`POST`,`/api/admin/report-templates`,{data:{...e,workspaceId:n}}),onSuccess:()=>{t.invalidateQueries({queryKey:[`/api/admin/report-templates`,n]}),s(!1),e({title:`Template created`,description:`Report template has been saved.`})},onError:t=>{e({title:`Failed to create template`,description:t.message,variant:`destructive`})}}),E=Yt({mutationFn:({id:e,data:t})=>yf(`PATCH`,`/api/admin/report-templates/${e}`,{data:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`/api/admin/report-templates`,n]}),a(null),e({title:`Template updated`,description:`Changes have been saved.`})},onError:t=>{e({title:`Failed to update template`,description:t.message,variant:`destructive`})}}),ee=Yt({mutationFn:e=>yf(`POST`,`/api/admin/report-templates/${e}/duplicate`),onSuccess:()=>{t.invalidateQueries({queryKey:[`/api/admin/report-templates`,n]}),e({title:`Template duplicated`,description:`A copy has been created.`})},onError:t=>{e({title:`Failed to duplicate`,description:t.message,variant:`destructive`})}}),D=Yt({mutationFn:e=>yf(`DELETE`,`/api/admin/report-templates/${e}`),onSuccess:()=>{t.invalidateQueries({queryKey:[`/api/admin/report-templates`,n]}),u(null),e({title:`Template deleted`,description:`The report template has been removed.`})},onError:t=>{e({title:`Failed to delete`,description:t.message,variant:`destructive`})}}),{data:te,isLoading:ne}=Ef(`/api/admin/report-templates/reports?workspaceId=${n}`,{queryKey:[`/api/admin/report-templates/reports`,n],queryOptions:{enabled:!!n&&p===`reports`}}),re=te?.reports??[],ie=Yt({mutationFn:e=>yf(`DELETE`,`/api/admin/report-templates/reports/${e}`),onSuccess:()=>{t.invalidateQueries({queryKey:[`/api/admin/report-templates/reports`,n]}),v(null),g(null),e({title:`Report deleted`,description:`The generated report has been removed.`})},onError:t=>{e({title:`Failed to delete report`,description:t.message,variant:`destructive`})}}),ae=w.reduce((e,t)=>
496{if(!t.lastRunAt)return e;let n=typeof t.lastRunAt==`string`?t.lastRunAt:new Date(t.lastRunAt).toISOString();return e?new Date(n)>new Date(e)?n:e:n},null),oe=o||i,se=r=>{m(`reports`);let i=re.find(e=>e.id===r);i?(g(i),t.invalidateQueries({queryKey:[`/api/admin/report-templates/reports`,n]})):yf(`GET`,`/api/admin/report-templates/reports/${r}`).then(e=>{e.report&&g(e.report),t.invalidateQueries({queryKey:[`/api/admin/report-templates/reports`,n]})}).catch(t=>{console.error(`Failed to fetch report:`,t),e({title:`Failed to load report`,description:t.message??`An unexpected error occurred`,variant:`destructive`})})};return(0,O.jsxs)(`div`,{className:`p-6 max-w-4xl`,children:[(0,O.jsxs)(`div`,{className:`mb-6`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between flex-wrap gap-3 mb-1`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold`,"data-testid":`text-admin-reports-title`,children:`Reports`}),p===`templates`&&!oe&&n&&(0,O.jsxs)(M,{onClick:()=>s(!0),"data-testid":`button-create-template`,children:[(0,O.jsx)(Io,{className:`w-4 h-4 mr-1`}),`Create Template`]})]}),(0,O.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Create and manage report templates available across the platform`})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-6`,children:[(0,O.jsxs)(M,{variant:p===`templates`?`default`:`outline`,size:`sm`,onClick:()=>{m(`templates`),g(null)},"data-testid":`button-tab-templates`,children:[(0,O.jsx)(jo,{className:`w-4 h-4 mr-1`}),`Templates`]}),(0,O.jsxs)(M,{variant:p===`reports`?`default`:`outline`,size:`sm`,onClick:()=>{m(`reports`),s(!1),a(null)},"data-testid":`button-tab-reports`,children:[(0,O.jsx)(to,{className:`w-4 h-4 mr-1`}),`Generated Reports`]})]}),(0,O.jsxs)(`div`,{className:`mb-6`,children:[(0,O.jsx)(n7,{className:`text-xs text-muted-foreground mb-1 block`,children:`Workspace`}),b?(0,O.jsx)(_h,{className:`h-9 w-64`}):(0,O.jsxs)(nZ,{value:n,onValueChange:e=>{r(e),s(!1),a(null),g(null)},children:[(0,O.jsx)(iZ,{className:`w-64`,"data-testid":`select-workspace`,children:(0,O.jsx)(rZ,{placeholder:`Select workspace...`})}),(0,O.jsx)(sZ,{children:x.map(e=>(0,O.jsxs)(lZ,{value:e.id,children:[e.tenantName||e.maslowTenantName,e.tenantName&&e.maslowTenantId?` (${e.maslowTenantId})`:``]},e.id))})]})]}),n?p===`reports`?h?(0,O.jsxs)(Bf,{children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center justify-between flex-wrap gap-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(M,{size:`icon`,variant:`ghost`,onClick:()=>g(null),"data-testid":`button-back-to-reports`,children:(0,O.jsx)(Aa,{className:`w-4 h-4`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,"data-testid":`text-report-detail-title`,children:h.title}),(0,O.jsxs)(Uf,{"data-testid":`text-report-detail-date`,children:[h.createdAt?new Date(h.createdAt).toLocaleDateString(`en-US`,{year:`numeric`,month:`long`,day:`numeric`,hour:`numeric`,minute:`2-digit`}):`Unknown date`,` `,`â `,h.userName]})]})]}),(0,O.jsxs)(M,{size:`sm`,variant:`ghost`,onClick:()=>v(h),"data-testid":`button-delete-report-detail`,children:[(0,O.jsx)(rs,{className:`w-4 h-4 mr-1`}),`Delete`]})]})}),(0,O.jsx)(Wf,{children:(0,O.jsx)(`div`,{className:`prose prose-sm dark:prose-invert max-w-none prose-p:text-sm prose-headings:text-base sm:prose-headings:text-lg prose-p:leading-relaxed`,"data-testid":`text-report-detail-content`,children:(0,O.jsx)(G5,{children:h.content||`No content available.`})})})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6`,children:(0,O.jsx)(Bf,{"data-testid":`card-total-reports`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(to,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[ne?(0,O.jsx)(_h,{className:`h-7 w-12 mb-1`}):(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-total-reports`,children:re.length}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Generated Reports`})]})]})})})}),(0,O.jsxs)(Bf,{"data-testid":`card-reports-list`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(Xa,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Report History`}),(0,O.jsx)(Uf,{children:`Previously generated reports for this workspace`})]})]})}),(0,O.jsx)(Wf,{children:ne?(0,O.jsx)(`div`,{className:`space-y-3`,children:[1,2,3].map(e=>(0,O.jsx)(_h,{className:`h-12 w-full`},e))}):re.length===0?(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 gap-3`,children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No reports generated yet. Run a template to create your first report.`}),(0,O.jsxs)(M,{variant:`outline`,onClick:()=>m(`templates`),"data-testid":`button-go-to-templates`,children:[(0,O.jsx)(jo,{className:`w-4 h-4 mr-1`}),`View Templates`]})]}):(0,O.jsxs)(W9,{"data-testid":`table-reports`,children:[(0,O.jsx)(G9,{children:(0,O.jsxs)(q9,{children:[(0,O.jsx)(J9,{children:`Title`}),(0,O.jsx)(J9,{className:`hidden sm:table-cell`,children:`Generated`}),(0,O.jsx)(J9,{className:`hidden md:table-cell`,children:`By`}),(0,O.jsx)(J9,{className:`text-right`,children:`Actions`})]})}),(0,O.jsx)(K9,{children:re.map(e=>(0,O.jsxs)(q9,{"data-testid":`row-report-${e.id}`,children:[(0,O.jsx)(Y9,{children:(0,O.jsx)(`button`,{className:`text-left hover-elevate rounded-md px-1 -mx-1`,onClick:()=>g(e),"data-testid":`text-report-title-${e.id}`,children:(0,O.jsx)(`span`,{className:`font-medium`,children:e.title})})}),(0,O.jsx)(Y9,{className:`hidden sm:table-cell text-muted-foreground text-sm`,"data-testid":`text-report-date-${e.id}`,children:Z9(e.createdAt)}),(0,O.jsx)(Y9,{className:`hidden md:table-cell text-muted-foreground text-sm`,"data-testid":`text-report-author-${e.id}`,children:e.userName}),(0,O.jsx)(Y9,{children:(0,O.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,O.jsx)(M,{size:`icon`,variant:`ghost`,onClick:()=>g(e),"data-testid":`button-view-report-${e.id}`,title:`View Report`,children:(0,O.jsx)(Ja,{className:`w-4 h-4`})}),(0,O.jsx)(M,{size:`icon`,variant:`ghost`,onClick:()=>v(e),"data-testid":`button-delete-report-${e.id}`,title:`Delete`,children:(0,O.jsx)(rs,{className:`w-4 h-4`})})]})})]},e.id))})]})})]})]}):oe?(0,O.jsxs)(Bf,{children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(M,{size:`icon`,variant:`ghost`,onClick:()=>{s(!1),a(null)},"data-testid":`button-back-to-list`,children:(0,O.jsx)(Aa,{className:`w-4 h-4`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:i?`Edit Template`:`Create Template`}),(0,O.jsx)(Uf,{children:i?`Editing "${i.name}"`:`Define a new report template`})]})]})}),(0,O.jsx)(Wf,{children:(0,O.jsx)(Kde,{initialData:i?{name:i.name,description:i.description||``,promptPattern:i.promptPattern,dataSources:i.dataSources,outputStructure:i.outputStructure||{},variables:i.variables||[]}:Gde,workspaceId:n,onSave:e=>{i?E.mutate({id:i.id,data:e}):T.mutate(e)},onCancel:()=>{s(!1),a(null)},isSaving:T.isPending||E.isPending})})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6`,children:[(0,O.jsx)(Bf,{"data-testid":`card-total-templates`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(jo,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[C?(0,O.jsx)(_h,{className:`h-7 w-12 mb-1`}):(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-total-templates`,children:w.length}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Total Templates`})]})]})})}),(0,O.jsx)(Bf,{"data-testid":`card-last-run`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(za,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[C?(0,O.jsx)(_h,{className:`h-7 w-20 mb-1`}):(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-last-run`,children:Z9(ae)}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Last Report Run`})]})]})})})]}),(0,O.jsxs)(Bf,{"data-testid":`card-template-list`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(Xa,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Template Library`}),(0,O.jsx)(Uf,{children:`Design, publish, and manage report templates`})]})]})}),(0,O.jsx)(Wf,{children:C?(0,O.jsx)(`div`,{className:`space-y-3`,children:[1,2,3].map(e=>(0,O.jsx)(_h,{className:`h-12 w-full`},e))}):w.length===0?(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 gap-3`,children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No templates yet. Create one to get started.`}),(0,O.jsxs)(M,{variant:`outline`,onClick:()=>s(!0),"data-testid":`button-create-first-template`,children:[(0,O.jsx)(Io,{
496className:`w-4 h-4 mr-1`}),`Create Template`]})]}):(0,O.jsxs)(W9,{"data-testid":`table-templates`,children:[(0,O.jsx)(G9,{children:(0,O.jsxs)(q9,{children:[(0,O.jsx)(J9,{children:`Name`}),(0,O.jsx)(J9,{className:`hidden sm:table-cell`,children:`Created By`}),(0,O.jsx)(J9,{className:`hidden md:table-cell`,children:`Last Run`}),(0,O.jsx)(J9,{className:`text-right`,children:`Actions`})]})}),(0,O.jsx)(K9,{children:w.map(e=>(0,O.jsxs)(q9,{"data-testid":`row-template-${e.id}`,children:[(0,O.jsx)(Y9,{children:(0,O.jsxs)(`button`,{className:`text-left hover-elevate rounded-md px-1 -mx-1`,onClick:()=>a(e),"data-testid":`text-template-name-${e.id}`,children:[(0,O.jsx)(`span`,{className:`font-medium`,children:e.name}),e.description&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground truncate max-w-[200px]`,children:e.description})]})}),(0,O.jsx)(Y9,{className:`hidden sm:table-cell text-muted-foreground text-sm`,"data-testid":`text-template-created-by-${e.id}`,children:e.createdByName}),(0,O.jsx)(Y9,{className:`hidden md:table-cell text-muted-foreground text-sm`,"data-testid":`text-template-last-run-${e.id}`,children:Z9(e.lastRunAt)}),(0,O.jsx)(Y9,{children:(0,O.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,O.jsx)(M,{size:`icon`,variant:`ghost`,onClick:()=>f(e),"data-testid":`button-run-template-${e.id}`,title:`Run Report`,children:(0,O.jsx)(Fo,{className:`w-4 h-4`})}),(0,O.jsx)(M,{size:`icon`,variant:`ghost`,onClick:()=>ee.mutate(e.id),"data-testid":`button-duplicate-template-${e.id}`,title:`Duplicate`,children:(0,O.jsx)(Ba,{className:`w-4 h-4`})}),(0,O.jsx)(M,{size:`icon`,variant:`ghost`,onClick:()=>u(e),"data-testid":`button-delete-template-${e.id}`,title:`Delete`,children:(0,O.jsx)(rs,{className:`w-4 h-4`})})]})})]},e.id))})]})})]})]}):(0,O.jsx)(`div`,{className:`flex items-center justify-center py-16 text-sm text-muted-foreground`,children:`Select a workspace to manage reports.`}),(0,O.jsx)(a2,{open:!!l,onOpenChange:()=>u(null),children:(0,O.jsxs)(l2,{"data-testid":`dialog-delete-confirm`,children:[(0,O.jsxs)(u2,{children:[(0,O.jsx)(f2,{children:`Delete Template`}),(0,O.jsxs)(p2,{children:[`Are you sure you want to delete "`,l?.name,`"? This action cannot be undone.`]})]}),(0,O.jsxs)(d2,{children:[(0,O.jsx)(h2,{"data-testid":`button-delete-cancel`,children:`Cancel`}),(0,O.jsx)(m2,{onClick:()=>l&&D.mutate(l.id),"data-testid":`button-delete-confirm`,children:`Delete`})]})]})}),(0,O.jsx)(a2,{open:!!_,onOpenChange:()=>v(null),children:(0,O.jsxs)(l2,{"data-testid":`dialog-delete-report-confirm`,children:[(0,O.jsxs)(u2,{children:[(0,O.jsx)(f2,{children:`Delete Report`}),(0,O.jsxs)(p2,{children:[`Are you sure you want to delete "`,_?.title,`"? This action cannot be undone.`]})]}),(0,O.jsxs)(d2,{children:[(0,O.jsx)(h2,{"data-testid":`button-delete-report-cancel`,children:`Cancel`}),(0,O.jsx)(m2,{onClick:()=>_&&ie.mutate(_.id),"data-testid":`button-delete-report-confirm`,children:`Delete`})]})]})}),d&&(0,O.jsx)(X9,{template:d,workspaceId:n,onClose:()=>{f(null),t.invalidateQueries({queryKey:[`/api/admin/report-templates`,n]})},onViewReport:e=>{f(null),t.invalidateQueries({queryKey:[`/api/admin/report-templates`,n]}),se(e)}})]})}function Jde(e){if(!e)return`Never`;let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4),i=Math.floor(r/60),a=Math.floor(i/24);return r<1?`Just now`:r<60?`${r}m ago`:i<24?`${i}h ago`:a<7?`${a}d ago`:t.toLocaleDateString()}function Q9({field:e,sortField:t,sortDirection:n}){return e===t?n===`asc`?(0,O.jsx)(ha,{className:`w-3 h-3 ml-1`}):(0,O.jsx)(fa,{className:`w-3 h-3 ml-1`}):(0,O.jsx)(ma,{className:`w-3 h-3 ml-1 opacity-40`})}function Yde(){let[e,t]=(0,c.useState)(`30`),[n,r]=(0,c.useState)(``),[i,a]=(0,c.useState)(`totalTokens`),[o,s]=(0,c.useState)(`desc`),{data:l,isLoading:u,error:d}=Ef(`/api/admin/usage/overview?days=${e}`,{queryKey:[`/api/admin/usage/overview`,e],cache:{staleTime:6e4}}),{data:f,isLoading:p,error:m}=Ef(`/api/admin/usage/summary?days=${e}`,{queryKey:[`/api/admin/usage/summary`,e],cache:{staleTime:6e4}}),{data:h,isLoading:g,error:_}=Ef(`/api/admin/usage/providers?days=${e}`,{queryKey:[`/api/admin/usage/providers`,e],cache:{staleTime:6e4}}),v=e=>{i===e?s(e=>e===`asc`?`desc`:`asc`):(a(e),s(e===`displayName`?`asc`:`desc`))},y=(0,c.useMemo)(()=>
496{if(!f?.users)return[];let e=[...f.users];if(n.trim()){let t=n.toLowerCase();e=e.filter(e=>e.displayName.toLowerCase().includes(t)||e.email&&e.email.toLowerCase().includes(t))}return e.sort((e,t)=>{let n=0;switch(i){case`displayName`:n=e.displayName.localeCompare(t.displayName);break;case`chatMessageCount`:n=e.chatMessageCount-t.chatMessageCount;break;case`notebookCreatedCount`:n=e.notebookCreatedCount-t.notebookCreatedCount;break;case`totalTokens`:n=e.totalTokens-t.totalTokens;break;case`lastActiveAt`:{let r=e.lastActiveAt?new Date(e.lastActiveAt).getTime():0,i=t.lastActiveAt?new Date(t.lastActiveAt).getTime():0;n=!e.lastActiveAt&&!t.lastActiveAt?0:e.lastActiveAt?t.lastActiveAt?r-i:1:-1;break}}return o===`asc`?n:-n}),e},[f?.users,n,i,o]),b=(0,c.useMemo)(()=>f?.users?[...f.users].sort((e,t)=>t.totalTokens-e.totalTokens).slice(0,5):[],[f?.users]),x=e===`7`?`7 days`:e===`30`?`30 days`:`90 days`;return(0,O.jsxs)(`div`,{className:`p-6 max-w-6xl`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between flex-wrap gap-3 mb-8`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold`,"data-testid":`text-admin-usage-title`,children:`Usage Tracking`}),(0,O.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Monitor platform usage across all users`})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`div`,{className:`flex gap-1`,children:[`7`,`30`,`90`].map(n=>(0,O.jsxs)(M,{variant:e===n?`default`:`outline`,size:`sm`,onClick:()=>t(n),"data-testid":`button-admin-range-${n}`,children:[n,`d`]},n))}),(0,O.jsxs)(M,{variant:`outline`,size:`sm`,onClick:()=>{if(!y.length)return;let e=[`Name`,`Email`,`Chats`,`Notebooks`,`Input Tokens`,`Output Tokens`,`Total Tokens`,`Last Active`],t=y.map(e=>[e.displayName,e.email||``,e.chatMessageCount,e.notebookCreatedCount,e.totalInputTokens,e.totalOutputTokens,e.totalTokens,e.lastActiveAt||`Never`]),n=e=>{let t=String(e);return t.includes(`,`)||t.includes(`"`)||t.includes(` 497`)?`"${t.replace(/"/g,`""`)}"`:t},r=[e.map(n).join(`,`),...t.map(e=>e.map(n).join(`,`))].join(` 498`),i=new Blob([r],{type:`text/csv;charset=utf-8;`}),a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=`usage-${x.replace(` `,`-`)}.csv`,o.click(),URL.revokeObjectURL(a)},disabled:p||!y.length,"data-testid":`button-export-csv`,children:[(0,O.jsx)(Ua,{className:`w-4 h-4 mr-1.5`}),`Export CSV`]})]})]}),d&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive mb-4`,"data-testid":`text-overview-error`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load usage overview`})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6`,children:[(0,O.jsx)(Bf,{"data-testid":`card-total-chats`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(To,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[u?(0,O.jsx)(_h,{className:`h-7 w-16 mb-1`}):(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-total-chats`,children:l?V9(l.overview.totalChatMessages):`--`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Chat Messages`})]})]})})}),(0,O.jsx)(Bf,{"data-testid":`card-total-tokens`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(fs,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[u?(0,O.jsx)(_h,{className:`h-7 w-16 mb-1`}):(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-total-tokens`,children:l?V9(l.overview.totalTokens):`--`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`AI Tokens Used`})]})]})})}),(0,O.jsx)(Bf,{"data-testid":`card-total-notebooks`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(ba,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[u?(0,O.jsx)(_h,{className:`h-7 w-16 mb-1`}):(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-total-notebooks`,children:l?V9(l.overview.totalNotebooksCreated):`--`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Notebooks Created`})]})]})})}),(0,O.jsx)(Bf,{"data-testid":`card-unique-users`,children:(0,O.jsx)(Wf,{className:`pt-6`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(us,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[u?(0,O.jsx)(_h,{className:`h-7 w-16 mb-1`}):(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,"data-testid":`text-unique-users`,children:l?l.overview.uniqueUsers:`--`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Active Users`})]})]})})})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6`,children:[(0,O.jsxs)(Bf,{className:`lg:col-span-1`,"data-testid":`card-top-users`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(as,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Top Users by Tokens`}),(0,O.jsxs)(Uf,{children:[`Last `,x]})]})]})}),(0,O.jsx)(Wf,{children:p?(0,O.jsx)(`div`,{className:`space-y-3`,children:[...[,,,,,]].map((e,t)=>(0,O.jsx)(_h,{className:`h-8 w-full`},t))}):m?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load`})]}):b.length===0?(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground py-4`,children:`No usage data for this period`}):(0,O.jsx)(`div`,{className:`space-y-2`,children:b.map((e,t)=>(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2 py-1.5`,"data-testid":`top-user-${t}`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,O.jsx)(qf,{variant:`secondary`,className:`text-xs shrink-0`,children:t+1}),(0,O.jsx)(`span`,{className:`text-sm truncate`,"data-testid":`text-top-user-name-${t}`,children:e.displayName})]}),(0,O.jsx)(`span`,{className:`text-sm font-medium tabular-nums shrink-0`,"data-testid":`text-top-user-tokens-${t}`,children:V9(e.totalTokens)})]}
498,e.userId))})})]}),(0,O.jsxs)(Bf,{className:`lg:col-span-2`,"data-testid":`card-provider-breakdown`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(mo,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Usage by Model`}),(0,O.jsxs)(Uf,{children:[`Token consumption per AI model â last `,x]})]})]})}),(0,O.jsx)(Wf,{children:g?(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsx)(_h,{className:`h-8 w-full`}),(0,O.jsx)(_h,{className:`h-8 w-full`})]}):_?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load`})]}):h?.providers?.length?(0,O.jsx)(`div`,{className:`space-y-3`,children:(()=>{let e=h.providers.reduce((e,t)=>e+t.totalTokens,0);return h.providers.map(t=>{let n=e>0?Math.round(t.totalTokens/e*100):0;return(0,O.jsxs)(`div`,{className:`space-y-1.5`,"data-testid":`provider-row-${t.provider}-${t.model}`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,O.jsx)(qf,{variant:`outline`,className:`text-xs shrink-0`,"data-testid":`badge-provider-${t.provider}`,children:z9(t.provider)}),(0,O.jsx)(`span`,{className:`text-sm truncate`,"data-testid":`text-model-name-${t.provider}-${t.model}`,children:B9(t.model)})]}),(0,O.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,O.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,"data-testid":`text-model-calls-${t.provider}-${t.model}`,children:[V9(t.callCount),` calls`]}),(0,O.jsxs)(`span`,{className:`text-sm font-medium tabular-nums`,"data-testid":`text-model-tokens-${t.provider}-${t.model}`,children:[V9(t.totalTokens),` tokens`]})]})]}),(0,O.jsx)(`div`,{className:`h-1.5 bg-muted rounded-full overflow-hidden`,children:(0,O.jsx)(`div`,{className:`h-full bg-primary rounded-full transition-all`,style:{width:`${n}%`},"data-testid":`bar-model-${t.provider}-${t.model}`})}),(0,O.jsxs)(`p`,{className:`text-xs text-muted-foreground tabular-nums`,children:[V9(t.totalInputTokens),` in /`,` `,V9(t.totalOutputTokens),` out (`,n,`%)`]})]},`${t.provider}-${t.model}`)})})()}):(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground py-4`,children:`No model usage data for this period`})})]})]}),(0,O.jsx)(`div`,{className:`mb-6`,children:(0,O.jsxs)(Bf,{"data-testid":`card-token-breakdown`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(fs,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Token Breakdown`}),(0,O.jsxs)(Uf,{children:[`Input vs output tokens â last `,x]})]})]})}),(0,O.jsx)(Wf,{children:u?(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsx)(_h,{className:`h-8 w-full`}),(0,O.jsx)(_h,{className:`h-8 w-full`})]}):d?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load`})]}):l?(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-3 gap-4`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground mb-1`,children:`Input Tokens`}),(0,O.jsx)(`p`,{className:`text-xl font-semibold`,"data-testid":`text-input-tokens`,children:V9(l.overview.totalInputTokens)})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground mb-1`,children:`Output Tokens`}),(0,O.jsx)(`p`,{className:`text-xl font-semibold`,"data-testid":`text-output-tokens`,children:V9(l.overview.totalOutputTokens)})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground mb-1`,children:`LLM Calls`}),(0,O.jsx)(`p`,{className:`text-xl font-semibold`,"data-testid":`text-llm-calls`,children:V9(l.overview.totalLlmCalls)})]})]}),l.overview.totalTokens>0&&(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`flex justify-between gap-2 text-xs text-muted-foreground mb-1`,children:[(0,O.jsxs)(`span`,{children:[`Input (`,Math.round(l.overview.totalInputTokens/l.overview.totalTokens*100),`%)`]}),(0,O.jsxs)(`span`,{children:[`Output (`,Math.round(l.overview.totalOutputTokens/l.overview.totalTokens*100),`%)`]})]}),(0,O.jsx)(`div`,{className:`h-2 bg-muted rounded-full overflow-hidden`,children:(0,O.jsx)(`div`,{className:`h-full bg-primary rounded-full transition-all`,style:{width:`${l.overview.totalInputTokens/l.overview.totalTokens*100}%`},"data-testid":`bar-input-ratio`})})]})]}):null})]})}),(0,O.jsxs)(Bf,{"data-testid":`card-user-table`,children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center justify-between flex-wrap gap-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(us,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Per-User Breakdown`}),(0,O.jsxs)(Uf,{children:[`All user activity â last `,x]})]})]}),(0,O.jsxs)(`div`,{className:`relative w-full sm:w-64`,children:[(0,O.jsx)(Ho,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground`}),(0,O.jsx)(Xf,{placeholder:`Search by name or email...`,value:n,onChange:e=>r(e.target.value),className:`pl-9`,"data-testid":`input-user-search`})]})]})}),(0,O.jsx)(Wf,{children:p?(0,O.jsx)(`div`,{className:`space-y-3`,children:[...[,,,,,]].map((e,t)=>(0,O.jsx)(_h,{className:`h-10 w-full`},t))}):m?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load user data`})]}):y.length===0?(0,O.jsx)(`div`,{className:`text-center py-8`,children:(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`text-no-users`,children:n?`No users match your search`:`No usage data for this period`})}):(0,O.jsxs)(W9,{children:[(0,O.jsx)(G9,{children:(0,O.jsxs)(q9,{children:[(0,O.jsx)(J9,{children:(0,O.jsxs)(`button`,{className:`flex items-center text-xs font-medium`,onClick:()=>v(`displayName`),"data-testid":`sort-name`,children:[`User`,(0,O.jsx)(Q9,{field:`displayName`,
498sortField:i,sortDirection:o})]})}),(0,O.jsx)(J9,{className:`text-right`,children:(0,O.jsxs)(`button`,{className:`flex items-center text-xs font-medium ml-auto`,onClick:()=>v(`chatMessageCount`),"data-testid":`sort-chats`,children:[`Chats`,(0,O.jsx)(Q9,{field:`chatMessageCount`,sortField:i,sortDirection:o})]})}),(0,O.jsx)(J9,{className:`text-right`,children:(0,O.jsxs)(`button`,{className:`flex items-center text-xs font-medium ml-auto`,onClick:()=>v(`notebookCreatedCount`),"data-testid":`sort-notebooks`,children:[`Notebooks`,(0,O.jsx)(Q9,{field:`notebookCreatedCount`,sortField:i,sortDirection:o})]})}),(0,O.jsx)(J9,{className:`text-right`,children:(0,O.jsxs)(`button`,{className:`flex items-center text-xs font-medium ml-auto`,onClick:()=>v(`totalTokens`),"data-testid":`sort-tokens`,children:[`Tokens`,(0,O.jsx)(Q9,{field:`totalTokens`,sortField:i,sortDirection:o})]})}),(0,O.jsx)(J9,{className:`text-right`,children:(0,O.jsxs)(`button`,{className:`flex items-center text-xs font-medium ml-auto`,onClick:()=>v(`lastActiveAt`),"data-testid":`sort-last-active`,children:[`Last Active`,(0,O.jsx)(Q9,{field:`lastActiveAt`,sortField:i,sortDirection:o})]})})]})}),(0,O.jsx)(K9,{children:y.map(e=>(0,O.jsxs)(q9,{"data-testid":`row-user-${e.userId}`,children:[(0,O.jsx)(Y9,{children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium text-sm`,children:e.displayName}),e.email&&(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.email})]})}),(0,O.jsx)(Y9,{className:`text-right tabular-nums`,children:e.chatMessageCount}),(0,O.jsx)(Y9,{className:`text-right tabular-nums`,children:e.notebookCreatedCount}),(0,O.jsx)(Y9,{className:`text-right`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`font-medium tabular-nums`,children:V9(e.totalTokens)}),(0,O.jsxs)(`p`,{className:`text-xs text-muted-foreground tabular-nums`,children:[V9(e.totalInputTokens),` in /`,` `,V9(e.totalOutputTokens),` out`]})]})}),(0,O.jsx)(Y9,{className:`text-right text-sm text-muted-foreground`,children:Jde(e.lastActiveAt)})]},e.userId))})]})})]})]})}var Xde=`.pdf,.docx,.txt,.md`;function Zde(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function Qde(e){switch(e){case`ready`:return(0,O.jsx)(qf,{variant:`default`,children:`Ready`});case`processing`:return(0,O.jsxs)(qf,{variant:`outline`,className:`border-amber-500 text-amber-600`,children:[(0,O.jsx)(vo,{className:`w-3 h-3 mr-1 animate-spin`}),`Processing`]});case`pending`:return(0,O.jsxs)(qf,{variant:`outline`,children:[(0,O.jsx)(vo,{className:`w-3 h-3 mr-1 animate-spin`}),`Pending`]});case`failed`:return(0,O.jsx)(qf,{variant:`destructive`,children:`Failed`});default:return(0,O.jsx)(qf,{variant:`outline`,children:e})}}function $de(){let{toast:e}=ln(),t=Nt(),[n,r]=(0,c.useState)(``),[i,a]=(0,c.useState)(`createdAt`),[o,s]=(0,c.useState)(`desc`),{data:l,isLoading:u,error:d}=Ef(`/api/admin/core-documents`,{queryKey:[`/api/admin/core-documents`],cache:{staleTime:5e3},queryOptions:{refetchInterval:e=>e.state.data?.documents?.some(e=>e.status===`pending`||e.status===`processing`)?5e3:!1}}),f=Yt({mutationFn:async e=>{let t=new FormData;return t.append(`file`,e),yf(`POST`,`/api/admin/core-documents`,{data:t})},onSuccess:()=>{t.invalidateQueries({queryKey:[`/api/admin/core-documents`]}),e({title:`Upload started`,description:`Document is being processed.`})},onError:t=>{e({title:`Upload failed`,description:t instanceof Error?t.message:`Could not upload document.`,variant:`destructive`})}}),p=Yt({mutationFn:async e=>yf(`DELETE`,`/api/admin/core-documents/${e}`),onSuccess:()=>{t.invalidateQueries({queryKey:[`/api/admin/core-documents`]}),e({title:`Document deleted`,description:`Document and all associated chunks have been removed.`})},onError:()=>{e({title:`Delete failed`,description:`Could not delete document.`,variant:`destructive`})}}),m=e=>{let t=e.target.files?.[0];t&&(f.mutate(t),e.target.value=``)},h=l?.documents??[],g=l?.stats??{totalDocuments:0,totalChunks:0},_=e=>{i===e?s(e=>e===`asc`?`desc`:`asc`):(a(e),s(e===`filename`?`asc`:`desc`))},v=(0,c.useMemo)(()=>
498{if(h.length===0)return h;let e=n.trim().toLowerCase(),t=e?h.filter(t=>t.filename.toLowerCase().includes(e)):h,r=o===`asc`?1:-1;return[...t].sort((e,t)=>{switch(i){case`filename`:return r*e.filename.localeCompare(t.filename);case`status`:return r*e.status.localeCompare(t.status);case`chunkCount`:return r*((e.chunkCount??0)-(t.chunkCount??0));case`fileSize`:return r*(e.fileSize-t.fileSize);case`createdAt`:return r*(new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime());default:return 0}})},[h,n,i,o]),y=({column:e})=>i===e?o===`asc`?(0,O.jsx)(ha,{className:`w-3 h-3 ml-1`}):(0,O.jsx)(fa,{className:`w-3 h-3 ml-1`}):(0,O.jsx)(ma,{className:`w-3 h-3 ml-1 opacity-40`});return(0,O.jsxs)(`div`,{className:`p-6 container mx-auto`,children:[(0,O.jsxs)(`div`,{className:`mb-8`,children:[(0,O.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Core Documents`}),(0,O.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Manage the knowledge base for Ask Maslow (Industry Insights)`})]}),(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsx)(Bf,{children:(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(Sa,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Ask Maslow Settings`}),(0,O.jsx)(Uf,{children:`Configure the AI model and creativity level for Industry Insights`})]})]})})}),(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,O.jsx)(Bf,{children:(0,O.jsxs)(Wf,{className:`flex items-center gap-3 pt-6`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(to,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,children:g.totalDocuments}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Documents`})]})]})}),(0,O.jsx)(Bf,{children:(0,O.jsxs)(Wf,{className:`flex items-center gap-3 pt-6`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(Ha,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-2xl font-semibold`,children:g.totalChunks.toLocaleString()}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Chunks`})]})]})})]}),(0,O.jsxs)(Bf,{children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(os,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Upload Document`}),(0,O.jsx)(Uf,{children:`Add a document to the Ask Maslow knowledge base. Supported: PDF, DOCX, TXT, Markdown.`})]})]})}),(0,O.jsx)(Wf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsxs)(`label`,{htmlFor:`core-doc-upload`,className:`inline-flex items-center gap-2 px-4 py-2 rounded-md border text-sm font-medium cursor-pointer transition-colors hover:bg-accent ${f.isPending?`opacity-60 pointer-events-none`:``}`,children:[f.isPending?(0,O.jsx)(vo,{className:`w-4 h-4 animate-spin`}):(0,O.jsx)(os,{className:`w-4 h-4`}),f.isPending?`Uploading...`:`Choose File`]}),(0,O.jsx)(`input`,{id:`core-doc-upload`,type:`file`,accept:Xde,onChange:m,disabled:f.isPending,className:`sr-only`}),(0,O.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Max 50 MB`})]})})]}),(0,O.jsxs)(Bf,{children:[(0,O.jsx)(Vf,{children:(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`p-2 bg-muted rounded-md`,children:(0,O.jsx)(ba,{className:`w-5 h-5`})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(Hf,{className:`text-base`,children:`Document Library`}),(0,O.jsx)(Uf,{children:`All documents in the Ask Maslow corpus`})]})]})}),(0,O.jsxs)(Wf,{children:[h.length>0&&(0,O.jsxs)(`div`,{className:`relative mb-4 max-w-sm`,children:[(0,O.jsx)(Ho,{className:`absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground`}),(0,O.jsx)(Xf,{placeholder:`Search by filename...`,value:n,onChange:e=>r(e.target.value),className:`pl-9 pr-8`}),n&&(0,O.jsx)(`button`,{onClick:()=>r(``),className:`absolute right-2.5 top-2.5 text-muted-foreground hover:text-foreground`,children:(0,O.jsx)(ds,{className:`h-4 w-4`})})]}),d?(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-destructive`,children:[(0,O.jsx)(Pa,{className:`w-4 h-4`}),(0,O.jsx)(`p`,{children:`Failed to load documents`})]}):u?(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsx)(_h,{className:`h-10 w-full`}),(0,O.jsx)(_h,{className:`h-10 w-full`}),(0,O.jsx)(_h,{className:`h-10 w-full`})]}):v.length===0&&!n?(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground text-center py-8`,children:`No documents uploaded yet. Upload your first document above.`}):v.length===0?(0,O.jsxs)(`p`,{className:`text-sm text-muted-foreground text-center py-8`,children:[`No documents match "`,n,`"`]}):(0,O.jsxs)(W9,{children:[(0,O.jsx)(G9,{children:(0,O.jsxs)(q9,{children:[(0,O.jsx)(J9,{className:`curs
498or-pointer select-none`,onClick:()=>_(`filename`),children:(0,O.jsxs)(`span`,{className:`inline-flex items-center`,children:[`Filename`,(0,O.jsx)(y,{column:`filename`})]})}),(0,O.jsx)(J9,{className:`cursor-pointer select-none`,onClick:()=>_(`status`),children:(0,O.jsxs)(`span`,{className:`inline-flex items-center`,children:[`Status`,(0,O.jsx)(y,{column:`status`})]})}),(0,O.jsx)(J9,{className:`cursor-pointer select-none text-right`,onClick:()=>_(`chunkCount`),children:(0,O.jsxs)(`span`,{className:`inline-flex items-center justify-end w-full`,children:[`Chunks`,(0,O.jsx)(y,{column:`chunkCount`})]})}),(0,O.jsx)(J9,{className:`cursor-pointer select-none text-right`,onClick:()=>_(`fileSize`),children:(0,O.jsxs)(`span`,{className:`inline-flex items-center justify-end w-full`,children:[`Size`,(0,O.jsx)(y,{column:`fileSize`})]})}),(0,O.jsx)(J9,{className:`cursor-pointer select-none`,onClick:()=>_(`createdAt`),children:(0,O.jsxs)(`span`,{className:`inline-flex items-center`,children:[`Uploaded`,(0,O.jsx)(y,{column:`createdAt`})]})}),(0,O.jsx)(J9,{className:`w-[60px]`})]})}),(0,O.jsx)(K9,{children:v.map(e=>(0,O.jsxs)(q9,{children:[(0,O.jsx)(Y9,{className:`font-medium max-w-[200px] truncate`,title:e.filename,children:e.filename}),(0,O.jsx)(Y9,{children:(0,O.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[Qde(e.status),e.status===`failed`&&e.errorMessage&&(0,O.jsx)(`span`,{className:`text-xs text-destructive`,title:e.errorMessage,children:e.errorMessage.length>50?`${e.errorMessage.slice(0,50)}...`:e.errorMessage})]})}),(0,O.jsx)(Y9,{className:`text-right`,children:e.chunkCount??`-`}),(0,O.jsx)(Y9,{className:`text-right`,children:Zde(e.fileSize)}),(0,O.jsx)(Y9,{className:`text-muted-foreground text-sm`,children:new Date(e.createdAt).toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})}),(0,O.jsx)(Y9,{children:(0,O.jsxs)(a2,{children:[(0,O.jsx)(o2,{asChild:!0,children:(0,O.jsx)(M,{variant:`ghost`,size:`icon`,className:`h-8 w-8 text-muted-foreground hover:text-destructive`,disabled:p.isPending,children:(0,O.jsx)(rs,{className:`w-4 h-4`})})}),(0,O.jsxs)(l2,{children:[(0,O.jsxs)(u2,{children:[(0,O.jsx)(f2,{children:`Delete Document`}),(0,O.jsxs)(p2,{children:[`This will permanently delete`,` `,(0,O.jsx)(`strong`,{children:e.filename}),` and all its`,` `,e.chunkCount??0,` chunks from the knowledge base. This action cannot be undone.`]})]}),(0,O.jsxs)(d2,{children:[(0,O.jsx)(h2,{children:`Cancel`}),(0,O.jsx)(m2,{onClick:()=>p.mutate(e.id),className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:`Delete`})]})]})]})})]},e.id))})]})]})]})]})]})}function $9(){return(0,O.jsxs)(ye,{children:[(0,O.jsx)(ge,{path:`/admin/settings`,component:Ide}),(0,O.jsx)(ge,{path:`/admin/users`,component:Hde}),(0,O.jsx)(ge,{path:`/admin/workspaces`,component:Ude}),(0,O.jsx)(ge,{path:`/admin/reports`,component:qde}),(0,O.jsx)(ge,{path:`/admin/usage`,component:Yde}),(0,O.jsx)(ge,{path:`/admin/core-documents`,component:$de}),(0,O.jsx)(ge,{path:`/admin`,children:(0,O.jsx)(be,{to:`/admin/settings`})}),(0,O.jsx)(ge,{component:L9})]})}function efe(){return(0,O.jsxs)(ye,{children:[(0,O.jsx)(ge,{path:`/dashboard`,component:_0}),(0,O.jsx)(ge,{path:`/search`,component:b0}),(0,O.jsx)(ge,{path:`/inbox`,component:T0}),(0,O.jsx)(ge,{path:`/artifacts`,component:A0}),(0,O.jsx)(ge,{path:`/ai-content`,children:(0,O.jsx)(be,{to:`/artifacts`})}),(0,O.jsx)(ge,{path:`/documents`,children:(0,O.jsx)(be,{to:`/artifacts`})}),(0,O.jsx)(ge,{path:`/notebooks`,component:_2}),(0,O.jsx)(ge,{path:`/notebooks/new`,component:Que}),(0,O.jsx)(ge,{path:`/notebooks/:id`,component:Zue}),(0,O.jsx)(ge,{path:`/workspace`,component:tde}),(0,O.jsx)(ge,{path:`/connections`,component:sde}),(0,O.jsx)(ge,{path:`/settings`,component:yde}),(0,O.jsx)(ge,{path:`/account`,component:Fde}),(0,O.jsx)(ge,{component:L9})]})}function tfe(){return(0,O.jsx)(Pt,{client:Xt,children:(0,O.jsx)(tf,{children:(0,O.jsx)(uf,{children:(0,O.jsx)(iee,{children:(0,O.jsx)(wf,{children:(0,O.jsx)(aee,{children:(0,O.jsxs)(Rd,{children:[(0,O.jsxs)(ye,{children:[(0,O.jsx)(ge,{path:`/`,component:Iee}),(0,O.jsx)(ge,{path:`/login`,component:bde}),(0,O.jsx)(ge,{path:`/auth/callback`,component:xde}),(0,O.jsx)(ge,{path:`/industry-insights`,component:OZ}),(0,O.jsx)(ge,{path:`/admin`,children:(0,O.jsx)(zf,{children:(0,O.jsx)(R9,{children:(0,O.jsx)($9,{})})})}),(0,O.jsx)(ge,{path:`/admin/:rest*`,children:(0,O.jsx)(zf,{children:(0,O.jsx)(R9,{children:(0,O.jsx)($9,{})})})}),(0,O.jsx)(ge,{children:(0,O.jsx)(zf,{children:(0,O.jsx)(Ode,{children:(0,O.jsx)(efe,{})})})})]}),(0,O.jsx)(vc,{}),(0,O.jsx)(mf,{})]})})})})})})})}(0,n((e=>{var t=pn();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot}))().createRoot)(document.getElementById(`root`)).render((0,O.jsx)(tfe,{}));export{jt as _,Fz as a,TA as c,B_ as d,Gg as f,Fg as g,zg as h,Iz as i,fw as l,Rg as m,Rz as n,jz as o,Vg as p,dV as r,eI as s,oV as t,cw as u,a as v};
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.